aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-03-30 05:49:37 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-03 14:48:52 +0000
commit838df4eec4496868e772d5708e00f38bad478718 (patch)
tree89e72bb0b9668ff4005156d590465602589ec4c3 /vendor
parentf41dc0b2580ae83129264edbe45b92231bd119a2 (diff)
downloadpodman-838df4eec4496868e772d5708e00f38bad478718.tar.gz
podman-838df4eec4496868e772d5708e00f38bad478718.tar.bz2
podman-838df4eec4496868e772d5708e00f38bad478718.zip
Vendor in latest containers/image
Some more features. docker-archive generates docker legacy compatible images Do not create $DiffID subdirectories for layers with no configs Ensure the layer IDs in legacy docker/tarfile metadata are unique docker-archive: repeated layers are symlinked in the tar file sysregistries: remove all trailing slashes Improve docker/* error messages Fix failure to make auth directory Create a new slice in Schema1.UpdateLayerInfos Drop unused storageImageDestination.{image,systemContext} Load a *storage.Image only once in storageImageSource Support gzip for docker-archive files Remove .tar extension from blob and config file names ostree, src: support copy of compressed layers ostree: re-pull layer if it misses uncompressed_digest|uncompressed_size image: fix docker schema v1 -> OCI conversion Add /etc/containers/certs.d as default certs directory Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #569 Approved by: mheon
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/containers/image/copy/copy.go26
-rw-r--r--vendor/github.com/containers/image/directory/directory_dest.go10
-rw-r--r--vendor/github.com/containers/image/docker/archive/dest.go5
-rw-r--r--vendor/github.com/containers/image/docker/daemon/daemon_dest.go5
-rw-r--r--vendor/github.com/containers/image/docker/docker_image_dest.go7
-rw-r--r--vendor/github.com/containers/image/docker/tarfile/dest.go237
-rw-r--r--vendor/github.com/containers/image/docker/tarfile/types.go10
-rw-r--r--vendor/github.com/containers/image/image/docker_schema2.go2
-rw-r--r--vendor/github.com/containers/image/oci/archive/oci_dest.go9
-rw-r--r--vendor/github.com/containers/image/oci/layout/oci_dest.go7
-rw-r--r--vendor/github.com/containers/image/openshift/openshift.go9
-rw-r--r--vendor/github.com/containers/image/ostree/ostree_dest.go6
-rw-r--r--vendor/github.com/containers/image/pkg/sysregistries/system_registries.go4
-rw-r--r--vendor/github.com/containers/image/storage/storage_image.go13
-rw-r--r--vendor/github.com/containers/image/types/types.go19
-rw-r--r--vendor/github.com/golang/groupcache/LICENSE191
-rw-r--r--vendor/github.com/golang/groupcache/README.md73
-rw-r--r--vendor/github.com/golang/groupcache/lru/lru.go133
-rw-r--r--vendor/github.com/golang/protobuf/LICENSE31
-rw-r--r--vendor/github.com/golang/protobuf/README.md241
-rw-r--r--vendor/github.com/golang/protobuf/proto/clone.go229
-rw-r--r--vendor/github.com/golang/protobuf/proto/decode.go970
-rw-r--r--vendor/github.com/golang/protobuf/proto/encode.go1355
-rw-r--r--vendor/github.com/golang/protobuf/proto/equal.go300
-rw-r--r--vendor/github.com/golang/protobuf/proto/extensions.go586
-rw-r--r--vendor/github.com/golang/protobuf/proto/lib.go898
-rw-r--r--vendor/github.com/golang/protobuf/proto/message_set.go311
-rw-r--r--vendor/github.com/golang/protobuf/proto/pointer_reflect.go484
-rw-r--r--vendor/github.com/golang/protobuf/proto/pointer_unsafe.go270
-rw-r--r--vendor/github.com/golang/protobuf/proto/properties.go872
-rw-r--r--vendor/github.com/golang/protobuf/proto/text.go854
-rw-r--r--vendor/github.com/golang/protobuf/proto/text_parser.go895
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/any.go136
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/any/any.pb.go155
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/any/any.proto140
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/doc.go35
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/duration.go102
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go114
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/duration/duration.proto98
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/timestamp.go125
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go127
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto111
-rw-r--r--vendor/github.com/googleapis/gnostic/LICENSE203
-rw-r--r--vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go8728
-rw-r--r--vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go4456
-rw-r--r--vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto663
-rw-r--r--vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md16
-rw-r--r--vendor/github.com/googleapis/gnostic/README.md103
-rw-r--r--vendor/github.com/googleapis/gnostic/compiler/README.md3
-rw-r--r--vendor/github.com/googleapis/gnostic/compiler/context.go43
-rw-r--r--vendor/github.com/googleapis/gnostic/compiler/error.go61
-rw-r--r--vendor/github.com/googleapis/gnostic/compiler/extension-handler.go101
-rw-r--r--vendor/github.com/googleapis/gnostic/compiler/helpers.go197
-rw-r--r--vendor/github.com/googleapis/gnostic/compiler/main.go16
-rw-r--r--vendor/github.com/googleapis/gnostic/compiler/reader.go167
-rw-r--r--vendor/github.com/googleapis/gnostic/extensions/README.md5
-rw-r--r--vendor/github.com/googleapis/gnostic/extensions/extension.pb.go219
-rw-r--r--vendor/github.com/googleapis/gnostic/extensions/extension.proto93
-rw-r--r--vendor/github.com/googleapis/gnostic/extensions/extensions.go82
-rw-r--r--vendor/github.com/hashicorp/golang-lru/2q.go212
-rw-r--r--vendor/github.com/hashicorp/golang-lru/LICENSE362
-rw-r--r--vendor/github.com/hashicorp/golang-lru/README.md25
-rw-r--r--vendor/github.com/hashicorp/golang-lru/arc.go257
-rw-r--r--vendor/github.com/hashicorp/golang-lru/lru.go114
-rw-r--r--vendor/github.com/hashicorp/golang-lru/simplelru/lru.go160
-rw-r--r--vendor/github.com/kr/pty/License23
-rw-r--r--vendor/github.com/kr/pty/README.md36
-rw-r--r--vendor/github.com/kr/pty/doc.go16
-rw-r--r--vendor/github.com/kr/pty/ioctl.go13
-rw-r--r--vendor/github.com/kr/pty/ioctl_bsd.go39
-rw-r--r--vendor/github.com/kr/pty/pty_darwin.go60
-rw-r--r--vendor/github.com/kr/pty/pty_dragonfly.go76
-rw-r--r--vendor/github.com/kr/pty/pty_freebsd.go73
-rw-r--r--vendor/github.com/kr/pty/pty_linux.go46
-rw-r--r--vendor/github.com/kr/pty/pty_unsupported.go11
-rw-r--r--vendor/github.com/kr/pty/run.go34
-rw-r--r--vendor/github.com/kr/pty/util.go37
-rw-r--r--vendor/github.com/kr/pty/ztypes_386.go9
-rw-r--r--vendor/github.com/kr/pty/ztypes_amd64.go9
-rw-r--r--vendor/github.com/kr/pty/ztypes_arm.go9
-rw-r--r--vendor/github.com/kr/pty/ztypes_arm64.go11
-rw-r--r--vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go14
-rw-r--r--vendor/github.com/kr/pty/ztypes_freebsd_386.go13
-rw-r--r--vendor/github.com/kr/pty/ztypes_freebsd_amd64.go14
-rw-r--r--vendor/github.com/kr/pty/ztypes_freebsd_arm.go13
-rw-r--r--vendor/github.com/kr/pty/ztypes_mipsx.go12
-rw-r--r--vendor/github.com/kr/pty/ztypes_ppc64.go11
-rw-r--r--vendor/github.com/kr/pty/ztypes_ppc64le.go11
-rw-r--r--vendor/github.com/kr/pty/ztypes_s390x.go11
-rw-r--r--vendor/golang.org/x/crypto/ed25519/ed25519.go181
-rw-r--r--vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go1422
-rw-r--r--vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go1771
-rw-r--r--vendor/golang.org/x/net/internal/timeseries/timeseries.go525
-rw-r--r--vendor/golang.org/x/net/trace/events.go532
-rw-r--r--vendor/golang.org/x/net/trace/histogram.go365
-rw-r--r--vendor/golang.org/x/net/trace/trace.go1079
-rw-r--r--vendor/google.golang.org/grpc/LICENSE28
-rw-r--r--vendor/google.golang.org/grpc/PATENTS22
-rw-r--r--vendor/google.golang.org/grpc/README.md32
-rw-r--r--vendor/google.golang.org/grpc/backoff.go80
-rw-r--r--vendor/google.golang.org/grpc/balancer.go400
-rw-r--r--vendor/google.golang.org/grpc/call.go232
-rw-r--r--vendor/google.golang.org/grpc/clientconn.go888
-rw-r--r--vendor/google.golang.org/grpc/codes/code_string.go16
-rw-r--r--vendor/google.golang.org/grpc/codes/codes.go159
-rw-r--r--vendor/google.golang.org/grpc/credentials/credentials.go232
-rw-r--r--vendor/google.golang.org/grpc/credentials/credentials_util_go17.go76
-rw-r--r--vendor/google.golang.org/grpc/credentials/credentials_util_pre_go17.go74
-rw-r--r--vendor/google.golang.org/grpc/doc.go6
-rw-r--r--vendor/google.golang.org/grpc/grpclog/logger.go93
-rw-r--r--vendor/google.golang.org/grpc/interceptor.go90
-rw-r--r--vendor/google.golang.org/grpc/internal/internal.go49
-rw-r--r--vendor/google.golang.org/grpc/metadata/metadata.go147
-rw-r--r--vendor/google.golang.org/grpc/naming/naming.go74
-rw-r--r--vendor/google.golang.org/grpc/peer/peer.go65
-rw-r--r--vendor/google.golang.org/grpc/rpc_util.go457
-rw-r--r--vendor/google.golang.org/grpc/server.go944
-rw-r--r--vendor/google.golang.org/grpc/stream.go526
-rw-r--r--vendor/google.golang.org/grpc/trace.go119
-rw-r--r--vendor/google.golang.org/grpc/transport/control.go215
-rw-r--r--vendor/google.golang.org/grpc/transport/go16.go46
-rw-r--r--vendor/google.golang.org/grpc/transport/go17.go46
-rw-r--r--vendor/google.golang.org/grpc/transport/handler_server.go397
-rw-r--r--vendor/google.golang.org/grpc/transport/http2_client.go1072
-rw-r--r--vendor/google.golang.org/grpc/transport/http2_server.go775
-rw-r--r--vendor/google.golang.org/grpc/transport/http_util.go513
-rw-r--r--vendor/google.golang.org/grpc/transport/pre_go16.go51
-rw-r--r--vendor/google.golang.org/grpc/transport/transport.go595
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/LICENSE202
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/README.md119
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/asymmetric.go591
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/cipher/cbc_hmac.go196
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/cipher/concat_kdf.go75
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/cipher/ecdh_es.go62
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/cipher/key_wrap.go109
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/crypter.go510
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/doc.go27
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/encoding.go178
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/json/LICENSE27
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/json/README.md13
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/json/decode.go1183
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/json/encode.go1197
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/json/indent.go141
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/json/scanner.go623
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/json/stream.go480
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/json/tags.go44
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/jwe.go291
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/jwk.go537
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/jws.go282
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/jwt/builder.go334
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/jwt/claims.go115
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/jwt/doc.go22
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/jwt/errors.go50
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/jwt/jwt.go113
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/jwt/validation.go89
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/shared.go417
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/signing.go343
-rw-r--r--vendor/gopkg.in/square/go-jose.v2/symmetric.go360
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go25
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go1028
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto108
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1alpha1/register.go51
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1alpha1/types.go106
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go71
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go145
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1beta1/doc.go25
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go2150
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto261
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1beta1/register.go53
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1beta1/types.go279
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go125
-rw-r--r--vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go317
-rw-r--r--vendor/k8s.io/api/apps/v1/doc.go20
-rw-r--r--vendor/k8s.io/api/apps/v1/generated.pb.go6945
-rw-r--r--vendor/k8s.io/api/apps/v1/generated.proto701
-rw-r--r--vendor/k8s.io/api/apps/v1/register.go60
-rw-r--r--vendor/k8s.io/api/apps/v1/types.go819
-rw-r--r--vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go365
-rw-r--r--vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go856
-rw-r--r--vendor/k8s.io/api/apps/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/api/apps/v1beta1/generated.pb.go5291
-rw-r--r--vendor/k8s.io/api/apps/v1beta1/generated.proto484
-rw-r--r--vendor/k8s.io/api/apps/v1beta1/register.go58
-rw-r--r--vendor/k8s.io/api/apps/v1beta1/types.go568
-rw-r--r--vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go273
-rw-r--r--vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go658
-rw-r--r--vendor/k8s.io/api/apps/v1beta2/doc.go20
-rw-r--r--vendor/k8s.io/api/apps/v1beta2/generated.pb.go7586
-rw-r--r--vendor/k8s.io/api/apps/v1beta2/generated.proto752
-rw-r--r--vendor/k8s.io/api/apps/v1beta2/register.go61
-rw-r--r--vendor/k8s.io/api/apps/v1beta2/types.go877
-rw-r--r--vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go396
-rw-r--r--vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go923
-rw-r--r--vendor/k8s.io/api/authentication/v1/doc.go20
-rw-r--r--vendor/k8s.io/api/authentication/v1/generated.pb.go2148
-rw-r--r--vendor/k8s.io/api/authentication/v1/generated.proto160
-rw-r--r--vendor/k8s.io/api/authentication/v1/register.go52
-rw-r--r--vendor/k8s.io/api/authentication/v1/types.go168
-rw-r--r--vendor/k8s.io/api/authentication/v1/types_swagger_doc_generated.go113
-rw-r--r--vendor/k8s.io/api/authentication/v1/zz_generated.deepcopy.go239
-rw-r--r--vendor/k8s.io/api/authentication/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/api/authentication/v1beta1/generated.pb.go1302
-rw-r--r--vendor/k8s.io/api/authentication/v1beta1/generated.proto99
-rw-r--r--vendor/k8s.io/api/authentication/v1beta1/register.go51
-rw-r--r--vendor/k8s.io/api/authentication/v1beta1/types.go92
-rw-r--r--vendor/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go72
-rw-r--r--vendor/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go139
-rw-r--r--vendor/k8s.io/api/authorization/v1/doc.go21
-rw-r--r--vendor/k8s.io/api/authorization/v1/generated.pb.go3528
-rw-r--r--vendor/k8s.io/api/authorization/v1/generated.proto273
-rw-r--r--vendor/k8s.io/api/authorization/v1/register.go55
-rw-r--r--vendor/k8s.io/api/authorization/v1/types.go268
-rw-r--r--vendor/k8s.io/api/authorization/v1/types_swagger_doc_generated.go173
-rw-r--r--vendor/k8s.io/api/authorization/v1/zz_generated.deepcopy.go398
-rw-r--r--vendor/k8s.io/api/authorization/v1beta1/doc.go21
-rw-r--r--vendor/k8s.io/api/authorization/v1beta1/generated.pb.go3529
-rw-r--r--vendor/k8s.io/api/authorization/v1beta1/generated.proto273
-rw-r--r--vendor/k8s.io/api/authorization/v1beta1/register.go55
-rw-r--r--vendor/k8s.io/api/authorization/v1beta1/types.go268
-rw-r--r--vendor/k8s.io/api/authorization/v1beta1/types_swagger_doc_generated.go173
-rw-r--r--vendor/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go398
-rw-r--r--vendor/k8s.io/api/autoscaling/v1/doc.go20
-rw-r--r--vendor/k8s.io/api/autoscaling/v1/generated.pb.go4420
-rw-r--r--vendor/k8s.io/api/autoscaling/v1/generated.proto382
-rw-r--r--vendor/k8s.io/api/autoscaling/v1/register.go53
-rw-r--r--vendor/k8s.io/api/autoscaling/v1/types.go396
-rw-r--r--vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go244
-rw-r--r--vendor/k8s.io/api/autoscaling/v1/zz_generated.deepcopy.go569
-rw-r--r--vendor/k8s.io/api/autoscaling/v2beta1/doc.go20
-rw-r--r--vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go4036
-rw-r--r--vendor/k8s.io/api/autoscaling/v2beta1/generated.proto363
-rw-r--r--vendor/k8s.io/api/autoscaling/v2beta1/register.go52
-rw-r--r--vendor/k8s.io/api/autoscaling/v2beta1/types.go372
-rw-r--r--vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go215
-rw-r--r--vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.deepcopy.go512
-rw-r--r--vendor/k8s.io/api/batch/v1/doc.go20
-rw-r--r--vendor/k8s.io/api/batch/v1/generated.pb.go1615
-rw-r--r--vendor/k8s.io/api/batch/v1/generated.proto173
-rw-r--r--vendor/k8s.io/api/batch/v1/register.go52
-rw-r--r--vendor/k8s.io/api/batch/v1/types.go181
-rw-r--r--vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go94
-rw-r--r--vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go215
-rw-r--r--vendor/k8s.io/api/batch/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/api/batch/v1beta1/generated.pb.go1509
-rw-r--r--vendor/k8s.io/api/batch/v1beta1/generated.proto138
-rw-r--r--vendor/k8s.io/api/batch/v1beta1/register.go53
-rw-r--r--vendor/k8s.io/api/batch/v1beta1/types.go158
-rw-r--r--vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go96
-rw-r--r--vendor/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go214
-rw-r--r--vendor/k8s.io/api/batch/v2alpha1/doc.go20
-rw-r--r--vendor/k8s.io/api/batch/v2alpha1/generated.pb.go1510
-rw-r--r--vendor/k8s.io/api/batch/v2alpha1/generated.proto136
-rw-r--r--vendor/k8s.io/api/batch/v2alpha1/register.go53
-rw-r--r--vendor/k8s.io/api/batch/v2alpha1/types.go156
-rw-r--r--vendor/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go96
-rw-r--r--vendor/k8s.io/api/batch/v2alpha1/zz_generated.deepcopy.go214
-rw-r--r--vendor/k8s.io/api/certificates/v1beta1/doc.go21
-rw-r--r--vendor/k8s.io/api/certificates/v1beta1/generated.pb.go1693
-rw-r--r--vendor/k8s.io/api/certificates/v1beta1/generated.proto122
-rw-r--r--vendor/k8s.io/api/certificates/v1beta1/register.go59
-rw-r--r--vendor/k8s.io/api/certificates/v1beta1/types.go155
-rw-r--r--vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go74
-rw-r--r--vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go194
-rw-r--r--vendor/k8s.io/api/events/v1beta1/doc.go21
-rw-r--r--vendor/k8s.io/api/events/v1beta1/generated.pb.go1306
-rw-r--r--vendor/k8s.io/api/events/v1beta1/generated.proto122
-rw-r--r--vendor/k8s.io/api/events/v1beta1/register.go53
-rw-r--r--vendor/k8s.io/api/events/v1beta1/types.go122
-rw-r--r--vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go73
-rw-r--r--vendor/k8s.io/api/events/v1beta1/zz_generated.deepcopy.go125
-rw-r--r--vendor/k8s.io/api/extensions/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/api/extensions/v1beta1/generated.pb.go12513
-rw-r--r--vendor/k8s.io/api/extensions/v1beta1/generated.proto1117
-rw-r--r--vendor/k8s.io/api/extensions/v1beta1/register.go66
-rw-r--r--vendor/k8s.io/api/extensions/v1beta1/types.go1292
-rw-r--r--vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go644
-rw-r--r--vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go1588
-rw-r--r--vendor/k8s.io/api/networking/v1/doc.go20
-rw-r--r--vendor/k8s.io/api/networking/v1/generated.pb.go1869
-rw-r--r--vendor/k8s.io/api/networking/v1/generated.proto190
-rw-r--r--vendor/k8s.io/api/networking/v1/register.go53
-rw-r--r--vendor/k8s.io/api/networking/v1/types.go196
-rw-r--r--vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go113
-rw-r--r--vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go282
-rw-r--r--vendor/k8s.io/api/policy/v1beta1/doc.go23
-rw-r--r--vendor/k8s.io/api/policy/v1beta1/generated.pb.go3916
-rw-r--r--vendor/k8s.io/api/policy/v1beta1/generated.proto307
-rw-r--r--vendor/k8s.io/api/policy/v1beta1/register.go56
-rw-r--r--vendor/k8s.io/api/policy/v1beta1/types.go368
-rw-r--r--vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go207
-rw-r--r--vendor/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go475
-rw-r--r--vendor/k8s.io/api/rbac/v1/doc.go21
-rw-r--r--vendor/k8s.io/api/rbac/v1/generated.pb.go2749
-rw-r--r--vendor/k8s.io/api/rbac/v1/generated.proto197
-rw-r--r--vendor/k8s.io/api/rbac/v1/register.go58
-rw-r--r--vendor/k8s.io/api/rbac/v1/types.go233
-rw-r--r--vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go158
-rw-r--r--vendor/k8s.io/api/rbac/v1/zz_generated.deepcopy.go393
-rw-r--r--vendor/k8s.io/api/rbac/v1alpha1/doc.go21
-rw-r--r--vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go2750
-rw-r--r--vendor/k8s.io/api/rbac/v1alpha1/generated.proto198
-rw-r--r--vendor/k8s.io/api/rbac/v1alpha1/register.go58
-rw-r--r--vendor/k8s.io/api/rbac/v1alpha1/types.go235
-rw-r--r--vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go158
-rw-r--r--vendor/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go393
-rw-r--r--vendor/k8s.io/api/rbac/v1beta1/doc.go21
-rw-r--r--vendor/k8s.io/api/rbac/v1beta1/generated.pb.go2750
-rw-r--r--vendor/k8s.io/api/rbac/v1beta1/generated.proto198
-rw-r--r--vendor/k8s.io/api/rbac/v1beta1/register.go58
-rw-r--r--vendor/k8s.io/api/rbac/v1beta1/types.go233
-rw-r--r--vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go158
-rw-r--r--vendor/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go393
-rw-r--r--vendor/k8s.io/api/scheduling/v1alpha1/doc.go21
-rw-r--r--vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go641
-rw-r--r--vendor/k8s.io/api/scheduling/v1alpha1/generated.proto68
-rw-r--r--vendor/k8s.io/api/scheduling/v1alpha1/register.go52
-rw-r--r--vendor/k8s.io/api/scheduling/v1alpha1/types.go66
-rw-r--r--vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go52
-rw-r--r--vendor/k8s.io/api/scheduling/v1alpha1/zz_generated.deepcopy.go84
-rw-r--r--vendor/k8s.io/api/settings/v1alpha1/doc.go21
-rw-r--r--vendor/k8s.io/api/settings/v1alpha1/generated.pb.go930
-rw-r--r--vendor/k8s.io/api/settings/v1alpha1/generated.proto76
-rw-r--r--vendor/k8s.io/api/settings/v1alpha1/register.go52
-rw-r--r--vendor/k8s.io/api/settings/v1alpha1/types.go70
-rw-r--r--vendor/k8s.io/api/settings/v1alpha1/types_swagger_doc_generated.go61
-rw-r--r--vendor/k8s.io/api/settings/v1alpha1/zz_generated.deepcopy.go131
-rw-r--r--vendor/k8s.io/api/storage/v1/doc.go20
-rw-r--r--vendor/k8s.io/api/storage/v1/generated.pb.go926
-rw-r--r--vendor/k8s.io/api/storage/v1/generated.proto85
-rw-r--r--vendor/k8s.io/api/storage/v1/register.go53
-rw-r--r--vendor/k8s.io/api/storage/v1/types.go98
-rw-r--r--vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go55
-rw-r--r--vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go124
-rw-r--r--vendor/k8s.io/api/storage/v1alpha1/doc.go20
-rw-r--r--vendor/k8s.io/api/storage/v1alpha1/generated.pb.go1523
-rw-r--r--vendor/k8s.io/api/storage/v1alpha1/generated.proto128
-rw-r--r--vendor/k8s.io/api/storage/v1alpha1/register.go50
-rw-r--r--vendor/k8s.io/api/storage/v1alpha1/types.go126
-rw-r--r--vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go93
-rw-r--r--vendor/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go186
-rw-r--r--vendor/k8s.io/api/storage/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/api/storage/v1beta1/generated.pb.go2211
-rw-r--r--vendor/k8s.io/api/storage/v1beta1/generated.proto182
-rw-r--r--vendor/k8s.io/api/storage/v1beta1/register.go56
-rw-r--r--vendor/k8s.io/api/storage/v1beta1/types.go205
-rw-r--r--vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go118
-rw-r--r--vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go285
-rw-r--r--vendor/k8s.io/apiextensions-apiserver/LICENSE202
-rw-r--r--vendor/k8s.io/apiextensions-apiserver/README.md20
-rw-r--r--vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go54
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go49
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/doc.go19
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/errors.go121
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go97
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/help.go205
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go149
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/lazy.go121
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/meta.go653
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go210
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/priority.go222
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go548
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go47
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/validation/doc.go18
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/validation/generic.go85
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go343
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go99
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go255
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go20
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go336
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apimachinery/types.go87
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go77
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/doc.go20
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go105
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go70
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go118
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go108
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go475
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go379
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go189
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go57
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go92
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/conversion.go27
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/deepcopy.go61
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/doc.go22
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go633
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto58
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go57
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go161
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go104
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.deepcopy.go194
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/cache/cache.go83
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go102
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/diff/diff.go273
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/mergepatch/errors.go102
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go133
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/strategicpatch/errors.go49
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/strategicpatch/meta.go194
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go2151
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/strategicpatch/types.go193
-rw-r--r--vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go513
-rw-r--r--vendor/k8s.io/apiserver/LICENSE202
-rw-r--r--vendor/k8s.io/apiserver/README.md30
-rw-r--r--vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go68
-rw-r--r--vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go73
-rw-r--r--vendor/k8s.io/apiserver/pkg/authentication/user/doc.go19
-rw-r--r--vendor/k8s.io/apiserver/pkg/authentication/user/user.go83
-rw-r--r--vendor/k8s.io/apiserver/pkg/features/kube_features.go81
-rw-r--r--vendor/k8s.io/apiserver/pkg/util/feature/feature_gate.go308
-rw-r--r--vendor/k8s.io/client-go/discovery/discovery_client.go405
-rw-r--r--vendor/k8s.io/client-go/discovery/helper.go121
-rw-r--r--vendor/k8s.io/client-go/discovery/restmapper.go331
-rw-r--r--vendor/k8s.io/client-go/discovery/unstructured.go95
-rw-r--r--vendor/k8s.io/client-go/informers/admissionregistration/interface.go54
-rw-r--r--vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go88
-rw-r--r--vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/interface.go52
-rw-r--r--vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go88
-rw-r--r--vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go88
-rw-r--r--vendor/k8s.io/client-go/informers/apps/interface.go62
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1/controllerrevision.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1/daemonset.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1/deployment.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1/interface.go73
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1/replicaset.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1/statefulset.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1beta1/deployment.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1beta1/interface.go59
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1beta1/statefulset.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1beta2/daemonset.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1beta2/deployment.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1beta2/interface.go73
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1beta2/replicaset.go89
-rw-r--r--vendor/k8s.io/client-go/informers/apps/v1beta2/statefulset.go89
-rw-r--r--vendor/k8s.io/client-go/informers/autoscaling/interface.go54
-rw-r--r--vendor/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go89
-rw-r--r--vendor/k8s.io/client-go/informers/autoscaling/v1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go89
-rw-r--r--vendor/k8s.io/client-go/informers/autoscaling/v2beta1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/batch/interface.go62
-rw-r--r--vendor/k8s.io/client-go/informers/batch/v1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/batch/v1/job.go89
-rw-r--r--vendor/k8s.io/client-go/informers/batch/v1beta1/cronjob.go89
-rw-r--r--vendor/k8s.io/client-go/informers/batch/v1beta1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go89
-rw-r--r--vendor/k8s.io/client-go/informers/batch/v2alpha1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/certificates/interface.go46
-rw-r--r--vendor/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go88
-rw-r--r--vendor/k8s.io/client-go/informers/certificates/v1beta1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/core/interface.go46
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/componentstatus.go88
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/configmap.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/endpoints.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/event.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/interface.go150
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/limitrange.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/namespace.go88
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/node.go88
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go88
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/pod.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/podtemplate.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/resourcequota.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/secret.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/service.go89
-rw-r--r--vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go89
-rw-r--r--vendor/k8s.io/client-go/informers/events/interface.go46
-rw-r--r--vendor/k8s.io/client-go/informers/events/v1beta1/event.go89
-rw-r--r--vendor/k8s.io/client-go/informers/events/v1beta1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/extensions/interface.go46
-rw-r--r--vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go89
-rw-r--r--vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go89
-rw-r--r--vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go89
-rw-r--r--vendor/k8s.io/client-go/informers/extensions/v1beta1/interface.go73
-rw-r--r--vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go88
-rw-r--r--vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go89
-rw-r--r--vendor/k8s.io/client-go/informers/factory.go209
-rw-r--r--vendor/k8s.io/client-go/informers/generic.go257
-rw-r--r--vendor/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go38
-rw-r--r--vendor/k8s.io/client-go/informers/networking/interface.go46
-rw-r--r--vendor/k8s.io/client-go/informers/networking/v1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/networking/v1/networkpolicy.go89
-rw-r--r--vendor/k8s.io/client-go/informers/policy/interface.go46
-rw-r--r--vendor/k8s.io/client-go/informers/policy/v1beta1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go89
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/interface.go62
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1/clusterrole.go88
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go88
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1/interface.go66
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1/role.go89
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1/rolebinding.go89
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go88
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go88
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1alpha1/interface.go66
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1alpha1/role.go89
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go89
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go88
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go88
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1beta1/interface.go66
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1beta1/role.go89
-rw-r--r--vendor/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go89
-rw-r--r--vendor/k8s.io/client-go/informers/scheduling/interface.go46
-rw-r--r--vendor/k8s.io/client-go/informers/scheduling/v1alpha1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go88
-rw-r--r--vendor/k8s.io/client-go/informers/settings/interface.go46
-rw-r--r--vendor/k8s.io/client-go/informers/settings/v1alpha1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go89
-rw-r--r--vendor/k8s.io/client-go/informers/storage/interface.go62
-rw-r--r--vendor/k8s.io/client-go/informers/storage/v1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/storage/v1/storageclass.go88
-rw-r--r--vendor/k8s.io/client-go/informers/storage/v1alpha1/interface.go45
-rw-r--r--vendor/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go88
-rw-r--r--vendor/k8s.io/client-go/informers/storage/v1beta1/interface.go52
-rw-r--r--vendor/k8s.io/client-go/informers/storage/v1beta1/storageclass.go88
-rw-r--r--vendor/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/clientset.go596
-rw-r--r--vendor/k8s.io/client-go/kubernetes/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/import.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/scheme/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/scheme/register.go106
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go93
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go21
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go108
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1/generated_expansion.go27
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go103
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go113
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/generated_expansion.go29
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/scale.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go203
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go35
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go35
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go103
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go35
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go35
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go103
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go35
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go35
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go161
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go37
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go163
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go164
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go39
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go161
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go31
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go161
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go43
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go161
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go45
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go204
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go41
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go203
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go29
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go113
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go203
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go65
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go38
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go93
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go103
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go103
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go103
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go161
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go21
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go93
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go161
-rw-r--r--vendor/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go23
-rw-r--r--vendor/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go65
-rw-r--r--vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go65
-rw-r--r--vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go65
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1/controllerrevision.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1/daemonset.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1/daemonset_expansion.go113
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1/deployment.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1/deployment_expansion.go70
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1/replicaset.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1/replicaset_expansion.go73
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1/statefulset.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1/statefulset_expansion.go77
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta1/deployment.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go43
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta1/scale.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go77
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset_expansion.go113
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/deployment.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/deployment_expansion.go70
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go35
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset_expansion.go73
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/scale.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset.go94
-rw-r--r--vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset_expansion.go77
-rw-r--r--vendor/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go94
-rw-r--r--vendor/k8s.io/client-go/listers/autoscaling/v2beta1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go94
-rw-r--r--vendor/k8s.io/client-go/listers/batch/v1/expansion_generated.go19
-rw-r--r--vendor/k8s.io/client-go/listers/batch/v1/job.go94
-rw-r--r--vendor/k8s.io/client-go/listers/batch/v1/job_expansion.go68
-rw-r--r--vendor/k8s.io/client-go/listers/batch/v1beta1/cronjob.go94
-rw-r--r--vendor/k8s.io/client-go/listers/batch/v1beta1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go94
-rw-r--r--vendor/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go65
-rw-r--r--vendor/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go23
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/componentstatus.go65
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/configmap.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/endpoints.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/event.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go111
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/limitrange.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/namespace.go65
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/node.go65
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/node_expansion.go48
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go65
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/pod.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/podtemplate.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go66
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/resourcequota.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/secret.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/service.go94
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/service_expansion.go56
-rw-r--r--vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go94
-rw-r--r--vendor/k8s.io/client-go/listers/events/v1beta1/event.go94
-rw-r--r--vendor/k8s.io/client-go/listers/events/v1beta1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go94
-rw-r--r--vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go114
-rw-r--r--vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go94
-rw-r--r--vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go70
-rw-r--r--vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go39
-rw-r--r--vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go94
-rw-r--r--vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go65
-rw-r--r--vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go94
-rw-r--r--vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go73
-rw-r--r--vendor/k8s.io/client-go/listers/extensions/v1beta1/scale.go94
-rw-r--r--vendor/k8s.io/client-go/listers/networking/v1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go94
-rw-r--r--vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go94
-rw-r--r--vendor/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go94
-rw-r--r--vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go74
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1/clusterrole.go65
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go65
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1/expansion_generated.go43
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1/role.go94
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1/rolebinding.go94
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go65
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go65
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go43
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1alpha1/role.go94
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go94
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go65
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go65
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go43
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1beta1/role.go94
-rw-r--r--vendor/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go94
-rw-r--r--vendor/k8s.io/client-go/listers/scheduling/v1alpha1/expansion_generated.go23
-rw-r--r--vendor/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go65
-rw-r--r--vendor/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go94
-rw-r--r--vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go23
-rw-r--r--vendor/k8s.io/client-go/listers/storage/v1/storageclass.go65
-rw-r--r--vendor/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go23
-rw-r--r--vendor/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go65
-rw-r--r--vendor/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go27
-rw-r--r--vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go65
-rw-r--r--vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go65
-rw-r--r--vendor/k8s.io/client-go/tools/cache/controller.go394
-rw-r--r--vendor/k8s.io/client-go/tools/cache/delta_fifo.go685
-rw-r--r--vendor/k8s.io/client-go/tools/cache/doc.go24
-rw-r--r--vendor/k8s.io/client-go/tools/cache/expiration_cache.go208
-rw-r--r--vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go54
-rw-r--r--vendor/k8s.io/client-go/tools/cache/fake_custom_store.go102
-rw-r--r--vendor/k8s.io/client-go/tools/cache/fifo.go358
-rw-r--r--vendor/k8s.io/client-go/tools/cache/heap.go323
-rw-r--r--vendor/k8s.io/client-go/tools/cache/index.go87
-rw-r--r--vendor/k8s.io/client-go/tools/cache/listers.go160
-rw-r--r--vendor/k8s.io/client-go/tools/cache/listwatch.go188
-rw-r--r--vendor/k8s.io/client-go/tools/cache/mutation_cache.go261
-rw-r--r--vendor/k8s.io/client-go/tools/cache/mutation_detector.go127
-rw-r--r--vendor/k8s.io/client-go/tools/cache/reflector.go449
-rw-r--r--vendor/k8s.io/client-go/tools/cache/reflector_metrics.go119
-rw-r--r--vendor/k8s.io/client-go/tools/cache/shared_informer.go600
-rwxr-xr-xvendor/k8s.io/client-go/tools/cache/store.go244
-rw-r--r--vendor/k8s.io/client-go/tools/cache/thread_safe_store.go304
-rw-r--r--vendor/k8s.io/client-go/tools/cache/undelta_store.go83
-rw-r--r--vendor/k8s.io/client-go/tools/pager/pager.go118
-rw-r--r--vendor/k8s.io/client-go/tools/record/doc.go18
-rw-r--r--vendor/k8s.io/client-go/tools/record/event.go318
-rw-r--r--vendor/k8s.io/client-go/tools/record/events_cache.go467
-rw-r--r--vendor/k8s.io/client-go/tools/record/fake.go54
-rw-r--r--vendor/k8s.io/client-go/tools/reference/ref.go122
-rw-r--r--vendor/k8s.io/client-go/util/buffer/ring_growing.go72
-rw-r--r--vendor/k8s.io/client-go/util/retry/util.go79
-rw-r--r--vendor/k8s.io/kube-openapi/LICENSE202
-rw-r--r--vendor/k8s.io/kube-openapi/README.md14
-rw-r--r--vendor/k8s.io/kube-openapi/pkg/util/proto/doc.go19
-rw-r--r--vendor/k8s.io/kube-openapi/pkg/util/proto/document.go285
-rw-r--r--vendor/k8s.io/kube-openapi/pkg/util/proto/openapi.go276
-rw-r--r--vendor/k8s.io/utils/LICENSE202
-rw-r--r--vendor/k8s.io/utils/README.md57
-rw-r--r--vendor/k8s.io/utils/exec/doc.go18
-rw-r--r--vendor/k8s.io/utils/exec/exec.go215
849 files changed, 259 insertions, 217196 deletions
diff --git a/vendor/github.com/containers/image/copy/copy.go b/vendor/github.com/containers/image/copy/copy.go
index a3c23c4f4..17f4bcbec 100644
--- a/vendor/github.com/containers/image/copy/copy.go
+++ b/vendor/github.com/containers/image/copy/copy.go
@@ -475,7 +475,7 @@ func (c *copier) copyConfig(src types.Image) error {
if err != nil {
return errors.Wrapf(err, "Error reading config blob %s", srcInfo.Digest)
}
- destInfo, err := c.copyBlobFromStream(bytes.NewReader(configBlob), srcInfo, nil, false)
+ destInfo, err := c.copyBlobFromStream(bytes.NewReader(configBlob), srcInfo, nil, false, true)
if err != nil {
return err
}
@@ -573,7 +573,7 @@ func (ic *imageCopier) copyLayerFromStream(srcStream io.Reader, srcInfo types.Bl
return pipeWriter
}
}
- blobInfo, err := ic.c.copyBlobFromStream(srcStream, srcInfo, getDiffIDRecorder, ic.canModifyManifest) // Sets err to nil on success
+ blobInfo, err := ic.c.copyBlobFromStream(srcStream, srcInfo, getDiffIDRecorder, ic.canModifyManifest, false) // Sets err to nil on success
return blobInfo, diffIDChan, err
// We need the defer … pipeWriter.CloseWithError() to happen HERE so that the caller can block on reading from diffIDChan
}
@@ -609,7 +609,7 @@ func computeDiffID(stream io.Reader, decompressor compression.DecompressorFunc)
// and returns a complete blobInfo of the copied blob.
func (c *copier) copyBlobFromStream(srcStream io.Reader, srcInfo types.BlobInfo,
getOriginalLayerCopyWriter func(decompressor compression.DecompressorFunc) io.Writer,
- canCompress bool) (types.BlobInfo, error) {
+ canModifyBlob bool, isConfig bool) (types.BlobInfo, error) {
// The copying happens through a pipeline of connected io.Readers.
// === Input: srcStream
@@ -650,12 +650,9 @@ func (c *copier) copyBlobFromStream(srcStream io.Reader, srcInfo types.BlobInfo,
originalLayerReader = destStream
}
- // === Compress the layer if it is uncompressed and compression is desired
+ // === Deal with layer compression/decompression if necessary
var inputInfo types.BlobInfo
- if !canCompress || isCompressed || !c.dest.ShouldCompressLayers() {
- logrus.Debugf("Using original blob without modification")
- inputInfo = srcInfo
- } else {
+ if canModifyBlob && c.dest.DesiredLayerCompression() == types.Compress && !isCompressed {
logrus.Debugf("Compressing blob on the fly")
pipeReader, pipeWriter := io.Pipe()
defer pipeReader.Close()
@@ -667,6 +664,17 @@ func (c *copier) copyBlobFromStream(srcStream io.Reader, srcInfo types.BlobInfo,
destStream = pipeReader
inputInfo.Digest = ""
inputInfo.Size = -1
+ } else if canModifyBlob && c.dest.DesiredLayerCompression() == types.Decompress && isCompressed {
+ logrus.Debugf("Blob will be decompressed")
+ destStream, err = decompressor(destStream)
+ if err != nil {
+ return types.BlobInfo{}, err
+ }
+ inputInfo.Digest = ""
+ inputInfo.Size = -1
+ } else {
+ logrus.Debugf("Using original blob without modification")
+ inputInfo = srcInfo
}
// === Report progress using the c.progress channel, if required.
@@ -681,7 +689,7 @@ func (c *copier) copyBlobFromStream(srcStream io.Reader, srcInfo types.BlobInfo,
}
// === Finally, send the layer stream to dest.
- uploadedInfo, err := c.dest.PutBlob(destStream, inputInfo)
+ uploadedInfo, err := c.dest.PutBlob(destStream, inputInfo, isConfig)
if err != nil {
return types.BlobInfo{}, errors.Wrap(err, "Error writing blob")
}
diff --git a/vendor/github.com/containers/image/directory/directory_dest.go b/vendor/github.com/containers/image/directory/directory_dest.go
index 515383e4d..c448692ed 100644
--- a/vendor/github.com/containers/image/directory/directory_dest.go
+++ b/vendor/github.com/containers/image/directory/directory_dest.go
@@ -98,9 +98,11 @@ func (d *dirImageDestination) SupportsSignatures() error {
return nil
}
-// ShouldCompressLayers returns true iff it is desirable to compress layer blobs written to this destination.
-func (d *dirImageDestination) ShouldCompressLayers() bool {
- return d.compress
+func (d *dirImageDestination) DesiredLayerCompression() types.LayerCompression {
+ if d.compress {
+ return types.Compress
+ }
+ return types.PreserveOriginal
}
// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually
@@ -120,7 +122,7 @@ func (d *dirImageDestination) MustMatchRuntimeOS() bool {
// WARNING: The contents of stream are being verified on the fly. Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available
// to any other readers for download using the supplied digest.
// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlob MUST 1) fail, and 2) delete any data stored so far.
-func (d *dirImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo) (types.BlobInfo, error) {
+func (d *dirImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo, isConfig bool) (types.BlobInfo, error) {
blobFile, err := ioutil.TempFile(d.ref.path, "dir-put-blob")
if err != nil {
return types.BlobInfo{}, err
diff --git a/vendor/github.com/containers/image/docker/archive/dest.go b/vendor/github.com/containers/image/docker/archive/dest.go
index 9fc85bd85..22152dfaa 100644
--- a/vendor/github.com/containers/image/docker/archive/dest.go
+++ b/vendor/github.com/containers/image/docker/archive/dest.go
@@ -46,6 +46,11 @@ func newImageDestination(ctx *types.SystemContext, ref archiveReference) (types.
}, nil
}
+// DesiredLayerCompression indicates if layers must be compressed, decompressed or preserved
+func (d *archiveImageDestination) DesiredLayerCompression() types.LayerCompression {
+ return types.Decompress
+}
+
// Reference returns the reference used to set up this destination. Note that this should directly correspond to user's intent,
// e.g. it should use the public hostname instead of the result of resolving CNAMEs or following redirects.
func (d *archiveImageDestination) Reference() types.ImageReference {
diff --git a/vendor/github.com/containers/image/docker/daemon/daemon_dest.go b/vendor/github.com/containers/image/docker/daemon/daemon_dest.go
index f73ac2339..bfd8ddc7c 100644
--- a/vendor/github.com/containers/image/docker/daemon/daemon_dest.go
+++ b/vendor/github.com/containers/image/docker/daemon/daemon_dest.go
@@ -85,6 +85,11 @@ func imageLoadGoroutine(ctx context.Context, c *client.Client, reader *io.PipeRe
defer resp.Body.Close()
}
+// DesiredLayerCompression indicates if layers must be compressed, decompressed or preserved
+func (d *daemonImageDestination) DesiredLayerCompression() types.LayerCompression {
+ return types.PreserveOriginal
+}
+
// MustMatchRuntimeOS returns true iff the destination can store only images targeted for the current runtime OS. False otherwise.
func (d *daemonImageDestination) MustMatchRuntimeOS() bool {
return d.mustMatchRuntimeOS
diff --git a/vendor/github.com/containers/image/docker/docker_image_dest.go b/vendor/github.com/containers/image/docker/docker_image_dest.go
index 2cf81844c..17f31dee4 100644
--- a/vendor/github.com/containers/image/docker/docker_image_dest.go
+++ b/vendor/github.com/containers/image/docker/docker_image_dest.go
@@ -80,9 +80,8 @@ func (d *dockerImageDestination) SupportsSignatures() error {
}
}
-// ShouldCompressLayers returns true iff it is desirable to compress layer blobs written to this destination.
-func (d *dockerImageDestination) ShouldCompressLayers() bool {
- return true
+func (d *dockerImageDestination) DesiredLayerCompression() types.LayerCompression {
+ return types.Compress
}
// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually
@@ -110,7 +109,7 @@ func (c *sizeCounter) Write(p []byte) (n int, err error) {
// WARNING: The contents of stream are being verified on the fly. Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available
// to any other readers for download using the supplied digest.
// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlob MUST 1) fail, and 2) delete any data stored so far.
-func (d *dockerImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo) (types.BlobInfo, error) {
+func (d *dockerImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo, isConfig bool) (types.BlobInfo, error) {
if inputInfo.Digest.String() != "" {
haveBlob, size, err := d.HasBlob(inputInfo)
if err != nil {
diff --git a/vendor/github.com/containers/image/docker/tarfile/dest.go b/vendor/github.com/containers/image/docker/tarfile/dest.go
index eb11ca866..1b1cefaea 100644
--- a/vendor/github.com/containers/image/docker/tarfile/dest.go
+++ b/vendor/github.com/containers/image/docker/tarfile/dest.go
@@ -8,6 +8,7 @@ import (
"io"
"io/ioutil"
"os"
+ "path/filepath"
"time"
"github.com/containers/image/docker/reference"
@@ -21,37 +22,21 @@ import (
// Destination is a partial implementation of types.ImageDestination for writing to an io.Writer.
type Destination struct {
- writer io.Writer
- tar *tar.Writer
- repoTag string
+ writer io.Writer
+ tar *tar.Writer
+ reference reference.NamedTagged
// Other state.
- blobs map[digest.Digest]types.BlobInfo // list of already-sent blobs
+ blobs map[digest.Digest]types.BlobInfo // list of already-sent blobs
+ config []byte
}
// NewDestination returns a tarfile.Destination for the specified io.Writer.
func NewDestination(dest io.Writer, ref reference.NamedTagged) *Destination {
- // For github.com/docker/docker consumers, this works just as well as
- // refString := ref.String()
- // because when reading the RepoTags strings, github.com/docker/docker/reference
- // normalizes both of them to the same value.
- //
- // Doing it this way to include the normalized-out `docker.io[/library]` does make
- // a difference for github.com/projectatomic/docker consumers, with the
- // “Add --add-registry and --block-registry options to docker daemon” patch.
- // These consumers treat reference strings which include a hostname and reference
- // strings without a hostname differently.
- //
- // Using the host name here is more explicit about the intent, and it has the same
- // effect as (docker pull) in projectatomic/docker, which tags the result using
- // a hostname-qualified reference.
- // See https://github.com/containers/image/issues/72 for a more detailed
- // analysis and explanation.
- refString := fmt.Sprintf("%s:%s", ref.Name(), ref.Tag())
return &Destination{
- writer: dest,
- tar: tar.NewWriter(dest),
- repoTag: refString,
- blobs: make(map[digest.Digest]types.BlobInfo),
+ writer: dest,
+ tar: tar.NewWriter(dest),
+ reference: ref,
+ blobs: make(map[digest.Digest]types.BlobInfo),
}
}
@@ -69,11 +54,6 @@ func (d *Destination) SupportsSignatures() error {
return errors.Errorf("Storing signatures for docker tar files is not supported")
}
-// ShouldCompressLayers returns true iff it is desirable to compress layer blobs written to this destination.
-func (d *Destination) ShouldCompressLayers() bool {
- return false
-}
-
// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually
// uploaded to the image destination, true otherwise.
func (d *Destination) AcceptsForeignLayerURLs() bool {
@@ -91,20 +71,10 @@ func (d *Destination) MustMatchRuntimeOS() bool {
// WARNING: The contents of stream are being verified on the fly. Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available
// to any other readers for download using the supplied digest.
// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlob MUST 1) fail, and 2) delete any data stored so far.
-func (d *Destination) PutBlob(stream io.Reader, inputInfo types.BlobInfo) (types.BlobInfo, error) {
- if inputInfo.Digest.String() == "" {
- return types.BlobInfo{}, errors.Errorf("Can not stream a blob with unknown digest to docker tarfile")
- }
-
- ok, size, err := d.HasBlob(inputInfo)
- if err != nil {
- return types.BlobInfo{}, err
- }
- if ok {
- return types.BlobInfo{Digest: inputInfo.Digest, Size: size}, nil
- }
-
- if inputInfo.Size == -1 { // Ouch, we need to stream the blob into a temporary file just to determine the size.
+func (d *Destination) PutBlob(stream io.Reader, inputInfo types.BlobInfo, isConfig bool) (types.BlobInfo, error) {
+ // Ouch, we need to stream the blob into a temporary file just to determine the size.
+ // When the layer is decompressed, we also have to generate the digest on uncompressed datas.
+ if inputInfo.Size == -1 || inputInfo.Digest.String() == "" {
logrus.Debugf("docker tarfile: input with unknown size, streaming to disk first ...")
streamCopy, err := ioutil.TempFile(tmpdir.TemporaryDirectoryForBigFiles(), "docker-tarfile-blob")
if err != nil {
@@ -113,7 +83,9 @@ func (d *Destination) PutBlob(stream io.Reader, inputInfo types.BlobInfo) (types
defer os.Remove(streamCopy.Name())
defer streamCopy.Close()
- size, err := io.Copy(streamCopy, stream)
+ digester := digest.Canonical.Digester()
+ tee := io.TeeReader(stream, digester.Hash())
+ size, err := io.Copy(streamCopy, tee)
if err != nil {
return types.BlobInfo{}, err
}
@@ -122,17 +94,43 @@ func (d *Destination) PutBlob(stream io.Reader, inputInfo types.BlobInfo) (types
return types.BlobInfo{}, err
}
inputInfo.Size = size // inputInfo is a struct, so we are only modifying our copy.
+ if inputInfo.Digest == "" {
+ inputInfo.Digest = digester.Digest()
+ }
stream = streamCopy
logrus.Debugf("... streaming done")
}
- digester := digest.Canonical.Digester()
- tee := io.TeeReader(stream, digester.Hash())
- if err := d.sendFile(inputInfo.Digest.String(), inputInfo.Size, tee); err != nil {
+ // Maybe the blob has been already sent
+ ok, size, err := d.HasBlob(inputInfo)
+ if err != nil {
return types.BlobInfo{}, err
}
- d.blobs[inputInfo.Digest] = types.BlobInfo{Digest: digester.Digest(), Size: inputInfo.Size}
- return types.BlobInfo{Digest: digester.Digest(), Size: inputInfo.Size}, nil
+ if ok {
+ return types.BlobInfo{Digest: inputInfo.Digest, Size: size}, nil
+ }
+
+ if isConfig {
+ buf, err := ioutil.ReadAll(stream)
+ if err != nil {
+ return types.BlobInfo{}, errors.Wrap(err, "Error reading Config file stream")
+ }
+ d.config = buf
+ if err := d.sendFile(inputInfo.Digest.Hex()+".json", inputInfo.Size, bytes.NewReader(buf)); err != nil {
+ return types.BlobInfo{}, errors.Wrap(err, "Error writing Config file")
+ }
+ } else {
+ // Note that this can't be e.g. filepath.Join(l.Digest.Hex(), legacyLayerFileName); due to the way
+ // writeLegacyLayerMetadata constructs layer IDs differently from inputinfo.Digest values (as described
+ // inside it), most of the layers would end up in subdirectories alone without any metadata; (docker load)
+ // tries to load every subdirectory as an image and fails if the config is missing. So, keep the layers
+ // in the root of the tarball.
+ if err := d.sendFile(inputInfo.Digest.Hex()+".tar", inputInfo.Size, stream); err != nil {
+ return types.BlobInfo{}, err
+ }
+ }
+ d.blobs[inputInfo.Digest] = types.BlobInfo{Digest: inputInfo.Digest, Size: inputInfo.Size}
+ return types.BlobInfo{Digest: inputInfo.Digest, Size: inputInfo.Size}, nil
}
// HasBlob returns true iff the image destination already contains a blob with
@@ -160,6 +158,19 @@ func (d *Destination) ReapplyBlob(info types.BlobInfo) (types.BlobInfo, error) {
return info, nil
}
+func (d *Destination) createRepositoriesFile(rootLayerID string) error {
+ repositories := map[string]map[string]string{
+ d.reference.Name(): {d.reference.Tag(): rootLayerID}}
+ b, err := json.Marshal(repositories)
+ if err != nil {
+ return errors.Wrap(err, "Error marshaling repositories")
+ }
+ if err := d.sendBytes(legacyRepositoriesFileName, b); err != nil {
+ return errors.Wrap(err, "Error writing config json file")
+ }
+ return nil
+}
+
// PutManifest writes manifest to the destination.
// FIXME? This should also receive a MIME type if known, to differentiate between schema versions.
// If the destination is in principle available, refuses this manifest type (e.g. it does not recognize the schema),
@@ -175,14 +186,37 @@ func (d *Destination) PutManifest(m []byte) error {
return errors.Errorf("Unsupported manifest type, need a Docker schema 2 manifest")
}
- layerPaths := []string{}
- for _, l := range man.LayersDescriptors {
- layerPaths = append(layerPaths, l.Digest.String())
+ layerPaths, lastLayerID, err := d.writeLegacyLayerMetadata(man.LayersDescriptors)
+ if err != nil {
+ return err
+ }
+
+ if len(man.LayersDescriptors) > 0 {
+ if err := d.createRepositoriesFile(lastLayerID); err != nil {
+ return err
+ }
}
+ // For github.com/docker/docker consumers, this works just as well as
+ // refString := ref.String()
+ // because when reading the RepoTags strings, github.com/docker/docker/reference
+ // normalizes both of them to the same value.
+ //
+ // Doing it this way to include the normalized-out `docker.io[/library]` does make
+ // a difference for github.com/projectatomic/docker consumers, with the
+ // “Add --add-registry and --block-registry options to docker daemon” patch.
+ // These consumers treat reference strings which include a hostname and reference
+ // strings without a hostname differently.
+ //
+ // Using the host name here is more explicit about the intent, and it has the same
+ // effect as (docker pull) in projectatomic/docker, which tags the result using
+ // a hostname-qualified reference.
+ // See https://github.com/containers/image/issues/72 for a more detailed
+ // analysis and explanation.
+ refString := fmt.Sprintf("%s:%s", d.reference.Name(), d.reference.Tag())
items := []ManifestItem{{
- Config: man.ConfigDescriptor.Digest.String(),
- RepoTags: []string{d.repoTag},
+ Config: man.ConfigDescriptor.Digest.Hex() + ".json",
+ RepoTags: []string{refString},
Layers: layerPaths,
Parent: "",
LayerSources: nil,
@@ -193,12 +227,81 @@ func (d *Destination) PutManifest(m []byte) error {
}
// FIXME? Do we also need to support the legacy format?
- return d.sendFile(manifestFileName, int64(len(itemsBytes)), bytes.NewReader(itemsBytes))
+ return d.sendBytes(manifestFileName, itemsBytes)
+}
+
+// writeLegacyLayerMetadata writes legacy VERSION and configuration files for all layers
+func (d *Destination) writeLegacyLayerMetadata(layerDescriptors []manifest.Schema2Descriptor) (layerPaths []string, lastLayerID string, err error) {
+ var chainID digest.Digest
+ lastLayerID = ""
+ for i, l := range layerDescriptors {
+ // This chainID value matches the computation in docker/docker/layer.CreateChainID …
+ if chainID == "" {
+ chainID = l.Digest
+ } else {
+ chainID = digest.Canonical.FromString(chainID.String() + " " + l.Digest.String())
+ }
+ // … but note that this image ID does not match docker/docker/image/v1.CreateID. At least recent
+ // versions allocate new IDs on load, as long as the IDs we use are unique / cannot loop.
+ //
+ // Overall, the goal of computing a digest dependent on the full history is to avoid reusing an image ID
+ // (and possibly creating a loop in the "parent" links) if a layer with the same DiffID appears two or more
+ // times in layersDescriptors. The ChainID values are sufficient for this, the v1.CreateID computation
+ // which also mixes in the full image configuration seems unnecessary, at least as long as we are storing
+ // only a single image per tarball, i.e. all DiffID prefixes are unique (can’t differ only with
+ // configuration).
+ layerID := chainID.Hex()
+
+ physicalLayerPath := l.Digest.Hex() + ".tar"
+ // The layer itself has been stored into physicalLayerPath in PutManifest.
+ // So, use that path for layerPaths used in the non-legacy manifest
+ layerPaths = append(layerPaths, physicalLayerPath)
+ // ... and create a symlink for the legacy format;
+ if err := d.sendSymlink(filepath.Join(layerID, legacyLayerFileName), filepath.Join("..", physicalLayerPath)); err != nil {
+ return nil, "", errors.Wrap(err, "Error creating layer symbolic link")
+ }
+
+ b := []byte("1.0")
+ if err := d.sendBytes(filepath.Join(layerID, legacyVersionFileName), b); err != nil {
+ return nil, "", errors.Wrap(err, "Error writing VERSION file")
+ }
+
+ // The legacy format requires a config file per layer
+ layerConfig := make(map[string]interface{})
+ layerConfig["id"] = layerID
+
+ // The root layer doesn't have any parent
+ if lastLayerID != "" {
+ layerConfig["parent"] = lastLayerID
+ }
+ // The root layer configuration file is generated by using subpart of the image configuration
+ if i == len(layerDescriptors)-1 {
+ var config map[string]*json.RawMessage
+ err := json.Unmarshal(d.config, &config)
+ if err != nil {
+ return nil, "", errors.Wrap(err, "Error unmarshaling config")
+ }
+ for _, attr := range [7]string{"architecture", "config", "container", "container_config", "created", "docker_version", "os"} {
+ layerConfig[attr] = config[attr]
+ }
+ }
+ b, err := json.Marshal(layerConfig)
+ if err != nil {
+ return nil, "", errors.Wrap(err, "Error marshaling layer config")
+ }
+ if err := d.sendBytes(filepath.Join(layerID, legacyConfigFileName), b); err != nil {
+ return nil, "", errors.Wrap(err, "Error writing config json file")
+ }
+
+ lastLayerID = layerID
+ }
+ return layerPaths, lastLayerID, nil
}
type tarFI struct {
- path string
- size int64
+ path string
+ size int64
+ isSymlink bool
}
func (t *tarFI) Name() string {
@@ -208,6 +311,9 @@ func (t *tarFI) Size() int64 {
return t.size
}
func (t *tarFI) Mode() os.FileMode {
+ if t.isSymlink {
+ return os.ModeSymlink
+ }
return 0444
}
func (t *tarFI) ModTime() time.Time {
@@ -220,6 +326,21 @@ func (t *tarFI) Sys() interface{} {
return nil
}
+// sendSymlink sends a symlink into the tar stream.
+func (d *Destination) sendSymlink(path string, target string) error {
+ hdr, err := tar.FileInfoHeader(&tarFI{path: path, size: 0, isSymlink: true}, target)
+ if err != nil {
+ return nil
+ }
+ logrus.Debugf("Sending as tar link %s -> %s", path, target)
+ return d.tar.WriteHeader(hdr)
+}
+
+// sendBytes sends a path into the tar stream.
+func (d *Destination) sendBytes(path string, b []byte) error {
+ return d.sendFile(path, int64(len(b)), bytes.NewReader(b))
+}
+
// sendFile sends a file into the tar stream.
func (d *Destination) sendFile(path string, expectedSize int64, stream io.Reader) error {
hdr, err := tar.FileInfoHeader(&tarFI{path: path, size: expectedSize}, "")
diff --git a/vendor/github.com/containers/image/docker/tarfile/types.go b/vendor/github.com/containers/image/docker/tarfile/types.go
index 2aa567545..e81d93930 100644
--- a/vendor/github.com/containers/image/docker/tarfile/types.go
+++ b/vendor/github.com/containers/image/docker/tarfile/types.go
@@ -9,11 +9,11 @@ import (
// Based on github.com/docker/docker/image/tarexport/tarexport.go
const (
- manifestFileName = "manifest.json"
- // legacyLayerFileName = "layer.tar"
- // legacyConfigFileName = "json"
- // legacyVersionFileName = "VERSION"
- // legacyRepositoriesFileName = "repositories"
+ manifestFileName = "manifest.json"
+ legacyLayerFileName = "layer.tar"
+ legacyConfigFileName = "json"
+ legacyVersionFileName = "VERSION"
+ legacyRepositoriesFileName = "repositories"
)
// ManifestItem is an element of the array stored in the top-level manifest.json file.
diff --git a/vendor/github.com/containers/image/image/docker_schema2.go b/vendor/github.com/containers/image/image/docker_schema2.go
index ef6cef440..2ef8d4622 100644
--- a/vendor/github.com/containers/image/image/docker_schema2.go
+++ b/vendor/github.com/containers/image/image/docker_schema2.go
@@ -252,7 +252,7 @@ func (m *manifestSchema2) convertToManifestSchema1(dest types.ImageDestination)
if historyEntry.EmptyLayer {
if !haveGzippedEmptyLayer {
logrus.Debugf("Uploading empty layer during conversion to schema 1")
- info, err := dest.PutBlob(bytes.NewReader(gzippedEmptyLayer), types.BlobInfo{Digest: gzippedEmptyLayerDigest, Size: int64(len(gzippedEmptyLayer))})
+ info, err := dest.PutBlob(bytes.NewReader(gzippedEmptyLayer), types.BlobInfo{Digest: gzippedEmptyLayerDigest, Size: int64(len(gzippedEmptyLayer))}, false)
if err != nil {
return nil, errors.Wrap(err, "Error uploading empty layer")
}
diff --git a/vendor/github.com/containers/image/oci/archive/oci_dest.go b/vendor/github.com/containers/image/oci/archive/oci_dest.go
index 52e99a43d..1cd3927a7 100644
--- a/vendor/github.com/containers/image/oci/archive/oci_dest.go
+++ b/vendor/github.com/containers/image/oci/archive/oci_dest.go
@@ -54,9 +54,8 @@ func (d *ociArchiveImageDestination) SupportsSignatures() error {
return d.unpackedDest.SupportsSignatures()
}
-// ShouldCompressLayers returns true iff it is desirable to compress layer blobs written to this destination
-func (d *ociArchiveImageDestination) ShouldCompressLayers() bool {
- return d.unpackedDest.ShouldCompressLayers()
+func (d *ociArchiveImageDestination) DesiredLayerCompression() types.LayerCompression {
+ return d.unpackedDest.DesiredLayerCompression()
}
// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually
@@ -73,8 +72,8 @@ func (d *ociArchiveImageDestination) MustMatchRuntimeOS() bool {
// PutBlob writes contents of stream and returns data representing the result (with all data filled in).
// inputInfo.Digest can be optionally provided if known; it is not mandatory for the implementation to verify it.
// inputInfo.Size is the expected length of stream, if known.
-func (d *ociArchiveImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo) (types.BlobInfo, error) {
- return d.unpackedDest.PutBlob(stream, inputInfo)
+func (d *ociArchiveImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo, isConfig bool) (types.BlobInfo, error) {
+ return d.unpackedDest.PutBlob(stream, inputInfo, isConfig)
}
// HasBlob returns true iff the image destination already contains a blob with the matching digest which can be reapplied using ReapplyBlob
diff --git a/vendor/github.com/containers/image/oci/layout/oci_dest.go b/vendor/github.com/containers/image/oci/layout/oci_dest.go
index e95f65167..ef72b96d4 100644
--- a/vendor/github.com/containers/image/oci/layout/oci_dest.go
+++ b/vendor/github.com/containers/image/oci/layout/oci_dest.go
@@ -84,9 +84,8 @@ func (d *ociImageDestination) SupportsSignatures() error {
return errors.Errorf("Pushing signatures for OCI images is not supported")
}
-// ShouldCompressLayers returns true iff it is desirable to compress layer blobs written to this destination.
-func (d *ociImageDestination) ShouldCompressLayers() bool {
- return true
+func (d *ociImageDestination) DesiredLayerCompression() types.LayerCompression {
+ return types.Compress
}
// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually
@@ -106,7 +105,7 @@ func (d *ociImageDestination) MustMatchRuntimeOS() bool {
// WARNING: The contents of stream are being verified on the fly. Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available
// to any other readers for download using the supplied digest.
// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlob MUST 1) fail, and 2) delete any data stored so far.
-func (d *ociImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo) (types.BlobInfo, error) {
+func (d *ociImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo, isConfig bool) (types.BlobInfo, error) {
blobFile, err := ioutil.TempFile(d.ref.dir, "oci-put-blob")
if err != nil {
return types.BlobInfo{}, err
diff --git a/vendor/github.com/containers/image/openshift/openshift.go b/vendor/github.com/containers/image/openshift/openshift.go
index 95ae8bced..75d67abe9 100644
--- a/vendor/github.com/containers/image/openshift/openshift.go
+++ b/vendor/github.com/containers/image/openshift/openshift.go
@@ -354,9 +354,8 @@ func (d *openshiftImageDestination) SupportsSignatures() error {
return nil
}
-// ShouldCompressLayers returns true iff it is desirable to compress layer blobs written to this destination.
-func (d *openshiftImageDestination) ShouldCompressLayers() bool {
- return true
+func (d *openshiftImageDestination) DesiredLayerCompression() types.LayerCompression {
+ return types.Compress
}
// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually
@@ -376,8 +375,8 @@ func (d *openshiftImageDestination) MustMatchRuntimeOS() bool {
// WARNING: The contents of stream are being verified on the fly. Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available
// to any other readers for download using the supplied digest.
// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlob MUST 1) fail, and 2) delete any data stored so far.
-func (d *openshiftImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo) (types.BlobInfo, error) {
- return d.docker.PutBlob(stream, inputInfo)
+func (d *openshiftImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo, isConfig bool) (types.BlobInfo, error) {
+ return d.docker.PutBlob(stream, inputInfo, isConfig)
}
// HasBlob returns true iff the image destination already contains a blob with the matching digest which can be reapplied using ReapplyBlob.
diff --git a/vendor/github.com/containers/image/ostree/ostree_dest.go b/vendor/github.com/containers/image/ostree/ostree_dest.go
index 1d97daf8f..63e4c8228 100644
--- a/vendor/github.com/containers/image/ostree/ostree_dest.go
+++ b/vendor/github.com/containers/image/ostree/ostree_dest.go
@@ -108,8 +108,8 @@ func (d *ostreeImageDestination) SupportsSignatures() error {
}
// ShouldCompressLayers returns true iff it is desirable to compress layer blobs written to this destination.
-func (d *ostreeImageDestination) ShouldCompressLayers() bool {
- return false
+func (d *ostreeImageDestination) DesiredLayerCompression() types.LayerCompression {
+ return types.PreserveOriginal
}
// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually
@@ -123,7 +123,7 @@ func (d *ostreeImageDestination) MustMatchRuntimeOS() bool {
return true
}
-func (d *ostreeImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo) (types.BlobInfo, error) {
+func (d *ostreeImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobInfo, isConfig bool) (types.BlobInfo, error) {
tmpDir, err := ioutil.TempDir(d.tmpDirPath, "blob")
if err != nil {
return types.BlobInfo{}, err
diff --git a/vendor/github.com/containers/image/pkg/sysregistries/system_registries.go b/vendor/github.com/containers/image/pkg/sysregistries/system_registries.go
index 6d2f7544d..c56e32ddd 100644
--- a/vendor/github.com/containers/image/pkg/sysregistries/system_registries.go
+++ b/vendor/github.com/containers/image/pkg/sysregistries/system_registries.go
@@ -31,11 +31,11 @@ type tomlConfig struct {
} `toml:"registries"`
}
-// normalizeRegistries removes a trailing slash from registries, which is a
+// normalizeRegistries removes trailing slashes from registries, which is a
// common pitfall when configuring registries (e.g., "docker.io/library/).
func normalizeRegistries(regs *registries) {
for i := range regs.Registries {
- regs.Registries[i] = strings.TrimSuffix(regs.Registries[i], "/")
+ regs.Registries[i] = strings.TrimRight(regs.Registries[i], "/")
}
}
diff --git a/vendor/github.com/containers/image/storage/storage_image.go b/vendor/github.com/containers/image/storage/storage_image.go
index a2babc9ea..cc99027a5 100644
--- a/vendor/github.com/containers/image/storage/storage_image.go
+++ b/vendor/github.com/containers/image/storage/storage_image.go
@@ -274,17 +274,16 @@ func (s *storageImageDestination) Close() error {
return os.RemoveAll(s.directory)
}
-// ShouldCompressLayers indicates whether or not a caller should compress not-already-compressed
-// data when handing it to us.
-func (s storageImageDestination) ShouldCompressLayers() bool {
- // We ultimately have to decompress layers to populate trees on disk, so callers shouldn't
- // bother compressing them before handing them to us, if they're not already compressed.
- return false
+func (s storageImageDestination) DesiredLayerCompression() types.LayerCompression {
+ // We ultimately have to decompress layers to populate trees on disk,
+ // so callers shouldn't bother compressing them before handing them to
+ // us, if they're not already compressed.
+ return types.PreserveOriginal
}
// PutBlob stores a layer or data blob in our temporary directory, checking that any information
// in the blobinfo matches the incoming data.
-func (s *storageImageDestination) PutBlob(stream io.Reader, blobinfo types.BlobInfo) (types.BlobInfo, error) {
+func (s *storageImageDestination) PutBlob(stream io.Reader, blobinfo types.BlobInfo, isConfig bool) (types.BlobInfo, error) {
errorBlobInfo := types.BlobInfo{
Digest: "",
Size: -1,
diff --git a/vendor/github.com/containers/image/types/types.go b/vendor/github.com/containers/image/types/types.go
index 88dcc8a29..7b4681b8f 100644
--- a/vendor/github.com/containers/image/types/types.go
+++ b/vendor/github.com/containers/image/types/types.go
@@ -132,6 +132,19 @@ type ImageSource interface {
LayerInfosForCopy() ([]BlobInfo, error)
}
+// LayerCompression indicates if layers must be compressed, decompressed or preserved
+type LayerCompression int
+
+const (
+ // PreserveOriginal indicates the layer must be preserved, ie
+ // no compression or decompression.
+ PreserveOriginal LayerCompression = iota
+ // Decompress indicates the layer must be decompressed
+ Decompress
+ // Compress indicates the layer must be compressed
+ Compress
+)
+
// ImageDestination is a service, possibly remote (= slow), to store components of a single image.
//
// There is a specific required order for some of the calls:
@@ -154,8 +167,8 @@ type ImageDestination interface {
// SupportsSignatures returns an error (to be displayed to the user) if the destination certainly can't store signatures.
// Note: It is still possible for PutSignatures to fail if SupportsSignatures returns nil.
SupportsSignatures() error
- // ShouldCompressLayers returns true iff it is desirable to compress layer blobs written to this destination.
- ShouldCompressLayers() bool
+ // DesiredLayerCompression indicates the kind of compression to apply on layers
+ DesiredLayerCompression() LayerCompression
// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually
// uploaded to the image destination, true otherwise.
AcceptsForeignLayerURLs() bool
@@ -168,7 +181,7 @@ type ImageDestination interface {
// WARNING: The contents of stream are being verified on the fly. Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available
// to any other readers for download using the supplied digest.
// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlob MUST 1) fail, and 2) delete any data stored so far.
- PutBlob(stream io.Reader, inputInfo BlobInfo) (BlobInfo, error)
+ PutBlob(stream io.Reader, inputInfo BlobInfo, isConfig bool) (BlobInfo, error)
// HasBlob returns true iff the image destination already contains a blob with the matching digest which can be reapplied using ReapplyBlob.
// Unlike PutBlob, the digest can not be empty. If HasBlob returns true, the size of the blob must also be returned.
// If the destination does not contain the blob, or it is unknown, HasBlob ordinarily returns (false, -1, nil);
diff --git a/vendor/github.com/golang/groupcache/LICENSE b/vendor/github.com/golang/groupcache/LICENSE
deleted file mode 100644
index 37ec93a14..000000000
--- a/vendor/github.com/golang/groupcache/LICENSE
+++ /dev/null
@@ -1,191 +0,0 @@
-Apache License
-Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and
-distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright
-owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities
-that control, are controlled by, or are under common control with that entity.
-For the purposes of this definition, "control" means (i) the power, direct or
-indirect, to cause the direction or management of such entity, whether by
-contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
-outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising
-permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including
-but not limited to software source code, documentation source, and configuration
-files.
-
-"Object" form shall mean any form resulting from mechanical transformation or
-translation of a Source form, including but not limited to compiled object code,
-generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made
-available under the License, as indicated by a copyright notice that is included
-in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that
-is based on (or derived from) the Work and for which the editorial revisions,
-annotations, elaborations, or other modifications represent, as a whole, an
-original work of authorship. For the purposes of this License, Derivative Works
-shall not include works that remain separable from, or merely link (or bind by
-name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version
-of the Work and any modifications or additions to that Work or Derivative Works
-thereof, that is intentionally submitted to Licensor for inclusion in the Work
-by the copyright owner or by an individual or Legal Entity authorized to submit
-on behalf of the copyright owner. For the purposes of this definition,
-"submitted" means any form of electronic, verbal, or written communication sent
-to the Licensor or its representatives, including but not limited to
-communication on electronic mailing lists, source code control systems, and
-issue tracking systems that are managed by, or on behalf of, the Licensor for
-the purpose of discussing and improving the Work, but excluding communication
-that is conspicuously marked or otherwise designated in writing by the copyright
-owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
-of whom a Contribution has been received by Licensor and subsequently
-incorporated within the Work.
-
-2. Grant of Copyright License.
-
-Subject to the terms and conditions of this License, each Contributor hereby
-grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
-irrevocable copyright license to reproduce, prepare Derivative Works of,
-publicly display, publicly perform, sublicense, and distribute the Work and such
-Derivative Works in Source or Object form.
-
-3. Grant of Patent License.
-
-Subject to the terms and conditions of this License, each Contributor hereby
-grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
-irrevocable (except as stated in this section) patent license to make, have
-made, use, offer to sell, sell, import, and otherwise transfer the Work, where
-such license applies only to those patent claims licensable by such Contributor
-that are necessarily infringed by their Contribution(s) alone or by combination
-of their Contribution(s) with the Work to which such Contribution(s) was
-submitted. If You institute patent litigation against any entity (including a
-cross-claim or counterclaim in a lawsuit) alleging that the Work or a
-Contribution incorporated within the Work constitutes direct or contributory
-patent infringement, then any patent licenses granted to You under this License
-for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution.
-
-You may reproduce and distribute copies of the Work or Derivative Works thereof
-in any medium, with or without modifications, and in Source or Object form,
-provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of
-this License; and
-You must cause any modified files to carry prominent notices stating that You
-changed the files; and
-You must retain, in the Source form of any Derivative Works that You distribute,
-all copyright, patent, trademark, and attribution notices from the Source form
-of the Work, excluding those notices that do not pertain to any part of the
-Derivative Works; and
-If the Work includes a "NOTICE" text file as part of its distribution, then any
-Derivative Works that You distribute must include a readable copy of the
-attribution notices contained within such NOTICE file, excluding those notices
-that do not pertain to any part of the Derivative Works, in at least one of the
-following places: within a NOTICE text file distributed as part of the
-Derivative Works; within the Source form or documentation, if provided along
-with the Derivative Works; or, within a display generated by the Derivative
-Works, if and wherever such third-party notices normally appear. The contents of
-the NOTICE file are for informational purposes only and do not modify the
-License. You may add Your own attribution notices within Derivative Works that
-You distribute, alongside or as an addendum to the NOTICE text from the Work,
-provided that such additional attribution notices cannot be construed as
-modifying the License.
-You may add Your own copyright statement to Your modifications and may provide
-additional or different license terms and conditions for use, reproduction, or
-distribution of Your modifications, or for any such Derivative Works as a whole,
-provided Your use, reproduction, and distribution of the Work otherwise complies
-with the conditions stated in this License.
-
-5. Submission of Contributions.
-
-Unless You explicitly state otherwise, any Contribution intentionally submitted
-for inclusion in the Work by You to the Licensor shall be under the terms and
-conditions of this License, without any additional terms or conditions.
-Notwithstanding the above, nothing herein shall supersede or modify the terms of
-any separate license agreement you may have executed with Licensor regarding
-such Contributions.
-
-6. Trademarks.
-
-This License does not grant permission to use the trade names, trademarks,
-service marks, or product names of the Licensor, except as required for
-reasonable and customary use in describing the origin of the Work and
-reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty.
-
-Unless required by applicable law or agreed to in writing, Licensor provides the
-Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
-including, without limitation, any warranties or conditions of TITLE,
-NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
-solely responsible for determining the appropriateness of using or
-redistributing the Work and assume any risks associated with Your exercise of
-permissions under this License.
-
-8. Limitation of Liability.
-
-In no event and under no legal theory, whether in tort (including negligence),
-contract, or otherwise, unless required by applicable law (such as deliberate
-and grossly negligent acts) or agreed to in writing, shall any Contributor be
-liable to You for damages, including any direct, indirect, special, incidental,
-or consequential damages of any character arising as a result of this License or
-out of the use or inability to use the Work (including but not limited to
-damages for loss of goodwill, work stoppage, computer failure or malfunction, or
-any and all other commercial damages or losses), even if such Contributor has
-been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability.
-
-While redistributing the Work or Derivative Works thereof, You may choose to
-offer, and charge a fee for, acceptance of support, warranty, indemnity, or
-other liability obligations and/or rights consistent with this License. However,
-in accepting such obligations, You may act only on Your own behalf and on Your
-sole responsibility, not on behalf of any other Contributor, and only if You
-agree to indemnify, defend, and hold each Contributor harmless for any liability
-incurred by, or claims asserted against, such Contributor by reason of your
-accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work
-
-To apply the Apache License to your work, attach the following boilerplate
-notice, with the fields enclosed by brackets "[]" replaced with your own
-identifying information. (Don't include the brackets!) The text should be
-enclosed in the appropriate comment syntax for the file format. We also
-recommend that a file or class name and description of purpose be included on
-the same "printed page" as the copyright notice for easier identification within
-third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/vendor/github.com/golang/groupcache/README.md b/vendor/github.com/golang/groupcache/README.md
deleted file mode 100644
index 70c29da16..000000000
--- a/vendor/github.com/golang/groupcache/README.md
+++ /dev/null
@@ -1,73 +0,0 @@
-# groupcache
-
-## Summary
-
-groupcache is a caching and cache-filling library, intended as a
-replacement for memcached in many cases.
-
-For API docs and examples, see http://godoc.org/github.com/golang/groupcache
-
-## Comparison to memcached
-
-### **Like memcached**, groupcache:
-
- * shards by key to select which peer is responsible for that key
-
-### **Unlike memcached**, groupcache:
-
- * does not require running a separate set of servers, thus massively
- reducing deployment/configuration pain. groupcache is a client
- library as well as a server. It connects to its own peers.
-
- * comes with a cache filling mechanism. Whereas memcached just says
- "Sorry, cache miss", often resulting in a thundering herd of
- database (or whatever) loads from an unbounded number of clients
- (which has resulted in several fun outages), groupcache coordinates
- cache fills such that only one load in one process of an entire
- replicated set of processes populates the cache, then multiplexes
- the loaded value to all callers.
-
- * does not support versioned values. If key "foo" is value "bar",
- key "foo" must always be "bar". There are neither cache expiration
- times, nor explicit cache evictions. Thus there is also no CAS,
- nor Increment/Decrement. This also means that groupcache....
-
- * ... supports automatic mirroring of super-hot items to multiple
- processes. This prevents memcached hot spotting where a machine's
- CPU and/or NIC are overloaded by very popular keys/values.
-
- * is currently only available for Go. It's very unlikely that I
- (bradfitz@) will port the code to any other language.
-
-## Loading process
-
-In a nutshell, a groupcache lookup of **Get("foo")** looks like:
-
-(On machine #5 of a set of N machines running the same code)
-
- 1. Is the value of "foo" in local memory because it's super hot? If so, use it.
-
- 2. Is the value of "foo" in local memory because peer #5 (the current
- peer) is the owner of it? If so, use it.
-
- 3. Amongst all the peers in my set of N, am I the owner of the key
- "foo"? (e.g. does it consistent hash to 5?) If so, load it. If
- other callers come in, via the same process or via RPC requests
- from peers, they block waiting for the load to finish and get the
- same answer. If not, RPC to the peer that's the owner and get
- the answer. If the RPC fails, just load it locally (still with
- local dup suppression).
-
-## Users
-
-groupcache is in production use by dl.google.com (its original user),
-parts of Blogger, parts of Google Code, parts of Google Fiber, parts
-of Google production monitoring systems, etc.
-
-## Presentations
-
-See http://talks.golang.org/2013/oscon-dl.slide
-
-## Help
-
-Use the golang-nuts mailing list for any discussion or questions.
diff --git a/vendor/github.com/golang/groupcache/lru/lru.go b/vendor/github.com/golang/groupcache/lru/lru.go
deleted file mode 100644
index 532cc45e6..000000000
--- a/vendor/github.com/golang/groupcache/lru/lru.go
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-Copyright 2013 Google Inc.
-
-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 lru implements an LRU cache.
-package lru
-
-import "container/list"
-
-// Cache is an LRU cache. It is not safe for concurrent access.
-type Cache struct {
- // MaxEntries is the maximum number of cache entries before
- // an item is evicted. Zero means no limit.
- MaxEntries int
-
- // OnEvicted optionally specificies a callback function to be
- // executed when an entry is purged from the cache.
- OnEvicted func(key Key, value interface{})
-
- ll *list.List
- cache map[interface{}]*list.Element
-}
-
-// A Key may be any value that is comparable. See http://golang.org/ref/spec#Comparison_operators
-type Key interface{}
-
-type entry struct {
- key Key
- value interface{}
-}
-
-// New creates a new Cache.
-// If maxEntries is zero, the cache has no limit and it's assumed
-// that eviction is done by the caller.
-func New(maxEntries int) *Cache {
- return &Cache{
- MaxEntries: maxEntries,
- ll: list.New(),
- cache: make(map[interface{}]*list.Element),
- }
-}
-
-// Add adds a value to the cache.
-func (c *Cache) Add(key Key, value interface{}) {
- if c.cache == nil {
- c.cache = make(map[interface{}]*list.Element)
- c.ll = list.New()
- }
- if ee, ok := c.cache[key]; ok {
- c.ll.MoveToFront(ee)
- ee.Value.(*entry).value = value
- return
- }
- ele := c.ll.PushFront(&entry{key, value})
- c.cache[key] = ele
- if c.MaxEntries != 0 && c.ll.Len() > c.MaxEntries {
- c.RemoveOldest()
- }
-}
-
-// Get looks up a key's value from the cache.
-func (c *Cache) Get(key Key) (value interface{}, ok bool) {
- if c.cache == nil {
- return
- }
- if ele, hit := c.cache[key]; hit {
- c.ll.MoveToFront(ele)
- return ele.Value.(*entry).value, true
- }
- return
-}
-
-// Remove removes the provided key from the cache.
-func (c *Cache) Remove(key Key) {
- if c.cache == nil {
- return
- }
- if ele, hit := c.cache[key]; hit {
- c.removeElement(ele)
- }
-}
-
-// RemoveOldest removes the oldest item from the cache.
-func (c *Cache) RemoveOldest() {
- if c.cache == nil {
- return
- }
- ele := c.ll.Back()
- if ele != nil {
- c.removeElement(ele)
- }
-}
-
-func (c *Cache) removeElement(e *list.Element) {
- c.ll.Remove(e)
- kv := e.Value.(*entry)
- delete(c.cache, kv.key)
- if c.OnEvicted != nil {
- c.OnEvicted(kv.key, kv.value)
- }
-}
-
-// Len returns the number of items in the cache.
-func (c *Cache) Len() int {
- if c.cache == nil {
- return 0
- }
- return c.ll.Len()
-}
-
-// Clear purges all stored items from the cache.
-func (c *Cache) Clear() {
- if c.OnEvicted != nil {
- for _, e := range c.cache {
- kv := e.Value.(*entry)
- c.OnEvicted(kv.key, kv.value)
- }
- }
- c.ll = nil
- c.cache = nil
-}
diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE
deleted file mode 100644
index 1b1b1921e..000000000
--- a/vendor/github.com/golang/protobuf/LICENSE
+++ /dev/null
@@ -1,31 +0,0 @@
-Go support for Protocol Buffers - Google's data interchange format
-
-Copyright 2010 The Go Authors. All rights reserved.
-https://github.com/golang/protobuf
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/vendor/github.com/golang/protobuf/README.md b/vendor/github.com/golang/protobuf/README.md
deleted file mode 100644
index 037fc7c8e..000000000
--- a/vendor/github.com/golang/protobuf/README.md
+++ /dev/null
@@ -1,241 +0,0 @@
-# Go support for Protocol Buffers
-
-Google's data interchange format.
-Copyright 2010 The Go Authors.
-https://github.com/golang/protobuf
-
-This package and the code it generates requires at least Go 1.4.
-
-This software implements Go bindings for protocol buffers. For
-information about protocol buffers themselves, see
- https://developers.google.com/protocol-buffers/
-
-## Installation ##
-
-To use this software, you must:
-- Install the standard C++ implementation of protocol buffers from
- https://developers.google.com/protocol-buffers/
-- Of course, install the Go compiler and tools from
- https://golang.org/
- See
- https://golang.org/doc/install
- for details or, if you are using gccgo, follow the instructions at
- https://golang.org/doc/install/gccgo
-- Grab the code from the repository and install the proto package.
- The simplest way is to run `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}`.
- The compiler plugin, protoc-gen-go, will be installed in $GOBIN,
- defaulting to $GOPATH/bin. It must be in your $PATH for the protocol
- compiler, protoc, to find it.
-
-This software has two parts: a 'protocol compiler plugin' that
-generates Go source files that, once compiled, can access and manage
-protocol buffers; and a library that implements run-time support for
-encoding (marshaling), decoding (unmarshaling), and accessing protocol
-buffers.
-
-There is support for gRPC in Go using protocol buffers.
-See the note at the bottom of this file for details.
-
-There are no insertion points in the plugin.
-
-
-## Using protocol buffers with Go ##
-
-Once the software is installed, there are two steps to using it.
-First you must compile the protocol buffer definitions and then import
-them, with the support library, into your program.
-
-To compile the protocol buffer definition, run protoc with the --go_out
-parameter set to the directory you want to output the Go code to.
-
- protoc --go_out=. *.proto
-
-The generated files will be suffixed .pb.go. See the Test code below
-for an example using such a file.
-
-
-The package comment for the proto library contains text describing
-the interface provided in Go for protocol buffers. Here is an edited
-version.
-
-==========
-
-The proto package converts data structures to and from the
-wire format of protocol buffers. It works in concert with the
-Go source code generated for .proto files by the protocol compiler.
-
-A summary of the properties of the protocol buffer interface
-for a protocol buffer variable v:
-
- - Names are turned from camel_case to CamelCase for export.
- - There are no methods on v to set fields; just treat
- them as structure fields.
- - There are getters that return a field's value if set,
- and return the field's default value if unset.
- The getters work even if the receiver is a nil message.
- - The zero value for a struct is its correct initialization state.
- All desired fields must be set before marshaling.
- - A Reset() method will restore a protobuf struct to its zero state.
- - Non-repeated fields are pointers to the values; nil means unset.
- That is, optional or required field int32 f becomes F *int32.
- - Repeated fields are slices.
- - Helper functions are available to aid the setting of fields.
- Helpers for getting values are superseded by the
- GetFoo methods and their use is deprecated.
- msg.Foo = proto.String("hello") // set field
- - Constants are defined to hold the default values of all fields that
- have them. They have the form Default_StructName_FieldName.
- Because the getter methods handle defaulted values,
- direct use of these constants should be rare.
- - Enums are given type names and maps from names to values.
- Enum values are prefixed with the enum's type name. Enum types have
- a String method, and a Enum method to assist in message construction.
- - Nested groups and enums have type names prefixed with the name of
- the surrounding message type.
- - Extensions are given descriptor names that start with E_,
- followed by an underscore-delimited list of the nested messages
- that contain it (if any) followed by the CamelCased name of the
- extension field itself. HasExtension, ClearExtension, GetExtension
- and SetExtension are functions for manipulating extensions.
- - Oneof field sets are given a single field in their message,
- with distinguished wrapper types for each possible field value.
- - Marshal and Unmarshal are functions to encode and decode the wire format.
-
-When the .proto file specifies `syntax="proto3"`, there are some differences:
-
- - Non-repeated fields of non-message type are values instead of pointers.
- - Getters are only generated for message and oneof fields.
- - Enum types do not get an Enum method.
-
-Consider file test.proto, containing
-
-```proto
- package example;
-
- enum FOO { X = 17; };
-
- message Test {
- required string label = 1;
- optional int32 type = 2 [default=77];
- repeated int64 reps = 3;
- optional group OptionalGroup = 4 {
- required string RequiredField = 5;
- }
- }
-```
-
-To create and play with a Test object from the example package,
-
-```go
- package main
-
- import (
- "log"
-
- "github.com/golang/protobuf/proto"
- "path/to/example"
- )
-
- func main() {
- test := &example.Test {
- Label: proto.String("hello"),
- Type: proto.Int32(17),
- Reps: []int64{1, 2, 3},
- Optionalgroup: &example.Test_OptionalGroup {
- RequiredField: proto.String("good bye"),
- },
- }
- data, err := proto.Marshal(test)
- if err != nil {
- log.Fatal("marshaling error: ", err)
- }
- newTest := &example.Test{}
- err = proto.Unmarshal(data, newTest)
- if err != nil {
- log.Fatal("unmarshaling error: ", err)
- }
- // Now test and newTest contain the same data.
- if test.GetLabel() != newTest.GetLabel() {
- log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel())
- }
- // etc.
- }
-```
-
-## Parameters ##
-
-To pass extra parameters to the plugin, use a comma-separated
-parameter list separated from the output directory by a colon:
-
-
- protoc --go_out=plugins=grpc,import_path=mypackage:. *.proto
-
-
-- `import_prefix=xxx` - a prefix that is added onto the beginning of
- all imports. Useful for things like generating protos in a
- subdirectory, or regenerating vendored protobufs in-place.
-- `import_path=foo/bar` - used as the package if no input files
- declare `go_package`. If it contains slashes, everything up to the
- rightmost slash is ignored.
-- `plugins=plugin1+plugin2` - specifies the list of sub-plugins to
- load. The only plugin in this repo is `grpc`.
-- `Mfoo/bar.proto=quux/shme` - declares that foo/bar.proto is
- associated with Go package quux/shme. This is subject to the
- import_prefix parameter.
-
-## gRPC Support ##
-
-If a proto file specifies RPC services, protoc-gen-go can be instructed to
-generate code compatible with gRPC (http://www.grpc.io/). To do this, pass
-the `plugins` parameter to protoc-gen-go; the usual way is to insert it into
-the --go_out argument to protoc:
-
- protoc --go_out=plugins=grpc:. *.proto
-
-## Compatibility ##
-
-The library and the generated code are expected to be stable over time.
-However, we reserve the right to make breaking changes without notice for the
-following reasons:
-
-- Security. A security issue in the specification or implementation may come to
- light whose resolution requires breaking compatibility. We reserve the right
- to address such security issues.
-- Unspecified behavior. There are some aspects of the Protocol Buffers
- specification that are undefined. Programs that depend on such unspecified
- behavior may break in future releases.
-- Specification errors or changes. If it becomes necessary to address an
- inconsistency, incompleteness, or change in the Protocol Buffers
- specification, resolving the issue could affect the meaning or legality of
- existing programs. We reserve the right to address such issues, including
- updating the implementations.
-- Bugs. If the library has a bug that violates the specification, a program
- that depends on the buggy behavior may break if the bug is fixed. We reserve
- the right to fix such bugs.
-- Adding methods or fields to generated structs. These may conflict with field
- names that already exist in a schema, causing applications to break. When the
- code generator encounters a field in the schema that would collide with a
- generated field or method name, the code generator will append an underscore
- to the generated field or method name.
-- Adding, removing, or changing methods or fields in generated structs that
- start with `XXX`. These parts of the generated code are exported out of
- necessity, but should not be considered part of the public API.
-- Adding, removing, or changing unexported symbols in generated code.
-
-Any breaking changes outside of these will be announced 6 months in advance to
-protobuf@googlegroups.com.
-
-You should, whenever possible, use generated code created by the `protoc-gen-go`
-tool built at the same commit as the `proto` package. The `proto` package
-declares package-level constants in the form `ProtoPackageIsVersionX`.
-Application code and generated code may depend on one of these constants to
-ensure that compilation will fail if the available version of the proto library
-is too old. Whenever we make a change to the generated code that requires newer
-library support, in the same commit we will increment the version number of the
-generated code and declare a new package-level constant whose name incorporates
-the latest version number. Removing a compatibility constant is considered a
-breaking change and would be subject to the announcement policy stated above.
-
-The `protoc-gen-go/generator` package exposes a plugin interface,
-which is used by the gRPC code generation. This interface is not
-supported and is subject to incompatible changes without notice.
diff --git a/vendor/github.com/golang/protobuf/proto/clone.go b/vendor/github.com/golang/protobuf/proto/clone.go
deleted file mode 100644
index e392575b3..000000000
--- a/vendor/github.com/golang/protobuf/proto/clone.go
+++ /dev/null
@@ -1,229 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2011 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Protocol buffer deep copy and merge.
-// TODO: RawMessage.
-
-package proto
-
-import (
- "log"
- "reflect"
- "strings"
-)
-
-// Clone returns a deep copy of a protocol buffer.
-func Clone(pb Message) Message {
- in := reflect.ValueOf(pb)
- if in.IsNil() {
- return pb
- }
-
- out := reflect.New(in.Type().Elem())
- // out is empty so a merge is a deep copy.
- mergeStruct(out.Elem(), in.Elem())
- return out.Interface().(Message)
-}
-
-// Merge merges src into dst.
-// Required and optional fields that are set in src will be set to that value in dst.
-// Elements of repeated fields will be appended.
-// Merge panics if src and dst are not the same type, or if dst is nil.
-func Merge(dst, src Message) {
- in := reflect.ValueOf(src)
- out := reflect.ValueOf(dst)
- if out.IsNil() {
- panic("proto: nil destination")
- }
- if in.Type() != out.Type() {
- // Explicit test prior to mergeStruct so that mistyped nils will fail
- panic("proto: type mismatch")
- }
- if in.IsNil() {
- // Merging nil into non-nil is a quiet no-op
- return
- }
- mergeStruct(out.Elem(), in.Elem())
-}
-
-func mergeStruct(out, in reflect.Value) {
- sprop := GetProperties(in.Type())
- for i := 0; i < in.NumField(); i++ {
- f := in.Type().Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i])
- }
-
- if emIn, ok := extendable(in.Addr().Interface()); ok {
- emOut, _ := extendable(out.Addr().Interface())
- mIn, muIn := emIn.extensionsRead()
- if mIn != nil {
- mOut := emOut.extensionsWrite()
- muIn.Lock()
- mergeExtension(mOut, mIn)
- muIn.Unlock()
- }
- }
-
- uf := in.FieldByName("XXX_unrecognized")
- if !uf.IsValid() {
- return
- }
- uin := uf.Bytes()
- if len(uin) > 0 {
- out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...))
- }
-}
-
-// mergeAny performs a merge between two values of the same type.
-// viaPtr indicates whether the values were indirected through a pointer (implying proto2).
-// prop is set if this is a struct field (it may be nil).
-func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) {
- if in.Type() == protoMessageType {
- if !in.IsNil() {
- if out.IsNil() {
- out.Set(reflect.ValueOf(Clone(in.Interface().(Message))))
- } else {
- Merge(out.Interface().(Message), in.Interface().(Message))
- }
- }
- return
- }
- switch in.Kind() {
- case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
- reflect.String, reflect.Uint32, reflect.Uint64:
- if !viaPtr && isProto3Zero(in) {
- return
- }
- out.Set(in)
- case reflect.Interface:
- // Probably a oneof field; copy non-nil values.
- if in.IsNil() {
- return
- }
- // Allocate destination if it is not set, or set to a different type.
- // Otherwise we will merge as normal.
- if out.IsNil() || out.Elem().Type() != in.Elem().Type() {
- out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T)
- }
- mergeAny(out.Elem(), in.Elem(), false, nil)
- case reflect.Map:
- if in.Len() == 0 {
- return
- }
- if out.IsNil() {
- out.Set(reflect.MakeMap(in.Type()))
- }
- // For maps with value types of *T or []byte we need to deep copy each value.
- elemKind := in.Type().Elem().Kind()
- for _, key := range in.MapKeys() {
- var val reflect.Value
- switch elemKind {
- case reflect.Ptr:
- val = reflect.New(in.Type().Elem().Elem())
- mergeAny(val, in.MapIndex(key), false, nil)
- case reflect.Slice:
- val = in.MapIndex(key)
- val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
- default:
- val = in.MapIndex(key)
- }
- out.SetMapIndex(key, val)
- }
- case reflect.Ptr:
- if in.IsNil() {
- return
- }
- if out.IsNil() {
- out.Set(reflect.New(in.Elem().Type()))
- }
- mergeAny(out.Elem(), in.Elem(), true, nil)
- case reflect.Slice:
- if in.IsNil() {
- return
- }
- if in.Type().Elem().Kind() == reflect.Uint8 {
- // []byte is a scalar bytes field, not a repeated field.
-
- // Edge case: if this is in a proto3 message, a zero length
- // bytes field is considered the zero value, and should not
- // be merged.
- if prop != nil && prop.proto3 && in.Len() == 0 {
- return
- }
-
- // Make a deep copy.
- // Append to []byte{} instead of []byte(nil) so that we never end up
- // with a nil result.
- out.SetBytes(append([]byte{}, in.Bytes()...))
- return
- }
- n := in.Len()
- if out.IsNil() {
- out.Set(reflect.MakeSlice(in.Type(), 0, n))
- }
- switch in.Type().Elem().Kind() {
- case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
- reflect.String, reflect.Uint32, reflect.Uint64:
- out.Set(reflect.AppendSlice(out, in))
- default:
- for i := 0; i < n; i++ {
- x := reflect.Indirect(reflect.New(in.Type().Elem()))
- mergeAny(x, in.Index(i), false, nil)
- out.Set(reflect.Append(out, x))
- }
- }
- case reflect.Struct:
- mergeStruct(out, in)
- default:
- // unknown type, so not a protocol buffer
- log.Printf("proto: don't know how to copy %v", in)
- }
-}
-
-func mergeExtension(out, in map[int32]Extension) {
- for extNum, eIn := range in {
- eOut := Extension{desc: eIn.desc}
- if eIn.value != nil {
- v := reflect.New(reflect.TypeOf(eIn.value)).Elem()
- mergeAny(v, reflect.ValueOf(eIn.value), false, nil)
- eOut.value = v.Interface()
- }
- if eIn.enc != nil {
- eOut.enc = make([]byte, len(eIn.enc))
- copy(eOut.enc, eIn.enc)
- }
-
- out[extNum] = eOut
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/decode.go b/vendor/github.com/golang/protobuf/proto/decode.go
deleted file mode 100644
index aa207298f..000000000
--- a/vendor/github.com/golang/protobuf/proto/decode.go
+++ /dev/null
@@ -1,970 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Routines for decoding protocol buffer data to construct in-memory representations.
- */
-
-import (
- "errors"
- "fmt"
- "io"
- "os"
- "reflect"
-)
-
-// errOverflow is returned when an integer is too large to be represented.
-var errOverflow = errors.New("proto: integer overflow")
-
-// ErrInternalBadWireType is returned by generated code when an incorrect
-// wire type is encountered. It does not get returned to user code.
-var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof")
-
-// The fundamental decoders that interpret bytes on the wire.
-// Those that take integer types all return uint64 and are
-// therefore of type valueDecoder.
-
-// DecodeVarint reads a varint-encoded integer from the slice.
-// It returns the integer and the number of bytes consumed, or
-// zero if there is not enough.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-func DecodeVarint(buf []byte) (x uint64, n int) {
- for shift := uint(0); shift < 64; shift += 7 {
- if n >= len(buf) {
- return 0, 0
- }
- b := uint64(buf[n])
- n++
- x |= (b & 0x7F) << shift
- if (b & 0x80) == 0 {
- return x, n
- }
- }
-
- // The number is too large to represent in a 64-bit value.
- return 0, 0
-}
-
-func (p *Buffer) decodeVarintSlow() (x uint64, err error) {
- i := p.index
- l := len(p.buf)
-
- for shift := uint(0); shift < 64; shift += 7 {
- if i >= l {
- err = io.ErrUnexpectedEOF
- return
- }
- b := p.buf[i]
- i++
- x |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- p.index = i
- return
- }
- }
-
- // The number is too large to represent in a 64-bit value.
- err = errOverflow
- return
-}
-
-// DecodeVarint reads a varint-encoded integer from the Buffer.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-func (p *Buffer) DecodeVarint() (x uint64, err error) {
- i := p.index
- buf := p.buf
-
- if i >= len(buf) {
- return 0, io.ErrUnexpectedEOF
- } else if buf[i] < 0x80 {
- p.index++
- return uint64(buf[i]), nil
- } else if len(buf)-i < 10 {
- return p.decodeVarintSlow()
- }
-
- var b uint64
- // we already checked the first byte
- x = uint64(buf[i]) - 0x80
- i++
-
- b = uint64(buf[i])
- i++
- x += b << 7
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 7
-
- b = uint64(buf[i])
- i++
- x += b << 14
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 14
-
- b = uint64(buf[i])
- i++
- x += b << 21
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 21
-
- b = uint64(buf[i])
- i++
- x += b << 28
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 28
-
- b = uint64(buf[i])
- i++
- x += b << 35
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 35
-
- b = uint64(buf[i])
- i++
- x += b << 42
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 42
-
- b = uint64(buf[i])
- i++
- x += b << 49
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 49
-
- b = uint64(buf[i])
- i++
- x += b << 56
- if b&0x80 == 0 {
- goto done
- }
- x -= 0x80 << 56
-
- b = uint64(buf[i])
- i++
- x += b << 63
- if b&0x80 == 0 {
- goto done
- }
- // x -= 0x80 << 63 // Always zero.
-
- return 0, errOverflow
-
-done:
- p.index = i
- return x, nil
-}
-
-// DecodeFixed64 reads a 64-bit integer from the Buffer.
-// This is the format for the
-// fixed64, sfixed64, and double protocol buffer types.
-func (p *Buffer) DecodeFixed64() (x uint64, err error) {
- // x, err already 0
- i := p.index + 8
- if i < 0 || i > len(p.buf) {
- err = io.ErrUnexpectedEOF
- return
- }
- p.index = i
-
- x = uint64(p.buf[i-8])
- x |= uint64(p.buf[i-7]) << 8
- x |= uint64(p.buf[i-6]) << 16
- x |= uint64(p.buf[i-5]) << 24
- x |= uint64(p.buf[i-4]) << 32
- x |= uint64(p.buf[i-3]) << 40
- x |= uint64(p.buf[i-2]) << 48
- x |= uint64(p.buf[i-1]) << 56
- return
-}
-
-// DecodeFixed32 reads a 32-bit integer from the Buffer.
-// This is the format for the
-// fixed32, sfixed32, and float protocol buffer types.
-func (p *Buffer) DecodeFixed32() (x uint64, err error) {
- // x, err already 0
- i := p.index + 4
- if i < 0 || i > len(p.buf) {
- err = io.ErrUnexpectedEOF
- return
- }
- p.index = i
-
- x = uint64(p.buf[i-4])
- x |= uint64(p.buf[i-3]) << 8
- x |= uint64(p.buf[i-2]) << 16
- x |= uint64(p.buf[i-1]) << 24
- return
-}
-
-// DecodeZigzag64 reads a zigzag-encoded 64-bit integer
-// from the Buffer.
-// This is the format used for the sint64 protocol buffer type.
-func (p *Buffer) DecodeZigzag64() (x uint64, err error) {
- x, err = p.DecodeVarint()
- if err != nil {
- return
- }
- x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63)
- return
-}
-
-// DecodeZigzag32 reads a zigzag-encoded 32-bit integer
-// from the Buffer.
-// This is the format used for the sint32 protocol buffer type.
-func (p *Buffer) DecodeZigzag32() (x uint64, err error) {
- x, err = p.DecodeVarint()
- if err != nil {
- return
- }
- x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31))
- return
-}
-
-// These are not ValueDecoders: they produce an array of bytes or a string.
-// bytes, embedded messages
-
-// DecodeRawBytes reads a count-delimited byte buffer from the Buffer.
-// This is the format used for the bytes protocol buffer
-// type and for embedded messages.
-func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) {
- n, err := p.DecodeVarint()
- if err != nil {
- return nil, err
- }
-
- nb := int(n)
- if nb < 0 {
- return nil, fmt.Errorf("proto: bad byte length %d", nb)
- }
- end := p.index + nb
- if end < p.index || end > len(p.buf) {
- return nil, io.ErrUnexpectedEOF
- }
-
- if !alloc {
- // todo: check if can get more uses of alloc=false
- buf = p.buf[p.index:end]
- p.index += nb
- return
- }
-
- buf = make([]byte, nb)
- copy(buf, p.buf[p.index:])
- p.index += nb
- return
-}
-
-// DecodeStringBytes reads an encoded string from the Buffer.
-// This is the format used for the proto2 string type.
-func (p *Buffer) DecodeStringBytes() (s string, err error) {
- buf, err := p.DecodeRawBytes(false)
- if err != nil {
- return
- }
- return string(buf), nil
-}
-
-// Skip the next item in the buffer. Its wire type is decoded and presented as an argument.
-// If the protocol buffer has extensions, and the field matches, add it as an extension.
-// Otherwise, if the XXX_unrecognized field exists, append the skipped data there.
-func (o *Buffer) skipAndSave(t reflect.Type, tag, wire int, base structPointer, unrecField field) error {
- oi := o.index
-
- err := o.skip(t, tag, wire)
- if err != nil {
- return err
- }
-
- if !unrecField.IsValid() {
- return nil
- }
-
- ptr := structPointer_Bytes(base, unrecField)
-
- // Add the skipped field to struct field
- obuf := o.buf
-
- o.buf = *ptr
- o.EncodeVarint(uint64(tag<<3 | wire))
- *ptr = append(o.buf, obuf[oi:o.index]...)
-
- o.buf = obuf
-
- return nil
-}
-
-// Skip the next item in the buffer. Its wire type is decoded and presented as an argument.
-func (o *Buffer) skip(t reflect.Type, tag, wire int) error {
-
- var u uint64
- var err error
-
- switch wire {
- case WireVarint:
- _, err = o.DecodeVarint()
- case WireFixed64:
- _, err = o.DecodeFixed64()
- case WireBytes:
- _, err = o.DecodeRawBytes(false)
- case WireFixed32:
- _, err = o.DecodeFixed32()
- case WireStartGroup:
- for {
- u, err = o.DecodeVarint()
- if err != nil {
- break
- }
- fwire := int(u & 0x7)
- if fwire == WireEndGroup {
- break
- }
- ftag := int(u >> 3)
- err = o.skip(t, ftag, fwire)
- if err != nil {
- break
- }
- }
- default:
- err = fmt.Errorf("proto: can't skip unknown wire type %d for %s", wire, t)
- }
- return err
-}
-
-// Unmarshaler is the interface representing objects that can
-// unmarshal themselves. The method should reset the receiver before
-// decoding starts. The argument points to data that may be
-// overwritten, so implementations should not keep references to the
-// buffer.
-type Unmarshaler interface {
- Unmarshal([]byte) error
-}
-
-// Unmarshal parses the protocol buffer representation in buf and places the
-// decoded result in pb. If the struct underlying pb does not match
-// the data in buf, the results can be unpredictable.
-//
-// Unmarshal resets pb before starting to unmarshal, so any
-// existing data in pb is always removed. Use UnmarshalMerge
-// to preserve and append to existing data.
-func Unmarshal(buf []byte, pb Message) error {
- pb.Reset()
- return UnmarshalMerge(buf, pb)
-}
-
-// UnmarshalMerge parses the protocol buffer representation in buf and
-// writes the decoded result to pb. If the struct underlying pb does not match
-// the data in buf, the results can be unpredictable.
-//
-// UnmarshalMerge merges into existing data in pb.
-// Most code should use Unmarshal instead.
-func UnmarshalMerge(buf []byte, pb Message) error {
- // If the object can unmarshal itself, let it.
- if u, ok := pb.(Unmarshaler); ok {
- return u.Unmarshal(buf)
- }
- return NewBuffer(buf).Unmarshal(pb)
-}
-
-// DecodeMessage reads a count-delimited message from the Buffer.
-func (p *Buffer) DecodeMessage(pb Message) error {
- enc, err := p.DecodeRawBytes(false)
- if err != nil {
- return err
- }
- return NewBuffer(enc).Unmarshal(pb)
-}
-
-// DecodeGroup reads a tag-delimited group from the Buffer.
-func (p *Buffer) DecodeGroup(pb Message) error {
- typ, base, err := getbase(pb)
- if err != nil {
- return err
- }
- return p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), true, base)
-}
-
-// Unmarshal parses the protocol buffer representation in the
-// Buffer and places the decoded result in pb. If the struct
-// underlying pb does not match the data in the buffer, the results can be
-// unpredictable.
-//
-// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal.
-func (p *Buffer) Unmarshal(pb Message) error {
- // If the object can unmarshal itself, let it.
- if u, ok := pb.(Unmarshaler); ok {
- err := u.Unmarshal(p.buf[p.index:])
- p.index = len(p.buf)
- return err
- }
-
- typ, base, err := getbase(pb)
- if err != nil {
- return err
- }
-
- err = p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), false, base)
-
- if collectStats {
- stats.Decode++
- }
-
- return err
-}
-
-// unmarshalType does the work of unmarshaling a structure.
-func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group bool, base structPointer) error {
- var state errorState
- required, reqFields := prop.reqCount, uint64(0)
-
- var err error
- for err == nil && o.index < len(o.buf) {
- oi := o.index
- var u uint64
- u, err = o.DecodeVarint()
- if err != nil {
- break
- }
- wire := int(u & 0x7)
- if wire == WireEndGroup {
- if is_group {
- if required > 0 {
- // Not enough information to determine the exact field.
- // (See below.)
- return &RequiredNotSetError{"{Unknown}"}
- }
- return nil // input is satisfied
- }
- return fmt.Errorf("proto: %s: wiretype end group for non-group", st)
- }
- tag := int(u >> 3)
- if tag <= 0 {
- return fmt.Errorf("proto: %s: illegal tag %d (wire type %d)", st, tag, wire)
- }
- fieldnum, ok := prop.decoderTags.get(tag)
- if !ok {
- // Maybe it's an extension?
- if prop.extendable {
- if e, _ := extendable(structPointer_Interface(base, st)); isExtensionField(e, int32(tag)) {
- if err = o.skip(st, tag, wire); err == nil {
- extmap := e.extensionsWrite()
- ext := extmap[int32(tag)] // may be missing
- ext.enc = append(ext.enc, o.buf[oi:o.index]...)
- extmap[int32(tag)] = ext
- }
- continue
- }
- }
- // Maybe it's a oneof?
- if prop.oneofUnmarshaler != nil {
- m := structPointer_Interface(base, st).(Message)
- // First return value indicates whether tag is a oneof field.
- ok, err = prop.oneofUnmarshaler(m, tag, wire, o)
- if err == ErrInternalBadWireType {
- // Map the error to something more descriptive.
- // Do the formatting here to save generated code space.
- err = fmt.Errorf("bad wiretype for oneof field in %T", m)
- }
- if ok {
- continue
- }
- }
- err = o.skipAndSave(st, tag, wire, base, prop.unrecField)
- continue
- }
- p := prop.Prop[fieldnum]
-
- if p.dec == nil {
- fmt.Fprintf(os.Stderr, "proto: no protobuf decoder for %s.%s\n", st, st.Field(fieldnum).Name)
- continue
- }
- dec := p.dec
- if wire != WireStartGroup && wire != p.WireType {
- if wire == WireBytes && p.packedDec != nil {
- // a packable field
- dec = p.packedDec
- } else {
- err = fmt.Errorf("proto: bad wiretype for field %s.%s: got wiretype %d, want %d", st, st.Field(fieldnum).Name, wire, p.WireType)
- continue
- }
- }
- decErr := dec(o, p, base)
- if decErr != nil && !state.shouldContinue(decErr, p) {
- err = decErr
- }
- if err == nil && p.Required {
- // Successfully decoded a required field.
- if tag <= 64 {
- // use bitmap for fields 1-64 to catch field reuse.
- var mask uint64 = 1 << uint64(tag-1)
- if reqFields&mask == 0 {
- // new required field
- reqFields |= mask
- required--
- }
- } else {
- // This is imprecise. It can be fooled by a required field
- // with a tag > 64 that is encoded twice; that's very rare.
- // A fully correct implementation would require allocating
- // a data structure, which we would like to avoid.
- required--
- }
- }
- }
- if err == nil {
- if is_group {
- return io.ErrUnexpectedEOF
- }
- if state.err != nil {
- return state.err
- }
- if required > 0 {
- // Not enough information to determine the exact field. If we use extra
- // CPU, we could determine the field only if the missing required field
- // has a tag <= 64 and we check reqFields.
- return &RequiredNotSetError{"{Unknown}"}
- }
- }
- return err
-}
-
-// Individual type decoders
-// For each,
-// u is the decoded value,
-// v is a pointer to the field (pointer) in the struct
-
-// Sizes of the pools to allocate inside the Buffer.
-// The goal is modest amortization and allocation
-// on at least 16-byte boundaries.
-const (
- boolPoolSize = 16
- uint32PoolSize = 8
- uint64PoolSize = 4
-)
-
-// Decode a bool.
-func (o *Buffer) dec_bool(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- if len(o.bools) == 0 {
- o.bools = make([]bool, boolPoolSize)
- }
- o.bools[0] = u != 0
- *structPointer_Bool(base, p.field) = &o.bools[0]
- o.bools = o.bools[1:]
- return nil
-}
-
-func (o *Buffer) dec_proto3_bool(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- *structPointer_BoolVal(base, p.field) = u != 0
- return nil
-}
-
-// Decode an int32.
-func (o *Buffer) dec_int32(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- word32_Set(structPointer_Word32(base, p.field), o, uint32(u))
- return nil
-}
-
-func (o *Buffer) dec_proto3_int32(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- word32Val_Set(structPointer_Word32Val(base, p.field), uint32(u))
- return nil
-}
-
-// Decode an int64.
-func (o *Buffer) dec_int64(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- word64_Set(structPointer_Word64(base, p.field), o, u)
- return nil
-}
-
-func (o *Buffer) dec_proto3_int64(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- word64Val_Set(structPointer_Word64Val(base, p.field), o, u)
- return nil
-}
-
-// Decode a string.
-func (o *Buffer) dec_string(p *Properties, base structPointer) error {
- s, err := o.DecodeStringBytes()
- if err != nil {
- return err
- }
- *structPointer_String(base, p.field) = &s
- return nil
-}
-
-func (o *Buffer) dec_proto3_string(p *Properties, base structPointer) error {
- s, err := o.DecodeStringBytes()
- if err != nil {
- return err
- }
- *structPointer_StringVal(base, p.field) = s
- return nil
-}
-
-// Decode a slice of bytes ([]byte).
-func (o *Buffer) dec_slice_byte(p *Properties, base structPointer) error {
- b, err := o.DecodeRawBytes(true)
- if err != nil {
- return err
- }
- *structPointer_Bytes(base, p.field) = b
- return nil
-}
-
-// Decode a slice of bools ([]bool).
-func (o *Buffer) dec_slice_bool(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- v := structPointer_BoolSlice(base, p.field)
- *v = append(*v, u != 0)
- return nil
-}
-
-// Decode a slice of bools ([]bool) in packed format.
-func (o *Buffer) dec_slice_packed_bool(p *Properties, base structPointer) error {
- v := structPointer_BoolSlice(base, p.field)
-
- nn, err := o.DecodeVarint()
- if err != nil {
- return err
- }
- nb := int(nn) // number of bytes of encoded bools
- fin := o.index + nb
- if fin < o.index {
- return errOverflow
- }
-
- y := *v
- for o.index < fin {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- y = append(y, u != 0)
- }
-
- *v = y
- return nil
-}
-
-// Decode a slice of int32s ([]int32).
-func (o *Buffer) dec_slice_int32(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- structPointer_Word32Slice(base, p.field).Append(uint32(u))
- return nil
-}
-
-// Decode a slice of int32s ([]int32) in packed format.
-func (o *Buffer) dec_slice_packed_int32(p *Properties, base structPointer) error {
- v := structPointer_Word32Slice(base, p.field)
-
- nn, err := o.DecodeVarint()
- if err != nil {
- return err
- }
- nb := int(nn) // number of bytes of encoded int32s
-
- fin := o.index + nb
- if fin < o.index {
- return errOverflow
- }
- for o.index < fin {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- v.Append(uint32(u))
- }
- return nil
-}
-
-// Decode a slice of int64s ([]int64).
-func (o *Buffer) dec_slice_int64(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
-
- structPointer_Word64Slice(base, p.field).Append(u)
- return nil
-}
-
-// Decode a slice of int64s ([]int64) in packed format.
-func (o *Buffer) dec_slice_packed_int64(p *Properties, base structPointer) error {
- v := structPointer_Word64Slice(base, p.field)
-
- nn, err := o.DecodeVarint()
- if err != nil {
- return err
- }
- nb := int(nn) // number of bytes of encoded int64s
-
- fin := o.index + nb
- if fin < o.index {
- return errOverflow
- }
- for o.index < fin {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- v.Append(u)
- }
- return nil
-}
-
-// Decode a slice of strings ([]string).
-func (o *Buffer) dec_slice_string(p *Properties, base structPointer) error {
- s, err := o.DecodeStringBytes()
- if err != nil {
- return err
- }
- v := structPointer_StringSlice(base, p.field)
- *v = append(*v, s)
- return nil
-}
-
-// Decode a slice of slice of bytes ([][]byte).
-func (o *Buffer) dec_slice_slice_byte(p *Properties, base structPointer) error {
- b, err := o.DecodeRawBytes(true)
- if err != nil {
- return err
- }
- v := structPointer_BytesSlice(base, p.field)
- *v = append(*v, b)
- return nil
-}
-
-// Decode a map field.
-func (o *Buffer) dec_new_map(p *Properties, base structPointer) error {
- raw, err := o.DecodeRawBytes(false)
- if err != nil {
- return err
- }
- oi := o.index // index at the end of this map entry
- o.index -= len(raw) // move buffer back to start of map entry
-
- mptr := structPointer_NewAt(base, p.field, p.mtype) // *map[K]V
- if mptr.Elem().IsNil() {
- mptr.Elem().Set(reflect.MakeMap(mptr.Type().Elem()))
- }
- v := mptr.Elem() // map[K]V
-
- // Prepare addressable doubly-indirect placeholders for the key and value types.
- // See enc_new_map for why.
- keyptr := reflect.New(reflect.PtrTo(p.mtype.Key())).Elem() // addressable *K
- keybase := toStructPointer(keyptr.Addr()) // **K
-
- var valbase structPointer
- var valptr reflect.Value
- switch p.mtype.Elem().Kind() {
- case reflect.Slice:
- // []byte
- var dummy []byte
- valptr = reflect.ValueOf(&dummy) // *[]byte
- valbase = toStructPointer(valptr) // *[]byte
- case reflect.Ptr:
- // message; valptr is **Msg; need to allocate the intermediate pointer
- valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V
- valptr.Set(reflect.New(valptr.Type().Elem()))
- valbase = toStructPointer(valptr)
- default:
- // everything else
- valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V
- valbase = toStructPointer(valptr.Addr()) // **V
- }
-
- // Decode.
- // This parses a restricted wire format, namely the encoding of a message
- // with two fields. See enc_new_map for the format.
- for o.index < oi {
- // tagcode for key and value properties are always a single byte
- // because they have tags 1 and 2.
- tagcode := o.buf[o.index]
- o.index++
- switch tagcode {
- case p.mkeyprop.tagcode[0]:
- if err := p.mkeyprop.dec(o, p.mkeyprop, keybase); err != nil {
- return err
- }
- case p.mvalprop.tagcode[0]:
- if err := p.mvalprop.dec(o, p.mvalprop, valbase); err != nil {
- return err
- }
- default:
- // TODO: Should we silently skip this instead?
- return fmt.Errorf("proto: bad map data tag %d", raw[0])
- }
- }
- keyelem, valelem := keyptr.Elem(), valptr.Elem()
- if !keyelem.IsValid() {
- keyelem = reflect.Zero(p.mtype.Key())
- }
- if !valelem.IsValid() {
- valelem = reflect.Zero(p.mtype.Elem())
- }
-
- v.SetMapIndex(keyelem, valelem)
- return nil
-}
-
-// Decode a group.
-func (o *Buffer) dec_struct_group(p *Properties, base structPointer) error {
- bas := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(bas) {
- // allocate new nested message
- bas = toStructPointer(reflect.New(p.stype))
- structPointer_SetStructPointer(base, p.field, bas)
- }
- return o.unmarshalType(p.stype, p.sprop, true, bas)
-}
-
-// Decode an embedded message.
-func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err error) {
- raw, e := o.DecodeRawBytes(false)
- if e != nil {
- return e
- }
-
- bas := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(bas) {
- // allocate new nested message
- bas = toStructPointer(reflect.New(p.stype))
- structPointer_SetStructPointer(base, p.field, bas)
- }
-
- // If the object can unmarshal itself, let it.
- if p.isUnmarshaler {
- iv := structPointer_Interface(bas, p.stype)
- return iv.(Unmarshaler).Unmarshal(raw)
- }
-
- obuf := o.buf
- oi := o.index
- o.buf = raw
- o.index = 0
-
- err = o.unmarshalType(p.stype, p.sprop, false, bas)
- o.buf = obuf
- o.index = oi
-
- return err
-}
-
-// Decode a slice of embedded messages.
-func (o *Buffer) dec_slice_struct_message(p *Properties, base structPointer) error {
- return o.dec_slice_struct(p, false, base)
-}
-
-// Decode a slice of embedded groups.
-func (o *Buffer) dec_slice_struct_group(p *Properties, base structPointer) error {
- return o.dec_slice_struct(p, true, base)
-}
-
-// Decode a slice of structs ([]*struct).
-func (o *Buffer) dec_slice_struct(p *Properties, is_group bool, base structPointer) error {
- v := reflect.New(p.stype)
- bas := toStructPointer(v)
- structPointer_StructPointerSlice(base, p.field).Append(bas)
-
- if is_group {
- err := o.unmarshalType(p.stype, p.sprop, is_group, bas)
- return err
- }
-
- raw, err := o.DecodeRawBytes(false)
- if err != nil {
- return err
- }
-
- // If the object can unmarshal itself, let it.
- if p.isUnmarshaler {
- iv := v.Interface()
- return iv.(Unmarshaler).Unmarshal(raw)
- }
-
- obuf := o.buf
- oi := o.index
- o.buf = raw
- o.index = 0
-
- err = o.unmarshalType(p.stype, p.sprop, is_group, bas)
-
- o.buf = obuf
- o.index = oi
-
- return err
-}
diff --git a/vendor/github.com/golang/protobuf/proto/encode.go b/vendor/github.com/golang/protobuf/proto/encode.go
deleted file mode 100644
index 68b9b30cf..000000000
--- a/vendor/github.com/golang/protobuf/proto/encode.go
+++ /dev/null
@@ -1,1355 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Routines for encoding data into the wire format for protocol buffers.
- */
-
-import (
- "errors"
- "fmt"
- "reflect"
- "sort"
-)
-
-// RequiredNotSetError is the error returned if Marshal is called with
-// a protocol buffer struct whose required fields have not
-// all been initialized. It is also the error returned if Unmarshal is
-// called with an encoded protocol buffer that does not include all the
-// required fields.
-//
-// When printed, RequiredNotSetError reports the first unset required field in a
-// message. If the field cannot be precisely determined, it is reported as
-// "{Unknown}".
-type RequiredNotSetError struct {
- field string
-}
-
-func (e *RequiredNotSetError) Error() string {
- return fmt.Sprintf("proto: required field %q not set", e.field)
-}
-
-var (
- // errRepeatedHasNil is the error returned if Marshal is called with
- // a struct with a repeated field containing a nil element.
- errRepeatedHasNil = errors.New("proto: repeated field has nil element")
-
- // errOneofHasNil is the error returned if Marshal is called with
- // a struct with a oneof field containing a nil element.
- errOneofHasNil = errors.New("proto: oneof field has nil value")
-
- // ErrNil is the error returned if Marshal is called with nil.
- ErrNil = errors.New("proto: Marshal called with nil")
-
- // ErrTooLarge is the error returned if Marshal is called with a
- // message that encodes to >2GB.
- ErrTooLarge = errors.New("proto: message encodes to over 2 GB")
-)
-
-// The fundamental encoders that put bytes on the wire.
-// Those that take integer types all accept uint64 and are
-// therefore of type valueEncoder.
-
-const maxVarintBytes = 10 // maximum length of a varint
-
-// maxMarshalSize is the largest allowed size of an encoded protobuf,
-// since C++ and Java use signed int32s for the size.
-const maxMarshalSize = 1<<31 - 1
-
-// EncodeVarint returns the varint encoding of x.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-// Not used by the package itself, but helpful to clients
-// wishing to use the same encoding.
-func EncodeVarint(x uint64) []byte {
- var buf [maxVarintBytes]byte
- var n int
- for n = 0; x > 127; n++ {
- buf[n] = 0x80 | uint8(x&0x7F)
- x >>= 7
- }
- buf[n] = uint8(x)
- n++
- return buf[0:n]
-}
-
-// EncodeVarint writes a varint-encoded integer to the Buffer.
-// This is the format for the
-// int32, int64, uint32, uint64, bool, and enum
-// protocol buffer types.
-func (p *Buffer) EncodeVarint(x uint64) error {
- for x >= 1<<7 {
- p.buf = append(p.buf, uint8(x&0x7f|0x80))
- x >>= 7
- }
- p.buf = append(p.buf, uint8(x))
- return nil
-}
-
-// SizeVarint returns the varint encoding size of an integer.
-func SizeVarint(x uint64) int {
- return sizeVarint(x)
-}
-
-func sizeVarint(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-
-// EncodeFixed64 writes a 64-bit integer to the Buffer.
-// This is the format for the
-// fixed64, sfixed64, and double protocol buffer types.
-func (p *Buffer) EncodeFixed64(x uint64) error {
- p.buf = append(p.buf,
- uint8(x),
- uint8(x>>8),
- uint8(x>>16),
- uint8(x>>24),
- uint8(x>>32),
- uint8(x>>40),
- uint8(x>>48),
- uint8(x>>56))
- return nil
-}
-
-func sizeFixed64(x uint64) int {
- return 8
-}
-
-// EncodeFixed32 writes a 32-bit integer to the Buffer.
-// This is the format for the
-// fixed32, sfixed32, and float protocol buffer types.
-func (p *Buffer) EncodeFixed32(x uint64) error {
- p.buf = append(p.buf,
- uint8(x),
- uint8(x>>8),
- uint8(x>>16),
- uint8(x>>24))
- return nil
-}
-
-func sizeFixed32(x uint64) int {
- return 4
-}
-
-// EncodeZigzag64 writes a zigzag-encoded 64-bit integer
-// to the Buffer.
-// This is the format used for the sint64 protocol buffer type.
-func (p *Buffer) EncodeZigzag64(x uint64) error {
- // use signed number to get arithmetic right shift.
- return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-
-func sizeZigzag64(x uint64) int {
- return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-
-// EncodeZigzag32 writes a zigzag-encoded 32-bit integer
-// to the Buffer.
-// This is the format used for the sint32 protocol buffer type.
-func (p *Buffer) EncodeZigzag32(x uint64) error {
- // use signed number to get arithmetic right shift.
- return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31))))
-}
-
-func sizeZigzag32(x uint64) int {
- return sizeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31))))
-}
-
-// EncodeRawBytes writes a count-delimited byte buffer to the Buffer.
-// This is the format used for the bytes protocol buffer
-// type and for embedded messages.
-func (p *Buffer) EncodeRawBytes(b []byte) error {
- p.EncodeVarint(uint64(len(b)))
- p.buf = append(p.buf, b...)
- return nil
-}
-
-func sizeRawBytes(b []byte) int {
- return sizeVarint(uint64(len(b))) +
- len(b)
-}
-
-// EncodeStringBytes writes an encoded string to the Buffer.
-// This is the format used for the proto2 string type.
-func (p *Buffer) EncodeStringBytes(s string) error {
- p.EncodeVarint(uint64(len(s)))
- p.buf = append(p.buf, s...)
- return nil
-}
-
-func sizeStringBytes(s string) int {
- return sizeVarint(uint64(len(s))) +
- len(s)
-}
-
-// Marshaler is the interface representing objects that can marshal themselves.
-type Marshaler interface {
- Marshal() ([]byte, error)
-}
-
-// Marshal takes the protocol buffer
-// and encodes it into the wire format, returning the data.
-func Marshal(pb Message) ([]byte, error) {
- // Can the object marshal itself?
- if m, ok := pb.(Marshaler); ok {
- return m.Marshal()
- }
- p := NewBuffer(nil)
- err := p.Marshal(pb)
- if p.buf == nil && err == nil {
- // Return a non-nil slice on success.
- return []byte{}, nil
- }
- return p.buf, err
-}
-
-// EncodeMessage writes the protocol buffer to the Buffer,
-// prefixed by a varint-encoded length.
-func (p *Buffer) EncodeMessage(pb Message) error {
- t, base, err := getbase(pb)
- if structPointer_IsNil(base) {
- return ErrNil
- }
- if err == nil {
- var state errorState
- err = p.enc_len_struct(GetProperties(t.Elem()), base, &state)
- }
- return err
-}
-
-// Marshal takes the protocol buffer
-// and encodes it into the wire format, writing the result to the
-// Buffer.
-func (p *Buffer) Marshal(pb Message) error {
- // Can the object marshal itself?
- if m, ok := pb.(Marshaler); ok {
- data, err := m.Marshal()
- p.buf = append(p.buf, data...)
- return err
- }
-
- t, base, err := getbase(pb)
- if structPointer_IsNil(base) {
- return ErrNil
- }
- if err == nil {
- err = p.enc_struct(GetProperties(t.Elem()), base)
- }
-
- if collectStats {
- (stats).Encode++ // Parens are to work around a goimports bug.
- }
-
- if len(p.buf) > maxMarshalSize {
- return ErrTooLarge
- }
- return err
-}
-
-// Size returns the encoded size of a protocol buffer.
-func Size(pb Message) (n int) {
- // Can the object marshal itself? If so, Size is slow.
- // TODO: add Size to Marshaler, or add a Sizer interface.
- if m, ok := pb.(Marshaler); ok {
- b, _ := m.Marshal()
- return len(b)
- }
-
- t, base, err := getbase(pb)
- if structPointer_IsNil(base) {
- return 0
- }
- if err == nil {
- n = size_struct(GetProperties(t.Elem()), base)
- }
-
- if collectStats {
- (stats).Size++ // Parens are to work around a goimports bug.
- }
-
- return
-}
-
-// Individual type encoders.
-
-// Encode a bool.
-func (o *Buffer) enc_bool(p *Properties, base structPointer) error {
- v := *structPointer_Bool(base, p.field)
- if v == nil {
- return ErrNil
- }
- x := 0
- if *v {
- x = 1
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func (o *Buffer) enc_proto3_bool(p *Properties, base structPointer) error {
- v := *structPointer_BoolVal(base, p.field)
- if !v {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, 1)
- return nil
-}
-
-func size_bool(p *Properties, base structPointer) int {
- v := *structPointer_Bool(base, p.field)
- if v == nil {
- return 0
- }
- return len(p.tagcode) + 1 // each bool takes exactly one byte
-}
-
-func size_proto3_bool(p *Properties, base structPointer) int {
- v := *structPointer_BoolVal(base, p.field)
- if !v && !p.oneof {
- return 0
- }
- return len(p.tagcode) + 1 // each bool takes exactly one byte
-}
-
-// Encode an int32.
-func (o *Buffer) enc_int32(p *Properties, base structPointer) error {
- v := structPointer_Word32(base, p.field)
- if word32_IsNil(v) {
- return ErrNil
- }
- x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func (o *Buffer) enc_proto3_int32(p *Properties, base structPointer) error {
- v := structPointer_Word32Val(base, p.field)
- x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range
- if x == 0 {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func size_int32(p *Properties, base structPointer) (n int) {
- v := structPointer_Word32(base, p.field)
- if word32_IsNil(v) {
- return 0
- }
- x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range
- n += len(p.tagcode)
- n += p.valSize(uint64(x))
- return
-}
-
-func size_proto3_int32(p *Properties, base structPointer) (n int) {
- v := structPointer_Word32Val(base, p.field)
- x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range
- if x == 0 && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += p.valSize(uint64(x))
- return
-}
-
-// Encode a uint32.
-// Exactly the same as int32, except for no sign extension.
-func (o *Buffer) enc_uint32(p *Properties, base structPointer) error {
- v := structPointer_Word32(base, p.field)
- if word32_IsNil(v) {
- return ErrNil
- }
- x := word32_Get(v)
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func (o *Buffer) enc_proto3_uint32(p *Properties, base structPointer) error {
- v := structPointer_Word32Val(base, p.field)
- x := word32Val_Get(v)
- if x == 0 {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func size_uint32(p *Properties, base structPointer) (n int) {
- v := structPointer_Word32(base, p.field)
- if word32_IsNil(v) {
- return 0
- }
- x := word32_Get(v)
- n += len(p.tagcode)
- n += p.valSize(uint64(x))
- return
-}
-
-func size_proto3_uint32(p *Properties, base structPointer) (n int) {
- v := structPointer_Word32Val(base, p.field)
- x := word32Val_Get(v)
- if x == 0 && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += p.valSize(uint64(x))
- return
-}
-
-// Encode an int64.
-func (o *Buffer) enc_int64(p *Properties, base structPointer) error {
- v := structPointer_Word64(base, p.field)
- if word64_IsNil(v) {
- return ErrNil
- }
- x := word64_Get(v)
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, x)
- return nil
-}
-
-func (o *Buffer) enc_proto3_int64(p *Properties, base structPointer) error {
- v := structPointer_Word64Val(base, p.field)
- x := word64Val_Get(v)
- if x == 0 {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, x)
- return nil
-}
-
-func size_int64(p *Properties, base structPointer) (n int) {
- v := structPointer_Word64(base, p.field)
- if word64_IsNil(v) {
- return 0
- }
- x := word64_Get(v)
- n += len(p.tagcode)
- n += p.valSize(x)
- return
-}
-
-func size_proto3_int64(p *Properties, base structPointer) (n int) {
- v := structPointer_Word64Val(base, p.field)
- x := word64Val_Get(v)
- if x == 0 && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += p.valSize(x)
- return
-}
-
-// Encode a string.
-func (o *Buffer) enc_string(p *Properties, base structPointer) error {
- v := *structPointer_String(base, p.field)
- if v == nil {
- return ErrNil
- }
- x := *v
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeStringBytes(x)
- return nil
-}
-
-func (o *Buffer) enc_proto3_string(p *Properties, base structPointer) error {
- v := *structPointer_StringVal(base, p.field)
- if v == "" {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeStringBytes(v)
- return nil
-}
-
-func size_string(p *Properties, base structPointer) (n int) {
- v := *structPointer_String(base, p.field)
- if v == nil {
- return 0
- }
- x := *v
- n += len(p.tagcode)
- n += sizeStringBytes(x)
- return
-}
-
-func size_proto3_string(p *Properties, base structPointer) (n int) {
- v := *structPointer_StringVal(base, p.field)
- if v == "" && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += sizeStringBytes(v)
- return
-}
-
-// All protocol buffer fields are nillable, but be careful.
-func isNil(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
- return v.IsNil()
- }
- return false
-}
-
-// Encode a message struct.
-func (o *Buffer) enc_struct_message(p *Properties, base structPointer) error {
- var state errorState
- structp := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(structp) {
- return ErrNil
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, err := m.Marshal()
- if err != nil && !state.shouldContinue(err, nil) {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- return state.err
- }
-
- o.buf = append(o.buf, p.tagcode...)
- return o.enc_len_struct(p.sprop, structp, &state)
-}
-
-func size_struct_message(p *Properties, base structPointer) int {
- structp := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(structp) {
- return 0
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, _ := m.Marshal()
- n0 := len(p.tagcode)
- n1 := sizeRawBytes(data)
- return n0 + n1
- }
-
- n0 := len(p.tagcode)
- n1 := size_struct(p.sprop, structp)
- n2 := sizeVarint(uint64(n1)) // size of encoded length
- return n0 + n1 + n2
-}
-
-// Encode a group struct.
-func (o *Buffer) enc_struct_group(p *Properties, base structPointer) error {
- var state errorState
- b := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(b) {
- return ErrNil
- }
-
- o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup))
- err := o.enc_struct(p.sprop, b)
- if err != nil && !state.shouldContinue(err, nil) {
- return err
- }
- o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup))
- return state.err
-}
-
-func size_struct_group(p *Properties, base structPointer) (n int) {
- b := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(b) {
- return 0
- }
-
- n += sizeVarint(uint64((p.Tag << 3) | WireStartGroup))
- n += size_struct(p.sprop, b)
- n += sizeVarint(uint64((p.Tag << 3) | WireEndGroup))
- return
-}
-
-// Encode a slice of bools ([]bool).
-func (o *Buffer) enc_slice_bool(p *Properties, base structPointer) error {
- s := *structPointer_BoolSlice(base, p.field)
- l := len(s)
- if l == 0 {
- return ErrNil
- }
- for _, x := range s {
- o.buf = append(o.buf, p.tagcode...)
- v := uint64(0)
- if x {
- v = 1
- }
- p.valEnc(o, v)
- }
- return nil
-}
-
-func size_slice_bool(p *Properties, base structPointer) int {
- s := *structPointer_BoolSlice(base, p.field)
- l := len(s)
- if l == 0 {
- return 0
- }
- return l * (len(p.tagcode) + 1) // each bool takes exactly one byte
-}
-
-// Encode a slice of bools ([]bool) in packed format.
-func (o *Buffer) enc_slice_packed_bool(p *Properties, base structPointer) error {
- s := *structPointer_BoolSlice(base, p.field)
- l := len(s)
- if l == 0 {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeVarint(uint64(l)) // each bool takes exactly one byte
- for _, x := range s {
- v := uint64(0)
- if x {
- v = 1
- }
- p.valEnc(o, v)
- }
- return nil
-}
-
-func size_slice_packed_bool(p *Properties, base structPointer) (n int) {
- s := *structPointer_BoolSlice(base, p.field)
- l := len(s)
- if l == 0 {
- return 0
- }
- n += len(p.tagcode)
- n += sizeVarint(uint64(l))
- n += l // each bool takes exactly one byte
- return
-}
-
-// Encode a slice of bytes ([]byte).
-func (o *Buffer) enc_slice_byte(p *Properties, base structPointer) error {
- s := *structPointer_Bytes(base, p.field)
- if s == nil {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(s)
- return nil
-}
-
-func (o *Buffer) enc_proto3_slice_byte(p *Properties, base structPointer) error {
- s := *structPointer_Bytes(base, p.field)
- if len(s) == 0 {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(s)
- return nil
-}
-
-func size_slice_byte(p *Properties, base structPointer) (n int) {
- s := *structPointer_Bytes(base, p.field)
- if s == nil && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += sizeRawBytes(s)
- return
-}
-
-func size_proto3_slice_byte(p *Properties, base structPointer) (n int) {
- s := *structPointer_Bytes(base, p.field)
- if len(s) == 0 && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += sizeRawBytes(s)
- return
-}
-
-// Encode a slice of int32s ([]int32).
-func (o *Buffer) enc_slice_int32(p *Properties, base structPointer) error {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- for i := 0; i < l; i++ {
- o.buf = append(o.buf, p.tagcode...)
- x := int32(s.Index(i)) // permit sign extension to use full 64-bit range
- p.valEnc(o, uint64(x))
- }
- return nil
-}
-
-func size_slice_int32(p *Properties, base structPointer) (n int) {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- for i := 0; i < l; i++ {
- n += len(p.tagcode)
- x := int32(s.Index(i)) // permit sign extension to use full 64-bit range
- n += p.valSize(uint64(x))
- }
- return
-}
-
-// Encode a slice of int32s ([]int32) in packed format.
-func (o *Buffer) enc_slice_packed_int32(p *Properties, base structPointer) error {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- // TODO: Reuse a Buffer.
- buf := NewBuffer(nil)
- for i := 0; i < l; i++ {
- x := int32(s.Index(i)) // permit sign extension to use full 64-bit range
- p.valEnc(buf, uint64(x))
- }
-
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeVarint(uint64(len(buf.buf)))
- o.buf = append(o.buf, buf.buf...)
- return nil
-}
-
-func size_slice_packed_int32(p *Properties, base structPointer) (n int) {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- var bufSize int
- for i := 0; i < l; i++ {
- x := int32(s.Index(i)) // permit sign extension to use full 64-bit range
- bufSize += p.valSize(uint64(x))
- }
-
- n += len(p.tagcode)
- n += sizeVarint(uint64(bufSize))
- n += bufSize
- return
-}
-
-// Encode a slice of uint32s ([]uint32).
-// Exactly the same as int32, except for no sign extension.
-func (o *Buffer) enc_slice_uint32(p *Properties, base structPointer) error {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- for i := 0; i < l; i++ {
- o.buf = append(o.buf, p.tagcode...)
- x := s.Index(i)
- p.valEnc(o, uint64(x))
- }
- return nil
-}
-
-func size_slice_uint32(p *Properties, base structPointer) (n int) {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- for i := 0; i < l; i++ {
- n += len(p.tagcode)
- x := s.Index(i)
- n += p.valSize(uint64(x))
- }
- return
-}
-
-// Encode a slice of uint32s ([]uint32) in packed format.
-// Exactly the same as int32, except for no sign extension.
-func (o *Buffer) enc_slice_packed_uint32(p *Properties, base structPointer) error {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- // TODO: Reuse a Buffer.
- buf := NewBuffer(nil)
- for i := 0; i < l; i++ {
- p.valEnc(buf, uint64(s.Index(i)))
- }
-
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeVarint(uint64(len(buf.buf)))
- o.buf = append(o.buf, buf.buf...)
- return nil
-}
-
-func size_slice_packed_uint32(p *Properties, base structPointer) (n int) {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- var bufSize int
- for i := 0; i < l; i++ {
- bufSize += p.valSize(uint64(s.Index(i)))
- }
-
- n += len(p.tagcode)
- n += sizeVarint(uint64(bufSize))
- n += bufSize
- return
-}
-
-// Encode a slice of int64s ([]int64).
-func (o *Buffer) enc_slice_int64(p *Properties, base structPointer) error {
- s := structPointer_Word64Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- for i := 0; i < l; i++ {
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, s.Index(i))
- }
- return nil
-}
-
-func size_slice_int64(p *Properties, base structPointer) (n int) {
- s := structPointer_Word64Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- for i := 0; i < l; i++ {
- n += len(p.tagcode)
- n += p.valSize(s.Index(i))
- }
- return
-}
-
-// Encode a slice of int64s ([]int64) in packed format.
-func (o *Buffer) enc_slice_packed_int64(p *Properties, base structPointer) error {
- s := structPointer_Word64Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- // TODO: Reuse a Buffer.
- buf := NewBuffer(nil)
- for i := 0; i < l; i++ {
- p.valEnc(buf, s.Index(i))
- }
-
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeVarint(uint64(len(buf.buf)))
- o.buf = append(o.buf, buf.buf...)
- return nil
-}
-
-func size_slice_packed_int64(p *Properties, base structPointer) (n int) {
- s := structPointer_Word64Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- var bufSize int
- for i := 0; i < l; i++ {
- bufSize += p.valSize(s.Index(i))
- }
-
- n += len(p.tagcode)
- n += sizeVarint(uint64(bufSize))
- n += bufSize
- return
-}
-
-// Encode a slice of slice of bytes ([][]byte).
-func (o *Buffer) enc_slice_slice_byte(p *Properties, base structPointer) error {
- ss := *structPointer_BytesSlice(base, p.field)
- l := len(ss)
- if l == 0 {
- return ErrNil
- }
- for i := 0; i < l; i++ {
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(ss[i])
- }
- return nil
-}
-
-func size_slice_slice_byte(p *Properties, base structPointer) (n int) {
- ss := *structPointer_BytesSlice(base, p.field)
- l := len(ss)
- if l == 0 {
- return 0
- }
- n += l * len(p.tagcode)
- for i := 0; i < l; i++ {
- n += sizeRawBytes(ss[i])
- }
- return
-}
-
-// Encode a slice of strings ([]string).
-func (o *Buffer) enc_slice_string(p *Properties, base structPointer) error {
- ss := *structPointer_StringSlice(base, p.field)
- l := len(ss)
- for i := 0; i < l; i++ {
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeStringBytes(ss[i])
- }
- return nil
-}
-
-func size_slice_string(p *Properties, base structPointer) (n int) {
- ss := *structPointer_StringSlice(base, p.field)
- l := len(ss)
- n += l * len(p.tagcode)
- for i := 0; i < l; i++ {
- n += sizeStringBytes(ss[i])
- }
- return
-}
-
-// Encode a slice of message structs ([]*struct).
-func (o *Buffer) enc_slice_struct_message(p *Properties, base structPointer) error {
- var state errorState
- s := structPointer_StructPointerSlice(base, p.field)
- l := s.Len()
-
- for i := 0; i < l; i++ {
- structp := s.Index(i)
- if structPointer_IsNil(structp) {
- return errRepeatedHasNil
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, err := m.Marshal()
- if err != nil && !state.shouldContinue(err, nil) {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- continue
- }
-
- o.buf = append(o.buf, p.tagcode...)
- err := o.enc_len_struct(p.sprop, structp, &state)
- if err != nil && !state.shouldContinue(err, nil) {
- if err == ErrNil {
- return errRepeatedHasNil
- }
- return err
- }
- }
- return state.err
-}
-
-func size_slice_struct_message(p *Properties, base structPointer) (n int) {
- s := structPointer_StructPointerSlice(base, p.field)
- l := s.Len()
- n += l * len(p.tagcode)
- for i := 0; i < l; i++ {
- structp := s.Index(i)
- if structPointer_IsNil(structp) {
- return // return the size up to this point
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, _ := m.Marshal()
- n += sizeRawBytes(data)
- continue
- }
-
- n0 := size_struct(p.sprop, structp)
- n1 := sizeVarint(uint64(n0)) // size of encoded length
- n += n0 + n1
- }
- return
-}
-
-// Encode a slice of group structs ([]*struct).
-func (o *Buffer) enc_slice_struct_group(p *Properties, base structPointer) error {
- var state errorState
- s := structPointer_StructPointerSlice(base, p.field)
- l := s.Len()
-
- for i := 0; i < l; i++ {
- b := s.Index(i)
- if structPointer_IsNil(b) {
- return errRepeatedHasNil
- }
-
- o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup))
-
- err := o.enc_struct(p.sprop, b)
-
- if err != nil && !state.shouldContinue(err, nil) {
- if err == ErrNil {
- return errRepeatedHasNil
- }
- return err
- }
-
- o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup))
- }
- return state.err
-}
-
-func size_slice_struct_group(p *Properties, base structPointer) (n int) {
- s := structPointer_StructPointerSlice(base, p.field)
- l := s.Len()
-
- n += l * sizeVarint(uint64((p.Tag<<3)|WireStartGroup))
- n += l * sizeVarint(uint64((p.Tag<<3)|WireEndGroup))
- for i := 0; i < l; i++ {
- b := s.Index(i)
- if structPointer_IsNil(b) {
- return // return size up to this point
- }
-
- n += size_struct(p.sprop, b)
- }
- return
-}
-
-// Encode an extension map.
-func (o *Buffer) enc_map(p *Properties, base structPointer) error {
- exts := structPointer_ExtMap(base, p.field)
- if err := encodeExtensionsMap(*exts); err != nil {
- return err
- }
-
- return o.enc_map_body(*exts)
-}
-
-func (o *Buffer) enc_exts(p *Properties, base structPointer) error {
- exts := structPointer_Extensions(base, p.field)
- if err := encodeExtensions(exts); err != nil {
- return err
- }
- v, _ := exts.extensionsRead()
-
- return o.enc_map_body(v)
-}
-
-func (o *Buffer) enc_map_body(v map[int32]Extension) error {
- // Fast-path for common cases: zero or one extensions.
- if len(v) <= 1 {
- for _, e := range v {
- o.buf = append(o.buf, e.enc...)
- }
- return nil
- }
-
- // Sort keys to provide a deterministic encoding.
- keys := make([]int, 0, len(v))
- for k := range v {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
-
- for _, k := range keys {
- o.buf = append(o.buf, v[int32(k)].enc...)
- }
- return nil
-}
-
-func size_map(p *Properties, base structPointer) int {
- v := structPointer_ExtMap(base, p.field)
- return extensionsMapSize(*v)
-}
-
-func size_exts(p *Properties, base structPointer) int {
- v := structPointer_Extensions(base, p.field)
- return extensionsSize(v)
-}
-
-// Encode a map field.
-func (o *Buffer) enc_new_map(p *Properties, base structPointer) error {
- var state errorState // XXX: or do we need to plumb this through?
-
- /*
- A map defined as
- map<key_type, value_type> map_field = N;
- is encoded in the same way as
- message MapFieldEntry {
- key_type key = 1;
- value_type value = 2;
- }
- repeated MapFieldEntry map_field = N;
- */
-
- v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V
- if v.Len() == 0 {
- return nil
- }
-
- keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype)
-
- enc := func() error {
- if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil {
- return err
- }
- if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil && err != ErrNil {
- return err
- }
- return nil
- }
-
- // Don't sort map keys. It is not required by the spec, and C++ doesn't do it.
- for _, key := range v.MapKeys() {
- val := v.MapIndex(key)
-
- keycopy.Set(key)
- valcopy.Set(val)
-
- o.buf = append(o.buf, p.tagcode...)
- if err := o.enc_len_thing(enc, &state); err != nil {
- return err
- }
- }
- return nil
-}
-
-func size_new_map(p *Properties, base structPointer) int {
- v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V
-
- keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype)
-
- n := 0
- for _, key := range v.MapKeys() {
- val := v.MapIndex(key)
- keycopy.Set(key)
- valcopy.Set(val)
-
- // Tag codes for key and val are the responsibility of the sub-sizer.
- keysize := p.mkeyprop.size(p.mkeyprop, keybase)
- valsize := p.mvalprop.size(p.mvalprop, valbase)
- entry := keysize + valsize
- // Add on tag code and length of map entry itself.
- n += len(p.tagcode) + sizeVarint(uint64(entry)) + entry
- }
- return n
-}
-
-// mapEncodeScratch returns a new reflect.Value matching the map's value type,
-// and a structPointer suitable for passing to an encoder or sizer.
-func mapEncodeScratch(mapType reflect.Type) (keycopy, valcopy reflect.Value, keybase, valbase structPointer) {
- // Prepare addressable doubly-indirect placeholders for the key and value types.
- // This is needed because the element-type encoders expect **T, but the map iteration produces T.
-
- keycopy = reflect.New(mapType.Key()).Elem() // addressable K
- keyptr := reflect.New(reflect.PtrTo(keycopy.Type())).Elem() // addressable *K
- keyptr.Set(keycopy.Addr()) //
- keybase = toStructPointer(keyptr.Addr()) // **K
-
- // Value types are more varied and require special handling.
- switch mapType.Elem().Kind() {
- case reflect.Slice:
- // []byte
- var dummy []byte
- valcopy = reflect.ValueOf(&dummy).Elem() // addressable []byte
- valbase = toStructPointer(valcopy.Addr())
- case reflect.Ptr:
- // message; the generated field type is map[K]*Msg (so V is *Msg),
- // so we only need one level of indirection.
- valcopy = reflect.New(mapType.Elem()).Elem() // addressable V
- valbase = toStructPointer(valcopy.Addr())
- default:
- // everything else
- valcopy = reflect.New(mapType.Elem()).Elem() // addressable V
- valptr := reflect.New(reflect.PtrTo(valcopy.Type())).Elem() // addressable *V
- valptr.Set(valcopy.Addr()) //
- valbase = toStructPointer(valptr.Addr()) // **V
- }
- return
-}
-
-// Encode a struct.
-func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error {
- var state errorState
- // Encode fields in tag order so that decoders may use optimizations
- // that depend on the ordering.
- // https://developers.google.com/protocol-buffers/docs/encoding#order
- for _, i := range prop.order {
- p := prop.Prop[i]
- if p.enc != nil {
- err := p.enc(o, p, base)
- if err != nil {
- if err == ErrNil {
- if p.Required && state.err == nil {
- state.err = &RequiredNotSetError{p.Name}
- }
- } else if err == errRepeatedHasNil {
- // Give more context to nil values in repeated fields.
- return errors.New("repeated field " + p.OrigName + " has nil element")
- } else if !state.shouldContinue(err, p) {
- return err
- }
- }
- if len(o.buf) > maxMarshalSize {
- return ErrTooLarge
- }
- }
- }
-
- // Do oneof fields.
- if prop.oneofMarshaler != nil {
- m := structPointer_Interface(base, prop.stype).(Message)
- if err := prop.oneofMarshaler(m, o); err == ErrNil {
- return errOneofHasNil
- } else if err != nil {
- return err
- }
- }
-
- // Add unrecognized fields at the end.
- if prop.unrecField.IsValid() {
- v := *structPointer_Bytes(base, prop.unrecField)
- if len(o.buf)+len(v) > maxMarshalSize {
- return ErrTooLarge
- }
- if len(v) > 0 {
- o.buf = append(o.buf, v...)
- }
- }
-
- return state.err
-}
-
-func size_struct(prop *StructProperties, base structPointer) (n int) {
- for _, i := range prop.order {
- p := prop.Prop[i]
- if p.size != nil {
- n += p.size(p, base)
- }
- }
-
- // Add unrecognized fields at the end.
- if prop.unrecField.IsValid() {
- v := *structPointer_Bytes(base, prop.unrecField)
- n += len(v)
- }
-
- // Factor in any oneof fields.
- if prop.oneofSizer != nil {
- m := structPointer_Interface(base, prop.stype).(Message)
- n += prop.oneofSizer(m)
- }
-
- return
-}
-
-var zeroes [20]byte // longer than any conceivable sizeVarint
-
-// Encode a struct, preceded by its encoded length (as a varint).
-func (o *Buffer) enc_len_struct(prop *StructProperties, base structPointer, state *errorState) error {
- return o.enc_len_thing(func() error { return o.enc_struct(prop, base) }, state)
-}
-
-// Encode something, preceded by its encoded length (as a varint).
-func (o *Buffer) enc_len_thing(enc func() error, state *errorState) error {
- iLen := len(o.buf)
- o.buf = append(o.buf, 0, 0, 0, 0) // reserve four bytes for length
- iMsg := len(o.buf)
- err := enc()
- if err != nil && !state.shouldContinue(err, nil) {
- return err
- }
- lMsg := len(o.buf) - iMsg
- lLen := sizeVarint(uint64(lMsg))
- switch x := lLen - (iMsg - iLen); {
- case x > 0: // actual length is x bytes larger than the space we reserved
- // Move msg x bytes right.
- o.buf = append(o.buf, zeroes[:x]...)
- copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg])
- case x < 0: // actual length is x bytes smaller than the space we reserved
- // Move msg x bytes left.
- copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg])
- o.buf = o.buf[:len(o.buf)+x] // x is negative
- }
- // Encode the length in the reserved space.
- o.buf = o.buf[:iLen]
- o.EncodeVarint(uint64(lMsg))
- o.buf = o.buf[:len(o.buf)+lMsg]
- return state.err
-}
-
-// errorState maintains the first error that occurs and updates that error
-// with additional context.
-type errorState struct {
- err error
-}
-
-// shouldContinue reports whether encoding should continue upon encountering the
-// given error. If the error is RequiredNotSetError, shouldContinue returns true
-// and, if this is the first appearance of that error, remembers it for future
-// reporting.
-//
-// If prop is not nil, it may update any error with additional context about the
-// field with the error.
-func (s *errorState) shouldContinue(err error, prop *Properties) bool {
- // Ignore unset required fields.
- reqNotSet, ok := err.(*RequiredNotSetError)
- if !ok {
- return false
- }
- if s.err == nil {
- if prop != nil {
- err = &RequiredNotSetError{prop.Name + "." + reqNotSet.field}
- }
- s.err = err
- }
- return true
-}
diff --git a/vendor/github.com/golang/protobuf/proto/equal.go b/vendor/github.com/golang/protobuf/proto/equal.go
deleted file mode 100644
index 2ed1cf596..000000000
--- a/vendor/github.com/golang/protobuf/proto/equal.go
+++ /dev/null
@@ -1,300 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2011 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Protocol buffer comparison.
-
-package proto
-
-import (
- "bytes"
- "log"
- "reflect"
- "strings"
-)
-
-/*
-Equal returns true iff protocol buffers a and b are equal.
-The arguments must both be pointers to protocol buffer structs.
-
-Equality is defined in this way:
- - Two messages are equal iff they are the same type,
- corresponding fields are equal, unknown field sets
- are equal, and extensions sets are equal.
- - Two set scalar fields are equal iff their values are equal.
- If the fields are of a floating-point type, remember that
- NaN != x for all x, including NaN. If the message is defined
- in a proto3 .proto file, fields are not "set"; specifically,
- zero length proto3 "bytes" fields are equal (nil == {}).
- - Two repeated fields are equal iff their lengths are the same,
- and their corresponding elements are equal. Note a "bytes" field,
- although represented by []byte, is not a repeated field and the
- rule for the scalar fields described above applies.
- - Two unset fields are equal.
- - Two unknown field sets are equal if their current
- encoded state is equal.
- - Two extension sets are equal iff they have corresponding
- elements that are pairwise equal.
- - Two map fields are equal iff their lengths are the same,
- and they contain the same set of elements. Zero-length map
- fields are equal.
- - Every other combination of things are not equal.
-
-The return value is undefined if a and b are not protocol buffers.
-*/
-func Equal(a, b Message) bool {
- if a == nil || b == nil {
- return a == b
- }
- v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b)
- if v1.Type() != v2.Type() {
- return false
- }
- if v1.Kind() == reflect.Ptr {
- if v1.IsNil() {
- return v2.IsNil()
- }
- if v2.IsNil() {
- return false
- }
- v1, v2 = v1.Elem(), v2.Elem()
- }
- if v1.Kind() != reflect.Struct {
- return false
- }
- return equalStruct(v1, v2)
-}
-
-// v1 and v2 are known to have the same type.
-func equalStruct(v1, v2 reflect.Value) bool {
- sprop := GetProperties(v1.Type())
- for i := 0; i < v1.NumField(); i++ {
- f := v1.Type().Field(i)
- if strings.HasPrefix(f.Name, "XXX_") {
- continue
- }
- f1, f2 := v1.Field(i), v2.Field(i)
- if f.Type.Kind() == reflect.Ptr {
- if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 {
- // both unset
- continue
- } else if n1 != n2 {
- // set/unset mismatch
- return false
- }
- b1, ok := f1.Interface().(raw)
- if ok {
- b2 := f2.Interface().(raw)
- // RawMessage
- if !bytes.Equal(b1.Bytes(), b2.Bytes()) {
- return false
- }
- continue
- }
- f1, f2 = f1.Elem(), f2.Elem()
- }
- if !equalAny(f1, f2, sprop.Prop[i]) {
- return false
- }
- }
-
- if em1 := v1.FieldByName("XXX_InternalExtensions"); em1.IsValid() {
- em2 := v2.FieldByName("XXX_InternalExtensions")
- if !equalExtensions(v1.Type(), em1.Interface().(XXX_InternalExtensions), em2.Interface().(XXX_InternalExtensions)) {
- return false
- }
- }
-
- if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() {
- em2 := v2.FieldByName("XXX_extensions")
- if !equalExtMap(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) {
- return false
- }
- }
-
- uf := v1.FieldByName("XXX_unrecognized")
- if !uf.IsValid() {
- return true
- }
-
- u1 := uf.Bytes()
- u2 := v2.FieldByName("XXX_unrecognized").Bytes()
- if !bytes.Equal(u1, u2) {
- return false
- }
-
- return true
-}
-
-// v1 and v2 are known to have the same type.
-// prop may be nil.
-func equalAny(v1, v2 reflect.Value, prop *Properties) bool {
- if v1.Type() == protoMessageType {
- m1, _ := v1.Interface().(Message)
- m2, _ := v2.Interface().(Message)
- return Equal(m1, m2)
- }
- switch v1.Kind() {
- case reflect.Bool:
- return v1.Bool() == v2.Bool()
- case reflect.Float32, reflect.Float64:
- return v1.Float() == v2.Float()
- case reflect.Int32, reflect.Int64:
- return v1.Int() == v2.Int()
- case reflect.Interface:
- // Probably a oneof field; compare the inner values.
- n1, n2 := v1.IsNil(), v2.IsNil()
- if n1 || n2 {
- return n1 == n2
- }
- e1, e2 := v1.Elem(), v2.Elem()
- if e1.Type() != e2.Type() {
- return false
- }
- return equalAny(e1, e2, nil)
- case reflect.Map:
- if v1.Len() != v2.Len() {
- return false
- }
- for _, key := range v1.MapKeys() {
- val2 := v2.MapIndex(key)
- if !val2.IsValid() {
- // This key was not found in the second map.
- return false
- }
- if !equalAny(v1.MapIndex(key), val2, nil) {
- return false
- }
- }
- return true
- case reflect.Ptr:
- // Maps may have nil values in them, so check for nil.
- if v1.IsNil() && v2.IsNil() {
- return true
- }
- if v1.IsNil() != v2.IsNil() {
- return false
- }
- return equalAny(v1.Elem(), v2.Elem(), prop)
- case reflect.Slice:
- if v1.Type().Elem().Kind() == reflect.Uint8 {
- // short circuit: []byte
-
- // Edge case: if this is in a proto3 message, a zero length
- // bytes field is considered the zero value.
- if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 {
- return true
- }
- if v1.IsNil() != v2.IsNil() {
- return false
- }
- return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte))
- }
-
- if v1.Len() != v2.Len() {
- return false
- }
- for i := 0; i < v1.Len(); i++ {
- if !equalAny(v1.Index(i), v2.Index(i), prop) {
- return false
- }
- }
- return true
- case reflect.String:
- return v1.Interface().(string) == v2.Interface().(string)
- case reflect.Struct:
- return equalStruct(v1, v2)
- case reflect.Uint32, reflect.Uint64:
- return v1.Uint() == v2.Uint()
- }
-
- // unknown type, so not a protocol buffer
- log.Printf("proto: don't know how to compare %v", v1)
- return false
-}
-
-// base is the struct type that the extensions are based on.
-// x1 and x2 are InternalExtensions.
-func equalExtensions(base reflect.Type, x1, x2 XXX_InternalExtensions) bool {
- em1, _ := x1.extensionsRead()
- em2, _ := x2.extensionsRead()
- return equalExtMap(base, em1, em2)
-}
-
-func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool {
- if len(em1) != len(em2) {
- return false
- }
-
- for extNum, e1 := range em1 {
- e2, ok := em2[extNum]
- if !ok {
- return false
- }
-
- m1, m2 := e1.value, e2.value
-
- if m1 != nil && m2 != nil {
- // Both are unencoded.
- if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) {
- return false
- }
- continue
- }
-
- // At least one is encoded. To do a semantically correct comparison
- // we need to unmarshal them first.
- var desc *ExtensionDesc
- if m := extensionMaps[base]; m != nil {
- desc = m[extNum]
- }
- if desc == nil {
- log.Printf("proto: don't know how to compare extension %d of %v", extNum, base)
- continue
- }
- var err error
- if m1 == nil {
- m1, err = decodeExtension(e1.enc, desc)
- }
- if m2 == nil && err == nil {
- m2, err = decodeExtension(e2.enc, desc)
- }
- if err != nil {
- // The encoded form is invalid.
- log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err)
- return false
- }
- if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) {
- return false
- }
- }
-
- return true
-}
diff --git a/vendor/github.com/golang/protobuf/proto/extensions.go b/vendor/github.com/golang/protobuf/proto/extensions.go
deleted file mode 100644
index 6b9b36374..000000000
--- a/vendor/github.com/golang/protobuf/proto/extensions.go
+++ /dev/null
@@ -1,586 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Types and routines for supporting protocol buffer extensions.
- */
-
-import (
- "errors"
- "fmt"
- "reflect"
- "strconv"
- "sync"
-)
-
-// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message.
-var ErrMissingExtension = errors.New("proto: missing extension")
-
-// ExtensionRange represents a range of message extensions for a protocol buffer.
-// Used in code generated by the protocol compiler.
-type ExtensionRange struct {
- Start, End int32 // both inclusive
-}
-
-// extendableProto is an interface implemented by any protocol buffer generated by the current
-// proto compiler that may be extended.
-type extendableProto interface {
- Message
- ExtensionRangeArray() []ExtensionRange
- extensionsWrite() map[int32]Extension
- extensionsRead() (map[int32]Extension, sync.Locker)
-}
-
-// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous
-// version of the proto compiler that may be extended.
-type extendableProtoV1 interface {
- Message
- ExtensionRangeArray() []ExtensionRange
- ExtensionMap() map[int32]Extension
-}
-
-// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto.
-type extensionAdapter struct {
- extendableProtoV1
-}
-
-func (e extensionAdapter) extensionsWrite() map[int32]Extension {
- return e.ExtensionMap()
-}
-
-func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) {
- return e.ExtensionMap(), notLocker{}
-}
-
-// notLocker is a sync.Locker whose Lock and Unlock methods are nops.
-type notLocker struct{}
-
-func (n notLocker) Lock() {}
-func (n notLocker) Unlock() {}
-
-// extendable returns the extendableProto interface for the given generated proto message.
-// If the proto message has the old extension format, it returns a wrapper that implements
-// the extendableProto interface.
-func extendable(p interface{}) (extendableProto, bool) {
- if ep, ok := p.(extendableProto); ok {
- return ep, ok
- }
- if ep, ok := p.(extendableProtoV1); ok {
- return extensionAdapter{ep}, ok
- }
- return nil, false
-}
-
-// XXX_InternalExtensions is an internal representation of proto extensions.
-//
-// Each generated message struct type embeds an anonymous XXX_InternalExtensions field,
-// thus gaining the unexported 'extensions' method, which can be called only from the proto package.
-//
-// The methods of XXX_InternalExtensions are not concurrency safe in general,
-// but calls to logically read-only methods such as has and get may be executed concurrently.
-type XXX_InternalExtensions struct {
- // The struct must be indirect so that if a user inadvertently copies a
- // generated message and its embedded XXX_InternalExtensions, they
- // avoid the mayhem of a copied mutex.
- //
- // The mutex serializes all logically read-only operations to p.extensionMap.
- // It is up to the client to ensure that write operations to p.extensionMap are
- // mutually exclusive with other accesses.
- p *struct {
- mu sync.Mutex
- extensionMap map[int32]Extension
- }
-}
-
-// extensionsWrite returns the extension map, creating it on first use.
-func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension {
- if e.p == nil {
- e.p = new(struct {
- mu sync.Mutex
- extensionMap map[int32]Extension
- })
- e.p.extensionMap = make(map[int32]Extension)
- }
- return e.p.extensionMap
-}
-
-// extensionsRead returns the extensions map for read-only use. It may be nil.
-// The caller must hold the returned mutex's lock when accessing Elements within the map.
-func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) {
- if e.p == nil {
- return nil, nil
- }
- return e.p.extensionMap, &e.p.mu
-}
-
-var extendableProtoType = reflect.TypeOf((*extendableProto)(nil)).Elem()
-var extendableProtoV1Type = reflect.TypeOf((*extendableProtoV1)(nil)).Elem()
-
-// ExtensionDesc represents an extension specification.
-// Used in generated code from the protocol compiler.
-type ExtensionDesc struct {
- ExtendedType Message // nil pointer to the type that is being extended
- ExtensionType interface{} // nil pointer to the extension type
- Field int32 // field number
- Name string // fully-qualified name of extension, for text formatting
- Tag string // protobuf tag style
-}
-
-func (ed *ExtensionDesc) repeated() bool {
- t := reflect.TypeOf(ed.ExtensionType)
- return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8
-}
-
-// Extension represents an extension in a message.
-type Extension struct {
- // When an extension is stored in a message using SetExtension
- // only desc and value are set. When the message is marshaled
- // enc will be set to the encoded form of the message.
- //
- // When a message is unmarshaled and contains extensions, each
- // extension will have only enc set. When such an extension is
- // accessed using GetExtension (or GetExtensions) desc and value
- // will be set.
- desc *ExtensionDesc
- value interface{}
- enc []byte
-}
-
-// SetRawExtension is for testing only.
-func SetRawExtension(base Message, id int32, b []byte) {
- epb, ok := extendable(base)
- if !ok {
- return
- }
- extmap := epb.extensionsWrite()
- extmap[id] = Extension{enc: b}
-}
-
-// isExtensionField returns true iff the given field number is in an extension range.
-func isExtensionField(pb extendableProto, field int32) bool {
- for _, er := range pb.ExtensionRangeArray() {
- if er.Start <= field && field <= er.End {
- return true
- }
- }
- return false
-}
-
-// checkExtensionTypes checks that the given extension is valid for pb.
-func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error {
- var pbi interface{} = pb
- // Check the extended type.
- if ea, ok := pbi.(extensionAdapter); ok {
- pbi = ea.extendableProtoV1
- }
- if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b {
- return errors.New("proto: bad extended type; " + b.String() + " does not extend " + a.String())
- }
- // Check the range.
- if !isExtensionField(pb, extension.Field) {
- return errors.New("proto: bad extension number; not in declared ranges")
- }
- return nil
-}
-
-// extPropKey is sufficient to uniquely identify an extension.
-type extPropKey struct {
- base reflect.Type
- field int32
-}
-
-var extProp = struct {
- sync.RWMutex
- m map[extPropKey]*Properties
-}{
- m: make(map[extPropKey]*Properties),
-}
-
-func extensionProperties(ed *ExtensionDesc) *Properties {
- key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field}
-
- extProp.RLock()
- if prop, ok := extProp.m[key]; ok {
- extProp.RUnlock()
- return prop
- }
- extProp.RUnlock()
-
- extProp.Lock()
- defer extProp.Unlock()
- // Check again.
- if prop, ok := extProp.m[key]; ok {
- return prop
- }
-
- prop := new(Properties)
- prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil)
- extProp.m[key] = prop
- return prop
-}
-
-// encode encodes any unmarshaled (unencoded) extensions in e.
-func encodeExtensions(e *XXX_InternalExtensions) error {
- m, mu := e.extensionsRead()
- if m == nil {
- return nil // fast path
- }
- mu.Lock()
- defer mu.Unlock()
- return encodeExtensionsMap(m)
-}
-
-// encode encodes any unmarshaled (unencoded) extensions in e.
-func encodeExtensionsMap(m map[int32]Extension) error {
- for k, e := range m {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- et := reflect.TypeOf(e.desc.ExtensionType)
- props := extensionProperties(e.desc)
-
- p := NewBuffer(nil)
- // If e.value has type T, the encoder expects a *struct{ X T }.
- // Pass a *T with a zero field and hope it all works out.
- x := reflect.New(et)
- x.Elem().Set(reflect.ValueOf(e.value))
- if err := props.enc(p, props, toStructPointer(x)); err != nil {
- return err
- }
- e.enc = p.buf
- m[k] = e
- }
- return nil
-}
-
-func extensionsSize(e *XXX_InternalExtensions) (n int) {
- m, mu := e.extensionsRead()
- if m == nil {
- return 0
- }
- mu.Lock()
- defer mu.Unlock()
- return extensionsMapSize(m)
-}
-
-func extensionsMapSize(m map[int32]Extension) (n int) {
- for _, e := range m {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- n += len(e.enc)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- et := reflect.TypeOf(e.desc.ExtensionType)
- props := extensionProperties(e.desc)
-
- // If e.value has type T, the encoder expects a *struct{ X T }.
- // Pass a *T with a zero field and hope it all works out.
- x := reflect.New(et)
- x.Elem().Set(reflect.ValueOf(e.value))
- n += props.size(props, toStructPointer(x))
- }
- return
-}
-
-// HasExtension returns whether the given extension is present in pb.
-func HasExtension(pb Message, extension *ExtensionDesc) bool {
- // TODO: Check types, field numbers, etc.?
- epb, ok := extendable(pb)
- if !ok {
- return false
- }
- extmap, mu := epb.extensionsRead()
- if extmap == nil {
- return false
- }
- mu.Lock()
- _, ok = extmap[extension.Field]
- mu.Unlock()
- return ok
-}
-
-// ClearExtension removes the given extension from pb.
-func ClearExtension(pb Message, extension *ExtensionDesc) {
- epb, ok := extendable(pb)
- if !ok {
- return
- }
- // TODO: Check types, field numbers, etc.?
- extmap := epb.extensionsWrite()
- delete(extmap, extension.Field)
-}
-
-// GetExtension parses and returns the given extension of pb.
-// If the extension is not present and has no default value it returns ErrMissingExtension.
-func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) {
- epb, ok := extendable(pb)
- if !ok {
- return nil, errors.New("proto: not an extendable proto")
- }
-
- if err := checkExtensionTypes(epb, extension); err != nil {
- return nil, err
- }
-
- emap, mu := epb.extensionsRead()
- if emap == nil {
- return defaultExtensionValue(extension)
- }
- mu.Lock()
- defer mu.Unlock()
- e, ok := emap[extension.Field]
- if !ok {
- // defaultExtensionValue returns the default value or
- // ErrMissingExtension if there is no default.
- return defaultExtensionValue(extension)
- }
-
- if e.value != nil {
- // Already decoded. Check the descriptor, though.
- if e.desc != extension {
- // This shouldn't happen. If it does, it means that
- // GetExtension was called twice with two different
- // descriptors with the same field number.
- return nil, errors.New("proto: descriptor conflict")
- }
- return e.value, nil
- }
-
- v, err := decodeExtension(e.enc, extension)
- if err != nil {
- return nil, err
- }
-
- // Remember the decoded version and drop the encoded version.
- // That way it is safe to mutate what we return.
- e.value = v
- e.desc = extension
- e.enc = nil
- emap[extension.Field] = e
- return e.value, nil
-}
-
-// defaultExtensionValue returns the default value for extension.
-// If no default for an extension is defined ErrMissingExtension is returned.
-func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) {
- t := reflect.TypeOf(extension.ExtensionType)
- props := extensionProperties(extension)
-
- sf, _, err := fieldDefault(t, props)
- if err != nil {
- return nil, err
- }
-
- if sf == nil || sf.value == nil {
- // There is no default value.
- return nil, ErrMissingExtension
- }
-
- if t.Kind() != reflect.Ptr {
- // We do not need to return a Ptr, we can directly return sf.value.
- return sf.value, nil
- }
-
- // We need to return an interface{} that is a pointer to sf.value.
- value := reflect.New(t).Elem()
- value.Set(reflect.New(value.Type().Elem()))
- if sf.kind == reflect.Int32 {
- // We may have an int32 or an enum, but the underlying data is int32.
- // Since we can't set an int32 into a non int32 reflect.value directly
- // set it as a int32.
- value.Elem().SetInt(int64(sf.value.(int32)))
- } else {
- value.Elem().Set(reflect.ValueOf(sf.value))
- }
- return value.Interface(), nil
-}
-
-// decodeExtension decodes an extension encoded in b.
-func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) {
- o := NewBuffer(b)
-
- t := reflect.TypeOf(extension.ExtensionType)
-
- props := extensionProperties(extension)
-
- // t is a pointer to a struct, pointer to basic type or a slice.
- // Allocate a "field" to store the pointer/slice itself; the
- // pointer/slice will be stored here. We pass
- // the address of this field to props.dec.
- // This passes a zero field and a *t and lets props.dec
- // interpret it as a *struct{ x t }.
- value := reflect.New(t).Elem()
-
- for {
- // Discard wire type and field number varint. It isn't needed.
- if _, err := o.DecodeVarint(); err != nil {
- return nil, err
- }
-
- if err := props.dec(o, props, toStructPointer(value.Addr())); err != nil {
- return nil, err
- }
-
- if o.index >= len(o.buf) {
- break
- }
- }
- return value.Interface(), nil
-}
-
-// GetExtensions returns a slice of the extensions present in pb that are also listed in es.
-// The returned slice has the same length as es; missing extensions will appear as nil elements.
-func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) {
- epb, ok := extendable(pb)
- if !ok {
- return nil, errors.New("proto: not an extendable proto")
- }
- extensions = make([]interface{}, len(es))
- for i, e := range es {
- extensions[i], err = GetExtension(epb, e)
- if err == ErrMissingExtension {
- err = nil
- }
- if err != nil {
- return
- }
- }
- return
-}
-
-// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order.
-// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing
-// just the Field field, which defines the extension's field number.
-func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) {
- epb, ok := extendable(pb)
- if !ok {
- return nil, fmt.Errorf("proto: %T is not an extendable proto.Message", pb)
- }
- registeredExtensions := RegisteredExtensions(pb)
-
- emap, mu := epb.extensionsRead()
- if emap == nil {
- return nil, nil
- }
- mu.Lock()
- defer mu.Unlock()
- extensions := make([]*ExtensionDesc, 0, len(emap))
- for extid, e := range emap {
- desc := e.desc
- if desc == nil {
- desc = registeredExtensions[extid]
- if desc == nil {
- desc = &ExtensionDesc{Field: extid}
- }
- }
-
- extensions = append(extensions, desc)
- }
- return extensions, nil
-}
-
-// SetExtension sets the specified extension of pb to the specified value.
-func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error {
- epb, ok := extendable(pb)
- if !ok {
- return errors.New("proto: not an extendable proto")
- }
- if err := checkExtensionTypes(epb, extension); err != nil {
- return err
- }
- typ := reflect.TypeOf(extension.ExtensionType)
- if typ != reflect.TypeOf(value) {
- return errors.New("proto: bad extension value type")
- }
- // nil extension values need to be caught early, because the
- // encoder can't distinguish an ErrNil due to a nil extension
- // from an ErrNil due to a missing field. Extensions are
- // always optional, so the encoder would just swallow the error
- // and drop all the extensions from the encoded message.
- if reflect.ValueOf(value).IsNil() {
- return fmt.Errorf("proto: SetExtension called with nil value of type %T", value)
- }
-
- extmap := epb.extensionsWrite()
- extmap[extension.Field] = Extension{desc: extension, value: value}
- return nil
-}
-
-// ClearAllExtensions clears all extensions from pb.
-func ClearAllExtensions(pb Message) {
- epb, ok := extendable(pb)
- if !ok {
- return
- }
- m := epb.extensionsWrite()
- for k := range m {
- delete(m, k)
- }
-}
-
-// A global registry of extensions.
-// The generated code will register the generated descriptors by calling RegisterExtension.
-
-var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc)
-
-// RegisterExtension is called from the generated code.
-func RegisterExtension(desc *ExtensionDesc) {
- st := reflect.TypeOf(desc.ExtendedType).Elem()
- m := extensionMaps[st]
- if m == nil {
- m = make(map[int32]*ExtensionDesc)
- extensionMaps[st] = m
- }
- if _, ok := m[desc.Field]; ok {
- panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field)))
- }
- m[desc.Field] = desc
-}
-
-// RegisteredExtensions returns a map of the registered extensions of a
-// protocol buffer struct, indexed by the extension number.
-// The argument pb should be a nil pointer to the struct type.
-func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc {
- return extensionMaps[reflect.TypeOf(pb).Elem()]
-}
diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go
deleted file mode 100644
index ac4ddbc07..000000000
--- a/vendor/github.com/golang/protobuf/proto/lib.go
+++ /dev/null
@@ -1,898 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-/*
-Package proto converts data structures to and from the wire format of
-protocol buffers. It works in concert with the Go source code generated
-for .proto files by the protocol compiler.
-
-A summary of the properties of the protocol buffer interface
-for a protocol buffer variable v:
-
- - Names are turned from camel_case to CamelCase for export.
- - There are no methods on v to set fields; just treat
- them as structure fields.
- - There are getters that return a field's value if set,
- and return the field's default value if unset.
- The getters work even if the receiver is a nil message.
- - The zero value for a struct is its correct initialization state.
- All desired fields must be set before marshaling.
- - A Reset() method will restore a protobuf struct to its zero state.
- - Non-repeated fields are pointers to the values; nil means unset.
- That is, optional or required field int32 f becomes F *int32.
- - Repeated fields are slices.
- - Helper functions are available to aid the setting of fields.
- msg.Foo = proto.String("hello") // set field
- - Constants are defined to hold the default values of all fields that
- have them. They have the form Default_StructName_FieldName.
- Because the getter methods handle defaulted values,
- direct use of these constants should be rare.
- - Enums are given type names and maps from names to values.
- Enum values are prefixed by the enclosing message's name, or by the
- enum's type name if it is a top-level enum. Enum types have a String
- method, and a Enum method to assist in message construction.
- - Nested messages, groups and enums have type names prefixed with the name of
- the surrounding message type.
- - Extensions are given descriptor names that start with E_,
- followed by an underscore-delimited list of the nested messages
- that contain it (if any) followed by the CamelCased name of the
- extension field itself. HasExtension, ClearExtension, GetExtension
- and SetExtension are functions for manipulating extensions.
- - Oneof field sets are given a single field in their message,
- with distinguished wrapper types for each possible field value.
- - Marshal and Unmarshal are functions to encode and decode the wire format.
-
-When the .proto file specifies `syntax="proto3"`, there are some differences:
-
- - Non-repeated fields of non-message type are values instead of pointers.
- - Getters are only generated for message and oneof fields.
- - Enum types do not get an Enum method.
-
-The simplest way to describe this is to see an example.
-Given file test.proto, containing
-
- package example;
-
- enum FOO { X = 17; }
-
- message Test {
- required string label = 1;
- optional int32 type = 2 [default=77];
- repeated int64 reps = 3;
- optional group OptionalGroup = 4 {
- required string RequiredField = 5;
- }
- oneof union {
- int32 number = 6;
- string name = 7;
- }
- }
-
-The resulting file, test.pb.go, is:
-
- package example
-
- import proto "github.com/golang/protobuf/proto"
- import math "math"
-
- type FOO int32
- const (
- FOO_X FOO = 17
- )
- var FOO_name = map[int32]string{
- 17: "X",
- }
- var FOO_value = map[string]int32{
- "X": 17,
- }
-
- func (x FOO) Enum() *FOO {
- p := new(FOO)
- *p = x
- return p
- }
- func (x FOO) String() string {
- return proto.EnumName(FOO_name, int32(x))
- }
- func (x *FOO) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FOO_value, data)
- if err != nil {
- return err
- }
- *x = FOO(value)
- return nil
- }
-
- type Test struct {
- Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"`
- Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"`
- Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"`
- Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
- // Types that are valid to be assigned to Union:
- // *Test_Number
- // *Test_Name
- Union isTest_Union `protobuf_oneof:"union"`
- XXX_unrecognized []byte `json:"-"`
- }
- func (m *Test) Reset() { *m = Test{} }
- func (m *Test) String() string { return proto.CompactTextString(m) }
- func (*Test) ProtoMessage() {}
-
- type isTest_Union interface {
- isTest_Union()
- }
-
- type Test_Number struct {
- Number int32 `protobuf:"varint,6,opt,name=number"`
- }
- type Test_Name struct {
- Name string `protobuf:"bytes,7,opt,name=name"`
- }
-
- func (*Test_Number) isTest_Union() {}
- func (*Test_Name) isTest_Union() {}
-
- func (m *Test) GetUnion() isTest_Union {
- if m != nil {
- return m.Union
- }
- return nil
- }
- const Default_Test_Type int32 = 77
-
- func (m *Test) GetLabel() string {
- if m != nil && m.Label != nil {
- return *m.Label
- }
- return ""
- }
-
- func (m *Test) GetType() int32 {
- if m != nil && m.Type != nil {
- return *m.Type
- }
- return Default_Test_Type
- }
-
- func (m *Test) GetOptionalgroup() *Test_OptionalGroup {
- if m != nil {
- return m.Optionalgroup
- }
- return nil
- }
-
- type Test_OptionalGroup struct {
- RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"`
- }
- func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} }
- func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) }
-
- func (m *Test_OptionalGroup) GetRequiredField() string {
- if m != nil && m.RequiredField != nil {
- return *m.RequiredField
- }
- return ""
- }
-
- func (m *Test) GetNumber() int32 {
- if x, ok := m.GetUnion().(*Test_Number); ok {
- return x.Number
- }
- return 0
- }
-
- func (m *Test) GetName() string {
- if x, ok := m.GetUnion().(*Test_Name); ok {
- return x.Name
- }
- return ""
- }
-
- func init() {
- proto.RegisterEnum("example.FOO", FOO_name, FOO_value)
- }
-
-To create and play with a Test object:
-
- package main
-
- import (
- "log"
-
- "github.com/golang/protobuf/proto"
- pb "./example.pb"
- )
-
- func main() {
- test := &pb.Test{
- Label: proto.String("hello"),
- Type: proto.Int32(17),
- Reps: []int64{1, 2, 3},
- Optionalgroup: &pb.Test_OptionalGroup{
- RequiredField: proto.String("good bye"),
- },
- Union: &pb.Test_Name{"fred"},
- }
- data, err := proto.Marshal(test)
- if err != nil {
- log.Fatal("marshaling error: ", err)
- }
- newTest := &pb.Test{}
- err = proto.Unmarshal(data, newTest)
- if err != nil {
- log.Fatal("unmarshaling error: ", err)
- }
- // Now test and newTest contain the same data.
- if test.GetLabel() != newTest.GetLabel() {
- log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel())
- }
- // Use a type switch to determine which oneof was set.
- switch u := test.Union.(type) {
- case *pb.Test_Number: // u.Number contains the number.
- case *pb.Test_Name: // u.Name contains the string.
- }
- // etc.
- }
-*/
-package proto
-
-import (
- "encoding/json"
- "fmt"
- "log"
- "reflect"
- "sort"
- "strconv"
- "sync"
-)
-
-// Message is implemented by generated protocol buffer messages.
-type Message interface {
- Reset()
- String() string
- ProtoMessage()
-}
-
-// Stats records allocation details about the protocol buffer encoders
-// and decoders. Useful for tuning the library itself.
-type Stats struct {
- Emalloc uint64 // mallocs in encode
- Dmalloc uint64 // mallocs in decode
- Encode uint64 // number of encodes
- Decode uint64 // number of decodes
- Chit uint64 // number of cache hits
- Cmiss uint64 // number of cache misses
- Size uint64 // number of sizes
-}
-
-// Set to true to enable stats collection.
-const collectStats = false
-
-var stats Stats
-
-// GetStats returns a copy of the global Stats structure.
-func GetStats() Stats { return stats }
-
-// A Buffer is a buffer manager for marshaling and unmarshaling
-// protocol buffers. It may be reused between invocations to
-// reduce memory usage. It is not necessary to use a Buffer;
-// the global functions Marshal and Unmarshal create a
-// temporary Buffer and are fine for most applications.
-type Buffer struct {
- buf []byte // encode/decode byte stream
- index int // read point
-
- // pools of basic types to amortize allocation.
- bools []bool
- uint32s []uint32
- uint64s []uint64
-
- // extra pools, only used with pointer_reflect.go
- int32s []int32
- int64s []int64
- float32s []float32
- float64s []float64
-}
-
-// NewBuffer allocates a new Buffer and initializes its internal data to
-// the contents of the argument slice.
-func NewBuffer(e []byte) *Buffer {
- return &Buffer{buf: e}
-}
-
-// Reset resets the Buffer, ready for marshaling a new protocol buffer.
-func (p *Buffer) Reset() {
- p.buf = p.buf[0:0] // for reading/writing
- p.index = 0 // for reading
-}
-
-// SetBuf replaces the internal buffer with the slice,
-// ready for unmarshaling the contents of the slice.
-func (p *Buffer) SetBuf(s []byte) {
- p.buf = s
- p.index = 0
-}
-
-// Bytes returns the contents of the Buffer.
-func (p *Buffer) Bytes() []byte { return p.buf }
-
-/*
- * Helper routines for simplifying the creation of optional fields of basic type.
- */
-
-// Bool is a helper routine that allocates a new bool value
-// to store v and returns a pointer to it.
-func Bool(v bool) *bool {
- return &v
-}
-
-// Int32 is a helper routine that allocates a new int32 value
-// to store v and returns a pointer to it.
-func Int32(v int32) *int32 {
- return &v
-}
-
-// Int is a helper routine that allocates a new int32 value
-// to store v and returns a pointer to it, but unlike Int32
-// its argument value is an int.
-func Int(v int) *int32 {
- p := new(int32)
- *p = int32(v)
- return p
-}
-
-// Int64 is a helper routine that allocates a new int64 value
-// to store v and returns a pointer to it.
-func Int64(v int64) *int64 {
- return &v
-}
-
-// Float32 is a helper routine that allocates a new float32 value
-// to store v and returns a pointer to it.
-func Float32(v float32) *float32 {
- return &v
-}
-
-// Float64 is a helper routine that allocates a new float64 value
-// to store v and returns a pointer to it.
-func Float64(v float64) *float64 {
- return &v
-}
-
-// Uint32 is a helper routine that allocates a new uint32 value
-// to store v and returns a pointer to it.
-func Uint32(v uint32) *uint32 {
- return &v
-}
-
-// Uint64 is a helper routine that allocates a new uint64 value
-// to store v and returns a pointer to it.
-func Uint64(v uint64) *uint64 {
- return &v
-}
-
-// String is a helper routine that allocates a new string value
-// to store v and returns a pointer to it.
-func String(v string) *string {
- return &v
-}
-
-// EnumName is a helper function to simplify printing protocol buffer enums
-// by name. Given an enum map and a value, it returns a useful string.
-func EnumName(m map[int32]string, v int32) string {
- s, ok := m[v]
- if ok {
- return s
- }
- return strconv.Itoa(int(v))
-}
-
-// UnmarshalJSONEnum is a helper function to simplify recovering enum int values
-// from their JSON-encoded representation. Given a map from the enum's symbolic
-// names to its int values, and a byte buffer containing the JSON-encoded
-// value, it returns an int32 that can be cast to the enum type by the caller.
-//
-// The function can deal with both JSON representations, numeric and symbolic.
-func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) {
- if data[0] == '"' {
- // New style: enums are strings.
- var repr string
- if err := json.Unmarshal(data, &repr); err != nil {
- return -1, err
- }
- val, ok := m[repr]
- if !ok {
- return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr)
- }
- return val, nil
- }
- // Old style: enums are ints.
- var val int32
- if err := json.Unmarshal(data, &val); err != nil {
- return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName)
- }
- return val, nil
-}
-
-// DebugPrint dumps the encoded data in b in a debugging format with a header
-// including the string s. Used in testing but made available for general debugging.
-func (p *Buffer) DebugPrint(s string, b []byte) {
- var u uint64
-
- obuf := p.buf
- index := p.index
- p.buf = b
- p.index = 0
- depth := 0
-
- fmt.Printf("\n--- %s ---\n", s)
-
-out:
- for {
- for i := 0; i < depth; i++ {
- fmt.Print(" ")
- }
-
- index := p.index
- if index == len(p.buf) {
- break
- }
-
- op, err := p.DecodeVarint()
- if err != nil {
- fmt.Printf("%3d: fetching op err %v\n", index, err)
- break out
- }
- tag := op >> 3
- wire := op & 7
-
- switch wire {
- default:
- fmt.Printf("%3d: t=%3d unknown wire=%d\n",
- index, tag, wire)
- break out
-
- case WireBytes:
- var r []byte
-
- r, err = p.DecodeRawBytes(false)
- if err != nil {
- break out
- }
- fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r))
- if len(r) <= 6 {
- for i := 0; i < len(r); i++ {
- fmt.Printf(" %.2x", r[i])
- }
- } else {
- for i := 0; i < 3; i++ {
- fmt.Printf(" %.2x", r[i])
- }
- fmt.Printf(" ..")
- for i := len(r) - 3; i < len(r); i++ {
- fmt.Printf(" %.2x", r[i])
- }
- }
- fmt.Printf("\n")
-
- case WireFixed32:
- u, err = p.DecodeFixed32()
- if err != nil {
- fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err)
- break out
- }
- fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u)
-
- case WireFixed64:
- u, err = p.DecodeFixed64()
- if err != nil {
- fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err)
- break out
- }
- fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u)
-
- case WireVarint:
- u, err = p.DecodeVarint()
- if err != nil {
- fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err)
- break out
- }
- fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u)
-
- case WireStartGroup:
- fmt.Printf("%3d: t=%3d start\n", index, tag)
- depth++
-
- case WireEndGroup:
- depth--
- fmt.Printf("%3d: t=%3d end\n", index, tag)
- }
- }
-
- if depth != 0 {
- fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth)
- }
- fmt.Printf("\n")
-
- p.buf = obuf
- p.index = index
-}
-
-// SetDefaults sets unset protocol buffer fields to their default values.
-// It only modifies fields that are both unset and have defined defaults.
-// It recursively sets default values in any non-nil sub-messages.
-func SetDefaults(pb Message) {
- setDefaults(reflect.ValueOf(pb), true, false)
-}
-
-// v is a pointer to a struct.
-func setDefaults(v reflect.Value, recur, zeros bool) {
- v = v.Elem()
-
- defaultMu.RLock()
- dm, ok := defaults[v.Type()]
- defaultMu.RUnlock()
- if !ok {
- dm = buildDefaultMessage(v.Type())
- defaultMu.Lock()
- defaults[v.Type()] = dm
- defaultMu.Unlock()
- }
-
- for _, sf := range dm.scalars {
- f := v.Field(sf.index)
- if !f.IsNil() {
- // field already set
- continue
- }
- dv := sf.value
- if dv == nil && !zeros {
- // no explicit default, and don't want to set zeros
- continue
- }
- fptr := f.Addr().Interface() // **T
- // TODO: Consider batching the allocations we do here.
- switch sf.kind {
- case reflect.Bool:
- b := new(bool)
- if dv != nil {
- *b = dv.(bool)
- }
- *(fptr.(**bool)) = b
- case reflect.Float32:
- f := new(float32)
- if dv != nil {
- *f = dv.(float32)
- }
- *(fptr.(**float32)) = f
- case reflect.Float64:
- f := new(float64)
- if dv != nil {
- *f = dv.(float64)
- }
- *(fptr.(**float64)) = f
- case reflect.Int32:
- // might be an enum
- if ft := f.Type(); ft != int32PtrType {
- // enum
- f.Set(reflect.New(ft.Elem()))
- if dv != nil {
- f.Elem().SetInt(int64(dv.(int32)))
- }
- } else {
- // int32 field
- i := new(int32)
- if dv != nil {
- *i = dv.(int32)
- }
- *(fptr.(**int32)) = i
- }
- case reflect.Int64:
- i := new(int64)
- if dv != nil {
- *i = dv.(int64)
- }
- *(fptr.(**int64)) = i
- case reflect.String:
- s := new(string)
- if dv != nil {
- *s = dv.(string)
- }
- *(fptr.(**string)) = s
- case reflect.Uint8:
- // exceptional case: []byte
- var b []byte
- if dv != nil {
- db := dv.([]byte)
- b = make([]byte, len(db))
- copy(b, db)
- } else {
- b = []byte{}
- }
- *(fptr.(*[]byte)) = b
- case reflect.Uint32:
- u := new(uint32)
- if dv != nil {
- *u = dv.(uint32)
- }
- *(fptr.(**uint32)) = u
- case reflect.Uint64:
- u := new(uint64)
- if dv != nil {
- *u = dv.(uint64)
- }
- *(fptr.(**uint64)) = u
- default:
- log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind)
- }
- }
-
- for _, ni := range dm.nested {
- f := v.Field(ni)
- // f is *T or []*T or map[T]*T
- switch f.Kind() {
- case reflect.Ptr:
- if f.IsNil() {
- continue
- }
- setDefaults(f, recur, zeros)
-
- case reflect.Slice:
- for i := 0; i < f.Len(); i++ {
- e := f.Index(i)
- if e.IsNil() {
- continue
- }
- setDefaults(e, recur, zeros)
- }
-
- case reflect.Map:
- for _, k := range f.MapKeys() {
- e := f.MapIndex(k)
- if e.IsNil() {
- continue
- }
- setDefaults(e, recur, zeros)
- }
- }
- }
-}
-
-var (
- // defaults maps a protocol buffer struct type to a slice of the fields,
- // with its scalar fields set to their proto-declared non-zero default values.
- defaultMu sync.RWMutex
- defaults = make(map[reflect.Type]defaultMessage)
-
- int32PtrType = reflect.TypeOf((*int32)(nil))
-)
-
-// defaultMessage represents information about the default values of a message.
-type defaultMessage struct {
- scalars []scalarField
- nested []int // struct field index of nested messages
-}
-
-type scalarField struct {
- index int // struct field index
- kind reflect.Kind // element type (the T in *T or []T)
- value interface{} // the proto-declared default value, or nil
-}
-
-// t is a struct type.
-func buildDefaultMessage(t reflect.Type) (dm defaultMessage) {
- sprop := GetProperties(t)
- for _, prop := range sprop.Prop {
- fi, ok := sprop.decoderTags.get(prop.Tag)
- if !ok {
- // XXX_unrecognized
- continue
- }
- ft := t.Field(fi).Type
-
- sf, nested, err := fieldDefault(ft, prop)
- switch {
- case err != nil:
- log.Print(err)
- case nested:
- dm.nested = append(dm.nested, fi)
- case sf != nil:
- sf.index = fi
- dm.scalars = append(dm.scalars, *sf)
- }
- }
-
- return dm
-}
-
-// fieldDefault returns the scalarField for field type ft.
-// sf will be nil if the field can not have a default.
-// nestedMessage will be true if this is a nested message.
-// Note that sf.index is not set on return.
-func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) {
- var canHaveDefault bool
- switch ft.Kind() {
- case reflect.Ptr:
- if ft.Elem().Kind() == reflect.Struct {
- nestedMessage = true
- } else {
- canHaveDefault = true // proto2 scalar field
- }
-
- case reflect.Slice:
- switch ft.Elem().Kind() {
- case reflect.Ptr:
- nestedMessage = true // repeated message
- case reflect.Uint8:
- canHaveDefault = true // bytes field
- }
-
- case reflect.Map:
- if ft.Elem().Kind() == reflect.Ptr {
- nestedMessage = true // map with message values
- }
- }
-
- if !canHaveDefault {
- if nestedMessage {
- return nil, true, nil
- }
- return nil, false, nil
- }
-
- // We now know that ft is a pointer or slice.
- sf = &scalarField{kind: ft.Elem().Kind()}
-
- // scalar fields without defaults
- if !prop.HasDefault {
- return sf, false, nil
- }
-
- // a scalar field: either *T or []byte
- switch ft.Elem().Kind() {
- case reflect.Bool:
- x, err := strconv.ParseBool(prop.Default)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err)
- }
- sf.value = x
- case reflect.Float32:
- x, err := strconv.ParseFloat(prop.Default, 32)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err)
- }
- sf.value = float32(x)
- case reflect.Float64:
- x, err := strconv.ParseFloat(prop.Default, 64)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err)
- }
- sf.value = x
- case reflect.Int32:
- x, err := strconv.ParseInt(prop.Default, 10, 32)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err)
- }
- sf.value = int32(x)
- case reflect.Int64:
- x, err := strconv.ParseInt(prop.Default, 10, 64)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err)
- }
- sf.value = x
- case reflect.String:
- sf.value = prop.Default
- case reflect.Uint8:
- // []byte (not *uint8)
- sf.value = []byte(prop.Default)
- case reflect.Uint32:
- x, err := strconv.ParseUint(prop.Default, 10, 32)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err)
- }
- sf.value = uint32(x)
- case reflect.Uint64:
- x, err := strconv.ParseUint(prop.Default, 10, 64)
- if err != nil {
- return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err)
- }
- sf.value = x
- default:
- return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind())
- }
-
- return sf, false, nil
-}
-
-// Map fields may have key types of non-float scalars, strings and enums.
-// The easiest way to sort them in some deterministic order is to use fmt.
-// If this turns out to be inefficient we can always consider other options,
-// such as doing a Schwartzian transform.
-
-func mapKeys(vs []reflect.Value) sort.Interface {
- s := mapKeySorter{
- vs: vs,
- // default Less function: textual comparison
- less: func(a, b reflect.Value) bool {
- return fmt.Sprint(a.Interface()) < fmt.Sprint(b.Interface())
- },
- }
-
- // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps;
- // numeric keys are sorted numerically.
- if len(vs) == 0 {
- return s
- }
- switch vs[0].Kind() {
- case reflect.Int32, reflect.Int64:
- s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() }
- case reflect.Uint32, reflect.Uint64:
- s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() }
- }
-
- return s
-}
-
-type mapKeySorter struct {
- vs []reflect.Value
- less func(a, b reflect.Value) bool
-}
-
-func (s mapKeySorter) Len() int { return len(s.vs) }
-func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] }
-func (s mapKeySorter) Less(i, j int) bool {
- return s.less(s.vs[i], s.vs[j])
-}
-
-// isProto3Zero reports whether v is a zero proto3 value.
-func isProto3Zero(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Bool:
- return !v.Bool()
- case reflect.Int32, reflect.Int64:
- return v.Int() == 0
- case reflect.Uint32, reflect.Uint64:
- return v.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return v.Float() == 0
- case reflect.String:
- return v.String() == ""
- }
- return false
-}
-
-// ProtoPackageIsVersion2 is referenced from generated protocol buffer files
-// to assert that that code is compatible with this version of the proto package.
-const ProtoPackageIsVersion2 = true
-
-// ProtoPackageIsVersion1 is referenced from generated protocol buffer files
-// to assert that that code is compatible with this version of the proto package.
-const ProtoPackageIsVersion1 = true
diff --git a/vendor/github.com/golang/protobuf/proto/message_set.go b/vendor/github.com/golang/protobuf/proto/message_set.go
deleted file mode 100644
index fd982decd..000000000
--- a/vendor/github.com/golang/protobuf/proto/message_set.go
+++ /dev/null
@@ -1,311 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Support for message sets.
- */
-
-import (
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- "reflect"
- "sort"
-)
-
-// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID.
-// A message type ID is required for storing a protocol buffer in a message set.
-var errNoMessageTypeID = errors.New("proto does not have a message type ID")
-
-// The first two types (_MessageSet_Item and messageSet)
-// model what the protocol compiler produces for the following protocol message:
-// message MessageSet {
-// repeated group Item = 1 {
-// required int32 type_id = 2;
-// required string message = 3;
-// };
-// }
-// That is the MessageSet wire format. We can't use a proto to generate these
-// because that would introduce a circular dependency between it and this package.
-
-type _MessageSet_Item struct {
- TypeId *int32 `protobuf:"varint,2,req,name=type_id"`
- Message []byte `protobuf:"bytes,3,req,name=message"`
-}
-
-type messageSet struct {
- Item []*_MessageSet_Item `protobuf:"group,1,rep"`
- XXX_unrecognized []byte
- // TODO: caching?
-}
-
-// Make sure messageSet is a Message.
-var _ Message = (*messageSet)(nil)
-
-// messageTypeIder is an interface satisfied by a protocol buffer type
-// that may be stored in a MessageSet.
-type messageTypeIder interface {
- MessageTypeId() int32
-}
-
-func (ms *messageSet) find(pb Message) *_MessageSet_Item {
- mti, ok := pb.(messageTypeIder)
- if !ok {
- return nil
- }
- id := mti.MessageTypeId()
- for _, item := range ms.Item {
- if *item.TypeId == id {
- return item
- }
- }
- return nil
-}
-
-func (ms *messageSet) Has(pb Message) bool {
- if ms.find(pb) != nil {
- return true
- }
- return false
-}
-
-func (ms *messageSet) Unmarshal(pb Message) error {
- if item := ms.find(pb); item != nil {
- return Unmarshal(item.Message, pb)
- }
- if _, ok := pb.(messageTypeIder); !ok {
- return errNoMessageTypeID
- }
- return nil // TODO: return error instead?
-}
-
-func (ms *messageSet) Marshal(pb Message) error {
- msg, err := Marshal(pb)
- if err != nil {
- return err
- }
- if item := ms.find(pb); item != nil {
- // reuse existing item
- item.Message = msg
- return nil
- }
-
- mti, ok := pb.(messageTypeIder)
- if !ok {
- return errNoMessageTypeID
- }
-
- mtid := mti.MessageTypeId()
- ms.Item = append(ms.Item, &_MessageSet_Item{
- TypeId: &mtid,
- Message: msg,
- })
- return nil
-}
-
-func (ms *messageSet) Reset() { *ms = messageSet{} }
-func (ms *messageSet) String() string { return CompactTextString(ms) }
-func (*messageSet) ProtoMessage() {}
-
-// Support for the message_set_wire_format message option.
-
-func skipVarint(buf []byte) []byte {
- i := 0
- for ; buf[i]&0x80 != 0; i++ {
- }
- return buf[i+1:]
-}
-
-// MarshalMessageSet encodes the extension map represented by m in the message set wire format.
-// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option.
-func MarshalMessageSet(exts interface{}) ([]byte, error) {
- var m map[int32]Extension
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- if err := encodeExtensions(exts); err != nil {
- return nil, err
- }
- m, _ = exts.extensionsRead()
- case map[int32]Extension:
- if err := encodeExtensionsMap(exts); err != nil {
- return nil, err
- }
- m = exts
- default:
- return nil, errors.New("proto: not an extension map")
- }
-
- // Sort extension IDs to provide a deterministic encoding.
- // See also enc_map in encode.go.
- ids := make([]int, 0, len(m))
- for id := range m {
- ids = append(ids, int(id))
- }
- sort.Ints(ids)
-
- ms := &messageSet{Item: make([]*_MessageSet_Item, 0, len(m))}
- for _, id := range ids {
- e := m[int32(id)]
- // Remove the wire type and field number varint, as well as the length varint.
- msg := skipVarint(skipVarint(e.enc))
-
- ms.Item = append(ms.Item, &_MessageSet_Item{
- TypeId: Int32(int32(id)),
- Message: msg,
- })
- }
- return Marshal(ms)
-}
-
-// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format.
-// It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option.
-func UnmarshalMessageSet(buf []byte, exts interface{}) error {
- var m map[int32]Extension
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- m = exts.extensionsWrite()
- case map[int32]Extension:
- m = exts
- default:
- return errors.New("proto: not an extension map")
- }
-
- ms := new(messageSet)
- if err := Unmarshal(buf, ms); err != nil {
- return err
- }
- for _, item := range ms.Item {
- id := *item.TypeId
- msg := item.Message
-
- // Restore wire type and field number varint, plus length varint.
- // Be careful to preserve duplicate items.
- b := EncodeVarint(uint64(id)<<3 | WireBytes)
- if ext, ok := m[id]; ok {
- // Existing data; rip off the tag and length varint
- // so we join the new data correctly.
- // We can assume that ext.enc is set because we are unmarshaling.
- o := ext.enc[len(b):] // skip wire type and field number
- _, n := DecodeVarint(o) // calculate length of length varint
- o = o[n:] // skip length varint
- msg = append(o, msg...) // join old data and new data
- }
- b = append(b, EncodeVarint(uint64(len(msg)))...)
- b = append(b, msg...)
-
- m[id] = Extension{enc: b}
- }
- return nil
-}
-
-// MarshalMessageSetJSON encodes the extension map represented by m in JSON format.
-// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
-func MarshalMessageSetJSON(exts interface{}) ([]byte, error) {
- var m map[int32]Extension
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- m, _ = exts.extensionsRead()
- case map[int32]Extension:
- m = exts
- default:
- return nil, errors.New("proto: not an extension map")
- }
- var b bytes.Buffer
- b.WriteByte('{')
-
- // Process the map in key order for deterministic output.
- ids := make([]int32, 0, len(m))
- for id := range m {
- ids = append(ids, id)
- }
- sort.Sort(int32Slice(ids)) // int32Slice defined in text.go
-
- for i, id := range ids {
- ext := m[id]
- if i > 0 {
- b.WriteByte(',')
- }
-
- msd, ok := messageSetMap[id]
- if !ok {
- // Unknown type; we can't render it, so skip it.
- continue
- }
- fmt.Fprintf(&b, `"[%s]":`, msd.name)
-
- x := ext.value
- if x == nil {
- x = reflect.New(msd.t.Elem()).Interface()
- if err := Unmarshal(ext.enc, x.(Message)); err != nil {
- return nil, err
- }
- }
- d, err := json.Marshal(x)
- if err != nil {
- return nil, err
- }
- b.Write(d)
- }
- b.WriteByte('}')
- return b.Bytes(), nil
-}
-
-// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format.
-// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
-func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error {
- // Common-case fast path.
- if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) {
- return nil
- }
-
- // This is fairly tricky, and it's not clear that it is needed.
- return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented")
-}
-
-// A global registry of types that can be used in a MessageSet.
-
-var messageSetMap = make(map[int32]messageSetDesc)
-
-type messageSetDesc struct {
- t reflect.Type // pointer to struct
- name string
-}
-
-// RegisterMessageSetType is called from the generated code.
-func RegisterMessageSetType(m Message, fieldNum int32, name string) {
- messageSetMap[fieldNum] = messageSetDesc{
- t: reflect.TypeOf(m),
- name: name,
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
deleted file mode 100644
index fb512e2e1..000000000
--- a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
+++ /dev/null
@@ -1,484 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2012 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// +build appengine js
-
-// This file contains an implementation of proto field accesses using package reflect.
-// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can
-// be used on App Engine.
-
-package proto
-
-import (
- "math"
- "reflect"
-)
-
-// A structPointer is a pointer to a struct.
-type structPointer struct {
- v reflect.Value
-}
-
-// toStructPointer returns a structPointer equivalent to the given reflect value.
-// The reflect value must itself be a pointer to a struct.
-func toStructPointer(v reflect.Value) structPointer {
- return structPointer{v}
-}
-
-// IsNil reports whether p is nil.
-func structPointer_IsNil(p structPointer) bool {
- return p.v.IsNil()
-}
-
-// Interface returns the struct pointer as an interface value.
-func structPointer_Interface(p structPointer, _ reflect.Type) interface{} {
- return p.v.Interface()
-}
-
-// A field identifies a field in a struct, accessible from a structPointer.
-// In this implementation, a field is identified by the sequence of field indices
-// passed to reflect's FieldByIndex.
-type field []int
-
-// toField returns a field equivalent to the given reflect field.
-func toField(f *reflect.StructField) field {
- return f.Index
-}
-
-// invalidField is an invalid field identifier.
-var invalidField = field(nil)
-
-// IsValid reports whether the field identifier is valid.
-func (f field) IsValid() bool { return f != nil }
-
-// field returns the given field in the struct as a reflect value.
-func structPointer_field(p structPointer, f field) reflect.Value {
- // Special case: an extension map entry with a value of type T
- // passes a *T to the struct-handling code with a zero field,
- // expecting that it will be treated as equivalent to *struct{ X T },
- // which has the same memory layout. We have to handle that case
- // specially, because reflect will panic if we call FieldByIndex on a
- // non-struct.
- if f == nil {
- return p.v.Elem()
- }
-
- return p.v.Elem().FieldByIndex(f)
-}
-
-// ifield returns the given field in the struct as an interface value.
-func structPointer_ifield(p structPointer, f field) interface{} {
- return structPointer_field(p, f).Addr().Interface()
-}
-
-// Bytes returns the address of a []byte field in the struct.
-func structPointer_Bytes(p structPointer, f field) *[]byte {
- return structPointer_ifield(p, f).(*[]byte)
-}
-
-// BytesSlice returns the address of a [][]byte field in the struct.
-func structPointer_BytesSlice(p structPointer, f field) *[][]byte {
- return structPointer_ifield(p, f).(*[][]byte)
-}
-
-// Bool returns the address of a *bool field in the struct.
-func structPointer_Bool(p structPointer, f field) **bool {
- return structPointer_ifield(p, f).(**bool)
-}
-
-// BoolVal returns the address of a bool field in the struct.
-func structPointer_BoolVal(p structPointer, f field) *bool {
- return structPointer_ifield(p, f).(*bool)
-}
-
-// BoolSlice returns the address of a []bool field in the struct.
-func structPointer_BoolSlice(p structPointer, f field) *[]bool {
- return structPointer_ifield(p, f).(*[]bool)
-}
-
-// String returns the address of a *string field in the struct.
-func structPointer_String(p structPointer, f field) **string {
- return structPointer_ifield(p, f).(**string)
-}
-
-// StringVal returns the address of a string field in the struct.
-func structPointer_StringVal(p structPointer, f field) *string {
- return structPointer_ifield(p, f).(*string)
-}
-
-// StringSlice returns the address of a []string field in the struct.
-func structPointer_StringSlice(p structPointer, f field) *[]string {
- return structPointer_ifield(p, f).(*[]string)
-}
-
-// Extensions returns the address of an extension map field in the struct.
-func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions {
- return structPointer_ifield(p, f).(*XXX_InternalExtensions)
-}
-
-// ExtMap returns the address of an extension map field in the struct.
-func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension {
- return structPointer_ifield(p, f).(*map[int32]Extension)
-}
-
-// NewAt returns the reflect.Value for a pointer to a field in the struct.
-func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value {
- return structPointer_field(p, f).Addr()
-}
-
-// SetStructPointer writes a *struct field in the struct.
-func structPointer_SetStructPointer(p structPointer, f field, q structPointer) {
- structPointer_field(p, f).Set(q.v)
-}
-
-// GetStructPointer reads a *struct field in the struct.
-func structPointer_GetStructPointer(p structPointer, f field) structPointer {
- return structPointer{structPointer_field(p, f)}
-}
-
-// StructPointerSlice the address of a []*struct field in the struct.
-func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice {
- return structPointerSlice{structPointer_field(p, f)}
-}
-
-// A structPointerSlice represents the address of a slice of pointers to structs
-// (themselves messages or groups). That is, v.Type() is *[]*struct{...}.
-type structPointerSlice struct {
- v reflect.Value
-}
-
-func (p structPointerSlice) Len() int { return p.v.Len() }
-func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} }
-func (p structPointerSlice) Append(q structPointer) {
- p.v.Set(reflect.Append(p.v, q.v))
-}
-
-var (
- int32Type = reflect.TypeOf(int32(0))
- uint32Type = reflect.TypeOf(uint32(0))
- float32Type = reflect.TypeOf(float32(0))
- int64Type = reflect.TypeOf(int64(0))
- uint64Type = reflect.TypeOf(uint64(0))
- float64Type = reflect.TypeOf(float64(0))
-)
-
-// A word32 represents a field of type *int32, *uint32, *float32, or *enum.
-// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable.
-type word32 struct {
- v reflect.Value
-}
-
-// IsNil reports whether p is nil.
-func word32_IsNil(p word32) bool {
- return p.v.IsNil()
-}
-
-// Set sets p to point at a newly allocated word with bits set to x.
-func word32_Set(p word32, o *Buffer, x uint32) {
- t := p.v.Type().Elem()
- switch t {
- case int32Type:
- if len(o.int32s) == 0 {
- o.int32s = make([]int32, uint32PoolSize)
- }
- o.int32s[0] = int32(x)
- p.v.Set(reflect.ValueOf(&o.int32s[0]))
- o.int32s = o.int32s[1:]
- return
- case uint32Type:
- if len(o.uint32s) == 0 {
- o.uint32s = make([]uint32, uint32PoolSize)
- }
- o.uint32s[0] = x
- p.v.Set(reflect.ValueOf(&o.uint32s[0]))
- o.uint32s = o.uint32s[1:]
- return
- case float32Type:
- if len(o.float32s) == 0 {
- o.float32s = make([]float32, uint32PoolSize)
- }
- o.float32s[0] = math.Float32frombits(x)
- p.v.Set(reflect.ValueOf(&o.float32s[0]))
- o.float32s = o.float32s[1:]
- return
- }
-
- // must be enum
- p.v.Set(reflect.New(t))
- p.v.Elem().SetInt(int64(int32(x)))
-}
-
-// Get gets the bits pointed at by p, as a uint32.
-func word32_Get(p word32) uint32 {
- elem := p.v.Elem()
- switch elem.Kind() {
- case reflect.Int32:
- return uint32(elem.Int())
- case reflect.Uint32:
- return uint32(elem.Uint())
- case reflect.Float32:
- return math.Float32bits(float32(elem.Float()))
- }
- panic("unreachable")
-}
-
-// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct.
-func structPointer_Word32(p structPointer, f field) word32 {
- return word32{structPointer_field(p, f)}
-}
-
-// A word32Val represents a field of type int32, uint32, float32, or enum.
-// That is, v.Type() is int32, uint32, float32, or enum and v is assignable.
-type word32Val struct {
- v reflect.Value
-}
-
-// Set sets *p to x.
-func word32Val_Set(p word32Val, x uint32) {
- switch p.v.Type() {
- case int32Type:
- p.v.SetInt(int64(x))
- return
- case uint32Type:
- p.v.SetUint(uint64(x))
- return
- case float32Type:
- p.v.SetFloat(float64(math.Float32frombits(x)))
- return
- }
-
- // must be enum
- p.v.SetInt(int64(int32(x)))
-}
-
-// Get gets the bits pointed at by p, as a uint32.
-func word32Val_Get(p word32Val) uint32 {
- elem := p.v
- switch elem.Kind() {
- case reflect.Int32:
- return uint32(elem.Int())
- case reflect.Uint32:
- return uint32(elem.Uint())
- case reflect.Float32:
- return math.Float32bits(float32(elem.Float()))
- }
- panic("unreachable")
-}
-
-// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct.
-func structPointer_Word32Val(p structPointer, f field) word32Val {
- return word32Val{structPointer_field(p, f)}
-}
-
-// A word32Slice is a slice of 32-bit values.
-// That is, v.Type() is []int32, []uint32, []float32, or []enum.
-type word32Slice struct {
- v reflect.Value
-}
-
-func (p word32Slice) Append(x uint32) {
- n, m := p.v.Len(), p.v.Cap()
- if n < m {
- p.v.SetLen(n + 1)
- } else {
- t := p.v.Type().Elem()
- p.v.Set(reflect.Append(p.v, reflect.Zero(t)))
- }
- elem := p.v.Index(n)
- switch elem.Kind() {
- case reflect.Int32:
- elem.SetInt(int64(int32(x)))
- case reflect.Uint32:
- elem.SetUint(uint64(x))
- case reflect.Float32:
- elem.SetFloat(float64(math.Float32frombits(x)))
- }
-}
-
-func (p word32Slice) Len() int {
- return p.v.Len()
-}
-
-func (p word32Slice) Index(i int) uint32 {
- elem := p.v.Index(i)
- switch elem.Kind() {
- case reflect.Int32:
- return uint32(elem.Int())
- case reflect.Uint32:
- return uint32(elem.Uint())
- case reflect.Float32:
- return math.Float32bits(float32(elem.Float()))
- }
- panic("unreachable")
-}
-
-// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct.
-func structPointer_Word32Slice(p structPointer, f field) word32Slice {
- return word32Slice{structPointer_field(p, f)}
-}
-
-// word64 is like word32 but for 64-bit values.
-type word64 struct {
- v reflect.Value
-}
-
-func word64_Set(p word64, o *Buffer, x uint64) {
- t := p.v.Type().Elem()
- switch t {
- case int64Type:
- if len(o.int64s) == 0 {
- o.int64s = make([]int64, uint64PoolSize)
- }
- o.int64s[0] = int64(x)
- p.v.Set(reflect.ValueOf(&o.int64s[0]))
- o.int64s = o.int64s[1:]
- return
- case uint64Type:
- if len(o.uint64s) == 0 {
- o.uint64s = make([]uint64, uint64PoolSize)
- }
- o.uint64s[0] = x
- p.v.Set(reflect.ValueOf(&o.uint64s[0]))
- o.uint64s = o.uint64s[1:]
- return
- case float64Type:
- if len(o.float64s) == 0 {
- o.float64s = make([]float64, uint64PoolSize)
- }
- o.float64s[0] = math.Float64frombits(x)
- p.v.Set(reflect.ValueOf(&o.float64s[0]))
- o.float64s = o.float64s[1:]
- return
- }
- panic("unreachable")
-}
-
-func word64_IsNil(p word64) bool {
- return p.v.IsNil()
-}
-
-func word64_Get(p word64) uint64 {
- elem := p.v.Elem()
- switch elem.Kind() {
- case reflect.Int64:
- return uint64(elem.Int())
- case reflect.Uint64:
- return elem.Uint()
- case reflect.Float64:
- return math.Float64bits(elem.Float())
- }
- panic("unreachable")
-}
-
-func structPointer_Word64(p structPointer, f field) word64 {
- return word64{structPointer_field(p, f)}
-}
-
-// word64Val is like word32Val but for 64-bit values.
-type word64Val struct {
- v reflect.Value
-}
-
-func word64Val_Set(p word64Val, o *Buffer, x uint64) {
- switch p.v.Type() {
- case int64Type:
- p.v.SetInt(int64(x))
- return
- case uint64Type:
- p.v.SetUint(x)
- return
- case float64Type:
- p.v.SetFloat(math.Float64frombits(x))
- return
- }
- panic("unreachable")
-}
-
-func word64Val_Get(p word64Val) uint64 {
- elem := p.v
- switch elem.Kind() {
- case reflect.Int64:
- return uint64(elem.Int())
- case reflect.Uint64:
- return elem.Uint()
- case reflect.Float64:
- return math.Float64bits(elem.Float())
- }
- panic("unreachable")
-}
-
-func structPointer_Word64Val(p structPointer, f field) word64Val {
- return word64Val{structPointer_field(p, f)}
-}
-
-type word64Slice struct {
- v reflect.Value
-}
-
-func (p word64Slice) Append(x uint64) {
- n, m := p.v.Len(), p.v.Cap()
- if n < m {
- p.v.SetLen(n + 1)
- } else {
- t := p.v.Type().Elem()
- p.v.Set(reflect.Append(p.v, reflect.Zero(t)))
- }
- elem := p.v.Index(n)
- switch elem.Kind() {
- case reflect.Int64:
- elem.SetInt(int64(int64(x)))
- case reflect.Uint64:
- elem.SetUint(uint64(x))
- case reflect.Float64:
- elem.SetFloat(float64(math.Float64frombits(x)))
- }
-}
-
-func (p word64Slice) Len() int {
- return p.v.Len()
-}
-
-func (p word64Slice) Index(i int) uint64 {
- elem := p.v.Index(i)
- switch elem.Kind() {
- case reflect.Int64:
- return uint64(elem.Int())
- case reflect.Uint64:
- return uint64(elem.Uint())
- case reflect.Float64:
- return math.Float64bits(float64(elem.Float()))
- }
- panic("unreachable")
-}
-
-func structPointer_Word64Slice(p structPointer, f field) word64Slice {
- return word64Slice{structPointer_field(p, f)}
-}
diff --git a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
deleted file mode 100644
index 6b5567d47..000000000
--- a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
+++ /dev/null
@@ -1,270 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2012 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// +build !appengine,!js
-
-// This file contains the implementation of the proto field accesses using package unsafe.
-
-package proto
-
-import (
- "reflect"
- "unsafe"
-)
-
-// NOTE: These type_Foo functions would more idiomatically be methods,
-// but Go does not allow methods on pointer types, and we must preserve
-// some pointer type for the garbage collector. We use these
-// funcs with clunky names as our poor approximation to methods.
-//
-// An alternative would be
-// type structPointer struct { p unsafe.Pointer }
-// but that does not registerize as well.
-
-// A structPointer is a pointer to a struct.
-type structPointer unsafe.Pointer
-
-// toStructPointer returns a structPointer equivalent to the given reflect value.
-func toStructPointer(v reflect.Value) structPointer {
- return structPointer(unsafe.Pointer(v.Pointer()))
-}
-
-// IsNil reports whether p is nil.
-func structPointer_IsNil(p structPointer) bool {
- return p == nil
-}
-
-// Interface returns the struct pointer, assumed to have element type t,
-// as an interface value.
-func structPointer_Interface(p structPointer, t reflect.Type) interface{} {
- return reflect.NewAt(t, unsafe.Pointer(p)).Interface()
-}
-
-// A field identifies a field in a struct, accessible from a structPointer.
-// In this implementation, a field is identified by its byte offset from the start of the struct.
-type field uintptr
-
-// toField returns a field equivalent to the given reflect field.
-func toField(f *reflect.StructField) field {
- return field(f.Offset)
-}
-
-// invalidField is an invalid field identifier.
-const invalidField = ^field(0)
-
-// IsValid reports whether the field identifier is valid.
-func (f field) IsValid() bool {
- return f != ^field(0)
-}
-
-// Bytes returns the address of a []byte field in the struct.
-func structPointer_Bytes(p structPointer, f field) *[]byte {
- return (*[]byte)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// BytesSlice returns the address of a [][]byte field in the struct.
-func structPointer_BytesSlice(p structPointer, f field) *[][]byte {
- return (*[][]byte)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// Bool returns the address of a *bool field in the struct.
-func structPointer_Bool(p structPointer, f field) **bool {
- return (**bool)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// BoolVal returns the address of a bool field in the struct.
-func structPointer_BoolVal(p structPointer, f field) *bool {
- return (*bool)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// BoolSlice returns the address of a []bool field in the struct.
-func structPointer_BoolSlice(p structPointer, f field) *[]bool {
- return (*[]bool)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// String returns the address of a *string field in the struct.
-func structPointer_String(p structPointer, f field) **string {
- return (**string)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// StringVal returns the address of a string field in the struct.
-func structPointer_StringVal(p structPointer, f field) *string {
- return (*string)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// StringSlice returns the address of a []string field in the struct.
-func structPointer_StringSlice(p structPointer, f field) *[]string {
- return (*[]string)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// ExtMap returns the address of an extension map field in the struct.
-func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions {
- return (*XXX_InternalExtensions)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension {
- return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// NewAt returns the reflect.Value for a pointer to a field in the struct.
-func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value {
- return reflect.NewAt(typ, unsafe.Pointer(uintptr(p)+uintptr(f)))
-}
-
-// SetStructPointer writes a *struct field in the struct.
-func structPointer_SetStructPointer(p structPointer, f field, q structPointer) {
- *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) = q
-}
-
-// GetStructPointer reads a *struct field in the struct.
-func structPointer_GetStructPointer(p structPointer, f field) structPointer {
- return *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// StructPointerSlice the address of a []*struct field in the struct.
-func structPointer_StructPointerSlice(p structPointer, f field) *structPointerSlice {
- return (*structPointerSlice)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// A structPointerSlice represents a slice of pointers to structs (themselves submessages or groups).
-type structPointerSlice []structPointer
-
-func (v *structPointerSlice) Len() int { return len(*v) }
-func (v *structPointerSlice) Index(i int) structPointer { return (*v)[i] }
-func (v *structPointerSlice) Append(p structPointer) { *v = append(*v, p) }
-
-// A word32 is the address of a "pointer to 32-bit value" field.
-type word32 **uint32
-
-// IsNil reports whether *v is nil.
-func word32_IsNil(p word32) bool {
- return *p == nil
-}
-
-// Set sets *v to point at a newly allocated word set to x.
-func word32_Set(p word32, o *Buffer, x uint32) {
- if len(o.uint32s) == 0 {
- o.uint32s = make([]uint32, uint32PoolSize)
- }
- o.uint32s[0] = x
- *p = &o.uint32s[0]
- o.uint32s = o.uint32s[1:]
-}
-
-// Get gets the value pointed at by *v.
-func word32_Get(p word32) uint32 {
- return **p
-}
-
-// Word32 returns the address of a *int32, *uint32, *float32, or *enum field in the struct.
-func structPointer_Word32(p structPointer, f field) word32 {
- return word32((**uint32)(unsafe.Pointer(uintptr(p) + uintptr(f))))
-}
-
-// A word32Val is the address of a 32-bit value field.
-type word32Val *uint32
-
-// Set sets *p to x.
-func word32Val_Set(p word32Val, x uint32) {
- *p = x
-}
-
-// Get gets the value pointed at by p.
-func word32Val_Get(p word32Val) uint32 {
- return *p
-}
-
-// Word32Val returns the address of a *int32, *uint32, *float32, or *enum field in the struct.
-func structPointer_Word32Val(p structPointer, f field) word32Val {
- return word32Val((*uint32)(unsafe.Pointer(uintptr(p) + uintptr(f))))
-}
-
-// A word32Slice is a slice of 32-bit values.
-type word32Slice []uint32
-
-func (v *word32Slice) Append(x uint32) { *v = append(*v, x) }
-func (v *word32Slice) Len() int { return len(*v) }
-func (v *word32Slice) Index(i int) uint32 { return (*v)[i] }
-
-// Word32Slice returns the address of a []int32, []uint32, []float32, or []enum field in the struct.
-func structPointer_Word32Slice(p structPointer, f field) *word32Slice {
- return (*word32Slice)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// word64 is like word32 but for 64-bit values.
-type word64 **uint64
-
-func word64_Set(p word64, o *Buffer, x uint64) {
- if len(o.uint64s) == 0 {
- o.uint64s = make([]uint64, uint64PoolSize)
- }
- o.uint64s[0] = x
- *p = &o.uint64s[0]
- o.uint64s = o.uint64s[1:]
-}
-
-func word64_IsNil(p word64) bool {
- return *p == nil
-}
-
-func word64_Get(p word64) uint64 {
- return **p
-}
-
-func structPointer_Word64(p structPointer, f field) word64 {
- return word64((**uint64)(unsafe.Pointer(uintptr(p) + uintptr(f))))
-}
-
-// word64Val is like word32Val but for 64-bit values.
-type word64Val *uint64
-
-func word64Val_Set(p word64Val, o *Buffer, x uint64) {
- *p = x
-}
-
-func word64Val_Get(p word64Val) uint64 {
- return *p
-}
-
-func structPointer_Word64Val(p structPointer, f field) word64Val {
- return word64Val((*uint64)(unsafe.Pointer(uintptr(p) + uintptr(f))))
-}
-
-// word64Slice is like word32Slice but for 64-bit values.
-type word64Slice []uint64
-
-func (v *word64Slice) Append(x uint64) { *v = append(*v, x) }
-func (v *word64Slice) Len() int { return len(*v) }
-func (v *word64Slice) Index(i int) uint64 { return (*v)[i] }
-
-func structPointer_Word64Slice(p structPointer, f field) *word64Slice {
- return (*word64Slice)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go
deleted file mode 100644
index ec2289c00..000000000
--- a/vendor/github.com/golang/protobuf/proto/properties.go
+++ /dev/null
@@ -1,872 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-/*
- * Routines for encoding data into the wire format for protocol buffers.
- */
-
-import (
- "fmt"
- "log"
- "os"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "sync"
-)
-
-const debug bool = false
-
-// Constants that identify the encoding of a value on the wire.
-const (
- WireVarint = 0
- WireFixed64 = 1
- WireBytes = 2
- WireStartGroup = 3
- WireEndGroup = 4
- WireFixed32 = 5
-)
-
-const startSize = 10 // initial slice/string sizes
-
-// Encoders are defined in encode.go
-// An encoder outputs the full representation of a field, including its
-// tag and encoder type.
-type encoder func(p *Buffer, prop *Properties, base structPointer) error
-
-// A valueEncoder encodes a single integer in a particular encoding.
-type valueEncoder func(o *Buffer, x uint64) error
-
-// Sizers are defined in encode.go
-// A sizer returns the encoded size of a field, including its tag and encoder
-// type.
-type sizer func(prop *Properties, base structPointer) int
-
-// A valueSizer returns the encoded size of a single integer in a particular
-// encoding.
-type valueSizer func(x uint64) int
-
-// Decoders are defined in decode.go
-// A decoder creates a value from its wire representation.
-// Unrecognized subelements are saved in unrec.
-type decoder func(p *Buffer, prop *Properties, base structPointer) error
-
-// A valueDecoder decodes a single integer in a particular encoding.
-type valueDecoder func(o *Buffer) (x uint64, err error)
-
-// A oneofMarshaler does the marshaling for all oneof fields in a message.
-type oneofMarshaler func(Message, *Buffer) error
-
-// A oneofUnmarshaler does the unmarshaling for a oneof field in a message.
-type oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error)
-
-// A oneofSizer does the sizing for all oneof fields in a message.
-type oneofSizer func(Message) int
-
-// tagMap is an optimization over map[int]int for typical protocol buffer
-// use-cases. Encoded protocol buffers are often in tag order with small tag
-// numbers.
-type tagMap struct {
- fastTags []int
- slowTags map[int]int
-}
-
-// tagMapFastLimit is the upper bound on the tag number that will be stored in
-// the tagMap slice rather than its map.
-const tagMapFastLimit = 1024
-
-func (p *tagMap) get(t int) (int, bool) {
- if t > 0 && t < tagMapFastLimit {
- if t >= len(p.fastTags) {
- return 0, false
- }
- fi := p.fastTags[t]
- return fi, fi >= 0
- }
- fi, ok := p.slowTags[t]
- return fi, ok
-}
-
-func (p *tagMap) put(t int, fi int) {
- if t > 0 && t < tagMapFastLimit {
- for len(p.fastTags) < t+1 {
- p.fastTags = append(p.fastTags, -1)
- }
- p.fastTags[t] = fi
- return
- }
- if p.slowTags == nil {
- p.slowTags = make(map[int]int)
- }
- p.slowTags[t] = fi
-}
-
-// StructProperties represents properties for all the fields of a struct.
-// decoderTags and decoderOrigNames should only be used by the decoder.
-type StructProperties struct {
- Prop []*Properties // properties for each field
- reqCount int // required count
- decoderTags tagMap // map from proto tag to struct field number
- decoderOrigNames map[string]int // map from original name to struct field number
- order []int // list of struct field numbers in tag order
- unrecField field // field id of the XXX_unrecognized []byte field
- extendable bool // is this an extendable proto
-
- oneofMarshaler oneofMarshaler
- oneofUnmarshaler oneofUnmarshaler
- oneofSizer oneofSizer
- stype reflect.Type
-
- // OneofTypes contains information about the oneof fields in this message.
- // It is keyed by the original name of a field.
- OneofTypes map[string]*OneofProperties
-}
-
-// OneofProperties represents information about a specific field in a oneof.
-type OneofProperties struct {
- Type reflect.Type // pointer to generated struct type for this oneof field
- Field int // struct field number of the containing oneof in the message
- Prop *Properties
-}
-
-// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec.
-// See encode.go, (*Buffer).enc_struct.
-
-func (sp *StructProperties) Len() int { return len(sp.order) }
-func (sp *StructProperties) Less(i, j int) bool {
- return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag
-}
-func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] }
-
-// Properties represents the protocol-specific behavior of a single struct field.
-type Properties struct {
- Name string // name of the field, for error messages
- OrigName string // original name before protocol compiler (always set)
- JSONName string // name to use for JSON; determined by protoc
- Wire string
- WireType int
- Tag int
- Required bool
- Optional bool
- Repeated bool
- Packed bool // relevant for repeated primitives only
- Enum string // set for enum types only
- proto3 bool // whether this is known to be a proto3 field; set for []byte only
- oneof bool // whether this is a oneof field
-
- Default string // default value
- HasDefault bool // whether an explicit default was provided
- def_uint64 uint64
-
- enc encoder
- valEnc valueEncoder // set for bool and numeric types only
- field field
- tagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType)
- tagbuf [8]byte
- stype reflect.Type // set for struct types only
- sprop *StructProperties // set for struct types only
- isMarshaler bool
- isUnmarshaler bool
-
- mtype reflect.Type // set for map types only
- mkeyprop *Properties // set for map types only
- mvalprop *Properties // set for map types only
-
- size sizer
- valSize valueSizer // set for bool and numeric types only
-
- dec decoder
- valDec valueDecoder // set for bool and numeric types only
-
- // If this is a packable field, this will be the decoder for the packed version of the field.
- packedDec decoder
-}
-
-// String formats the properties in the protobuf struct field tag style.
-func (p *Properties) String() string {
- s := p.Wire
- s = ","
- s += strconv.Itoa(p.Tag)
- if p.Required {
- s += ",req"
- }
- if p.Optional {
- s += ",opt"
- }
- if p.Repeated {
- s += ",rep"
- }
- if p.Packed {
- s += ",packed"
- }
- s += ",name=" + p.OrigName
- if p.JSONName != p.OrigName {
- s += ",json=" + p.JSONName
- }
- if p.proto3 {
- s += ",proto3"
- }
- if p.oneof {
- s += ",oneof"
- }
- if len(p.Enum) > 0 {
- s += ",enum=" + p.Enum
- }
- if p.HasDefault {
- s += ",def=" + p.Default
- }
- return s
-}
-
-// Parse populates p by parsing a string in the protobuf struct field tag style.
-func (p *Properties) Parse(s string) {
- // "bytes,49,opt,name=foo,def=hello!"
- fields := strings.Split(s, ",") // breaks def=, but handled below.
- if len(fields) < 2 {
- fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s)
- return
- }
-
- p.Wire = fields[0]
- switch p.Wire {
- case "varint":
- p.WireType = WireVarint
- p.valEnc = (*Buffer).EncodeVarint
- p.valDec = (*Buffer).DecodeVarint
- p.valSize = sizeVarint
- case "fixed32":
- p.WireType = WireFixed32
- p.valEnc = (*Buffer).EncodeFixed32
- p.valDec = (*Buffer).DecodeFixed32
- p.valSize = sizeFixed32
- case "fixed64":
- p.WireType = WireFixed64
- p.valEnc = (*Buffer).EncodeFixed64
- p.valDec = (*Buffer).DecodeFixed64
- p.valSize = sizeFixed64
- case "zigzag32":
- p.WireType = WireVarint
- p.valEnc = (*Buffer).EncodeZigzag32
- p.valDec = (*Buffer).DecodeZigzag32
- p.valSize = sizeZigzag32
- case "zigzag64":
- p.WireType = WireVarint
- p.valEnc = (*Buffer).EncodeZigzag64
- p.valDec = (*Buffer).DecodeZigzag64
- p.valSize = sizeZigzag64
- case "bytes", "group":
- p.WireType = WireBytes
- // no numeric converter for non-numeric types
- default:
- fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s)
- return
- }
-
- var err error
- p.Tag, err = strconv.Atoi(fields[1])
- if err != nil {
- return
- }
-
- for i := 2; i < len(fields); i++ {
- f := fields[i]
- switch {
- case f == "req":
- p.Required = true
- case f == "opt":
- p.Optional = true
- case f == "rep":
- p.Repeated = true
- case f == "packed":
- p.Packed = true
- case strings.HasPrefix(f, "name="):
- p.OrigName = f[5:]
- case strings.HasPrefix(f, "json="):
- p.JSONName = f[5:]
- case strings.HasPrefix(f, "enum="):
- p.Enum = f[5:]
- case f == "proto3":
- p.proto3 = true
- case f == "oneof":
- p.oneof = true
- case strings.HasPrefix(f, "def="):
- p.HasDefault = true
- p.Default = f[4:] // rest of string
- if i+1 < len(fields) {
- // Commas aren't escaped, and def is always last.
- p.Default += "," + strings.Join(fields[i+1:], ",")
- break
- }
- }
- }
-}
-
-func logNoSliceEnc(t1, t2 reflect.Type) {
- fmt.Fprintf(os.Stderr, "proto: no slice oenc for %T = []%T\n", t1, t2)
-}
-
-var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem()
-
-// Initialize the fields for encoding and decoding.
-func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) {
- p.enc = nil
- p.dec = nil
- p.size = nil
-
- switch t1 := typ; t1.Kind() {
- default:
- fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1)
-
- // proto3 scalar types
-
- case reflect.Bool:
- p.enc = (*Buffer).enc_proto3_bool
- p.dec = (*Buffer).dec_proto3_bool
- p.size = size_proto3_bool
- case reflect.Int32:
- p.enc = (*Buffer).enc_proto3_int32
- p.dec = (*Buffer).dec_proto3_int32
- p.size = size_proto3_int32
- case reflect.Uint32:
- p.enc = (*Buffer).enc_proto3_uint32
- p.dec = (*Buffer).dec_proto3_int32 // can reuse
- p.size = size_proto3_uint32
- case reflect.Int64, reflect.Uint64:
- p.enc = (*Buffer).enc_proto3_int64
- p.dec = (*Buffer).dec_proto3_int64
- p.size = size_proto3_int64
- case reflect.Float32:
- p.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits
- p.dec = (*Buffer).dec_proto3_int32
- p.size = size_proto3_uint32
- case reflect.Float64:
- p.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits
- p.dec = (*Buffer).dec_proto3_int64
- p.size = size_proto3_int64
- case reflect.String:
- p.enc = (*Buffer).enc_proto3_string
- p.dec = (*Buffer).dec_proto3_string
- p.size = size_proto3_string
-
- case reflect.Ptr:
- switch t2 := t1.Elem(); t2.Kind() {
- default:
- fmt.Fprintf(os.Stderr, "proto: no encoder function for %v -> %v\n", t1, t2)
- break
- case reflect.Bool:
- p.enc = (*Buffer).enc_bool
- p.dec = (*Buffer).dec_bool
- p.size = size_bool
- case reflect.Int32:
- p.enc = (*Buffer).enc_int32
- p.dec = (*Buffer).dec_int32
- p.size = size_int32
- case reflect.Uint32:
- p.enc = (*Buffer).enc_uint32
- p.dec = (*Buffer).dec_int32 // can reuse
- p.size = size_uint32
- case reflect.Int64, reflect.Uint64:
- p.enc = (*Buffer).enc_int64
- p.dec = (*Buffer).dec_int64
- p.size = size_int64
- case reflect.Float32:
- p.enc = (*Buffer).enc_uint32 // can just treat them as bits
- p.dec = (*Buffer).dec_int32
- p.size = size_uint32
- case reflect.Float64:
- p.enc = (*Buffer).enc_int64 // can just treat them as bits
- p.dec = (*Buffer).dec_int64
- p.size = size_int64
- case reflect.String:
- p.enc = (*Buffer).enc_string
- p.dec = (*Buffer).dec_string
- p.size = size_string
- case reflect.Struct:
- p.stype = t1.Elem()
- p.isMarshaler = isMarshaler(t1)
- p.isUnmarshaler = isUnmarshaler(t1)
- if p.Wire == "bytes" {
- p.enc = (*Buffer).enc_struct_message
- p.dec = (*Buffer).dec_struct_message
- p.size = size_struct_message
- } else {
- p.enc = (*Buffer).enc_struct_group
- p.dec = (*Buffer).dec_struct_group
- p.size = size_struct_group
- }
- }
-
- case reflect.Slice:
- switch t2 := t1.Elem(); t2.Kind() {
- default:
- logNoSliceEnc(t1, t2)
- break
- case reflect.Bool:
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_bool
- p.size = size_slice_packed_bool
- } else {
- p.enc = (*Buffer).enc_slice_bool
- p.size = size_slice_bool
- }
- p.dec = (*Buffer).dec_slice_bool
- p.packedDec = (*Buffer).dec_slice_packed_bool
- case reflect.Int32:
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_int32
- p.size = size_slice_packed_int32
- } else {
- p.enc = (*Buffer).enc_slice_int32
- p.size = size_slice_int32
- }
- p.dec = (*Buffer).dec_slice_int32
- p.packedDec = (*Buffer).dec_slice_packed_int32
- case reflect.Uint32:
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_uint32
- p.size = size_slice_packed_uint32
- } else {
- p.enc = (*Buffer).enc_slice_uint32
- p.size = size_slice_uint32
- }
- p.dec = (*Buffer).dec_slice_int32
- p.packedDec = (*Buffer).dec_slice_packed_int32
- case reflect.Int64, reflect.Uint64:
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_int64
- p.size = size_slice_packed_int64
- } else {
- p.enc = (*Buffer).enc_slice_int64
- p.size = size_slice_int64
- }
- p.dec = (*Buffer).dec_slice_int64
- p.packedDec = (*Buffer).dec_slice_packed_int64
- case reflect.Uint8:
- p.dec = (*Buffer).dec_slice_byte
- if p.proto3 {
- p.enc = (*Buffer).enc_proto3_slice_byte
- p.size = size_proto3_slice_byte
- } else {
- p.enc = (*Buffer).enc_slice_byte
- p.size = size_slice_byte
- }
- case reflect.Float32, reflect.Float64:
- switch t2.Bits() {
- case 32:
- // can just treat them as bits
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_uint32
- p.size = size_slice_packed_uint32
- } else {
- p.enc = (*Buffer).enc_slice_uint32
- p.size = size_slice_uint32
- }
- p.dec = (*Buffer).dec_slice_int32
- p.packedDec = (*Buffer).dec_slice_packed_int32
- case 64:
- // can just treat them as bits
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_int64
- p.size = size_slice_packed_int64
- } else {
- p.enc = (*Buffer).enc_slice_int64
- p.size = size_slice_int64
- }
- p.dec = (*Buffer).dec_slice_int64
- p.packedDec = (*Buffer).dec_slice_packed_int64
- default:
- logNoSliceEnc(t1, t2)
- break
- }
- case reflect.String:
- p.enc = (*Buffer).enc_slice_string
- p.dec = (*Buffer).dec_slice_string
- p.size = size_slice_string
- case reflect.Ptr:
- switch t3 := t2.Elem(); t3.Kind() {
- default:
- fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T -> %T\n", t1, t2, t3)
- break
- case reflect.Struct:
- p.stype = t2.Elem()
- p.isMarshaler = isMarshaler(t2)
- p.isUnmarshaler = isUnmarshaler(t2)
- if p.Wire == "bytes" {
- p.enc = (*Buffer).enc_slice_struct_message
- p.dec = (*Buffer).dec_slice_struct_message
- p.size = size_slice_struct_message
- } else {
- p.enc = (*Buffer).enc_slice_struct_group
- p.dec = (*Buffer).dec_slice_struct_group
- p.size = size_slice_struct_group
- }
- }
- case reflect.Slice:
- switch t2.Elem().Kind() {
- default:
- fmt.Fprintf(os.Stderr, "proto: no slice elem oenc for %T -> %T -> %T\n", t1, t2, t2.Elem())
- break
- case reflect.Uint8:
- p.enc = (*Buffer).enc_slice_slice_byte
- p.dec = (*Buffer).dec_slice_slice_byte
- p.size = size_slice_slice_byte
- }
- }
-
- case reflect.Map:
- p.enc = (*Buffer).enc_new_map
- p.dec = (*Buffer).dec_new_map
- p.size = size_new_map
-
- p.mtype = t1
- p.mkeyprop = &Properties{}
- p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
- p.mvalprop = &Properties{}
- vtype := p.mtype.Elem()
- if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {
- // The value type is not a message (*T) or bytes ([]byte),
- // so we need encoders for the pointer to this type.
- vtype = reflect.PtrTo(vtype)
- }
- p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
- }
-
- // precalculate tag code
- wire := p.WireType
- if p.Packed {
- wire = WireBytes
- }
- x := uint32(p.Tag)<<3 | uint32(wire)
- i := 0
- for i = 0; x > 127; i++ {
- p.tagbuf[i] = 0x80 | uint8(x&0x7F)
- x >>= 7
- }
- p.tagbuf[i] = uint8(x)
- p.tagcode = p.tagbuf[0 : i+1]
-
- if p.stype != nil {
- if lockGetProp {
- p.sprop = GetProperties(p.stype)
- } else {
- p.sprop = getPropertiesLocked(p.stype)
- }
- }
-}
-
-var (
- marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()
- unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem()
-)
-
-// isMarshaler reports whether type t implements Marshaler.
-func isMarshaler(t reflect.Type) bool {
- // We're checking for (likely) pointer-receiver methods
- // so if t is not a pointer, something is very wrong.
- // The calls above only invoke isMarshaler on pointer types.
- if t.Kind() != reflect.Ptr {
- panic("proto: misuse of isMarshaler")
- }
- return t.Implements(marshalerType)
-}
-
-// isUnmarshaler reports whether type t implements Unmarshaler.
-func isUnmarshaler(t reflect.Type) bool {
- // We're checking for (likely) pointer-receiver methods
- // so if t is not a pointer, something is very wrong.
- // The calls above only invoke isUnmarshaler on pointer types.
- if t.Kind() != reflect.Ptr {
- panic("proto: misuse of isUnmarshaler")
- }
- return t.Implements(unmarshalerType)
-}
-
-// Init populates the properties from a protocol buffer struct tag.
-func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) {
- p.init(typ, name, tag, f, true)
-}
-
-func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) {
- // "bytes,49,opt,def=hello!"
- p.Name = name
- p.OrigName = name
- if f != nil {
- p.field = toField(f)
- }
- if tag == "" {
- return
- }
- p.Parse(tag)
- p.setEncAndDec(typ, f, lockGetProp)
-}
-
-var (
- propertiesMu sync.RWMutex
- propertiesMap = make(map[reflect.Type]*StructProperties)
-)
-
-// GetProperties returns the list of properties for the type represented by t.
-// t must represent a generated struct type of a protocol message.
-func GetProperties(t reflect.Type) *StructProperties {
- if t.Kind() != reflect.Struct {
- panic("proto: type must have kind struct")
- }
-
- // Most calls to GetProperties in a long-running program will be
- // retrieving details for types we have seen before.
- propertiesMu.RLock()
- sprop, ok := propertiesMap[t]
- propertiesMu.RUnlock()
- if ok {
- if collectStats {
- stats.Chit++
- }
- return sprop
- }
-
- propertiesMu.Lock()
- sprop = getPropertiesLocked(t)
- propertiesMu.Unlock()
- return sprop
-}
-
-// getPropertiesLocked requires that propertiesMu is held.
-func getPropertiesLocked(t reflect.Type) *StructProperties {
- if prop, ok := propertiesMap[t]; ok {
- if collectStats {
- stats.Chit++
- }
- return prop
- }
- if collectStats {
- stats.Cmiss++
- }
-
- prop := new(StructProperties)
- // in case of recursive protos, fill this in now.
- propertiesMap[t] = prop
-
- // build properties
- prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) ||
- reflect.PtrTo(t).Implements(extendableProtoV1Type)
- prop.unrecField = invalidField
- prop.Prop = make([]*Properties, t.NumField())
- prop.order = make([]int, t.NumField())
-
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- p := new(Properties)
- name := f.Name
- p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false)
-
- if f.Name == "XXX_InternalExtensions" { // special case
- p.enc = (*Buffer).enc_exts
- p.dec = nil // not needed
- p.size = size_exts
- } else if f.Name == "XXX_extensions" { // special case
- p.enc = (*Buffer).enc_map
- p.dec = nil // not needed
- p.size = size_map
- } else if f.Name == "XXX_unrecognized" { // special case
- prop.unrecField = toField(&f)
- }
- oneof := f.Tag.Get("protobuf_oneof") // special case
- if oneof != "" {
- // Oneof fields don't use the traditional protobuf tag.
- p.OrigName = oneof
- }
- prop.Prop[i] = p
- prop.order[i] = i
- if debug {
- print(i, " ", f.Name, " ", t.String(), " ")
- if p.Tag > 0 {
- print(p.String())
- }
- print("\n")
- }
- if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && oneof == "" {
- fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]")
- }
- }
-
- // Re-order prop.order.
- sort.Sort(prop)
-
- type oneofMessage interface {
- XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
- }
- if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
- var oots []interface{}
- prop.oneofMarshaler, prop.oneofUnmarshaler, prop.oneofSizer, oots = om.XXX_OneofFuncs()
- prop.stype = t
-
- // Interpret oneof metadata.
- prop.OneofTypes = make(map[string]*OneofProperties)
- for _, oot := range oots {
- oop := &OneofProperties{
- Type: reflect.ValueOf(oot).Type(), // *T
- Prop: new(Properties),
- }
- sft := oop.Type.Elem().Field(0)
- oop.Prop.Name = sft.Name
- oop.Prop.Parse(sft.Tag.Get("protobuf"))
- // There will be exactly one interface field that
- // this new value is assignable to.
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- if f.Type.Kind() != reflect.Interface {
- continue
- }
- if !oop.Type.AssignableTo(f.Type) {
- continue
- }
- oop.Field = i
- break
- }
- prop.OneofTypes[oop.Prop.OrigName] = oop
- }
- }
-
- // build required counts
- // build tags
- reqCount := 0
- prop.decoderOrigNames = make(map[string]int)
- for i, p := range prop.Prop {
- if strings.HasPrefix(p.Name, "XXX_") {
- // Internal fields should not appear in tags/origNames maps.
- // They are handled specially when encoding and decoding.
- continue
- }
- if p.Required {
- reqCount++
- }
- prop.decoderTags.put(p.Tag, i)
- prop.decoderOrigNames[p.OrigName] = i
- }
- prop.reqCount = reqCount
-
- return prop
-}
-
-// Return the Properties object for the x[0]'th field of the structure.
-func propByIndex(t reflect.Type, x []int) *Properties {
- if len(x) != 1 {
- fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t)
- return nil
- }
- prop := GetProperties(t)
- return prop.Prop[x[0]]
-}
-
-// Get the address and type of a pointer to a struct from an interface.
-func getbase(pb Message) (t reflect.Type, b structPointer, err error) {
- if pb == nil {
- err = ErrNil
- return
- }
- // get the reflect type of the pointer to the struct.
- t = reflect.TypeOf(pb)
- // get the address of the struct.
- value := reflect.ValueOf(pb)
- b = toStructPointer(value)
- return
-}
-
-// A global registry of enum types.
-// The generated code will register the generated maps by calling RegisterEnum.
-
-var enumValueMaps = make(map[string]map[string]int32)
-
-// RegisterEnum is called from the generated code to install the enum descriptor
-// maps into the global table to aid parsing text format protocol buffers.
-func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) {
- if _, ok := enumValueMaps[typeName]; ok {
- panic("proto: duplicate enum registered: " + typeName)
- }
- enumValueMaps[typeName] = valueMap
-}
-
-// EnumValueMap returns the mapping from names to integers of the
-// enum type enumType, or a nil if not found.
-func EnumValueMap(enumType string) map[string]int32 {
- return enumValueMaps[enumType]
-}
-
-// A registry of all linked message types.
-// The string is a fully-qualified proto name ("pkg.Message").
-var (
- protoTypes = make(map[string]reflect.Type)
- revProtoTypes = make(map[reflect.Type]string)
-)
-
-// RegisterType is called from generated code and maps from the fully qualified
-// proto name to the type (pointer to struct) of the protocol buffer.
-func RegisterType(x Message, name string) {
- if _, ok := protoTypes[name]; ok {
- // TODO: Some day, make this a panic.
- log.Printf("proto: duplicate proto type registered: %s", name)
- return
- }
- t := reflect.TypeOf(x)
- protoTypes[name] = t
- revProtoTypes[t] = name
-}
-
-// MessageName returns the fully-qualified proto name for the given message type.
-func MessageName(x Message) string {
- type xname interface {
- XXX_MessageName() string
- }
- if m, ok := x.(xname); ok {
- return m.XXX_MessageName()
- }
- return revProtoTypes[reflect.TypeOf(x)]
-}
-
-// MessageType returns the message type (pointer to struct) for a named message.
-func MessageType(name string) reflect.Type { return protoTypes[name] }
-
-// A registry of all linked proto files.
-var (
- protoFiles = make(map[string][]byte) // file name => fileDescriptor
-)
-
-// RegisterFile is called from generated code and maps from the
-// full file name of a .proto file to its compressed FileDescriptorProto.
-func RegisterFile(filename string, fileDescriptor []byte) {
- protoFiles[filename] = fileDescriptor
-}
-
-// FileDescriptor returns the compressed FileDescriptorProto for a .proto file.
-func FileDescriptor(filename string) []byte { return protoFiles[filename] }
diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go
deleted file mode 100644
index 965876bf0..000000000
--- a/vendor/github.com/golang/protobuf/proto/text.go
+++ /dev/null
@@ -1,854 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-// Functions for writing the text protocol buffer format.
-
-import (
- "bufio"
- "bytes"
- "encoding"
- "errors"
- "fmt"
- "io"
- "log"
- "math"
- "reflect"
- "sort"
- "strings"
-)
-
-var (
- newline = []byte("\n")
- spaces = []byte(" ")
- gtNewline = []byte(">\n")
- endBraceNewline = []byte("}\n")
- backslashN = []byte{'\\', 'n'}
- backslashR = []byte{'\\', 'r'}
- backslashT = []byte{'\\', 't'}
- backslashDQ = []byte{'\\', '"'}
- backslashBS = []byte{'\\', '\\'}
- posInf = []byte("inf")
- negInf = []byte("-inf")
- nan = []byte("nan")
-)
-
-type writer interface {
- io.Writer
- WriteByte(byte) error
-}
-
-// textWriter is an io.Writer that tracks its indentation level.
-type textWriter struct {
- ind int
- complete bool // if the current position is a complete line
- compact bool // whether to write out as a one-liner
- w writer
-}
-
-func (w *textWriter) WriteString(s string) (n int, err error) {
- if !strings.Contains(s, "\n") {
- if !w.compact && w.complete {
- w.writeIndent()
- }
- w.complete = false
- return io.WriteString(w.w, s)
- }
- // WriteString is typically called without newlines, so this
- // codepath and its copy are rare. We copy to avoid
- // duplicating all of Write's logic here.
- return w.Write([]byte(s))
-}
-
-func (w *textWriter) Write(p []byte) (n int, err error) {
- newlines := bytes.Count(p, newline)
- if newlines == 0 {
- if !w.compact && w.complete {
- w.writeIndent()
- }
- n, err = w.w.Write(p)
- w.complete = false
- return n, err
- }
-
- frags := bytes.SplitN(p, newline, newlines+1)
- if w.compact {
- for i, frag := range frags {
- if i > 0 {
- if err := w.w.WriteByte(' '); err != nil {
- return n, err
- }
- n++
- }
- nn, err := w.w.Write(frag)
- n += nn
- if err != nil {
- return n, err
- }
- }
- return n, nil
- }
-
- for i, frag := range frags {
- if w.complete {
- w.writeIndent()
- }
- nn, err := w.w.Write(frag)
- n += nn
- if err != nil {
- return n, err
- }
- if i+1 < len(frags) {
- if err := w.w.WriteByte('\n'); err != nil {
- return n, err
- }
- n++
- }
- }
- w.complete = len(frags[len(frags)-1]) == 0
- return n, nil
-}
-
-func (w *textWriter) WriteByte(c byte) error {
- if w.compact && c == '\n' {
- c = ' '
- }
- if !w.compact && w.complete {
- w.writeIndent()
- }
- err := w.w.WriteByte(c)
- w.complete = c == '\n'
- return err
-}
-
-func (w *textWriter) indent() { w.ind++ }
-
-func (w *textWriter) unindent() {
- if w.ind == 0 {
- log.Print("proto: textWriter unindented too far")
- return
- }
- w.ind--
-}
-
-func writeName(w *textWriter, props *Properties) error {
- if _, err := w.WriteString(props.OrigName); err != nil {
- return err
- }
- if props.Wire != "group" {
- return w.WriteByte(':')
- }
- return nil
-}
-
-// raw is the interface satisfied by RawMessage.
-type raw interface {
- Bytes() []byte
-}
-
-func requiresQuotes(u string) bool {
- // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted.
- for _, ch := range u {
- switch {
- case ch == '.' || ch == '/' || ch == '_':
- continue
- case '0' <= ch && ch <= '9':
- continue
- case 'A' <= ch && ch <= 'Z':
- continue
- case 'a' <= ch && ch <= 'z':
- continue
- default:
- return true
- }
- }
- return false
-}
-
-// isAny reports whether sv is a google.protobuf.Any message
-func isAny(sv reflect.Value) bool {
- type wkt interface {
- XXX_WellKnownType() string
- }
- t, ok := sv.Addr().Interface().(wkt)
- return ok && t.XXX_WellKnownType() == "Any"
-}
-
-// writeProto3Any writes an expanded google.protobuf.Any message.
-//
-// It returns (false, nil) if sv value can't be unmarshaled (e.g. because
-// required messages are not linked in).
-//
-// It returns (true, error) when sv was written in expanded format or an error
-// was encountered.
-func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) {
- turl := sv.FieldByName("TypeUrl")
- val := sv.FieldByName("Value")
- if !turl.IsValid() || !val.IsValid() {
- return true, errors.New("proto: invalid google.protobuf.Any message")
- }
-
- b, ok := val.Interface().([]byte)
- if !ok {
- return true, errors.New("proto: invalid google.protobuf.Any message")
- }
-
- parts := strings.Split(turl.String(), "/")
- mt := MessageType(parts[len(parts)-1])
- if mt == nil {
- return false, nil
- }
- m := reflect.New(mt.Elem())
- if err := Unmarshal(b, m.Interface().(Message)); err != nil {
- return false, nil
- }
- w.Write([]byte("["))
- u := turl.String()
- if requiresQuotes(u) {
- writeString(w, u)
- } else {
- w.Write([]byte(u))
- }
- if w.compact {
- w.Write([]byte("]:<"))
- } else {
- w.Write([]byte("]: <\n"))
- w.ind++
- }
- if err := tm.writeStruct(w, m.Elem()); err != nil {
- return true, err
- }
- if w.compact {
- w.Write([]byte("> "))
- } else {
- w.ind--
- w.Write([]byte(">\n"))
- }
- return true, nil
-}
-
-func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
- if tm.ExpandAny && isAny(sv) {
- if canExpand, err := tm.writeProto3Any(w, sv); canExpand {
- return err
- }
- }
- st := sv.Type()
- sprops := GetProperties(st)
- for i := 0; i < sv.NumField(); i++ {
- fv := sv.Field(i)
- props := sprops.Prop[i]
- name := st.Field(i).Name
-
- if strings.HasPrefix(name, "XXX_") {
- // There are two XXX_ fields:
- // XXX_unrecognized []byte
- // XXX_extensions map[int32]proto.Extension
- // The first is handled here;
- // the second is handled at the bottom of this function.
- if name == "XXX_unrecognized" && !fv.IsNil() {
- if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil {
- return err
- }
- }
- continue
- }
- if fv.Kind() == reflect.Ptr && fv.IsNil() {
- // Field not filled in. This could be an optional field or
- // a required field that wasn't filled in. Either way, there
- // isn't anything we can show for it.
- continue
- }
- if fv.Kind() == reflect.Slice && fv.IsNil() {
- // Repeated field that is empty, or a bytes field that is unused.
- continue
- }
-
- if props.Repeated && fv.Kind() == reflect.Slice {
- // Repeated field.
- for j := 0; j < fv.Len(); j++ {
- if err := writeName(w, props); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- v := fv.Index(j)
- if v.Kind() == reflect.Ptr && v.IsNil() {
- // A nil message in a repeated field is not valid,
- // but we can handle that more gracefully than panicking.
- if _, err := w.Write([]byte("<nil>\n")); err != nil {
- return err
- }
- continue
- }
- if err := tm.writeAny(w, v, props); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- continue
- }
- if fv.Kind() == reflect.Map {
- // Map fields are rendered as a repeated struct with key/value fields.
- keys := fv.MapKeys()
- sort.Sort(mapKeys(keys))
- for _, key := range keys {
- val := fv.MapIndex(key)
- if err := writeName(w, props); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- // open struct
- if err := w.WriteByte('<'); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- w.indent()
- // key
- if _, err := w.WriteString("key:"); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- if err := tm.writeAny(w, key, props.mkeyprop); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- // nil values aren't legal, but we can avoid panicking because of them.
- if val.Kind() != reflect.Ptr || !val.IsNil() {
- // value
- if _, err := w.WriteString("value:"); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- if err := tm.writeAny(w, val, props.mvalprop); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- // close struct
- w.unindent()
- if err := w.WriteByte('>'); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- continue
- }
- if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 {
- // empty bytes field
- continue
- }
- if fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice {
- // proto3 non-repeated scalar field; skip if zero value
- if isProto3Zero(fv) {
- continue
- }
- }
-
- if fv.Kind() == reflect.Interface {
- // Check if it is a oneof.
- if st.Field(i).Tag.Get("protobuf_oneof") != "" {
- // fv is nil, or holds a pointer to generated struct.
- // That generated struct has exactly one field,
- // which has a protobuf struct tag.
- if fv.IsNil() {
- continue
- }
- inner := fv.Elem().Elem() // interface -> *T -> T
- tag := inner.Type().Field(0).Tag.Get("protobuf")
- props = new(Properties) // Overwrite the outer props var, but not its pointee.
- props.Parse(tag)
- // Write the value in the oneof, not the oneof itself.
- fv = inner.Field(0)
-
- // Special case to cope with malformed messages gracefully:
- // If the value in the oneof is a nil pointer, don't panic
- // in writeAny.
- if fv.Kind() == reflect.Ptr && fv.IsNil() {
- // Use errors.New so writeAny won't render quotes.
- msg := errors.New("/* nil */")
- fv = reflect.ValueOf(&msg).Elem()
- }
- }
- }
-
- if err := writeName(w, props); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- if b, ok := fv.Interface().(raw); ok {
- if err := writeRaw(w, b.Bytes()); err != nil {
- return err
- }
- continue
- }
-
- // Enums have a String method, so writeAny will work fine.
- if err := tm.writeAny(w, fv, props); err != nil {
- return err
- }
-
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
-
- // Extensions (the XXX_extensions field).
- pv := sv.Addr()
- if _, ok := extendable(pv.Interface()); ok {
- if err := tm.writeExtensions(w, pv); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-// writeRaw writes an uninterpreted raw message.
-func writeRaw(w *textWriter, b []byte) error {
- if err := w.WriteByte('<'); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- w.indent()
- if err := writeUnknownStruct(w, b); err != nil {
- return err
- }
- w.unindent()
- if err := w.WriteByte('>'); err != nil {
- return err
- }
- return nil
-}
-
-// writeAny writes an arbitrary field.
-func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error {
- v = reflect.Indirect(v)
-
- // Floats have special cases.
- if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 {
- x := v.Float()
- var b []byte
- switch {
- case math.IsInf(x, 1):
- b = posInf
- case math.IsInf(x, -1):
- b = negInf
- case math.IsNaN(x):
- b = nan
- }
- if b != nil {
- _, err := w.Write(b)
- return err
- }
- // Other values are handled below.
- }
-
- // We don't attempt to serialise every possible value type; only those
- // that can occur in protocol buffers.
- switch v.Kind() {
- case reflect.Slice:
- // Should only be a []byte; repeated fields are handled in writeStruct.
- if err := writeString(w, string(v.Bytes())); err != nil {
- return err
- }
- case reflect.String:
- if err := writeString(w, v.String()); err != nil {
- return err
- }
- case reflect.Struct:
- // Required/optional group/message.
- var bra, ket byte = '<', '>'
- if props != nil && props.Wire == "group" {
- bra, ket = '{', '}'
- }
- if err := w.WriteByte(bra); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- w.indent()
- if etm, ok := v.Interface().(encoding.TextMarshaler); ok {
- text, err := etm.MarshalText()
- if err != nil {
- return err
- }
- if _, err = w.Write(text); err != nil {
- return err
- }
- } else if err := tm.writeStruct(w, v); err != nil {
- return err
- }
- w.unindent()
- if err := w.WriteByte(ket); err != nil {
- return err
- }
- default:
- _, err := fmt.Fprint(w, v.Interface())
- return err
- }
- return nil
-}
-
-// equivalent to C's isprint.
-func isprint(c byte) bool {
- return c >= 0x20 && c < 0x7f
-}
-
-// writeString writes a string in the protocol buffer text format.
-// It is similar to strconv.Quote except we don't use Go escape sequences,
-// we treat the string as a byte sequence, and we use octal escapes.
-// These differences are to maintain interoperability with the other
-// languages' implementations of the text format.
-func writeString(w *textWriter, s string) error {
- // use WriteByte here to get any needed indent
- if err := w.WriteByte('"'); err != nil {
- return err
- }
- // Loop over the bytes, not the runes.
- for i := 0; i < len(s); i++ {
- var err error
- // Divergence from C++: we don't escape apostrophes.
- // There's no need to escape them, and the C++ parser
- // copes with a naked apostrophe.
- switch c := s[i]; c {
- case '\n':
- _, err = w.w.Write(backslashN)
- case '\r':
- _, err = w.w.Write(backslashR)
- case '\t':
- _, err = w.w.Write(backslashT)
- case '"':
- _, err = w.w.Write(backslashDQ)
- case '\\':
- _, err = w.w.Write(backslashBS)
- default:
- if isprint(c) {
- err = w.w.WriteByte(c)
- } else {
- _, err = fmt.Fprintf(w.w, "\\%03o", c)
- }
- }
- if err != nil {
- return err
- }
- }
- return w.WriteByte('"')
-}
-
-func writeUnknownStruct(w *textWriter, data []byte) (err error) {
- if !w.compact {
- if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil {
- return err
- }
- }
- b := NewBuffer(data)
- for b.index < len(b.buf) {
- x, err := b.DecodeVarint()
- if err != nil {
- _, err := fmt.Fprintf(w, "/* %v */\n", err)
- return err
- }
- wire, tag := x&7, x>>3
- if wire == WireEndGroup {
- w.unindent()
- if _, err := w.Write(endBraceNewline); err != nil {
- return err
- }
- continue
- }
- if _, err := fmt.Fprint(w, tag); err != nil {
- return err
- }
- if wire != WireStartGroup {
- if err := w.WriteByte(':'); err != nil {
- return err
- }
- }
- if !w.compact || wire == WireStartGroup {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- switch wire {
- case WireBytes:
- buf, e := b.DecodeRawBytes(false)
- if e == nil {
- _, err = fmt.Fprintf(w, "%q", buf)
- } else {
- _, err = fmt.Fprintf(w, "/* %v */", e)
- }
- case WireFixed32:
- x, err = b.DecodeFixed32()
- err = writeUnknownInt(w, x, err)
- case WireFixed64:
- x, err = b.DecodeFixed64()
- err = writeUnknownInt(w, x, err)
- case WireStartGroup:
- err = w.WriteByte('{')
- w.indent()
- case WireVarint:
- x, err = b.DecodeVarint()
- err = writeUnknownInt(w, x, err)
- default:
- _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire)
- }
- if err != nil {
- return err
- }
- if err = w.WriteByte('\n'); err != nil {
- return err
- }
- }
- return nil
-}
-
-func writeUnknownInt(w *textWriter, x uint64, err error) error {
- if err == nil {
- _, err = fmt.Fprint(w, x)
- } else {
- _, err = fmt.Fprintf(w, "/* %v */", err)
- }
- return err
-}
-
-type int32Slice []int32
-
-func (s int32Slice) Len() int { return len(s) }
-func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] }
-func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-
-// writeExtensions writes all the extensions in pv.
-// pv is assumed to be a pointer to a protocol message struct that is extendable.
-func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error {
- emap := extensionMaps[pv.Type().Elem()]
- ep, _ := extendable(pv.Interface())
-
- // Order the extensions by ID.
- // This isn't strictly necessary, but it will give us
- // canonical output, which will also make testing easier.
- m, mu := ep.extensionsRead()
- if m == nil {
- return nil
- }
- mu.Lock()
- ids := make([]int32, 0, len(m))
- for id := range m {
- ids = append(ids, id)
- }
- sort.Sort(int32Slice(ids))
- mu.Unlock()
-
- for _, extNum := range ids {
- ext := m[extNum]
- var desc *ExtensionDesc
- if emap != nil {
- desc = emap[extNum]
- }
- if desc == nil {
- // Unknown extension.
- if err := writeUnknownStruct(w, ext.enc); err != nil {
- return err
- }
- continue
- }
-
- pb, err := GetExtension(ep, desc)
- if err != nil {
- return fmt.Errorf("failed getting extension: %v", err)
- }
-
- // Repeated extensions will appear as a slice.
- if !desc.repeated() {
- if err := tm.writeExtension(w, desc.Name, pb); err != nil {
- return err
- }
- } else {
- v := reflect.ValueOf(pb)
- for i := 0; i < v.Len(); i++ {
- if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil {
- return err
- }
- }
- }
- }
- return nil
-}
-
-func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error {
- if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- }
- if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil {
- return err
- }
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- return nil
-}
-
-func (w *textWriter) writeIndent() {
- if !w.complete {
- return
- }
- remain := w.ind * 2
- for remain > 0 {
- n := remain
- if n > len(spaces) {
- n = len(spaces)
- }
- w.w.Write(spaces[:n])
- remain -= n
- }
- w.complete = false
-}
-
-// TextMarshaler is a configurable text format marshaler.
-type TextMarshaler struct {
- Compact bool // use compact text format (one line).
- ExpandAny bool // expand google.protobuf.Any messages of known types
-}
-
-// Marshal writes a given protocol buffer in text format.
-// The only errors returned are from w.
-func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error {
- val := reflect.ValueOf(pb)
- if pb == nil || val.IsNil() {
- w.Write([]byte("<nil>"))
- return nil
- }
- var bw *bufio.Writer
- ww, ok := w.(writer)
- if !ok {
- bw = bufio.NewWriter(w)
- ww = bw
- }
- aw := &textWriter{
- w: ww,
- complete: true,
- compact: tm.Compact,
- }
-
- if etm, ok := pb.(encoding.TextMarshaler); ok {
- text, err := etm.MarshalText()
- if err != nil {
- return err
- }
- if _, err = aw.Write(text); err != nil {
- return err
- }
- if bw != nil {
- return bw.Flush()
- }
- return nil
- }
- // Dereference the received pointer so we don't have outer < and >.
- v := reflect.Indirect(val)
- if err := tm.writeStruct(aw, v); err != nil {
- return err
- }
- if bw != nil {
- return bw.Flush()
- }
- return nil
-}
-
-// Text is the same as Marshal, but returns the string directly.
-func (tm *TextMarshaler) Text(pb Message) string {
- var buf bytes.Buffer
- tm.Marshal(&buf, pb)
- return buf.String()
-}
-
-var (
- defaultTextMarshaler = TextMarshaler{}
- compactTextMarshaler = TextMarshaler{Compact: true}
-)
-
-// TODO: consider removing some of the Marshal functions below.
-
-// MarshalText writes a given protocol buffer in text format.
-// The only errors returned are from w.
-func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) }
-
-// MarshalTextString is the same as MarshalText, but returns the string directly.
-func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) }
-
-// CompactText writes a given protocol buffer in compact text format (one line).
-func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) }
-
-// CompactTextString is the same as CompactText, but returns the string directly.
-func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) }
diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go
deleted file mode 100644
index 61f83c1e1..000000000
--- a/vendor/github.com/golang/protobuf/proto/text_parser.go
+++ /dev/null
@@ -1,895 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-// Functions for parsing the Text protocol buffer format.
-// TODO: message sets.
-
-import (
- "encoding"
- "errors"
- "fmt"
- "reflect"
- "strconv"
- "strings"
- "unicode/utf8"
-)
-
-// Error string emitted when deserializing Any and fields are already set
-const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set"
-
-type ParseError struct {
- Message string
- Line int // 1-based line number
- Offset int // 0-based byte offset from start of input
-}
-
-func (p *ParseError) Error() string {
- if p.Line == 1 {
- // show offset only for first line
- return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message)
- }
- return fmt.Sprintf("line %d: %v", p.Line, p.Message)
-}
-
-type token struct {
- value string
- err *ParseError
- line int // line number
- offset int // byte number from start of input, not start of line
- unquoted string // the unquoted version of value, if it was a quoted string
-}
-
-func (t *token) String() string {
- if t.err == nil {
- return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset)
- }
- return fmt.Sprintf("parse error: %v", t.err)
-}
-
-type textParser struct {
- s string // remaining input
- done bool // whether the parsing is finished (success or error)
- backed bool // whether back() was called
- offset, line int
- cur token
-}
-
-func newTextParser(s string) *textParser {
- p := new(textParser)
- p.s = s
- p.line = 1
- p.cur.line = 1
- return p
-}
-
-func (p *textParser) errorf(format string, a ...interface{}) *ParseError {
- pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset}
- p.cur.err = pe
- p.done = true
- return pe
-}
-
-// Numbers and identifiers are matched by [-+._A-Za-z0-9]
-func isIdentOrNumberChar(c byte) bool {
- switch {
- case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z':
- return true
- case '0' <= c && c <= '9':
- return true
- }
- switch c {
- case '-', '+', '.', '_':
- return true
- }
- return false
-}
-
-func isWhitespace(c byte) bool {
- switch c {
- case ' ', '\t', '\n', '\r':
- return true
- }
- return false
-}
-
-func isQuote(c byte) bool {
- switch c {
- case '"', '\'':
- return true
- }
- return false
-}
-
-func (p *textParser) skipWhitespace() {
- i := 0
- for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') {
- if p.s[i] == '#' {
- // comment; skip to end of line or input
- for i < len(p.s) && p.s[i] != '\n' {
- i++
- }
- if i == len(p.s) {
- break
- }
- }
- if p.s[i] == '\n' {
- p.line++
- }
- i++
- }
- p.offset += i
- p.s = p.s[i:len(p.s)]
- if len(p.s) == 0 {
- p.done = true
- }
-}
-
-func (p *textParser) advance() {
- // Skip whitespace
- p.skipWhitespace()
- if p.done {
- return
- }
-
- // Start of non-whitespace
- p.cur.err = nil
- p.cur.offset, p.cur.line = p.offset, p.line
- p.cur.unquoted = ""
- switch p.s[0] {
- case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/':
- // Single symbol
- p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)]
- case '"', '\'':
- // Quoted string
- i := 1
- for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' {
- if p.s[i] == '\\' && i+1 < len(p.s) {
- // skip escaped char
- i++
- }
- i++
- }
- if i >= len(p.s) || p.s[i] != p.s[0] {
- p.errorf("unmatched quote")
- return
- }
- unq, err := unquoteC(p.s[1:i], rune(p.s[0]))
- if err != nil {
- p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err)
- return
- }
- p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)]
- p.cur.unquoted = unq
- default:
- i := 0
- for i < len(p.s) && isIdentOrNumberChar(p.s[i]) {
- i++
- }
- if i == 0 {
- p.errorf("unexpected byte %#x", p.s[0])
- return
- }
- p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)]
- }
- p.offset += len(p.cur.value)
-}
-
-var (
- errBadUTF8 = errors.New("proto: bad UTF-8")
- errBadHex = errors.New("proto: bad hexadecimal")
-)
-
-func unquoteC(s string, quote rune) (string, error) {
- // This is based on C++'s tokenizer.cc.
- // Despite its name, this is *not* parsing C syntax.
- // For instance, "\0" is an invalid quoted string.
-
- // Avoid allocation in trivial cases.
- simple := true
- for _, r := range s {
- if r == '\\' || r == quote {
- simple = false
- break
- }
- }
- if simple {
- return s, nil
- }
-
- buf := make([]byte, 0, 3*len(s)/2)
- for len(s) > 0 {
- r, n := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError && n == 1 {
- return "", errBadUTF8
- }
- s = s[n:]
- if r != '\\' {
- if r < utf8.RuneSelf {
- buf = append(buf, byte(r))
- } else {
- buf = append(buf, string(r)...)
- }
- continue
- }
-
- ch, tail, err := unescape(s)
- if err != nil {
- return "", err
- }
- buf = append(buf, ch...)
- s = tail
- }
- return string(buf), nil
-}
-
-func unescape(s string) (ch string, tail string, err error) {
- r, n := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError && n == 1 {
- return "", "", errBadUTF8
- }
- s = s[n:]
- switch r {
- case 'a':
- return "\a", s, nil
- case 'b':
- return "\b", s, nil
- case 'f':
- return "\f", s, nil
- case 'n':
- return "\n", s, nil
- case 'r':
- return "\r", s, nil
- case 't':
- return "\t", s, nil
- case 'v':
- return "\v", s, nil
- case '?':
- return "?", s, nil // trigraph workaround
- case '\'', '"', '\\':
- return string(r), s, nil
- case '0', '1', '2', '3', '4', '5', '6', '7', 'x', 'X':
- if len(s) < 2 {
- return "", "", fmt.Errorf(`\%c requires 2 following digits`, r)
- }
- base := 8
- ss := s[:2]
- s = s[2:]
- if r == 'x' || r == 'X' {
- base = 16
- } else {
- ss = string(r) + ss
- }
- i, err := strconv.ParseUint(ss, base, 8)
- if err != nil {
- return "", "", err
- }
- return string([]byte{byte(i)}), s, nil
- case 'u', 'U':
- n := 4
- if r == 'U' {
- n = 8
- }
- if len(s) < n {
- return "", "", fmt.Errorf(`\%c requires %d digits`, r, n)
- }
-
- bs := make([]byte, n/2)
- for i := 0; i < n; i += 2 {
- a, ok1 := unhex(s[i])
- b, ok2 := unhex(s[i+1])
- if !ok1 || !ok2 {
- return "", "", errBadHex
- }
- bs[i/2] = a<<4 | b
- }
- s = s[n:]
- return string(bs), s, nil
- }
- return "", "", fmt.Errorf(`unknown escape \%c`, r)
-}
-
-// Adapted from src/pkg/strconv/quote.go.
-func unhex(b byte) (v byte, ok bool) {
- switch {
- case '0' <= b && b <= '9':
- return b - '0', true
- case 'a' <= b && b <= 'f':
- return b - 'a' + 10, true
- case 'A' <= b && b <= 'F':
- return b - 'A' + 10, true
- }
- return 0, false
-}
-
-// Back off the parser by one token. Can only be done between calls to next().
-// It makes the next advance() a no-op.
-func (p *textParser) back() { p.backed = true }
-
-// Advances the parser and returns the new current token.
-func (p *textParser) next() *token {
- if p.backed || p.done {
- p.backed = false
- return &p.cur
- }
- p.advance()
- if p.done {
- p.cur.value = ""
- } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) {
- // Look for multiple quoted strings separated by whitespace,
- // and concatenate them.
- cat := p.cur
- for {
- p.skipWhitespace()
- if p.done || !isQuote(p.s[0]) {
- break
- }
- p.advance()
- if p.cur.err != nil {
- return &p.cur
- }
- cat.value += " " + p.cur.value
- cat.unquoted += p.cur.unquoted
- }
- p.done = false // parser may have seen EOF, but we want to return cat
- p.cur = cat
- }
- return &p.cur
-}
-
-func (p *textParser) consumeToken(s string) error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != s {
- p.back()
- return p.errorf("expected %q, found %q", s, tok.value)
- }
- return nil
-}
-
-// Return a RequiredNotSetError indicating which required field was not set.
-func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError {
- st := sv.Type()
- sprops := GetProperties(st)
- for i := 0; i < st.NumField(); i++ {
- if !isNil(sv.Field(i)) {
- continue
- }
-
- props := sprops.Prop[i]
- if props.Required {
- return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)}
- }
- }
- return &RequiredNotSetError{fmt.Sprintf("%v.<unknown field name>", st)} // should not happen
-}
-
-// Returns the index in the struct for the named field, as well as the parsed tag properties.
-func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) {
- i, ok := sprops.decoderOrigNames[name]
- if ok {
- return i, sprops.Prop[i], true
- }
- return -1, nil, false
-}
-
-// Consume a ':' from the input stream (if the next token is a colon),
-// returning an error if a colon is needed but not present.
-func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != ":" {
- // Colon is optional when the field is a group or message.
- needColon := true
- switch props.Wire {
- case "group":
- needColon = false
- case "bytes":
- // A "bytes" field is either a message, a string, or a repeated field;
- // those three become *T, *string and []T respectively, so we can check for
- // this field being a pointer to a non-string.
- if typ.Kind() == reflect.Ptr {
- // *T or *string
- if typ.Elem().Kind() == reflect.String {
- break
- }
- } else if typ.Kind() == reflect.Slice {
- // []T or []*T
- if typ.Elem().Kind() != reflect.Ptr {
- break
- }
- } else if typ.Kind() == reflect.String {
- // The proto3 exception is for a string field,
- // which requires a colon.
- break
- }
- needColon = false
- }
- if needColon {
- return p.errorf("expected ':', found %q", tok.value)
- }
- p.back()
- }
- return nil
-}
-
-func (p *textParser) readStruct(sv reflect.Value, terminator string) error {
- st := sv.Type()
- sprops := GetProperties(st)
- reqCount := sprops.reqCount
- var reqFieldErr error
- fieldSet := make(map[string]bool)
- // A struct is a sequence of "name: value", terminated by one of
- // '>' or '}', or the end of the input. A name may also be
- // "[extension]" or "[type/url]".
- //
- // The whole struct can also be an expanded Any message, like:
- // [type/url] < ... struct contents ... >
- for {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == terminator {
- break
- }
- if tok.value == "[" {
- // Looks like an extension or an Any.
- //
- // TODO: Check whether we need to handle
- // namespace rooted names (e.g. ".something.Foo").
- extName, err := p.consumeExtName()
- if err != nil {
- return err
- }
-
- if s := strings.LastIndex(extName, "/"); s >= 0 {
- // If it contains a slash, it's an Any type URL.
- messageName := extName[s+1:]
- mt := MessageType(messageName)
- if mt == nil {
- return p.errorf("unrecognized message %q in google.protobuf.Any", messageName)
- }
- tok = p.next()
- if tok.err != nil {
- return tok.err
- }
- // consume an optional colon
- if tok.value == ":" {
- tok = p.next()
- if tok.err != nil {
- return tok.err
- }
- }
- var terminator string
- switch tok.value {
- case "<":
- terminator = ">"
- case "{":
- terminator = "}"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
- v := reflect.New(mt.Elem())
- if pe := p.readStruct(v.Elem(), terminator); pe != nil {
- return pe
- }
- b, err := Marshal(v.Interface().(Message))
- if err != nil {
- return p.errorf("failed to marshal message of type %q: %v", messageName, err)
- }
- if fieldSet["type_url"] {
- return p.errorf(anyRepeatedlyUnpacked, "type_url")
- }
- if fieldSet["value"] {
- return p.errorf(anyRepeatedlyUnpacked, "value")
- }
- sv.FieldByName("TypeUrl").SetString(extName)
- sv.FieldByName("Value").SetBytes(b)
- fieldSet["type_url"] = true
- fieldSet["value"] = true
- continue
- }
-
- var desc *ExtensionDesc
- // This could be faster, but it's functional.
- // TODO: Do something smarter than a linear scan.
- for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) {
- if d.Name == extName {
- desc = d
- break
- }
- }
- if desc == nil {
- return p.errorf("unrecognized extension %q", extName)
- }
-
- props := &Properties{}
- props.Parse(desc.Tag)
-
- typ := reflect.TypeOf(desc.ExtensionType)
- if err := p.checkForColon(props, typ); err != nil {
- return err
- }
-
- rep := desc.repeated()
-
- // Read the extension structure, and set it in
- // the value we're constructing.
- var ext reflect.Value
- if !rep {
- ext = reflect.New(typ).Elem()
- } else {
- ext = reflect.New(typ.Elem()).Elem()
- }
- if err := p.readAny(ext, props); err != nil {
- if _, ok := err.(*RequiredNotSetError); !ok {
- return err
- }
- reqFieldErr = err
- }
- ep := sv.Addr().Interface().(Message)
- if !rep {
- SetExtension(ep, desc, ext.Interface())
- } else {
- old, err := GetExtension(ep, desc)
- var sl reflect.Value
- if err == nil {
- sl = reflect.ValueOf(old) // existing slice
- } else {
- sl = reflect.MakeSlice(typ, 0, 1)
- }
- sl = reflect.Append(sl, ext)
- SetExtension(ep, desc, sl.Interface())
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- continue
- }
-
- // This is a normal, non-extension field.
- name := tok.value
- var dst reflect.Value
- fi, props, ok := structFieldByName(sprops, name)
- if ok {
- dst = sv.Field(fi)
- } else if oop, ok := sprops.OneofTypes[name]; ok {
- // It is a oneof.
- props = oop.Prop
- nv := reflect.New(oop.Type.Elem())
- dst = nv.Elem().Field(0)
- field := sv.Field(oop.Field)
- if !field.IsNil() {
- return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name)
- }
- field.Set(nv)
- }
- if !dst.IsValid() {
- return p.errorf("unknown field name %q in %v", name, st)
- }
-
- if dst.Kind() == reflect.Map {
- // Consume any colon.
- if err := p.checkForColon(props, dst.Type()); err != nil {
- return err
- }
-
- // Construct the map if it doesn't already exist.
- if dst.IsNil() {
- dst.Set(reflect.MakeMap(dst.Type()))
- }
- key := reflect.New(dst.Type().Key()).Elem()
- val := reflect.New(dst.Type().Elem()).Elem()
-
- // The map entry should be this sequence of tokens:
- // < key : KEY value : VALUE >
- // However, implementations may omit key or value, and technically
- // we should support them in any order. See b/28924776 for a time
- // this went wrong.
-
- tok := p.next()
- var terminator string
- switch tok.value {
- case "<":
- terminator = ">"
- case "{":
- terminator = "}"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
- for {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == terminator {
- break
- }
- switch tok.value {
- case "key":
- if err := p.consumeToken(":"); err != nil {
- return err
- }
- if err := p.readAny(key, props.mkeyprop); err != nil {
- return err
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- case "value":
- if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil {
- return err
- }
- if err := p.readAny(val, props.mvalprop); err != nil {
- return err
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- default:
- p.back()
- return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value)
- }
- }
-
- dst.SetMapIndex(key, val)
- continue
- }
-
- // Check that it's not already set if it's not a repeated field.
- if !props.Repeated && fieldSet[name] {
- return p.errorf("non-repeated field %q was repeated", name)
- }
-
- if err := p.checkForColon(props, dst.Type()); err != nil {
- return err
- }
-
- // Parse into the field.
- fieldSet[name] = true
- if err := p.readAny(dst, props); err != nil {
- if _, ok := err.(*RequiredNotSetError); !ok {
- return err
- }
- reqFieldErr = err
- }
- if props.Required {
- reqCount--
- }
-
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
-
- }
-
- if reqCount > 0 {
- return p.missingRequiredFieldError(sv)
- }
- return reqFieldErr
-}
-
-// consumeExtName consumes extension name or expanded Any type URL and the
-// following ']'. It returns the name or URL consumed.
-func (p *textParser) consumeExtName() (string, error) {
- tok := p.next()
- if tok.err != nil {
- return "", tok.err
- }
-
- // If extension name or type url is quoted, it's a single token.
- if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] {
- name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0]))
- if err != nil {
- return "", err
- }
- return name, p.consumeToken("]")
- }
-
- // Consume everything up to "]"
- var parts []string
- for tok.value != "]" {
- parts = append(parts, tok.value)
- tok = p.next()
- if tok.err != nil {
- return "", p.errorf("unrecognized type_url or extension name: %s", tok.err)
- }
- }
- return strings.Join(parts, ""), nil
-}
-
-// consumeOptionalSeparator consumes an optional semicolon or comma.
-// It is used in readStruct to provide backward compatibility.
-func (p *textParser) consumeOptionalSeparator() error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != ";" && tok.value != "," {
- p.back()
- }
- return nil
-}
-
-func (p *textParser) readAny(v reflect.Value, props *Properties) error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == "" {
- return p.errorf("unexpected EOF")
- }
-
- switch fv := v; fv.Kind() {
- case reflect.Slice:
- at := v.Type()
- if at.Elem().Kind() == reflect.Uint8 {
- // Special case for []byte
- if tok.value[0] != '"' && tok.value[0] != '\'' {
- // Deliberately written out here, as the error after
- // this switch statement would write "invalid []byte: ...",
- // which is not as user-friendly.
- return p.errorf("invalid string: %v", tok.value)
- }
- bytes := []byte(tok.unquoted)
- fv.Set(reflect.ValueOf(bytes))
- return nil
- }
- // Repeated field.
- if tok.value == "[" {
- // Repeated field with list notation, like [1,2,3].
- for {
- fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem()))
- err := p.readAny(fv.Index(fv.Len()-1), props)
- if err != nil {
- return err
- }
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == "]" {
- break
- }
- if tok.value != "," {
- return p.errorf("Expected ']' or ',' found %q", tok.value)
- }
- }
- return nil
- }
- // One value of the repeated field.
- p.back()
- fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem()))
- return p.readAny(fv.Index(fv.Len()-1), props)
- case reflect.Bool:
- // true/1/t/True or false/f/0/False.
- switch tok.value {
- case "true", "1", "t", "True":
- fv.SetBool(true)
- return nil
- case "false", "0", "f", "False":
- fv.SetBool(false)
- return nil
- }
- case reflect.Float32, reflect.Float64:
- v := tok.value
- // Ignore 'f' for compatibility with output generated by C++, but don't
- // remove 'f' when the value is "-inf" or "inf".
- if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" {
- v = v[:len(v)-1]
- }
- if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil {
- fv.SetFloat(f)
- return nil
- }
- case reflect.Int32:
- if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {
- fv.SetInt(x)
- return nil
- }
-
- if len(props.Enum) == 0 {
- break
- }
- m, ok := enumValueMaps[props.Enum]
- if !ok {
- break
- }
- x, ok := m[tok.value]
- if !ok {
- break
- }
- fv.SetInt(int64(x))
- return nil
- case reflect.Int64:
- if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil {
- fv.SetInt(x)
- return nil
- }
-
- case reflect.Ptr:
- // A basic field (indirected through pointer), or a repeated message/group
- p.back()
- fv.Set(reflect.New(fv.Type().Elem()))
- return p.readAny(fv.Elem(), props)
- case reflect.String:
- if tok.value[0] == '"' || tok.value[0] == '\'' {
- fv.SetString(tok.unquoted)
- return nil
- }
- case reflect.Struct:
- var terminator string
- switch tok.value {
- case "{":
- terminator = "}"
- case "<":
- terminator = ">"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
- // TODO: Handle nested messages which implement encoding.TextUnmarshaler.
- return p.readStruct(fv, terminator)
- case reflect.Uint32:
- if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
- fv.SetUint(uint64(x))
- return nil
- }
- case reflect.Uint64:
- if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil {
- fv.SetUint(x)
- return nil
- }
- }
- return p.errorf("invalid %v: %v", v.Type(), tok.value)
-}
-
-// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb
-// before starting to unmarshal, so any existing data in pb is always removed.
-// If a required field is not set and no other error occurs,
-// UnmarshalText returns *RequiredNotSetError.
-func UnmarshalText(s string, pb Message) error {
- if um, ok := pb.(encoding.TextUnmarshaler); ok {
- err := um.UnmarshalText([]byte(s))
- return err
- }
- pb.Reset()
- v := reflect.ValueOf(pb)
- if pe := newTextParser(s).readStruct(v.Elem(), ""); pe != nil {
- return pe
- }
- return nil
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/any.go b/vendor/github.com/golang/protobuf/ptypes/any.go
deleted file mode 100644
index 89e07ae19..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/any.go
+++ /dev/null
@@ -1,136 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package ptypes
-
-// This file implements functions to marshal proto.Message to/from
-// google.protobuf.Any message.
-
-import (
- "fmt"
- "reflect"
- "strings"
-
- "github.com/golang/protobuf/proto"
- "github.com/golang/protobuf/ptypes/any"
-)
-
-const googleApis = "type.googleapis.com/"
-
-// AnyMessageName returns the name of the message contained in a google.protobuf.Any message.
-//
-// Note that regular type assertions should be done using the Is
-// function. AnyMessageName is provided for less common use cases like filtering a
-// sequence of Any messages based on a set of allowed message type names.
-func AnyMessageName(any *any.Any) (string, error) {
- slash := strings.LastIndex(any.TypeUrl, "/")
- if slash < 0 {
- return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl)
- }
- return any.TypeUrl[slash+1:], nil
-}
-
-// MarshalAny takes the protocol buffer and encodes it into google.protobuf.Any.
-func MarshalAny(pb proto.Message) (*any.Any, error) {
- value, err := proto.Marshal(pb)
- if err != nil {
- return nil, err
- }
- return &any.Any{TypeUrl: googleApis + proto.MessageName(pb), Value: value}, nil
-}
-
-// DynamicAny is a value that can be passed to UnmarshalAny to automatically
-// allocate a proto.Message for the type specified in a google.protobuf.Any
-// message. The allocated message is stored in the embedded proto.Message.
-//
-// Example:
-//
-// var x ptypes.DynamicAny
-// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... }
-// fmt.Printf("unmarshaled message: %v", x.Message)
-type DynamicAny struct {
- proto.Message
-}
-
-// Empty returns a new proto.Message of the type specified in a
-// google.protobuf.Any message. It returns an error if corresponding message
-// type isn't linked in.
-func Empty(any *any.Any) (proto.Message, error) {
- aname, err := AnyMessageName(any)
- if err != nil {
- return nil, err
- }
-
- t := proto.MessageType(aname)
- if t == nil {
- return nil, fmt.Errorf("any: message type %q isn't linked in", aname)
- }
- return reflect.New(t.Elem()).Interface().(proto.Message), nil
-}
-
-// UnmarshalAny parses the protocol buffer representation in a google.protobuf.Any
-// message and places the decoded result in pb. It returns an error if type of
-// contents of Any message does not match type of pb message.
-//
-// pb can be a proto.Message, or a *DynamicAny.
-func UnmarshalAny(any *any.Any, pb proto.Message) error {
- if d, ok := pb.(*DynamicAny); ok {
- if d.Message == nil {
- var err error
- d.Message, err = Empty(any)
- if err != nil {
- return err
- }
- }
- return UnmarshalAny(any, d.Message)
- }
-
- aname, err := AnyMessageName(any)
- if err != nil {
- return err
- }
-
- mname := proto.MessageName(pb)
- if aname != mname {
- return fmt.Errorf("mismatched message type: got %q want %q", aname, mname)
- }
- return proto.Unmarshal(any.Value, pb)
-}
-
-// Is returns true if any value contains a given message type.
-func Is(any *any.Any, pb proto.Message) bool {
- aname, err := AnyMessageName(any)
- if err != nil {
- return false
- }
-
- return aname == proto.MessageName(pb)
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
deleted file mode 100644
index f2c6906b9..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
+++ /dev/null
@@ -1,155 +0,0 @@
-// Code generated by protoc-gen-go.
-// source: github.com/golang/protobuf/ptypes/any/any.proto
-// DO NOT EDIT!
-
-/*
-Package any is a generated protocol buffer package.
-
-It is generated from these files:
- github.com/golang/protobuf/ptypes/any/any.proto
-
-It has these top-level messages:
- Any
-*/
-package any
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// `Any` contains an arbitrary serialized protocol buffer message along with a
-// URL that describes the type of the serialized message.
-//
-// Protobuf library provides support to pack/unpack Any values in the form
-// of utility functions or additional generated methods of the Any type.
-//
-// Example 1: Pack and unpack a message in C++.
-//
-// Foo foo = ...;
-// Any any;
-// any.PackFrom(foo);
-// ...
-// if (any.UnpackTo(&foo)) {
-// ...
-// }
-//
-// Example 2: Pack and unpack a message in Java.
-//
-// Foo foo = ...;
-// Any any = Any.pack(foo);
-// ...
-// if (any.is(Foo.class)) {
-// foo = any.unpack(Foo.class);
-// }
-//
-// Example 3: Pack and unpack a message in Python.
-//
-// foo = Foo(...)
-// any = Any()
-// any.Pack(foo)
-// ...
-// if any.Is(Foo.DESCRIPTOR):
-// any.Unpack(foo)
-// ...
-//
-// The pack methods provided by protobuf library will by default use
-// 'type.googleapis.com/full.type.name' as the type URL and the unpack
-// methods only use the fully qualified type name after the last '/'
-// in the type URL, for example "foo.bar.com/x/y.z" will yield type
-// name "y.z".
-//
-//
-// JSON
-// ====
-// The JSON representation of an `Any` value uses the regular
-// representation of the deserialized, embedded message, with an
-// additional field `@type` which contains the type URL. Example:
-//
-// package google.profile;
-// message Person {
-// string first_name = 1;
-// string last_name = 2;
-// }
-//
-// {
-// "@type": "type.googleapis.com/google.profile.Person",
-// "firstName": <string>,
-// "lastName": <string>
-// }
-//
-// If the embedded message type is well-known and has a custom JSON
-// representation, that representation will be embedded adding a field
-// `value` which holds the custom JSON in addition to the `@type`
-// field. Example (for message [google.protobuf.Duration][]):
-//
-// {
-// "@type": "type.googleapis.com/google.protobuf.Duration",
-// "value": "1.212s"
-// }
-//
-type Any struct {
- // A URL/resource name whose content describes the type of the
- // serialized protocol buffer message.
- //
- // For URLs which use the scheme `http`, `https`, or no scheme, the
- // following restrictions and interpretations apply:
- //
- // * If no scheme is provided, `https` is assumed.
- // * The last segment of the URL's path must represent the fully
- // qualified name of the type (as in `path/google.protobuf.Duration`).
- // The name should be in a canonical form (e.g., leading "." is
- // not accepted).
- // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
- // value in binary format, or produce an error.
- // * Applications are allowed to cache lookup results based on the
- // URL, or have them precompiled into a binary to avoid any
- // lookup. Therefore, binary compatibility needs to be preserved
- // on changes to types. (Use versioned type names to manage
- // breaking changes.)
- //
- // Schemes other than `http`, `https` (or the empty scheme) might be
- // used with implementation specific semantics.
- //
- TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"`
- // Must be a valid serialized protocol buffer of the above specified type.
- Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
-}
-
-func (m *Any) Reset() { *m = Any{} }
-func (m *Any) String() string { return proto.CompactTextString(m) }
-func (*Any) ProtoMessage() {}
-func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-func (*Any) XXX_WellKnownType() string { return "Any" }
-
-func init() {
- proto.RegisterType((*Any)(nil), "google.protobuf.Any")
-}
-
-func init() { proto.RegisterFile("github.com/golang/protobuf/ptypes/any/any.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 187 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0x4f, 0xcf, 0x2c, 0xc9,
- 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28,
- 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xcc,
- 0xab, 0x04, 0x61, 0x3d, 0xb0, 0xb8, 0x10, 0x7f, 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x1e, 0x4c,
- 0x95, 0x92, 0x19, 0x17, 0xb3, 0x63, 0x5e, 0xa5, 0x90, 0x24, 0x17, 0x07, 0x48, 0x79, 0x7c, 0x69,
- 0x51, 0x8e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x3b, 0x88, 0x1f, 0x5a, 0x94, 0x23, 0x24,
- 0xc2, 0xc5, 0x5a, 0x96, 0x98, 0x53, 0x9a, 0x2a, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x13, 0x04, 0xe1,
- 0x38, 0x15, 0x71, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x19, 0xe7, 0xc4, 0xe1, 0x98, 0x57, 0x19,
- 0x00, 0xe2, 0x04, 0x30, 0x46, 0xa9, 0x12, 0xe5, 0xb8, 0x05, 0x8c, 0x8c, 0x8b, 0x98, 0x98, 0xdd,
- 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x4c, 0x0b, 0x80, 0xaa, 0xd2, 0x0b, 0x4f, 0xcd, 0xc9,
- 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0xa9, 0x4e, 0x62, 0x03, 0x6b, 0x37, 0x06, 0x04, 0x00,
- 0x00, 0xff, 0xff, 0xc6, 0x4d, 0x03, 0x23, 0xf6, 0x00, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.proto b/vendor/github.com/golang/protobuf/ptypes/any/any.proto
deleted file mode 100644
index 81dcf46cc..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/any/any.proto
+++ /dev/null
@@ -1,140 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option go_package = "github.com/golang/protobuf/ptypes/any";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "AnyProto";
-option java_multiple_files = true;
-option java_generate_equals_and_hash = true;
-option objc_class_prefix = "GPB";
-
-// `Any` contains an arbitrary serialized protocol buffer message along with a
-// URL that describes the type of the serialized message.
-//
-// Protobuf library provides support to pack/unpack Any values in the form
-// of utility functions or additional generated methods of the Any type.
-//
-// Example 1: Pack and unpack a message in C++.
-//
-// Foo foo = ...;
-// Any any;
-// any.PackFrom(foo);
-// ...
-// if (any.UnpackTo(&foo)) {
-// ...
-// }
-//
-// Example 2: Pack and unpack a message in Java.
-//
-// Foo foo = ...;
-// Any any = Any.pack(foo);
-// ...
-// if (any.is(Foo.class)) {
-// foo = any.unpack(Foo.class);
-// }
-//
-// Example 3: Pack and unpack a message in Python.
-//
-// foo = Foo(...)
-// any = Any()
-// any.Pack(foo)
-// ...
-// if any.Is(Foo.DESCRIPTOR):
-// any.Unpack(foo)
-// ...
-//
-// The pack methods provided by protobuf library will by default use
-// 'type.googleapis.com/full.type.name' as the type URL and the unpack
-// methods only use the fully qualified type name after the last '/'
-// in the type URL, for example "foo.bar.com/x/y.z" will yield type
-// name "y.z".
-//
-//
-// JSON
-// ====
-// The JSON representation of an `Any` value uses the regular
-// representation of the deserialized, embedded message, with an
-// additional field `@type` which contains the type URL. Example:
-//
-// package google.profile;
-// message Person {
-// string first_name = 1;
-// string last_name = 2;
-// }
-//
-// {
-// "@type": "type.googleapis.com/google.profile.Person",
-// "firstName": <string>,
-// "lastName": <string>
-// }
-//
-// If the embedded message type is well-known and has a custom JSON
-// representation, that representation will be embedded adding a field
-// `value` which holds the custom JSON in addition to the `@type`
-// field. Example (for message [google.protobuf.Duration][]):
-//
-// {
-// "@type": "type.googleapis.com/google.protobuf.Duration",
-// "value": "1.212s"
-// }
-//
-message Any {
- // A URL/resource name whose content describes the type of the
- // serialized protocol buffer message.
- //
- // For URLs which use the scheme `http`, `https`, or no scheme, the
- // following restrictions and interpretations apply:
- //
- // * If no scheme is provided, `https` is assumed.
- // * The last segment of the URL's path must represent the fully
- // qualified name of the type (as in `path/google.protobuf.Duration`).
- // The name should be in a canonical form (e.g., leading "." is
- // not accepted).
- // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
- // value in binary format, or produce an error.
- // * Applications are allowed to cache lookup results based on the
- // URL, or have them precompiled into a binary to avoid any
- // lookup. Therefore, binary compatibility needs to be preserved
- // on changes to types. (Use versioned type names to manage
- // breaking changes.)
- //
- // Schemes other than `http`, `https` (or the empty scheme) might be
- // used with implementation specific semantics.
- //
- string type_url = 1;
-
- // Must be a valid serialized protocol buffer of the above specified type.
- bytes value = 2;
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/doc.go b/vendor/github.com/golang/protobuf/ptypes/doc.go
deleted file mode 100644
index c0d595da7..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/doc.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-/*
-Package ptypes contains code for interacting with well-known types.
-*/
-package ptypes
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration.go b/vendor/github.com/golang/protobuf/ptypes/duration.go
deleted file mode 100644
index 65cb0f8eb..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/duration.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package ptypes
-
-// This file implements conversions between google.protobuf.Duration
-// and time.Duration.
-
-import (
- "errors"
- "fmt"
- "time"
-
- durpb "github.com/golang/protobuf/ptypes/duration"
-)
-
-const (
- // Range of a durpb.Duration in seconds, as specified in
- // google/protobuf/duration.proto. This is about 10,000 years in seconds.
- maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60)
- minSeconds = -maxSeconds
-)
-
-// validateDuration determines whether the durpb.Duration is valid according to the
-// definition in google/protobuf/duration.proto. A valid durpb.Duration
-// may still be too large to fit into a time.Duration (the range of durpb.Duration
-// is about 10,000 years, and the range of time.Duration is about 290).
-func validateDuration(d *durpb.Duration) error {
- if d == nil {
- return errors.New("duration: nil Duration")
- }
- if d.Seconds < minSeconds || d.Seconds > maxSeconds {
- return fmt.Errorf("duration: %v: seconds out of range", d)
- }
- if d.Nanos <= -1e9 || d.Nanos >= 1e9 {
- return fmt.Errorf("duration: %v: nanos out of range", d)
- }
- // Seconds and Nanos must have the same sign, unless d.Nanos is zero.
- if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) {
- return fmt.Errorf("duration: %v: seconds and nanos have different signs", d)
- }
- return nil
-}
-
-// Duration converts a durpb.Duration to a time.Duration. Duration
-// returns an error if the durpb.Duration is invalid or is too large to be
-// represented in a time.Duration.
-func Duration(p *durpb.Duration) (time.Duration, error) {
- if err := validateDuration(p); err != nil {
- return 0, err
- }
- d := time.Duration(p.Seconds) * time.Second
- if int64(d/time.Second) != p.Seconds {
- return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
- }
- if p.Nanos != 0 {
- d += time.Duration(p.Nanos)
- if (d < 0) != (p.Nanos < 0) {
- return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
- }
- }
- return d, nil
-}
-
-// DurationProto converts a time.Duration to a durpb.Duration.
-func DurationProto(d time.Duration) *durpb.Duration {
- nanos := d.Nanoseconds()
- secs := nanos / 1e9
- nanos -= secs * 1e9
- return &durpb.Duration{
- Seconds: secs,
- Nanos: int32(nanos),
- }
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go
deleted file mode 100644
index 569748346..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Code generated by protoc-gen-go.
-// source: github.com/golang/protobuf/ptypes/duration/duration.proto
-// DO NOT EDIT!
-
-/*
-Package duration is a generated protocol buffer package.
-
-It is generated from these files:
- github.com/golang/protobuf/ptypes/duration/duration.proto
-
-It has these top-level messages:
- Duration
-*/
-package duration
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// A Duration represents a signed, fixed-length span of time represented
-// as a count of seconds and fractions of seconds at nanosecond
-// resolution. It is independent of any calendar and concepts like "day"
-// or "month". It is related to Timestamp in that the difference between
-// two Timestamp values is a Duration and it can be added or subtracted
-// from a Timestamp. Range is approximately +-10,000 years.
-//
-// Example 1: Compute Duration from two Timestamps in pseudo code.
-//
-// Timestamp start = ...;
-// Timestamp end = ...;
-// Duration duration = ...;
-//
-// duration.seconds = end.seconds - start.seconds;
-// duration.nanos = end.nanos - start.nanos;
-//
-// if (duration.seconds < 0 && duration.nanos > 0) {
-// duration.seconds += 1;
-// duration.nanos -= 1000000000;
-// } else if (durations.seconds > 0 && duration.nanos < 0) {
-// duration.seconds -= 1;
-// duration.nanos += 1000000000;
-// }
-//
-// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
-//
-// Timestamp start = ...;
-// Duration duration = ...;
-// Timestamp end = ...;
-//
-// end.seconds = start.seconds + duration.seconds;
-// end.nanos = start.nanos + duration.nanos;
-//
-// if (end.nanos < 0) {
-// end.seconds -= 1;
-// end.nanos += 1000000000;
-// } else if (end.nanos >= 1000000000) {
-// end.seconds += 1;
-// end.nanos -= 1000000000;
-// }
-//
-//
-type Duration struct {
- // Signed seconds of the span of time. Must be from -315,576,000,000
- // to +315,576,000,000 inclusive.
- Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
- // Signed fractions of a second at nanosecond resolution of the span
- // of time. Durations less than one second are represented with a 0
- // `seconds` field and a positive or negative `nanos` field. For durations
- // of one second or more, a non-zero value for the `nanos` field must be
- // of the same sign as the `seconds` field. Must be from -999,999,999
- // to +999,999,999 inclusive.
- Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
-}
-
-func (m *Duration) Reset() { *m = Duration{} }
-func (m *Duration) String() string { return proto.CompactTextString(m) }
-func (*Duration) ProtoMessage() {}
-func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-func (*Duration) XXX_WellKnownType() string { return "Duration" }
-
-func init() {
- proto.RegisterType((*Duration)(nil), "google.protobuf.Duration")
-}
-
-func init() {
- proto.RegisterFile("github.com/golang/protobuf/ptypes/duration/duration.proto", fileDescriptor0)
-}
-
-var fileDescriptor0 = []byte{
- // 189 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9,
- 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28,
- 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0x29,
- 0x2d, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0x83, 0x33, 0xf4, 0xc0, 0x2a, 0x84, 0xf8, 0xd3, 0xf3, 0xf3,
- 0xd3, 0x73, 0x52, 0xf5, 0x60, 0xea, 0x95, 0xac, 0xb8, 0x38, 0x5c, 0xa0, 0x4a, 0x84, 0x24, 0xb8,
- 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, 0x60,
- 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xd6,
- 0x20, 0x08, 0xc7, 0xa9, 0x86, 0x4b, 0x38, 0x39, 0x3f, 0x57, 0x0f, 0xcd, 0x48, 0x27, 0x5e, 0x98,
- 0x81, 0x01, 0x20, 0x91, 0x00, 0xc6, 0x28, 0x2d, 0xe2, 0xdd, 0xbb, 0x80, 0x91, 0x71, 0x11, 0x13,
- 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0xb9, 0x01, 0x50, 0xa5, 0x7a, 0xe1, 0xa9,
- 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, 0x2d, 0x49, 0x6c, 0x60, 0x33, 0x8c, 0x01,
- 0x01, 0x00, 0x00, 0xff, 0xff, 0x62, 0xfb, 0xb1, 0x51, 0x0e, 0x01, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto
deleted file mode 100644
index 96c1796d6..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto
+++ /dev/null
@@ -1,98 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option go_package = "github.com/golang/protobuf/ptypes/duration";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "DurationProto";
-option java_multiple_files = true;
-option java_generate_equals_and_hash = true;
-option objc_class_prefix = "GPB";
-
-// A Duration represents a signed, fixed-length span of time represented
-// as a count of seconds and fractions of seconds at nanosecond
-// resolution. It is independent of any calendar and concepts like "day"
-// or "month". It is related to Timestamp in that the difference between
-// two Timestamp values is a Duration and it can be added or subtracted
-// from a Timestamp. Range is approximately +-10,000 years.
-//
-// Example 1: Compute Duration from two Timestamps in pseudo code.
-//
-// Timestamp start = ...;
-// Timestamp end = ...;
-// Duration duration = ...;
-//
-// duration.seconds = end.seconds - start.seconds;
-// duration.nanos = end.nanos - start.nanos;
-//
-// if (duration.seconds < 0 && duration.nanos > 0) {
-// duration.seconds += 1;
-// duration.nanos -= 1000000000;
-// } else if (durations.seconds > 0 && duration.nanos < 0) {
-// duration.seconds -= 1;
-// duration.nanos += 1000000000;
-// }
-//
-// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
-//
-// Timestamp start = ...;
-// Duration duration = ...;
-// Timestamp end = ...;
-//
-// end.seconds = start.seconds + duration.seconds;
-// end.nanos = start.nanos + duration.nanos;
-//
-// if (end.nanos < 0) {
-// end.seconds -= 1;
-// end.nanos += 1000000000;
-// } else if (end.nanos >= 1000000000) {
-// end.seconds += 1;
-// end.nanos -= 1000000000;
-// }
-//
-//
-message Duration {
-
- // Signed seconds of the span of time. Must be from -315,576,000,000
- // to +315,576,000,000 inclusive.
- int64 seconds = 1;
-
- // Signed fractions of a second at nanosecond resolution of the span
- // of time. Durations less than one second are represented with a 0
- // `seconds` field and a positive or negative `nanos` field. For durations
- // of one second or more, a non-zero value for the `nanos` field must be
- // of the same sign as the `seconds` field. Must be from -999,999,999
- // to +999,999,999 inclusive.
- int32 nanos = 2;
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp.go b/vendor/github.com/golang/protobuf/ptypes/timestamp.go
deleted file mode 100644
index 1b3657622..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/timestamp.go
+++ /dev/null
@@ -1,125 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package ptypes
-
-// This file implements operations on google.protobuf.Timestamp.
-
-import (
- "errors"
- "fmt"
- "time"
-
- tspb "github.com/golang/protobuf/ptypes/timestamp"
-)
-
-const (
- // Seconds field of the earliest valid Timestamp.
- // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix().
- minValidSeconds = -62135596800
- // Seconds field just after the latest valid Timestamp.
- // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix().
- maxValidSeconds = 253402300800
-)
-
-// validateTimestamp determines whether a Timestamp is valid.
-// A valid timestamp represents a time in the range
-// [0001-01-01, 10000-01-01) and has a Nanos field
-// in the range [0, 1e9).
-//
-// If the Timestamp is valid, validateTimestamp returns nil.
-// Otherwise, it returns an error that describes
-// the problem.
-//
-// Every valid Timestamp can be represented by a time.Time, but the converse is not true.
-func validateTimestamp(ts *tspb.Timestamp) error {
- if ts == nil {
- return errors.New("timestamp: nil Timestamp")
- }
- if ts.Seconds < minValidSeconds {
- return fmt.Errorf("timestamp: %v before 0001-01-01", ts)
- }
- if ts.Seconds >= maxValidSeconds {
- return fmt.Errorf("timestamp: %v after 10000-01-01", ts)
- }
- if ts.Nanos < 0 || ts.Nanos >= 1e9 {
- return fmt.Errorf("timestamp: %v: nanos not in range [0, 1e9)", ts)
- }
- return nil
-}
-
-// Timestamp converts a google.protobuf.Timestamp proto to a time.Time.
-// It returns an error if the argument is invalid.
-//
-// Unlike most Go functions, if Timestamp returns an error, the first return value
-// is not the zero time.Time. Instead, it is the value obtained from the
-// time.Unix function when passed the contents of the Timestamp, in the UTC
-// locale. This may or may not be a meaningful time; many invalid Timestamps
-// do map to valid time.Times.
-//
-// A nil Timestamp returns an error. The first return value in that case is
-// undefined.
-func Timestamp(ts *tspb.Timestamp) (time.Time, error) {
- // Don't return the zero value on error, because corresponds to a valid
- // timestamp. Instead return whatever time.Unix gives us.
- var t time.Time
- if ts == nil {
- t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp
- } else {
- t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC()
- }
- return t, validateTimestamp(ts)
-}
-
-// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto.
-// It returns an error if the resulting Timestamp is invalid.
-func TimestampProto(t time.Time) (*tspb.Timestamp, error) {
- seconds := t.Unix()
- nanos := int32(t.Sub(time.Unix(seconds, 0)))
- ts := &tspb.Timestamp{
- Seconds: seconds,
- Nanos: nanos,
- }
- if err := validateTimestamp(ts); err != nil {
- return nil, err
- }
- return ts, nil
-}
-
-// TimestampString returns the RFC 3339 string for valid Timestamps. For invalid
-// Timestamps, it returns an error message in parentheses.
-func TimestampString(ts *tspb.Timestamp) string {
- t, err := Timestamp(ts)
- if err != nil {
- return fmt.Sprintf("(%v)", err)
- }
- return t.Format(time.RFC3339Nano)
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go
deleted file mode 100644
index ffcc51594..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// Code generated by protoc-gen-go.
-// source: github.com/golang/protobuf/ptypes/timestamp/timestamp.proto
-// DO NOT EDIT!
-
-/*
-Package timestamp is a generated protocol buffer package.
-
-It is generated from these files:
- github.com/golang/protobuf/ptypes/timestamp/timestamp.proto
-
-It has these top-level messages:
- Timestamp
-*/
-package timestamp
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// A Timestamp represents a point in time independent of any time zone
-// or calendar, represented as seconds and fractions of seconds at
-// nanosecond resolution in UTC Epoch time. It is encoded using the
-// Proleptic Gregorian Calendar which extends the Gregorian calendar
-// backwards to year one. It is encoded assuming all minutes are 60
-// seconds long, i.e. leap seconds are "smeared" so that no leap second
-// table is needed for interpretation. Range is from
-// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
-// By restricting to that range, we ensure that we can convert to
-// and from RFC 3339 date strings.
-// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
-//
-// Example 1: Compute Timestamp from POSIX `time()`.
-//
-// Timestamp timestamp;
-// timestamp.set_seconds(time(NULL));
-// timestamp.set_nanos(0);
-//
-// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
-//
-// struct timeval tv;
-// gettimeofday(&tv, NULL);
-//
-// Timestamp timestamp;
-// timestamp.set_seconds(tv.tv_sec);
-// timestamp.set_nanos(tv.tv_usec * 1000);
-//
-// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
-//
-// FILETIME ft;
-// GetSystemTimeAsFileTime(&ft);
-// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
-//
-// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
-// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
-// Timestamp timestamp;
-// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
-// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
-//
-// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
-//
-// long millis = System.currentTimeMillis();
-//
-// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
-// .setNanos((int) ((millis % 1000) * 1000000)).build();
-//
-//
-// Example 5: Compute Timestamp from current time in Python.
-//
-// now = time.time()
-// seconds = int(now)
-// nanos = int((now - seconds) * 10**9)
-// timestamp = Timestamp(seconds=seconds, nanos=nanos)
-//
-//
-type Timestamp struct {
- // Represents seconds of UTC time since Unix epoch
- // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to
- // 9999-12-31T23:59:59Z inclusive.
- Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
- // Non-negative fractions of a second at nanosecond resolution. Negative
- // second values with fractions must still have non-negative nanos values
- // that count forward in time. Must be from 0 to 999,999,999
- // inclusive.
- Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
-}
-
-func (m *Timestamp) Reset() { *m = Timestamp{} }
-func (m *Timestamp) String() string { return proto.CompactTextString(m) }
-func (*Timestamp) ProtoMessage() {}
-func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" }
-
-func init() {
- proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp")
-}
-
-func init() {
- proto.RegisterFile("github.com/golang/protobuf/ptypes/timestamp/timestamp.proto", fileDescriptor0)
-}
-
-var fileDescriptor0 = []byte{
- // 194 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9,
- 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28,
- 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0xc9,
- 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x40, 0xb0, 0xf4, 0xc0, 0x6a, 0x84, 0xf8, 0xd3, 0xf3,
- 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x60, 0x3a, 0x94, 0xac, 0xb9, 0x38, 0x43, 0x60, 0x6a, 0x84, 0x24,
- 0xb8, 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83,
- 0x60, 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d,
- 0xd6, 0x20, 0x08, 0xc7, 0xa9, 0x91, 0x91, 0x4b, 0x38, 0x39, 0x3f, 0x57, 0x0f, 0xcd, 0x50, 0x27,
- 0x3e, 0xb8, 0x91, 0x01, 0x20, 0xa1, 0x00, 0xc6, 0x28, 0x6d, 0x12, 0x1c, 0xbd, 0x80, 0x91, 0xf1,
- 0x07, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10, 0xc3, 0x03,
- 0xa0, 0xca, 0xf5, 0xc2, 0x53, 0x73, 0x72, 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, 0xda, 0x92,
- 0xd8, 0xc0, 0xe6, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x17, 0x5f, 0xb7, 0xdc, 0x17, 0x01,
- 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto
deleted file mode 100644
index 7992a8588..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto
+++ /dev/null
@@ -1,111 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option cc_enable_arenas = true;
-option go_package = "github.com/golang/protobuf/ptypes/timestamp";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "TimestampProto";
-option java_multiple_files = true;
-option java_generate_equals_and_hash = true;
-option objc_class_prefix = "GPB";
-
-// A Timestamp represents a point in time independent of any time zone
-// or calendar, represented as seconds and fractions of seconds at
-// nanosecond resolution in UTC Epoch time. It is encoded using the
-// Proleptic Gregorian Calendar which extends the Gregorian calendar
-// backwards to year one. It is encoded assuming all minutes are 60
-// seconds long, i.e. leap seconds are "smeared" so that no leap second
-// table is needed for interpretation. Range is from
-// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
-// By restricting to that range, we ensure that we can convert to
-// and from RFC 3339 date strings.
-// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
-//
-// Example 1: Compute Timestamp from POSIX `time()`.
-//
-// Timestamp timestamp;
-// timestamp.set_seconds(time(NULL));
-// timestamp.set_nanos(0);
-//
-// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
-//
-// struct timeval tv;
-// gettimeofday(&tv, NULL);
-//
-// Timestamp timestamp;
-// timestamp.set_seconds(tv.tv_sec);
-// timestamp.set_nanos(tv.tv_usec * 1000);
-//
-// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
-//
-// FILETIME ft;
-// GetSystemTimeAsFileTime(&ft);
-// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
-//
-// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
-// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
-// Timestamp timestamp;
-// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
-// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
-//
-// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
-//
-// long millis = System.currentTimeMillis();
-//
-// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
-// .setNanos((int) ((millis % 1000) * 1000000)).build();
-//
-//
-// Example 5: Compute Timestamp from current time in Python.
-//
-// now = time.time()
-// seconds = int(now)
-// nanos = int((now - seconds) * 10**9)
-// timestamp = Timestamp(seconds=seconds, nanos=nanos)
-//
-//
-message Timestamp {
-
- // Represents seconds of UTC time since Unix epoch
- // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to
- // 9999-12-31T23:59:59Z inclusive.
- int64 seconds = 1;
-
- // Non-negative fractions of a second at nanosecond resolution. Negative
- // second values with fractions must still have non-negative nanos values
- // that count forward in time. Must be from 0 to 999,999,999
- // inclusive.
- int32 nanos = 2;
-}
diff --git a/vendor/github.com/googleapis/gnostic/LICENSE b/vendor/github.com/googleapis/gnostic/LICENSE
deleted file mode 100644
index 6b0b1270f..000000000
--- a/vendor/github.com/googleapis/gnostic/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
-
diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go
deleted file mode 100644
index 0e32451a3..000000000
--- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go
+++ /dev/null
@@ -1,8728 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// 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 IS AUTOMATICALLY GENERATED.
-
-package openapi_v2
-
-import (
- "fmt"
- "github.com/googleapis/gnostic/compiler"
- "gopkg.in/yaml.v2"
- "regexp"
- "strings"
-)
-
-// Version returns the package name (and OpenAPI version).
-func Version() string {
- return "openapi_v2"
-}
-
-// NewAdditionalPropertiesItem creates an object of type AdditionalPropertiesItem if possible, returning an error if not.
-func NewAdditionalPropertiesItem(in interface{}, context *compiler.Context) (*AdditionalPropertiesItem, error) {
- errors := make([]error, 0)
- x := &AdditionalPropertiesItem{}
- matched := false
- // Schema schema = 1;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewSchema(m, compiler.NewContext("schema", context))
- if matchingError == nil {
- x.Oneof = &AdditionalPropertiesItem_Schema{Schema: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- // bool boolean = 2;
- boolValue, ok := in.(bool)
- if ok {
- x.Oneof = &AdditionalPropertiesItem_Boolean{Boolean: boolValue}
- }
- if matched {
- // since the oneof matched one of its possibilities, discard any matching errors
- errors = make([]error, 0)
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewAny creates an object of type Any if possible, returning an error if not.
-func NewAny(in interface{}, context *compiler.Context) (*Any, error) {
- errors := make([]error, 0)
- x := &Any{}
- bytes, _ := yaml.Marshal(in)
- x.Yaml = string(bytes)
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewApiKeySecurity creates an object of type ApiKeySecurity if possible, returning an error if not.
-func NewApiKeySecurity(in interface{}, context *compiler.Context) (*ApiKeySecurity, error) {
- errors := make([]error, 0)
- x := &ApiKeySecurity{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"in", "name", "type"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"description", "in", "name", "type"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string type = 1;
- v1 := compiler.MapValueForKey(m, "type")
- if v1 != nil {
- x.Type, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [apiKey]
- if ok && !compiler.StringArrayContainsValue([]string{"apiKey"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string name = 2;
- v2 := compiler.MapValueForKey(m, "name")
- if v2 != nil {
- x.Name, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string in = 3;
- v3 := compiler.MapValueForKey(m, "in")
- if v3 != nil {
- x.In, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [header query]
- if ok && !compiler.StringArrayContainsValue([]string{"header", "query"}, x.In) {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 4;
- v4 := compiler.MapValueForKey(m, "description")
- if v4 != nil {
- x.Description, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 5;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewBasicAuthenticationSecurity creates an object of type BasicAuthenticationSecurity if possible, returning an error if not.
-func NewBasicAuthenticationSecurity(in interface{}, context *compiler.Context) (*BasicAuthenticationSecurity, error) {
- errors := make([]error, 0)
- x := &BasicAuthenticationSecurity{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"type"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"description", "type"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string type = 1;
- v1 := compiler.MapValueForKey(m, "type")
- if v1 != nil {
- x.Type, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [basic]
- if ok && !compiler.StringArrayContainsValue([]string{"basic"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 2;
- v2 := compiler.MapValueForKey(m, "description")
- if v2 != nil {
- x.Description, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 3;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewBodyParameter creates an object of type BodyParameter if possible, returning an error if not.
-func NewBodyParameter(in interface{}, context *compiler.Context) (*BodyParameter, error) {
- errors := make([]error, 0)
- x := &BodyParameter{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"in", "name", "schema"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"description", "in", "name", "required", "schema"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string description = 1;
- v1 := compiler.MapValueForKey(m, "description")
- if v1 != nil {
- x.Description, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string name = 2;
- v2 := compiler.MapValueForKey(m, "name")
- if v2 != nil {
- x.Name, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string in = 3;
- v3 := compiler.MapValueForKey(m, "in")
- if v3 != nil {
- x.In, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [body]
- if ok && !compiler.StringArrayContainsValue([]string{"body"}, x.In) {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool required = 4;
- v4 := compiler.MapValueForKey(m, "required")
- if v4 != nil {
- x.Required, ok = v4.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Schema schema = 5;
- v5 := compiler.MapValueForKey(m, "schema")
- if v5 != nil {
- var err error
- x.Schema, err = NewSchema(v5, compiler.NewContext("schema", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated NamedAny vendor_extension = 6;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewContact creates an object of type Contact if possible, returning an error if not.
-func NewContact(in interface{}, context *compiler.Context) (*Contact, error) {
- errors := make([]error, 0)
- x := &Contact{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"email", "name", "url"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string url = 2;
- v2 := compiler.MapValueForKey(m, "url")
- if v2 != nil {
- x.Url, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string email = 3;
- v3 := compiler.MapValueForKey(m, "email")
- if v3 != nil {
- x.Email, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for email: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 4;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewDefault creates an object of type Default if possible, returning an error if not.
-func NewDefault(in interface{}, context *compiler.Context) (*Default, error) {
- errors := make([]error, 0)
- x := &Default{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedAny additional_properties = 1;
- // MAP: Any
- x.AdditionalProperties = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewDefinitions creates an object of type Definitions if possible, returning an error if not.
-func NewDefinitions(in interface{}, context *compiler.Context) (*Definitions, error) {
- errors := make([]error, 0)
- x := &Definitions{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedSchema additional_properties = 1;
- // MAP: Schema
- x.AdditionalProperties = make([]*NamedSchema, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedSchema{}
- pair.Name = k
- var err error
- pair.Value, err = NewSchema(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewDocument creates an object of type Document if possible, returning an error if not.
-func NewDocument(in interface{}, context *compiler.Context) (*Document, error) {
- errors := make([]error, 0)
- x := &Document{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"info", "paths", "swagger"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"basePath", "consumes", "definitions", "externalDocs", "host", "info", "parameters", "paths", "produces", "responses", "schemes", "security", "securityDefinitions", "swagger", "tags"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string swagger = 1;
- v1 := compiler.MapValueForKey(m, "swagger")
- if v1 != nil {
- x.Swagger, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for swagger: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [2.0]
- if ok && !compiler.StringArrayContainsValue([]string{"2.0"}, x.Swagger) {
- message := fmt.Sprintf("has unexpected value for swagger: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Info info = 2;
- v2 := compiler.MapValueForKey(m, "info")
- if v2 != nil {
- var err error
- x.Info, err = NewInfo(v2, compiler.NewContext("info", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string host = 3;
- v3 := compiler.MapValueForKey(m, "host")
- if v3 != nil {
- x.Host, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for host: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string base_path = 4;
- v4 := compiler.MapValueForKey(m, "basePath")
- if v4 != nil {
- x.BasePath, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for basePath: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated string schemes = 5;
- v5 := compiler.MapValueForKey(m, "schemes")
- if v5 != nil {
- v, ok := v5.([]interface{})
- if ok {
- x.Schemes = compiler.ConvertInterfaceArrayToStringArray(v)
- } else {
- message := fmt.Sprintf("has unexpected value for schemes: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [http https ws wss]
- if ok && !compiler.StringArrayContainsValues([]string{"http", "https", "ws", "wss"}, x.Schemes) {
- message := fmt.Sprintf("has unexpected value for schemes: %+v", v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated string consumes = 6;
- v6 := compiler.MapValueForKey(m, "consumes")
- if v6 != nil {
- v, ok := v6.([]interface{})
- if ok {
- x.Consumes = compiler.ConvertInterfaceArrayToStringArray(v)
- } else {
- message := fmt.Sprintf("has unexpected value for consumes: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated string produces = 7;
- v7 := compiler.MapValueForKey(m, "produces")
- if v7 != nil {
- v, ok := v7.([]interface{})
- if ok {
- x.Produces = compiler.ConvertInterfaceArrayToStringArray(v)
- } else {
- message := fmt.Sprintf("has unexpected value for produces: %+v (%T)", v7, v7)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Paths paths = 8;
- v8 := compiler.MapValueForKey(m, "paths")
- if v8 != nil {
- var err error
- x.Paths, err = NewPaths(v8, compiler.NewContext("paths", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Definitions definitions = 9;
- v9 := compiler.MapValueForKey(m, "definitions")
- if v9 != nil {
- var err error
- x.Definitions, err = NewDefinitions(v9, compiler.NewContext("definitions", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // ParameterDefinitions parameters = 10;
- v10 := compiler.MapValueForKey(m, "parameters")
- if v10 != nil {
- var err error
- x.Parameters, err = NewParameterDefinitions(v10, compiler.NewContext("parameters", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // ResponseDefinitions responses = 11;
- v11 := compiler.MapValueForKey(m, "responses")
- if v11 != nil {
- var err error
- x.Responses, err = NewResponseDefinitions(v11, compiler.NewContext("responses", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated SecurityRequirement security = 12;
- v12 := compiler.MapValueForKey(m, "security")
- if v12 != nil {
- // repeated SecurityRequirement
- x.Security = make([]*SecurityRequirement, 0)
- a, ok := v12.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewSecurityRequirement(item, compiler.NewContext("security", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Security = append(x.Security, y)
- }
- }
- }
- // SecurityDefinitions security_definitions = 13;
- v13 := compiler.MapValueForKey(m, "securityDefinitions")
- if v13 != nil {
- var err error
- x.SecurityDefinitions, err = NewSecurityDefinitions(v13, compiler.NewContext("securityDefinitions", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated Tag tags = 14;
- v14 := compiler.MapValueForKey(m, "tags")
- if v14 != nil {
- // repeated Tag
- x.Tags = make([]*Tag, 0)
- a, ok := v14.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewTag(item, compiler.NewContext("tags", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Tags = append(x.Tags, y)
- }
- }
- }
- // ExternalDocs external_docs = 15;
- v15 := compiler.MapValueForKey(m, "externalDocs")
- if v15 != nil {
- var err error
- x.ExternalDocs, err = NewExternalDocs(v15, compiler.NewContext("externalDocs", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated NamedAny vendor_extension = 16;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewExamples creates an object of type Examples if possible, returning an error if not.
-func NewExamples(in interface{}, context *compiler.Context) (*Examples, error) {
- errors := make([]error, 0)
- x := &Examples{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedAny additional_properties = 1;
- // MAP: Any
- x.AdditionalProperties = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewExternalDocs creates an object of type ExternalDocs if possible, returning an error if not.
-func NewExternalDocs(in interface{}, context *compiler.Context) (*ExternalDocs, error) {
- errors := make([]error, 0)
- x := &ExternalDocs{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"url"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"description", "url"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string description = 1;
- v1 := compiler.MapValueForKey(m, "description")
- if v1 != nil {
- x.Description, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string url = 2;
- v2 := compiler.MapValueForKey(m, "url")
- if v2 != nil {
- x.Url, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 3;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewFileSchema creates an object of type FileSchema if possible, returning an error if not.
-func NewFileSchema(in interface{}, context *compiler.Context) (*FileSchema, error) {
- errors := make([]error, 0)
- x := &FileSchema{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"type"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"default", "description", "example", "externalDocs", "format", "readOnly", "required", "title", "type"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string format = 1;
- v1 := compiler.MapValueForKey(m, "format")
- if v1 != nil {
- x.Format, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string title = 2;
- v2 := compiler.MapValueForKey(m, "title")
- if v2 != nil {
- x.Title, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 3;
- v3 := compiler.MapValueForKey(m, "description")
- if v3 != nil {
- x.Description, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Any default = 4;
- v4 := compiler.MapValueForKey(m, "default")
- if v4 != nil {
- var err error
- x.Default, err = NewAny(v4, compiler.NewContext("default", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated string required = 5;
- v5 := compiler.MapValueForKey(m, "required")
- if v5 != nil {
- v, ok := v5.([]interface{})
- if ok {
- x.Required = compiler.ConvertInterfaceArrayToStringArray(v)
- } else {
- message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string type = 6;
- v6 := compiler.MapValueForKey(m, "type")
- if v6 != nil {
- x.Type, ok = v6.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [file]
- if ok && !compiler.StringArrayContainsValue([]string{"file"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool read_only = 7;
- v7 := compiler.MapValueForKey(m, "readOnly")
- if v7 != nil {
- x.ReadOnly, ok = v7.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for readOnly: %+v (%T)", v7, v7)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // ExternalDocs external_docs = 8;
- v8 := compiler.MapValueForKey(m, "externalDocs")
- if v8 != nil {
- var err error
- x.ExternalDocs, err = NewExternalDocs(v8, compiler.NewContext("externalDocs", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Any example = 9;
- v9 := compiler.MapValueForKey(m, "example")
- if v9 != nil {
- var err error
- x.Example, err = NewAny(v9, compiler.NewContext("example", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated NamedAny vendor_extension = 10;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewFormDataParameterSubSchema creates an object of type FormDataParameterSubSchema if possible, returning an error if not.
-func NewFormDataParameterSubSchema(in interface{}, context *compiler.Context) (*FormDataParameterSubSchema, error) {
- errors := make([]error, 0)
- x := &FormDataParameterSubSchema{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"allowEmptyValue", "collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // bool required = 1;
- v1 := compiler.MapValueForKey(m, "required")
- if v1 != nil {
- x.Required, ok = v1.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string in = 2;
- v2 := compiler.MapValueForKey(m, "in")
- if v2 != nil {
- x.In, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [formData]
- if ok && !compiler.StringArrayContainsValue([]string{"formData"}, x.In) {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 3;
- v3 := compiler.MapValueForKey(m, "description")
- if v3 != nil {
- x.Description, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string name = 4;
- v4 := compiler.MapValueForKey(m, "name")
- if v4 != nil {
- x.Name, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool allow_empty_value = 5;
- v5 := compiler.MapValueForKey(m, "allowEmptyValue")
- if v5 != nil {
- x.AllowEmptyValue, ok = v5.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for allowEmptyValue: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string type = 6;
- v6 := compiler.MapValueForKey(m, "type")
- if v6 != nil {
- x.Type, ok = v6.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [string number boolean integer array file]
- if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array", "file"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string format = 7;
- v7 := compiler.MapValueForKey(m, "format")
- if v7 != nil {
- x.Format, ok = v7.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v7, v7)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // PrimitivesItems items = 8;
- v8 := compiler.MapValueForKey(m, "items")
- if v8 != nil {
- var err error
- x.Items, err = NewPrimitivesItems(v8, compiler.NewContext("items", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string collection_format = 9;
- v9 := compiler.MapValueForKey(m, "collectionFormat")
- if v9 != nil {
- x.CollectionFormat, ok = v9.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [csv ssv tsv pipes multi]
- if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes", "multi"}, x.CollectionFormat) {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Any default = 10;
- v10 := compiler.MapValueForKey(m, "default")
- if v10 != nil {
- var err error
- x.Default, err = NewAny(v10, compiler.NewContext("default", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // float maximum = 11;
- v11 := compiler.MapValueForKey(m, "maximum")
- if v11 != nil {
- switch v11 := v11.(type) {
- case float64:
- x.Maximum = v11
- case float32:
- x.Maximum = float64(v11)
- case uint64:
- x.Maximum = float64(v11)
- case uint32:
- x.Maximum = float64(v11)
- case int64:
- x.Maximum = float64(v11)
- case int32:
- x.Maximum = float64(v11)
- case int:
- x.Maximum = float64(v11)
- default:
- message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v11, v11)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_maximum = 12;
- v12 := compiler.MapValueForKey(m, "exclusiveMaximum")
- if v12 != nil {
- x.ExclusiveMaximum, ok = v12.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v12, v12)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // float minimum = 13;
- v13 := compiler.MapValueForKey(m, "minimum")
- if v13 != nil {
- switch v13 := v13.(type) {
- case float64:
- x.Minimum = v13
- case float32:
- x.Minimum = float64(v13)
- case uint64:
- x.Minimum = float64(v13)
- case uint32:
- x.Minimum = float64(v13)
- case int64:
- x.Minimum = float64(v13)
- case int32:
- x.Minimum = float64(v13)
- case int:
- x.Minimum = float64(v13)
- default:
- message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v13, v13)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_minimum = 14;
- v14 := compiler.MapValueForKey(m, "exclusiveMinimum")
- if v14 != nil {
- x.ExclusiveMinimum, ok = v14.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v14, v14)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_length = 15;
- v15 := compiler.MapValueForKey(m, "maxLength")
- if v15 != nil {
- t, ok := v15.(int)
- if ok {
- x.MaxLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v15, v15)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_length = 16;
- v16 := compiler.MapValueForKey(m, "minLength")
- if v16 != nil {
- t, ok := v16.(int)
- if ok {
- x.MinLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v16, v16)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string pattern = 17;
- v17 := compiler.MapValueForKey(m, "pattern")
- if v17 != nil {
- x.Pattern, ok = v17.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v17, v17)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_items = 18;
- v18 := compiler.MapValueForKey(m, "maxItems")
- if v18 != nil {
- t, ok := v18.(int)
- if ok {
- x.MaxItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v18, v18)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_items = 19;
- v19 := compiler.MapValueForKey(m, "minItems")
- if v19 != nil {
- t, ok := v19.(int)
- if ok {
- x.MinItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v19, v19)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool unique_items = 20;
- v20 := compiler.MapValueForKey(m, "uniqueItems")
- if v20 != nil {
- x.UniqueItems, ok = v20.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v20, v20)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated Any enum = 21;
- v21 := compiler.MapValueForKey(m, "enum")
- if v21 != nil {
- // repeated Any
- x.Enum = make([]*Any, 0)
- a, ok := v21.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewAny(item, compiler.NewContext("enum", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Enum = append(x.Enum, y)
- }
- }
- }
- // float multiple_of = 22;
- v22 := compiler.MapValueForKey(m, "multipleOf")
- if v22 != nil {
- switch v22 := v22.(type) {
- case float64:
- x.MultipleOf = v22
- case float32:
- x.MultipleOf = float64(v22)
- case uint64:
- x.MultipleOf = float64(v22)
- case uint32:
- x.MultipleOf = float64(v22)
- case int64:
- x.MultipleOf = float64(v22)
- case int32:
- x.MultipleOf = float64(v22)
- case int:
- x.MultipleOf = float64(v22)
- default:
- message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v22, v22)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 23;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewHeader creates an object of type Header if possible, returning an error if not.
-func NewHeader(in interface{}, context *compiler.Context) (*Header, error) {
- errors := make([]error, 0)
- x := &Header{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"type"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "pattern", "type", "uniqueItems"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string type = 1;
- v1 := compiler.MapValueForKey(m, "type")
- if v1 != nil {
- x.Type, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [string number integer boolean array]
- if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "integer", "boolean", "array"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string format = 2;
- v2 := compiler.MapValueForKey(m, "format")
- if v2 != nil {
- x.Format, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // PrimitivesItems items = 3;
- v3 := compiler.MapValueForKey(m, "items")
- if v3 != nil {
- var err error
- x.Items, err = NewPrimitivesItems(v3, compiler.NewContext("items", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string collection_format = 4;
- v4 := compiler.MapValueForKey(m, "collectionFormat")
- if v4 != nil {
- x.CollectionFormat, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [csv ssv tsv pipes]
- if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Any default = 5;
- v5 := compiler.MapValueForKey(m, "default")
- if v5 != nil {
- var err error
- x.Default, err = NewAny(v5, compiler.NewContext("default", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // float maximum = 6;
- v6 := compiler.MapValueForKey(m, "maximum")
- if v6 != nil {
- switch v6 := v6.(type) {
- case float64:
- x.Maximum = v6
- case float32:
- x.Maximum = float64(v6)
- case uint64:
- x.Maximum = float64(v6)
- case uint32:
- x.Maximum = float64(v6)
- case int64:
- x.Maximum = float64(v6)
- case int32:
- x.Maximum = float64(v6)
- case int:
- x.Maximum = float64(v6)
- default:
- message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_maximum = 7;
- v7 := compiler.MapValueForKey(m, "exclusiveMaximum")
- if v7 != nil {
- x.ExclusiveMaximum, ok = v7.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v7, v7)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // float minimum = 8;
- v8 := compiler.MapValueForKey(m, "minimum")
- if v8 != nil {
- switch v8 := v8.(type) {
- case float64:
- x.Minimum = v8
- case float32:
- x.Minimum = float64(v8)
- case uint64:
- x.Minimum = float64(v8)
- case uint32:
- x.Minimum = float64(v8)
- case int64:
- x.Minimum = float64(v8)
- case int32:
- x.Minimum = float64(v8)
- case int:
- x.Minimum = float64(v8)
- default:
- message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v8, v8)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_minimum = 9;
- v9 := compiler.MapValueForKey(m, "exclusiveMinimum")
- if v9 != nil {
- x.ExclusiveMinimum, ok = v9.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v9, v9)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_length = 10;
- v10 := compiler.MapValueForKey(m, "maxLength")
- if v10 != nil {
- t, ok := v10.(int)
- if ok {
- x.MaxLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v10, v10)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_length = 11;
- v11 := compiler.MapValueForKey(m, "minLength")
- if v11 != nil {
- t, ok := v11.(int)
- if ok {
- x.MinLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v11, v11)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string pattern = 12;
- v12 := compiler.MapValueForKey(m, "pattern")
- if v12 != nil {
- x.Pattern, ok = v12.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v12, v12)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_items = 13;
- v13 := compiler.MapValueForKey(m, "maxItems")
- if v13 != nil {
- t, ok := v13.(int)
- if ok {
- x.MaxItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v13, v13)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_items = 14;
- v14 := compiler.MapValueForKey(m, "minItems")
- if v14 != nil {
- t, ok := v14.(int)
- if ok {
- x.MinItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v14, v14)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool unique_items = 15;
- v15 := compiler.MapValueForKey(m, "uniqueItems")
- if v15 != nil {
- x.UniqueItems, ok = v15.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v15, v15)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated Any enum = 16;
- v16 := compiler.MapValueForKey(m, "enum")
- if v16 != nil {
- // repeated Any
- x.Enum = make([]*Any, 0)
- a, ok := v16.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewAny(item, compiler.NewContext("enum", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Enum = append(x.Enum, y)
- }
- }
- }
- // float multiple_of = 17;
- v17 := compiler.MapValueForKey(m, "multipleOf")
- if v17 != nil {
- switch v17 := v17.(type) {
- case float64:
- x.MultipleOf = v17
- case float32:
- x.MultipleOf = float64(v17)
- case uint64:
- x.MultipleOf = float64(v17)
- case uint32:
- x.MultipleOf = float64(v17)
- case int64:
- x.MultipleOf = float64(v17)
- case int32:
- x.MultipleOf = float64(v17)
- case int:
- x.MultipleOf = float64(v17)
- default:
- message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v17, v17)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 18;
- v18 := compiler.MapValueForKey(m, "description")
- if v18 != nil {
- x.Description, ok = v18.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v18, v18)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 19;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewHeaderParameterSubSchema creates an object of type HeaderParameterSubSchema if possible, returning an error if not.
-func NewHeaderParameterSubSchema(in interface{}, context *compiler.Context) (*HeaderParameterSubSchema, error) {
- errors := make([]error, 0)
- x := &HeaderParameterSubSchema{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // bool required = 1;
- v1 := compiler.MapValueForKey(m, "required")
- if v1 != nil {
- x.Required, ok = v1.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string in = 2;
- v2 := compiler.MapValueForKey(m, "in")
- if v2 != nil {
- x.In, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [header]
- if ok && !compiler.StringArrayContainsValue([]string{"header"}, x.In) {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 3;
- v3 := compiler.MapValueForKey(m, "description")
- if v3 != nil {
- x.Description, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string name = 4;
- v4 := compiler.MapValueForKey(m, "name")
- if v4 != nil {
- x.Name, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string type = 5;
- v5 := compiler.MapValueForKey(m, "type")
- if v5 != nil {
- x.Type, ok = v5.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [string number boolean integer array]
- if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string format = 6;
- v6 := compiler.MapValueForKey(m, "format")
- if v6 != nil {
- x.Format, ok = v6.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // PrimitivesItems items = 7;
- v7 := compiler.MapValueForKey(m, "items")
- if v7 != nil {
- var err error
- x.Items, err = NewPrimitivesItems(v7, compiler.NewContext("items", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string collection_format = 8;
- v8 := compiler.MapValueForKey(m, "collectionFormat")
- if v8 != nil {
- x.CollectionFormat, ok = v8.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [csv ssv tsv pipes]
- if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Any default = 9;
- v9 := compiler.MapValueForKey(m, "default")
- if v9 != nil {
- var err error
- x.Default, err = NewAny(v9, compiler.NewContext("default", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // float maximum = 10;
- v10 := compiler.MapValueForKey(m, "maximum")
- if v10 != nil {
- switch v10 := v10.(type) {
- case float64:
- x.Maximum = v10
- case float32:
- x.Maximum = float64(v10)
- case uint64:
- x.Maximum = float64(v10)
- case uint32:
- x.Maximum = float64(v10)
- case int64:
- x.Maximum = float64(v10)
- case int32:
- x.Maximum = float64(v10)
- case int:
- x.Maximum = float64(v10)
- default:
- message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v10, v10)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_maximum = 11;
- v11 := compiler.MapValueForKey(m, "exclusiveMaximum")
- if v11 != nil {
- x.ExclusiveMaximum, ok = v11.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v11, v11)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // float minimum = 12;
- v12 := compiler.MapValueForKey(m, "minimum")
- if v12 != nil {
- switch v12 := v12.(type) {
- case float64:
- x.Minimum = v12
- case float32:
- x.Minimum = float64(v12)
- case uint64:
- x.Minimum = float64(v12)
- case uint32:
- x.Minimum = float64(v12)
- case int64:
- x.Minimum = float64(v12)
- case int32:
- x.Minimum = float64(v12)
- case int:
- x.Minimum = float64(v12)
- default:
- message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v12, v12)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_minimum = 13;
- v13 := compiler.MapValueForKey(m, "exclusiveMinimum")
- if v13 != nil {
- x.ExclusiveMinimum, ok = v13.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v13, v13)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_length = 14;
- v14 := compiler.MapValueForKey(m, "maxLength")
- if v14 != nil {
- t, ok := v14.(int)
- if ok {
- x.MaxLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v14, v14)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_length = 15;
- v15 := compiler.MapValueForKey(m, "minLength")
- if v15 != nil {
- t, ok := v15.(int)
- if ok {
- x.MinLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v15, v15)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string pattern = 16;
- v16 := compiler.MapValueForKey(m, "pattern")
- if v16 != nil {
- x.Pattern, ok = v16.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v16, v16)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_items = 17;
- v17 := compiler.MapValueForKey(m, "maxItems")
- if v17 != nil {
- t, ok := v17.(int)
- if ok {
- x.MaxItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v17, v17)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_items = 18;
- v18 := compiler.MapValueForKey(m, "minItems")
- if v18 != nil {
- t, ok := v18.(int)
- if ok {
- x.MinItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v18, v18)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool unique_items = 19;
- v19 := compiler.MapValueForKey(m, "uniqueItems")
- if v19 != nil {
- x.UniqueItems, ok = v19.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v19, v19)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated Any enum = 20;
- v20 := compiler.MapValueForKey(m, "enum")
- if v20 != nil {
- // repeated Any
- x.Enum = make([]*Any, 0)
- a, ok := v20.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewAny(item, compiler.NewContext("enum", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Enum = append(x.Enum, y)
- }
- }
- }
- // float multiple_of = 21;
- v21 := compiler.MapValueForKey(m, "multipleOf")
- if v21 != nil {
- switch v21 := v21.(type) {
- case float64:
- x.MultipleOf = v21
- case float32:
- x.MultipleOf = float64(v21)
- case uint64:
- x.MultipleOf = float64(v21)
- case uint32:
- x.MultipleOf = float64(v21)
- case int64:
- x.MultipleOf = float64(v21)
- case int32:
- x.MultipleOf = float64(v21)
- case int:
- x.MultipleOf = float64(v21)
- default:
- message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v21, v21)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 22;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewHeaders creates an object of type Headers if possible, returning an error if not.
-func NewHeaders(in interface{}, context *compiler.Context) (*Headers, error) {
- errors := make([]error, 0)
- x := &Headers{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedHeader additional_properties = 1;
- // MAP: Header
- x.AdditionalProperties = make([]*NamedHeader, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedHeader{}
- pair.Name = k
- var err error
- pair.Value, err = NewHeader(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewInfo creates an object of type Info if possible, returning an error if not.
-func NewInfo(in interface{}, context *compiler.Context) (*Info, error) {
- errors := make([]error, 0)
- x := &Info{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"title", "version"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"contact", "description", "license", "termsOfService", "title", "version"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string title = 1;
- v1 := compiler.MapValueForKey(m, "title")
- if v1 != nil {
- x.Title, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string version = 2;
- v2 := compiler.MapValueForKey(m, "version")
- if v2 != nil {
- x.Version, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for version: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 3;
- v3 := compiler.MapValueForKey(m, "description")
- if v3 != nil {
- x.Description, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string terms_of_service = 4;
- v4 := compiler.MapValueForKey(m, "termsOfService")
- if v4 != nil {
- x.TermsOfService, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for termsOfService: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Contact contact = 5;
- v5 := compiler.MapValueForKey(m, "contact")
- if v5 != nil {
- var err error
- x.Contact, err = NewContact(v5, compiler.NewContext("contact", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // License license = 6;
- v6 := compiler.MapValueForKey(m, "license")
- if v6 != nil {
- var err error
- x.License, err = NewLicense(v6, compiler.NewContext("license", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated NamedAny vendor_extension = 7;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewItemsItem creates an object of type ItemsItem if possible, returning an error if not.
-func NewItemsItem(in interface{}, context *compiler.Context) (*ItemsItem, error) {
- errors := make([]error, 0)
- x := &ItemsItem{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value for item array: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- x.Schema = make([]*Schema, 0)
- y, err := NewSchema(m, compiler.NewContext("<array>", context))
- if err != nil {
- return nil, err
- }
- x.Schema = append(x.Schema, y)
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewJsonReference creates an object of type JsonReference if possible, returning an error if not.
-func NewJsonReference(in interface{}, context *compiler.Context) (*JsonReference, error) {
- errors := make([]error, 0)
- x := &JsonReference{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"$ref"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"$ref", "description"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string _ref = 1;
- v1 := compiler.MapValueForKey(m, "$ref")
- if v1 != nil {
- x.XRef, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 2;
- v2 := compiler.MapValueForKey(m, "description")
- if v2 != nil {
- x.Description, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewLicense creates an object of type License if possible, returning an error if not.
-func NewLicense(in interface{}, context *compiler.Context) (*License, error) {
- errors := make([]error, 0)
- x := &License{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"name"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"name", "url"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string url = 2;
- v2 := compiler.MapValueForKey(m, "url")
- if v2 != nil {
- x.Url, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 3;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNamedAny creates an object of type NamedAny if possible, returning an error if not.
-func NewNamedAny(in interface{}, context *compiler.Context) (*NamedAny, error) {
- errors := make([]error, 0)
- x := &NamedAny{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"name", "value"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Any value = 2;
- v2 := compiler.MapValueForKey(m, "value")
- if v2 != nil {
- var err error
- x.Value, err = NewAny(v2, compiler.NewContext("value", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNamedHeader creates an object of type NamedHeader if possible, returning an error if not.
-func NewNamedHeader(in interface{}, context *compiler.Context) (*NamedHeader, error) {
- errors := make([]error, 0)
- x := &NamedHeader{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"name", "value"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Header value = 2;
- v2 := compiler.MapValueForKey(m, "value")
- if v2 != nil {
- var err error
- x.Value, err = NewHeader(v2, compiler.NewContext("value", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNamedParameter creates an object of type NamedParameter if possible, returning an error if not.
-func NewNamedParameter(in interface{}, context *compiler.Context) (*NamedParameter, error) {
- errors := make([]error, 0)
- x := &NamedParameter{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"name", "value"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Parameter value = 2;
- v2 := compiler.MapValueForKey(m, "value")
- if v2 != nil {
- var err error
- x.Value, err = NewParameter(v2, compiler.NewContext("value", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNamedPathItem creates an object of type NamedPathItem if possible, returning an error if not.
-func NewNamedPathItem(in interface{}, context *compiler.Context) (*NamedPathItem, error) {
- errors := make([]error, 0)
- x := &NamedPathItem{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"name", "value"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // PathItem value = 2;
- v2 := compiler.MapValueForKey(m, "value")
- if v2 != nil {
- var err error
- x.Value, err = NewPathItem(v2, compiler.NewContext("value", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNamedResponse creates an object of type NamedResponse if possible, returning an error if not.
-func NewNamedResponse(in interface{}, context *compiler.Context) (*NamedResponse, error) {
- errors := make([]error, 0)
- x := &NamedResponse{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"name", "value"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Response value = 2;
- v2 := compiler.MapValueForKey(m, "value")
- if v2 != nil {
- var err error
- x.Value, err = NewResponse(v2, compiler.NewContext("value", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNamedResponseValue creates an object of type NamedResponseValue if possible, returning an error if not.
-func NewNamedResponseValue(in interface{}, context *compiler.Context) (*NamedResponseValue, error) {
- errors := make([]error, 0)
- x := &NamedResponseValue{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"name", "value"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // ResponseValue value = 2;
- v2 := compiler.MapValueForKey(m, "value")
- if v2 != nil {
- var err error
- x.Value, err = NewResponseValue(v2, compiler.NewContext("value", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNamedSchema creates an object of type NamedSchema if possible, returning an error if not.
-func NewNamedSchema(in interface{}, context *compiler.Context) (*NamedSchema, error) {
- errors := make([]error, 0)
- x := &NamedSchema{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"name", "value"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Schema value = 2;
- v2 := compiler.MapValueForKey(m, "value")
- if v2 != nil {
- var err error
- x.Value, err = NewSchema(v2, compiler.NewContext("value", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNamedSecurityDefinitionsItem creates an object of type NamedSecurityDefinitionsItem if possible, returning an error if not.
-func NewNamedSecurityDefinitionsItem(in interface{}, context *compiler.Context) (*NamedSecurityDefinitionsItem, error) {
- errors := make([]error, 0)
- x := &NamedSecurityDefinitionsItem{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"name", "value"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // SecurityDefinitionsItem value = 2;
- v2 := compiler.MapValueForKey(m, "value")
- if v2 != nil {
- var err error
- x.Value, err = NewSecurityDefinitionsItem(v2, compiler.NewContext("value", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNamedString creates an object of type NamedString if possible, returning an error if not.
-func NewNamedString(in interface{}, context *compiler.Context) (*NamedString, error) {
- errors := make([]error, 0)
- x := &NamedString{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"name", "value"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string value = 2;
- v2 := compiler.MapValueForKey(m, "value")
- if v2 != nil {
- x.Value, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for value: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNamedStringArray creates an object of type NamedStringArray if possible, returning an error if not.
-func NewNamedStringArray(in interface{}, context *compiler.Context) (*NamedStringArray, error) {
- errors := make([]error, 0)
- x := &NamedStringArray{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"name", "value"}
- var allowedPatterns []*regexp.Regexp
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // StringArray value = 2;
- v2 := compiler.MapValueForKey(m, "value")
- if v2 != nil {
- var err error
- x.Value, err = NewStringArray(v2, compiler.NewContext("value", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewNonBodyParameter creates an object of type NonBodyParameter if possible, returning an error if not.
-func NewNonBodyParameter(in interface{}, context *compiler.Context) (*NonBodyParameter, error) {
- errors := make([]error, 0)
- x := &NonBodyParameter{}
- matched := false
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"in", "name", "type"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // HeaderParameterSubSchema header_parameter_sub_schema = 1;
- {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewHeaderParameterSubSchema(m, compiler.NewContext("headerParameterSubSchema", context))
- if matchingError == nil {
- x.Oneof = &NonBodyParameter_HeaderParameterSubSchema{HeaderParameterSubSchema: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- // FormDataParameterSubSchema form_data_parameter_sub_schema = 2;
- {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewFormDataParameterSubSchema(m, compiler.NewContext("formDataParameterSubSchema", context))
- if matchingError == nil {
- x.Oneof = &NonBodyParameter_FormDataParameterSubSchema{FormDataParameterSubSchema: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- // QueryParameterSubSchema query_parameter_sub_schema = 3;
- {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewQueryParameterSubSchema(m, compiler.NewContext("queryParameterSubSchema", context))
- if matchingError == nil {
- x.Oneof = &NonBodyParameter_QueryParameterSubSchema{QueryParameterSubSchema: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- // PathParameterSubSchema path_parameter_sub_schema = 4;
- {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewPathParameterSubSchema(m, compiler.NewContext("pathParameterSubSchema", context))
- if matchingError == nil {
- x.Oneof = &NonBodyParameter_PathParameterSubSchema{PathParameterSubSchema: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- if matched {
- // since the oneof matched one of its possibilities, discard any matching errors
- errors = make([]error, 0)
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewOauth2AccessCodeSecurity creates an object of type Oauth2AccessCodeSecurity if possible, returning an error if not.
-func NewOauth2AccessCodeSecurity(in interface{}, context *compiler.Context) (*Oauth2AccessCodeSecurity, error) {
- errors := make([]error, 0)
- x := &Oauth2AccessCodeSecurity{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"authorizationUrl", "flow", "tokenUrl", "type"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"authorizationUrl", "description", "flow", "scopes", "tokenUrl", "type"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string type = 1;
- v1 := compiler.MapValueForKey(m, "type")
- if v1 != nil {
- x.Type, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [oauth2]
- if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string flow = 2;
- v2 := compiler.MapValueForKey(m, "flow")
- if v2 != nil {
- x.Flow, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [accessCode]
- if ok && !compiler.StringArrayContainsValue([]string{"accessCode"}, x.Flow) {
- message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Oauth2Scopes scopes = 3;
- v3 := compiler.MapValueForKey(m, "scopes")
- if v3 != nil {
- var err error
- x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string authorization_url = 4;
- v4 := compiler.MapValueForKey(m, "authorizationUrl")
- if v4 != nil {
- x.AuthorizationUrl, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for authorizationUrl: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string token_url = 5;
- v5 := compiler.MapValueForKey(m, "tokenUrl")
- if v5 != nil {
- x.TokenUrl, ok = v5.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for tokenUrl: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 6;
- v6 := compiler.MapValueForKey(m, "description")
- if v6 != nil {
- x.Description, ok = v6.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 7;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewOauth2ApplicationSecurity creates an object of type Oauth2ApplicationSecurity if possible, returning an error if not.
-func NewOauth2ApplicationSecurity(in interface{}, context *compiler.Context) (*Oauth2ApplicationSecurity, error) {
- errors := make([]error, 0)
- x := &Oauth2ApplicationSecurity{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"flow", "tokenUrl", "type"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"description", "flow", "scopes", "tokenUrl", "type"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string type = 1;
- v1 := compiler.MapValueForKey(m, "type")
- if v1 != nil {
- x.Type, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [oauth2]
- if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string flow = 2;
- v2 := compiler.MapValueForKey(m, "flow")
- if v2 != nil {
- x.Flow, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [application]
- if ok && !compiler.StringArrayContainsValue([]string{"application"}, x.Flow) {
- message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Oauth2Scopes scopes = 3;
- v3 := compiler.MapValueForKey(m, "scopes")
- if v3 != nil {
- var err error
- x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string token_url = 4;
- v4 := compiler.MapValueForKey(m, "tokenUrl")
- if v4 != nil {
- x.TokenUrl, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for tokenUrl: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 5;
- v5 := compiler.MapValueForKey(m, "description")
- if v5 != nil {
- x.Description, ok = v5.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 6;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewOauth2ImplicitSecurity creates an object of type Oauth2ImplicitSecurity if possible, returning an error if not.
-func NewOauth2ImplicitSecurity(in interface{}, context *compiler.Context) (*Oauth2ImplicitSecurity, error) {
- errors := make([]error, 0)
- x := &Oauth2ImplicitSecurity{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"authorizationUrl", "flow", "type"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"authorizationUrl", "description", "flow", "scopes", "type"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string type = 1;
- v1 := compiler.MapValueForKey(m, "type")
- if v1 != nil {
- x.Type, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [oauth2]
- if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string flow = 2;
- v2 := compiler.MapValueForKey(m, "flow")
- if v2 != nil {
- x.Flow, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [implicit]
- if ok && !compiler.StringArrayContainsValue([]string{"implicit"}, x.Flow) {
- message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Oauth2Scopes scopes = 3;
- v3 := compiler.MapValueForKey(m, "scopes")
- if v3 != nil {
- var err error
- x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string authorization_url = 4;
- v4 := compiler.MapValueForKey(m, "authorizationUrl")
- if v4 != nil {
- x.AuthorizationUrl, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for authorizationUrl: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 5;
- v5 := compiler.MapValueForKey(m, "description")
- if v5 != nil {
- x.Description, ok = v5.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 6;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewOauth2PasswordSecurity creates an object of type Oauth2PasswordSecurity if possible, returning an error if not.
-func NewOauth2PasswordSecurity(in interface{}, context *compiler.Context) (*Oauth2PasswordSecurity, error) {
- errors := make([]error, 0)
- x := &Oauth2PasswordSecurity{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"flow", "tokenUrl", "type"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"description", "flow", "scopes", "tokenUrl", "type"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string type = 1;
- v1 := compiler.MapValueForKey(m, "type")
- if v1 != nil {
- x.Type, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [oauth2]
- if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string flow = 2;
- v2 := compiler.MapValueForKey(m, "flow")
- if v2 != nil {
- x.Flow, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [password]
- if ok && !compiler.StringArrayContainsValue([]string{"password"}, x.Flow) {
- message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Oauth2Scopes scopes = 3;
- v3 := compiler.MapValueForKey(m, "scopes")
- if v3 != nil {
- var err error
- x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string token_url = 4;
- v4 := compiler.MapValueForKey(m, "tokenUrl")
- if v4 != nil {
- x.TokenUrl, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for tokenUrl: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 5;
- v5 := compiler.MapValueForKey(m, "description")
- if v5 != nil {
- x.Description, ok = v5.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 6;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewOauth2Scopes creates an object of type Oauth2Scopes if possible, returning an error if not.
-func NewOauth2Scopes(in interface{}, context *compiler.Context) (*Oauth2Scopes, error) {
- errors := make([]error, 0)
- x := &Oauth2Scopes{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedString additional_properties = 1;
- // MAP: string
- x.AdditionalProperties = make([]*NamedString, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedString{}
- pair.Name = k
- pair.Value = v.(string)
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewOperation creates an object of type Operation if possible, returning an error if not.
-func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) {
- errors := make([]error, 0)
- x := &Operation{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"responses"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"consumes", "deprecated", "description", "externalDocs", "operationId", "parameters", "produces", "responses", "schemes", "security", "summary", "tags"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // repeated string tags = 1;
- v1 := compiler.MapValueForKey(m, "tags")
- if v1 != nil {
- v, ok := v1.([]interface{})
- if ok {
- x.Tags = compiler.ConvertInterfaceArrayToStringArray(v)
- } else {
- message := fmt.Sprintf("has unexpected value for tags: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string summary = 2;
- v2 := compiler.MapValueForKey(m, "summary")
- if v2 != nil {
- x.Summary, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for summary: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 3;
- v3 := compiler.MapValueForKey(m, "description")
- if v3 != nil {
- x.Description, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // ExternalDocs external_docs = 4;
- v4 := compiler.MapValueForKey(m, "externalDocs")
- if v4 != nil {
- var err error
- x.ExternalDocs, err = NewExternalDocs(v4, compiler.NewContext("externalDocs", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string operation_id = 5;
- v5 := compiler.MapValueForKey(m, "operationId")
- if v5 != nil {
- x.OperationId, ok = v5.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for operationId: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated string produces = 6;
- v6 := compiler.MapValueForKey(m, "produces")
- if v6 != nil {
- v, ok := v6.([]interface{})
- if ok {
- x.Produces = compiler.ConvertInterfaceArrayToStringArray(v)
- } else {
- message := fmt.Sprintf("has unexpected value for produces: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated string consumes = 7;
- v7 := compiler.MapValueForKey(m, "consumes")
- if v7 != nil {
- v, ok := v7.([]interface{})
- if ok {
- x.Consumes = compiler.ConvertInterfaceArrayToStringArray(v)
- } else {
- message := fmt.Sprintf("has unexpected value for consumes: %+v (%T)", v7, v7)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated ParametersItem parameters = 8;
- v8 := compiler.MapValueForKey(m, "parameters")
- if v8 != nil {
- // repeated ParametersItem
- x.Parameters = make([]*ParametersItem, 0)
- a, ok := v8.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewParametersItem(item, compiler.NewContext("parameters", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Parameters = append(x.Parameters, y)
- }
- }
- }
- // Responses responses = 9;
- v9 := compiler.MapValueForKey(m, "responses")
- if v9 != nil {
- var err error
- x.Responses, err = NewResponses(v9, compiler.NewContext("responses", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated string schemes = 10;
- v10 := compiler.MapValueForKey(m, "schemes")
- if v10 != nil {
- v, ok := v10.([]interface{})
- if ok {
- x.Schemes = compiler.ConvertInterfaceArrayToStringArray(v)
- } else {
- message := fmt.Sprintf("has unexpected value for schemes: %+v (%T)", v10, v10)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [http https ws wss]
- if ok && !compiler.StringArrayContainsValues([]string{"http", "https", "ws", "wss"}, x.Schemes) {
- message := fmt.Sprintf("has unexpected value for schemes: %+v", v10)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool deprecated = 11;
- v11 := compiler.MapValueForKey(m, "deprecated")
- if v11 != nil {
- x.Deprecated, ok = v11.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for deprecated: %+v (%T)", v11, v11)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated SecurityRequirement security = 12;
- v12 := compiler.MapValueForKey(m, "security")
- if v12 != nil {
- // repeated SecurityRequirement
- x.Security = make([]*SecurityRequirement, 0)
- a, ok := v12.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewSecurityRequirement(item, compiler.NewContext("security", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Security = append(x.Security, y)
- }
- }
- }
- // repeated NamedAny vendor_extension = 13;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewParameter creates an object of type Parameter if possible, returning an error if not.
-func NewParameter(in interface{}, context *compiler.Context) (*Parameter, error) {
- errors := make([]error, 0)
- x := &Parameter{}
- matched := false
- // BodyParameter body_parameter = 1;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewBodyParameter(m, compiler.NewContext("bodyParameter", context))
- if matchingError == nil {
- x.Oneof = &Parameter_BodyParameter{BodyParameter: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- // NonBodyParameter non_body_parameter = 2;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewNonBodyParameter(m, compiler.NewContext("nonBodyParameter", context))
- if matchingError == nil {
- x.Oneof = &Parameter_NonBodyParameter{NonBodyParameter: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- if matched {
- // since the oneof matched one of its possibilities, discard any matching errors
- errors = make([]error, 0)
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewParameterDefinitions creates an object of type ParameterDefinitions if possible, returning an error if not.
-func NewParameterDefinitions(in interface{}, context *compiler.Context) (*ParameterDefinitions, error) {
- errors := make([]error, 0)
- x := &ParameterDefinitions{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedParameter additional_properties = 1;
- // MAP: Parameter
- x.AdditionalProperties = make([]*NamedParameter, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedParameter{}
- pair.Name = k
- var err error
- pair.Value, err = NewParameter(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewParametersItem creates an object of type ParametersItem if possible, returning an error if not.
-func NewParametersItem(in interface{}, context *compiler.Context) (*ParametersItem, error) {
- errors := make([]error, 0)
- x := &ParametersItem{}
- matched := false
- // Parameter parameter = 1;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewParameter(m, compiler.NewContext("parameter", context))
- if matchingError == nil {
- x.Oneof = &ParametersItem_Parameter{Parameter: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- // JsonReference json_reference = 2;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewJsonReference(m, compiler.NewContext("jsonReference", context))
- if matchingError == nil {
- x.Oneof = &ParametersItem_JsonReference{JsonReference: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- if matched {
- // since the oneof matched one of its possibilities, discard any matching errors
- errors = make([]error, 0)
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewPathItem creates an object of type PathItem if possible, returning an error if not.
-func NewPathItem(in interface{}, context *compiler.Context) (*PathItem, error) {
- errors := make([]error, 0)
- x := &PathItem{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"$ref", "delete", "get", "head", "options", "parameters", "patch", "post", "put"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string _ref = 1;
- v1 := compiler.MapValueForKey(m, "$ref")
- if v1 != nil {
- x.XRef, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Operation get = 2;
- v2 := compiler.MapValueForKey(m, "get")
- if v2 != nil {
- var err error
- x.Get, err = NewOperation(v2, compiler.NewContext("get", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Operation put = 3;
- v3 := compiler.MapValueForKey(m, "put")
- if v3 != nil {
- var err error
- x.Put, err = NewOperation(v3, compiler.NewContext("put", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Operation post = 4;
- v4 := compiler.MapValueForKey(m, "post")
- if v4 != nil {
- var err error
- x.Post, err = NewOperation(v4, compiler.NewContext("post", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Operation delete = 5;
- v5 := compiler.MapValueForKey(m, "delete")
- if v5 != nil {
- var err error
- x.Delete, err = NewOperation(v5, compiler.NewContext("delete", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Operation options = 6;
- v6 := compiler.MapValueForKey(m, "options")
- if v6 != nil {
- var err error
- x.Options, err = NewOperation(v6, compiler.NewContext("options", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Operation head = 7;
- v7 := compiler.MapValueForKey(m, "head")
- if v7 != nil {
- var err error
- x.Head, err = NewOperation(v7, compiler.NewContext("head", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Operation patch = 8;
- v8 := compiler.MapValueForKey(m, "patch")
- if v8 != nil {
- var err error
- x.Patch, err = NewOperation(v8, compiler.NewContext("patch", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated ParametersItem parameters = 9;
- v9 := compiler.MapValueForKey(m, "parameters")
- if v9 != nil {
- // repeated ParametersItem
- x.Parameters = make([]*ParametersItem, 0)
- a, ok := v9.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewParametersItem(item, compiler.NewContext("parameters", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Parameters = append(x.Parameters, y)
- }
- }
- }
- // repeated NamedAny vendor_extension = 10;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewPathParameterSubSchema creates an object of type PathParameterSubSchema if possible, returning an error if not.
-func NewPathParameterSubSchema(in interface{}, context *compiler.Context) (*PathParameterSubSchema, error) {
- errors := make([]error, 0)
- x := &PathParameterSubSchema{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"required"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // bool required = 1;
- v1 := compiler.MapValueForKey(m, "required")
- if v1 != nil {
- x.Required, ok = v1.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string in = 2;
- v2 := compiler.MapValueForKey(m, "in")
- if v2 != nil {
- x.In, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [path]
- if ok && !compiler.StringArrayContainsValue([]string{"path"}, x.In) {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 3;
- v3 := compiler.MapValueForKey(m, "description")
- if v3 != nil {
- x.Description, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string name = 4;
- v4 := compiler.MapValueForKey(m, "name")
- if v4 != nil {
- x.Name, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string type = 5;
- v5 := compiler.MapValueForKey(m, "type")
- if v5 != nil {
- x.Type, ok = v5.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [string number boolean integer array]
- if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string format = 6;
- v6 := compiler.MapValueForKey(m, "format")
- if v6 != nil {
- x.Format, ok = v6.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // PrimitivesItems items = 7;
- v7 := compiler.MapValueForKey(m, "items")
- if v7 != nil {
- var err error
- x.Items, err = NewPrimitivesItems(v7, compiler.NewContext("items", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string collection_format = 8;
- v8 := compiler.MapValueForKey(m, "collectionFormat")
- if v8 != nil {
- x.CollectionFormat, ok = v8.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [csv ssv tsv pipes]
- if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Any default = 9;
- v9 := compiler.MapValueForKey(m, "default")
- if v9 != nil {
- var err error
- x.Default, err = NewAny(v9, compiler.NewContext("default", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // float maximum = 10;
- v10 := compiler.MapValueForKey(m, "maximum")
- if v10 != nil {
- switch v10 := v10.(type) {
- case float64:
- x.Maximum = v10
- case float32:
- x.Maximum = float64(v10)
- case uint64:
- x.Maximum = float64(v10)
- case uint32:
- x.Maximum = float64(v10)
- case int64:
- x.Maximum = float64(v10)
- case int32:
- x.Maximum = float64(v10)
- case int:
- x.Maximum = float64(v10)
- default:
- message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v10, v10)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_maximum = 11;
- v11 := compiler.MapValueForKey(m, "exclusiveMaximum")
- if v11 != nil {
- x.ExclusiveMaximum, ok = v11.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v11, v11)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // float minimum = 12;
- v12 := compiler.MapValueForKey(m, "minimum")
- if v12 != nil {
- switch v12 := v12.(type) {
- case float64:
- x.Minimum = v12
- case float32:
- x.Minimum = float64(v12)
- case uint64:
- x.Minimum = float64(v12)
- case uint32:
- x.Minimum = float64(v12)
- case int64:
- x.Minimum = float64(v12)
- case int32:
- x.Minimum = float64(v12)
- case int:
- x.Minimum = float64(v12)
- default:
- message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v12, v12)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_minimum = 13;
- v13 := compiler.MapValueForKey(m, "exclusiveMinimum")
- if v13 != nil {
- x.ExclusiveMinimum, ok = v13.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v13, v13)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_length = 14;
- v14 := compiler.MapValueForKey(m, "maxLength")
- if v14 != nil {
- t, ok := v14.(int)
- if ok {
- x.MaxLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v14, v14)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_length = 15;
- v15 := compiler.MapValueForKey(m, "minLength")
- if v15 != nil {
- t, ok := v15.(int)
- if ok {
- x.MinLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v15, v15)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string pattern = 16;
- v16 := compiler.MapValueForKey(m, "pattern")
- if v16 != nil {
- x.Pattern, ok = v16.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v16, v16)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_items = 17;
- v17 := compiler.MapValueForKey(m, "maxItems")
- if v17 != nil {
- t, ok := v17.(int)
- if ok {
- x.MaxItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v17, v17)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_items = 18;
- v18 := compiler.MapValueForKey(m, "minItems")
- if v18 != nil {
- t, ok := v18.(int)
- if ok {
- x.MinItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v18, v18)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool unique_items = 19;
- v19 := compiler.MapValueForKey(m, "uniqueItems")
- if v19 != nil {
- x.UniqueItems, ok = v19.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v19, v19)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated Any enum = 20;
- v20 := compiler.MapValueForKey(m, "enum")
- if v20 != nil {
- // repeated Any
- x.Enum = make([]*Any, 0)
- a, ok := v20.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewAny(item, compiler.NewContext("enum", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Enum = append(x.Enum, y)
- }
- }
- }
- // float multiple_of = 21;
- v21 := compiler.MapValueForKey(m, "multipleOf")
- if v21 != nil {
- switch v21 := v21.(type) {
- case float64:
- x.MultipleOf = v21
- case float32:
- x.MultipleOf = float64(v21)
- case uint64:
- x.MultipleOf = float64(v21)
- case uint32:
- x.MultipleOf = float64(v21)
- case int64:
- x.MultipleOf = float64(v21)
- case int32:
- x.MultipleOf = float64(v21)
- case int:
- x.MultipleOf = float64(v21)
- default:
- message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v21, v21)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 22;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewPaths creates an object of type Paths if possible, returning an error if not.
-func NewPaths(in interface{}, context *compiler.Context) (*Paths, error) {
- errors := make([]error, 0)
- x := &Paths{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{}
- allowedPatterns := []*regexp.Regexp{pattern0, pattern1}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // repeated NamedAny vendor_extension = 1;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- // repeated NamedPathItem path = 2;
- // MAP: PathItem ^/
- x.Path = make([]*NamedPathItem, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "/") {
- pair := &NamedPathItem{}
- pair.Name = k
- var err error
- pair.Value, err = NewPathItem(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Path = append(x.Path, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewPrimitivesItems creates an object of type PrimitivesItems if possible, returning an error if not.
-func NewPrimitivesItems(in interface{}, context *compiler.Context) (*PrimitivesItems, error) {
- errors := make([]error, 0)
- x := &PrimitivesItems{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"collectionFormat", "default", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "pattern", "type", "uniqueItems"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string type = 1;
- v1 := compiler.MapValueForKey(m, "type")
- if v1 != nil {
- x.Type, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [string number integer boolean array]
- if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "integer", "boolean", "array"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string format = 2;
- v2 := compiler.MapValueForKey(m, "format")
- if v2 != nil {
- x.Format, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // PrimitivesItems items = 3;
- v3 := compiler.MapValueForKey(m, "items")
- if v3 != nil {
- var err error
- x.Items, err = NewPrimitivesItems(v3, compiler.NewContext("items", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string collection_format = 4;
- v4 := compiler.MapValueForKey(m, "collectionFormat")
- if v4 != nil {
- x.CollectionFormat, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [csv ssv tsv pipes]
- if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Any default = 5;
- v5 := compiler.MapValueForKey(m, "default")
- if v5 != nil {
- var err error
- x.Default, err = NewAny(v5, compiler.NewContext("default", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // float maximum = 6;
- v6 := compiler.MapValueForKey(m, "maximum")
- if v6 != nil {
- switch v6 := v6.(type) {
- case float64:
- x.Maximum = v6
- case float32:
- x.Maximum = float64(v6)
- case uint64:
- x.Maximum = float64(v6)
- case uint32:
- x.Maximum = float64(v6)
- case int64:
- x.Maximum = float64(v6)
- case int32:
- x.Maximum = float64(v6)
- case int:
- x.Maximum = float64(v6)
- default:
- message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_maximum = 7;
- v7 := compiler.MapValueForKey(m, "exclusiveMaximum")
- if v7 != nil {
- x.ExclusiveMaximum, ok = v7.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v7, v7)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // float minimum = 8;
- v8 := compiler.MapValueForKey(m, "minimum")
- if v8 != nil {
- switch v8 := v8.(type) {
- case float64:
- x.Minimum = v8
- case float32:
- x.Minimum = float64(v8)
- case uint64:
- x.Minimum = float64(v8)
- case uint32:
- x.Minimum = float64(v8)
- case int64:
- x.Minimum = float64(v8)
- case int32:
- x.Minimum = float64(v8)
- case int:
- x.Minimum = float64(v8)
- default:
- message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v8, v8)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_minimum = 9;
- v9 := compiler.MapValueForKey(m, "exclusiveMinimum")
- if v9 != nil {
- x.ExclusiveMinimum, ok = v9.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v9, v9)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_length = 10;
- v10 := compiler.MapValueForKey(m, "maxLength")
- if v10 != nil {
- t, ok := v10.(int)
- if ok {
- x.MaxLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v10, v10)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_length = 11;
- v11 := compiler.MapValueForKey(m, "minLength")
- if v11 != nil {
- t, ok := v11.(int)
- if ok {
- x.MinLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v11, v11)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string pattern = 12;
- v12 := compiler.MapValueForKey(m, "pattern")
- if v12 != nil {
- x.Pattern, ok = v12.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v12, v12)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_items = 13;
- v13 := compiler.MapValueForKey(m, "maxItems")
- if v13 != nil {
- t, ok := v13.(int)
- if ok {
- x.MaxItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v13, v13)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_items = 14;
- v14 := compiler.MapValueForKey(m, "minItems")
- if v14 != nil {
- t, ok := v14.(int)
- if ok {
- x.MinItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v14, v14)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool unique_items = 15;
- v15 := compiler.MapValueForKey(m, "uniqueItems")
- if v15 != nil {
- x.UniqueItems, ok = v15.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v15, v15)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated Any enum = 16;
- v16 := compiler.MapValueForKey(m, "enum")
- if v16 != nil {
- // repeated Any
- x.Enum = make([]*Any, 0)
- a, ok := v16.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewAny(item, compiler.NewContext("enum", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Enum = append(x.Enum, y)
- }
- }
- }
- // float multiple_of = 17;
- v17 := compiler.MapValueForKey(m, "multipleOf")
- if v17 != nil {
- switch v17 := v17.(type) {
- case float64:
- x.MultipleOf = v17
- case float32:
- x.MultipleOf = float64(v17)
- case uint64:
- x.MultipleOf = float64(v17)
- case uint32:
- x.MultipleOf = float64(v17)
- case int64:
- x.MultipleOf = float64(v17)
- case int32:
- x.MultipleOf = float64(v17)
- case int:
- x.MultipleOf = float64(v17)
- default:
- message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v17, v17)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 18;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewProperties creates an object of type Properties if possible, returning an error if not.
-func NewProperties(in interface{}, context *compiler.Context) (*Properties, error) {
- errors := make([]error, 0)
- x := &Properties{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedSchema additional_properties = 1;
- // MAP: Schema
- x.AdditionalProperties = make([]*NamedSchema, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedSchema{}
- pair.Name = k
- var err error
- pair.Value, err = NewSchema(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewQueryParameterSubSchema creates an object of type QueryParameterSubSchema if possible, returning an error if not.
-func NewQueryParameterSubSchema(in interface{}, context *compiler.Context) (*QueryParameterSubSchema, error) {
- errors := make([]error, 0)
- x := &QueryParameterSubSchema{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"allowEmptyValue", "collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // bool required = 1;
- v1 := compiler.MapValueForKey(m, "required")
- if v1 != nil {
- x.Required, ok = v1.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string in = 2;
- v2 := compiler.MapValueForKey(m, "in")
- if v2 != nil {
- x.In, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [query]
- if ok && !compiler.StringArrayContainsValue([]string{"query"}, x.In) {
- message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 3;
- v3 := compiler.MapValueForKey(m, "description")
- if v3 != nil {
- x.Description, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string name = 4;
- v4 := compiler.MapValueForKey(m, "name")
- if v4 != nil {
- x.Name, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool allow_empty_value = 5;
- v5 := compiler.MapValueForKey(m, "allowEmptyValue")
- if v5 != nil {
- x.AllowEmptyValue, ok = v5.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for allowEmptyValue: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string type = 6;
- v6 := compiler.MapValueForKey(m, "type")
- if v6 != nil {
- x.Type, ok = v6.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [string number boolean integer array]
- if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) {
- message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string format = 7;
- v7 := compiler.MapValueForKey(m, "format")
- if v7 != nil {
- x.Format, ok = v7.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v7, v7)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // PrimitivesItems items = 8;
- v8 := compiler.MapValueForKey(m, "items")
- if v8 != nil {
- var err error
- x.Items, err = NewPrimitivesItems(v8, compiler.NewContext("items", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string collection_format = 9;
- v9 := compiler.MapValueForKey(m, "collectionFormat")
- if v9 != nil {
- x.CollectionFormat, ok = v9.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9)
- errors = append(errors, compiler.NewError(context, message))
- }
- // check for valid enum values
- // [csv ssv tsv pipes multi]
- if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes", "multi"}, x.CollectionFormat) {
- message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Any default = 10;
- v10 := compiler.MapValueForKey(m, "default")
- if v10 != nil {
- var err error
- x.Default, err = NewAny(v10, compiler.NewContext("default", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // float maximum = 11;
- v11 := compiler.MapValueForKey(m, "maximum")
- if v11 != nil {
- switch v11 := v11.(type) {
- case float64:
- x.Maximum = v11
- case float32:
- x.Maximum = float64(v11)
- case uint64:
- x.Maximum = float64(v11)
- case uint32:
- x.Maximum = float64(v11)
- case int64:
- x.Maximum = float64(v11)
- case int32:
- x.Maximum = float64(v11)
- case int:
- x.Maximum = float64(v11)
- default:
- message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v11, v11)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_maximum = 12;
- v12 := compiler.MapValueForKey(m, "exclusiveMaximum")
- if v12 != nil {
- x.ExclusiveMaximum, ok = v12.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v12, v12)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // float minimum = 13;
- v13 := compiler.MapValueForKey(m, "minimum")
- if v13 != nil {
- switch v13 := v13.(type) {
- case float64:
- x.Minimum = v13
- case float32:
- x.Minimum = float64(v13)
- case uint64:
- x.Minimum = float64(v13)
- case uint32:
- x.Minimum = float64(v13)
- case int64:
- x.Minimum = float64(v13)
- case int32:
- x.Minimum = float64(v13)
- case int:
- x.Minimum = float64(v13)
- default:
- message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v13, v13)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_minimum = 14;
- v14 := compiler.MapValueForKey(m, "exclusiveMinimum")
- if v14 != nil {
- x.ExclusiveMinimum, ok = v14.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v14, v14)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_length = 15;
- v15 := compiler.MapValueForKey(m, "maxLength")
- if v15 != nil {
- t, ok := v15.(int)
- if ok {
- x.MaxLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v15, v15)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_length = 16;
- v16 := compiler.MapValueForKey(m, "minLength")
- if v16 != nil {
- t, ok := v16.(int)
- if ok {
- x.MinLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v16, v16)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string pattern = 17;
- v17 := compiler.MapValueForKey(m, "pattern")
- if v17 != nil {
- x.Pattern, ok = v17.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v17, v17)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_items = 18;
- v18 := compiler.MapValueForKey(m, "maxItems")
- if v18 != nil {
- t, ok := v18.(int)
- if ok {
- x.MaxItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v18, v18)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_items = 19;
- v19 := compiler.MapValueForKey(m, "minItems")
- if v19 != nil {
- t, ok := v19.(int)
- if ok {
- x.MinItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v19, v19)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool unique_items = 20;
- v20 := compiler.MapValueForKey(m, "uniqueItems")
- if v20 != nil {
- x.UniqueItems, ok = v20.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v20, v20)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated Any enum = 21;
- v21 := compiler.MapValueForKey(m, "enum")
- if v21 != nil {
- // repeated Any
- x.Enum = make([]*Any, 0)
- a, ok := v21.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewAny(item, compiler.NewContext("enum", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Enum = append(x.Enum, y)
- }
- }
- }
- // float multiple_of = 22;
- v22 := compiler.MapValueForKey(m, "multipleOf")
- if v22 != nil {
- switch v22 := v22.(type) {
- case float64:
- x.MultipleOf = v22
- case float32:
- x.MultipleOf = float64(v22)
- case uint64:
- x.MultipleOf = float64(v22)
- case uint32:
- x.MultipleOf = float64(v22)
- case int64:
- x.MultipleOf = float64(v22)
- case int32:
- x.MultipleOf = float64(v22)
- case int:
- x.MultipleOf = float64(v22)
- default:
- message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v22, v22)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 23;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewResponse creates an object of type Response if possible, returning an error if not.
-func NewResponse(in interface{}, context *compiler.Context) (*Response, error) {
- errors := make([]error, 0)
- x := &Response{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"description"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"description", "examples", "headers", "schema"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string description = 1;
- v1 := compiler.MapValueForKey(m, "description")
- if v1 != nil {
- x.Description, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // SchemaItem schema = 2;
- v2 := compiler.MapValueForKey(m, "schema")
- if v2 != nil {
- var err error
- x.Schema, err = NewSchemaItem(v2, compiler.NewContext("schema", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Headers headers = 3;
- v3 := compiler.MapValueForKey(m, "headers")
- if v3 != nil {
- var err error
- x.Headers, err = NewHeaders(v3, compiler.NewContext("headers", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Examples examples = 4;
- v4 := compiler.MapValueForKey(m, "examples")
- if v4 != nil {
- var err error
- x.Examples, err = NewExamples(v4, compiler.NewContext("examples", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated NamedAny vendor_extension = 5;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewResponseDefinitions creates an object of type ResponseDefinitions if possible, returning an error if not.
-func NewResponseDefinitions(in interface{}, context *compiler.Context) (*ResponseDefinitions, error) {
- errors := make([]error, 0)
- x := &ResponseDefinitions{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedResponse additional_properties = 1;
- // MAP: Response
- x.AdditionalProperties = make([]*NamedResponse, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedResponse{}
- pair.Name = k
- var err error
- pair.Value, err = NewResponse(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewResponseValue creates an object of type ResponseValue if possible, returning an error if not.
-func NewResponseValue(in interface{}, context *compiler.Context) (*ResponseValue, error) {
- errors := make([]error, 0)
- x := &ResponseValue{}
- matched := false
- // Response response = 1;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewResponse(m, compiler.NewContext("response", context))
- if matchingError == nil {
- x.Oneof = &ResponseValue_Response{Response: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- // JsonReference json_reference = 2;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewJsonReference(m, compiler.NewContext("jsonReference", context))
- if matchingError == nil {
- x.Oneof = &ResponseValue_JsonReference{JsonReference: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- if matched {
- // since the oneof matched one of its possibilities, discard any matching errors
- errors = make([]error, 0)
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewResponses creates an object of type Responses if possible, returning an error if not.
-func NewResponses(in interface{}, context *compiler.Context) (*Responses, error) {
- errors := make([]error, 0)
- x := &Responses{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{}
- allowedPatterns := []*regexp.Regexp{pattern2, pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // repeated NamedResponseValue response_code = 1;
- // MAP: ResponseValue ^([0-9]{3})$|^(default)$
- x.ResponseCode = make([]*NamedResponseValue, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if pattern2.MatchString(k) {
- pair := &NamedResponseValue{}
- pair.Name = k
- var err error
- pair.Value, err = NewResponseValue(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- x.ResponseCode = append(x.ResponseCode, pair)
- }
- }
- }
- // repeated NamedAny vendor_extension = 2;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewSchema creates an object of type Schema if possible, returning an error if not.
-func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) {
- errors := make([]error, 0)
- x := &Schema{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"$ref", "additionalProperties", "allOf", "default", "description", "discriminator", "enum", "example", "exclusiveMaximum", "exclusiveMinimum", "externalDocs", "format", "items", "maxItems", "maxLength", "maxProperties", "maximum", "minItems", "minLength", "minProperties", "minimum", "multipleOf", "pattern", "properties", "readOnly", "required", "title", "type", "uniqueItems", "xml"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string _ref = 1;
- v1 := compiler.MapValueForKey(m, "$ref")
- if v1 != nil {
- x.XRef, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string format = 2;
- v2 := compiler.MapValueForKey(m, "format")
- if v2 != nil {
- x.Format, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string title = 3;
- v3 := compiler.MapValueForKey(m, "title")
- if v3 != nil {
- x.Title, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 4;
- v4 := compiler.MapValueForKey(m, "description")
- if v4 != nil {
- x.Description, ok = v4.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Any default = 5;
- v5 := compiler.MapValueForKey(m, "default")
- if v5 != nil {
- var err error
- x.Default, err = NewAny(v5, compiler.NewContext("default", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // float multiple_of = 6;
- v6 := compiler.MapValueForKey(m, "multipleOf")
- if v6 != nil {
- switch v6 := v6.(type) {
- case float64:
- x.MultipleOf = v6
- case float32:
- x.MultipleOf = float64(v6)
- case uint64:
- x.MultipleOf = float64(v6)
- case uint32:
- x.MultipleOf = float64(v6)
- case int64:
- x.MultipleOf = float64(v6)
- case int32:
- x.MultipleOf = float64(v6)
- case int:
- x.MultipleOf = float64(v6)
- default:
- message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v6, v6)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // float maximum = 7;
- v7 := compiler.MapValueForKey(m, "maximum")
- if v7 != nil {
- switch v7 := v7.(type) {
- case float64:
- x.Maximum = v7
- case float32:
- x.Maximum = float64(v7)
- case uint64:
- x.Maximum = float64(v7)
- case uint32:
- x.Maximum = float64(v7)
- case int64:
- x.Maximum = float64(v7)
- case int32:
- x.Maximum = float64(v7)
- case int:
- x.Maximum = float64(v7)
- default:
- message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v7, v7)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_maximum = 8;
- v8 := compiler.MapValueForKey(m, "exclusiveMaximum")
- if v8 != nil {
- x.ExclusiveMaximum, ok = v8.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v8, v8)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // float minimum = 9;
- v9 := compiler.MapValueForKey(m, "minimum")
- if v9 != nil {
- switch v9 := v9.(type) {
- case float64:
- x.Minimum = v9
- case float32:
- x.Minimum = float64(v9)
- case uint64:
- x.Minimum = float64(v9)
- case uint32:
- x.Minimum = float64(v9)
- case int64:
- x.Minimum = float64(v9)
- case int32:
- x.Minimum = float64(v9)
- case int:
- x.Minimum = float64(v9)
- default:
- message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v9, v9)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool exclusive_minimum = 10;
- v10 := compiler.MapValueForKey(m, "exclusiveMinimum")
- if v10 != nil {
- x.ExclusiveMinimum, ok = v10.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v10, v10)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_length = 11;
- v11 := compiler.MapValueForKey(m, "maxLength")
- if v11 != nil {
- t, ok := v11.(int)
- if ok {
- x.MaxLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v11, v11)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_length = 12;
- v12 := compiler.MapValueForKey(m, "minLength")
- if v12 != nil {
- t, ok := v12.(int)
- if ok {
- x.MinLength = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v12, v12)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string pattern = 13;
- v13 := compiler.MapValueForKey(m, "pattern")
- if v13 != nil {
- x.Pattern, ok = v13.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v13, v13)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_items = 14;
- v14 := compiler.MapValueForKey(m, "maxItems")
- if v14 != nil {
- t, ok := v14.(int)
- if ok {
- x.MaxItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v14, v14)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_items = 15;
- v15 := compiler.MapValueForKey(m, "minItems")
- if v15 != nil {
- t, ok := v15.(int)
- if ok {
- x.MinItems = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v15, v15)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool unique_items = 16;
- v16 := compiler.MapValueForKey(m, "uniqueItems")
- if v16 != nil {
- x.UniqueItems, ok = v16.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v16, v16)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 max_properties = 17;
- v17 := compiler.MapValueForKey(m, "maxProperties")
- if v17 != nil {
- t, ok := v17.(int)
- if ok {
- x.MaxProperties = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for maxProperties: %+v (%T)", v17, v17)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // int64 min_properties = 18;
- v18 := compiler.MapValueForKey(m, "minProperties")
- if v18 != nil {
- t, ok := v18.(int)
- if ok {
- x.MinProperties = int64(t)
- } else {
- message := fmt.Sprintf("has unexpected value for minProperties: %+v (%T)", v18, v18)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated string required = 19;
- v19 := compiler.MapValueForKey(m, "required")
- if v19 != nil {
- v, ok := v19.([]interface{})
- if ok {
- x.Required = compiler.ConvertInterfaceArrayToStringArray(v)
- } else {
- message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v19, v19)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated Any enum = 20;
- v20 := compiler.MapValueForKey(m, "enum")
- if v20 != nil {
- // repeated Any
- x.Enum = make([]*Any, 0)
- a, ok := v20.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewAny(item, compiler.NewContext("enum", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.Enum = append(x.Enum, y)
- }
- }
- }
- // AdditionalPropertiesItem additional_properties = 21;
- v21 := compiler.MapValueForKey(m, "additionalProperties")
- if v21 != nil {
- var err error
- x.AdditionalProperties, err = NewAdditionalPropertiesItem(v21, compiler.NewContext("additionalProperties", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // TypeItem type = 22;
- v22 := compiler.MapValueForKey(m, "type")
- if v22 != nil {
- var err error
- x.Type, err = NewTypeItem(v22, compiler.NewContext("type", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // ItemsItem items = 23;
- v23 := compiler.MapValueForKey(m, "items")
- if v23 != nil {
- var err error
- x.Items, err = NewItemsItem(v23, compiler.NewContext("items", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated Schema all_of = 24;
- v24 := compiler.MapValueForKey(m, "allOf")
- if v24 != nil {
- // repeated Schema
- x.AllOf = make([]*Schema, 0)
- a, ok := v24.([]interface{})
- if ok {
- for _, item := range a {
- y, err := NewSchema(item, compiler.NewContext("allOf", context))
- if err != nil {
- errors = append(errors, err)
- }
- x.AllOf = append(x.AllOf, y)
- }
- }
- }
- // Properties properties = 25;
- v25 := compiler.MapValueForKey(m, "properties")
- if v25 != nil {
- var err error
- x.Properties, err = NewProperties(v25, compiler.NewContext("properties", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // string discriminator = 26;
- v26 := compiler.MapValueForKey(m, "discriminator")
- if v26 != nil {
- x.Discriminator, ok = v26.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for discriminator: %+v (%T)", v26, v26)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool read_only = 27;
- v27 := compiler.MapValueForKey(m, "readOnly")
- if v27 != nil {
- x.ReadOnly, ok = v27.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for readOnly: %+v (%T)", v27, v27)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // Xml xml = 28;
- v28 := compiler.MapValueForKey(m, "xml")
- if v28 != nil {
- var err error
- x.Xml, err = NewXml(v28, compiler.NewContext("xml", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // ExternalDocs external_docs = 29;
- v29 := compiler.MapValueForKey(m, "externalDocs")
- if v29 != nil {
- var err error
- x.ExternalDocs, err = NewExternalDocs(v29, compiler.NewContext("externalDocs", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // Any example = 30;
- v30 := compiler.MapValueForKey(m, "example")
- if v30 != nil {
- var err error
- x.Example, err = NewAny(v30, compiler.NewContext("example", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated NamedAny vendor_extension = 31;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewSchemaItem creates an object of type SchemaItem if possible, returning an error if not.
-func NewSchemaItem(in interface{}, context *compiler.Context) (*SchemaItem, error) {
- errors := make([]error, 0)
- x := &SchemaItem{}
- matched := false
- // Schema schema = 1;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewSchema(m, compiler.NewContext("schema", context))
- if matchingError == nil {
- x.Oneof = &SchemaItem_Schema{Schema: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- // FileSchema file_schema = 2;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewFileSchema(m, compiler.NewContext("fileSchema", context))
- if matchingError == nil {
- x.Oneof = &SchemaItem_FileSchema{FileSchema: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- if matched {
- // since the oneof matched one of its possibilities, discard any matching errors
- errors = make([]error, 0)
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewSecurityDefinitions creates an object of type SecurityDefinitions if possible, returning an error if not.
-func NewSecurityDefinitions(in interface{}, context *compiler.Context) (*SecurityDefinitions, error) {
- errors := make([]error, 0)
- x := &SecurityDefinitions{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedSecurityDefinitionsItem additional_properties = 1;
- // MAP: SecurityDefinitionsItem
- x.AdditionalProperties = make([]*NamedSecurityDefinitionsItem, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedSecurityDefinitionsItem{}
- pair.Name = k
- var err error
- pair.Value, err = NewSecurityDefinitionsItem(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewSecurityDefinitionsItem creates an object of type SecurityDefinitionsItem if possible, returning an error if not.
-func NewSecurityDefinitionsItem(in interface{}, context *compiler.Context) (*SecurityDefinitionsItem, error) {
- errors := make([]error, 0)
- x := &SecurityDefinitionsItem{}
- matched := false
- // BasicAuthenticationSecurity basic_authentication_security = 1;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewBasicAuthenticationSecurity(m, compiler.NewContext("basicAuthenticationSecurity", context))
- if matchingError == nil {
- x.Oneof = &SecurityDefinitionsItem_BasicAuthenticationSecurity{BasicAuthenticationSecurity: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- // ApiKeySecurity api_key_security = 2;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewApiKeySecurity(m, compiler.NewContext("apiKeySecurity", context))
- if matchingError == nil {
- x.Oneof = &SecurityDefinitionsItem_ApiKeySecurity{ApiKeySecurity: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- // Oauth2ImplicitSecurity oauth2_implicit_security = 3;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewOauth2ImplicitSecurity(m, compiler.NewContext("oauth2ImplicitSecurity", context))
- if matchingError == nil {
- x.Oneof = &SecurityDefinitionsItem_Oauth2ImplicitSecurity{Oauth2ImplicitSecurity: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- // Oauth2PasswordSecurity oauth2_password_security = 4;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewOauth2PasswordSecurity(m, compiler.NewContext("oauth2PasswordSecurity", context))
- if matchingError == nil {
- x.Oneof = &SecurityDefinitionsItem_Oauth2PasswordSecurity{Oauth2PasswordSecurity: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- // Oauth2ApplicationSecurity oauth2_application_security = 5;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewOauth2ApplicationSecurity(m, compiler.NewContext("oauth2ApplicationSecurity", context))
- if matchingError == nil {
- x.Oneof = &SecurityDefinitionsItem_Oauth2ApplicationSecurity{Oauth2ApplicationSecurity: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- // Oauth2AccessCodeSecurity oauth2_access_code_security = 6;
- {
- m, ok := compiler.UnpackMap(in)
- if ok {
- // errors might be ok here, they mean we just don't have the right subtype
- t, matchingError := NewOauth2AccessCodeSecurity(m, compiler.NewContext("oauth2AccessCodeSecurity", context))
- if matchingError == nil {
- x.Oneof = &SecurityDefinitionsItem_Oauth2AccessCodeSecurity{Oauth2AccessCodeSecurity: t}
- matched = true
- } else {
- errors = append(errors, matchingError)
- }
- }
- }
- if matched {
- // since the oneof matched one of its possibilities, discard any matching errors
- errors = make([]error, 0)
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewSecurityRequirement creates an object of type SecurityRequirement if possible, returning an error if not.
-func NewSecurityRequirement(in interface{}, context *compiler.Context) (*SecurityRequirement, error) {
- errors := make([]error, 0)
- x := &SecurityRequirement{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedStringArray additional_properties = 1;
- // MAP: StringArray
- x.AdditionalProperties = make([]*NamedStringArray, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedStringArray{}
- pair.Name = k
- var err error
- pair.Value, err = NewStringArray(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewStringArray creates an object of type StringArray if possible, returning an error if not.
-func NewStringArray(in interface{}, context *compiler.Context) (*StringArray, error) {
- errors := make([]error, 0)
- x := &StringArray{}
- a, ok := in.([]interface{})
- if !ok {
- message := fmt.Sprintf("has unexpected value for StringArray: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- x.Value = make([]string, 0)
- for _, s := range a {
- x.Value = append(x.Value, s.(string))
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewTag creates an object of type Tag if possible, returning an error if not.
-func NewTag(in interface{}, context *compiler.Context) (*Tag, error) {
- errors := make([]error, 0)
- x := &Tag{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- requiredKeys := []string{"name"}
- missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
- if len(missingKeys) > 0 {
- message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- allowedKeys := []string{"description", "externalDocs", "name"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string description = 2;
- v2 := compiler.MapValueForKey(m, "description")
- if v2 != nil {
- x.Description, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // ExternalDocs external_docs = 3;
- v3 := compiler.MapValueForKey(m, "externalDocs")
- if v3 != nil {
- var err error
- x.ExternalDocs, err = NewExternalDocs(v3, compiler.NewContext("externalDocs", context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- // repeated NamedAny vendor_extension = 4;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewTypeItem creates an object of type TypeItem if possible, returning an error if not.
-func NewTypeItem(in interface{}, context *compiler.Context) (*TypeItem, error) {
- errors := make([]error, 0)
- x := &TypeItem{}
- switch in := in.(type) {
- case string:
- x.Value = make([]string, 0)
- x.Value = append(x.Value, in)
- case []interface{}:
- x.Value = make([]string, 0)
- for _, v := range in {
- value, ok := v.(string)
- if ok {
- x.Value = append(x.Value, value)
- } else {
- message := fmt.Sprintf("has unexpected value for string array element: %+v (%T)", value, value)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- default:
- message := fmt.Sprintf("has unexpected value for string array: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewVendorExtension creates an object of type VendorExtension if possible, returning an error if not.
-func NewVendorExtension(in interface{}, context *compiler.Context) (*VendorExtension, error) {
- errors := make([]error, 0)
- x := &VendorExtension{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- // repeated NamedAny additional_properties = 1;
- // MAP: Any
- x.AdditionalProperties = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.AdditionalProperties = append(x.AdditionalProperties, pair)
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// NewXml creates an object of type Xml if possible, returning an error if not.
-func NewXml(in interface{}, context *compiler.Context) (*Xml, error) {
- errors := make([]error, 0)
- x := &Xml{}
- m, ok := compiler.UnpackMap(in)
- if !ok {
- message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
- errors = append(errors, compiler.NewError(context, message))
- } else {
- allowedKeys := []string{"attribute", "name", "namespace", "prefix", "wrapped"}
- allowedPatterns := []*regexp.Regexp{pattern0}
- invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
- if len(invalidKeys) > 0 {
- message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
- errors = append(errors, compiler.NewError(context, message))
- }
- // string name = 1;
- v1 := compiler.MapValueForKey(m, "name")
- if v1 != nil {
- x.Name, ok = v1.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string namespace = 2;
- v2 := compiler.MapValueForKey(m, "namespace")
- if v2 != nil {
- x.Namespace, ok = v2.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for namespace: %+v (%T)", v2, v2)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // string prefix = 3;
- v3 := compiler.MapValueForKey(m, "prefix")
- if v3 != nil {
- x.Prefix, ok = v3.(string)
- if !ok {
- message := fmt.Sprintf("has unexpected value for prefix: %+v (%T)", v3, v3)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool attribute = 4;
- v4 := compiler.MapValueForKey(m, "attribute")
- if v4 != nil {
- x.Attribute, ok = v4.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for attribute: %+v (%T)", v4, v4)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // bool wrapped = 5;
- v5 := compiler.MapValueForKey(m, "wrapped")
- if v5 != nil {
- x.Wrapped, ok = v5.(bool)
- if !ok {
- message := fmt.Sprintf("has unexpected value for wrapped: %+v (%T)", v5, v5)
- errors = append(errors, compiler.NewError(context, message))
- }
- }
- // repeated NamedAny vendor_extension = 6;
- // MAP: Any ^x-
- x.VendorExtension = make([]*NamedAny, 0)
- for _, item := range m {
- k, ok := compiler.StringValue(item.Key)
- if ok {
- v := item.Value
- if strings.HasPrefix(k, "x-") {
- pair := &NamedAny{}
- pair.Name = k
- result := &Any{}
- handled, resultFromExt, err := compiler.HandleExtension(context, v, k)
- if handled {
- if err != nil {
- errors = append(errors, err)
- } else {
- bytes, _ := yaml.Marshal(v)
- result.Yaml = string(bytes)
- result.Value = resultFromExt
- pair.Value = result
- }
- } else {
- pair.Value, err = NewAny(v, compiler.NewContext(k, context))
- if err != nil {
- errors = append(errors, err)
- }
- }
- x.VendorExtension = append(x.VendorExtension, pair)
- }
- }
- }
- }
- return x, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside AdditionalPropertiesItem objects.
-func (m *AdditionalPropertiesItem) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- {
- p, ok := m.Oneof.(*AdditionalPropertiesItem_Schema)
- if ok {
- _, err := p.Schema.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Any objects.
-func (m *Any) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside ApiKeySecurity objects.
-func (m *ApiKeySecurity) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside BasicAuthenticationSecurity objects.
-func (m *BasicAuthenticationSecurity) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside BodyParameter objects.
-func (m *BodyParameter) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Schema != nil {
- _, err := m.Schema.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Contact objects.
-func (m *Contact) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Default objects.
-func (m *Default) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Definitions objects.
-func (m *Definitions) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Document objects.
-func (m *Document) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Info != nil {
- _, err := m.Info.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Paths != nil {
- _, err := m.Paths.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Definitions != nil {
- _, err := m.Definitions.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Parameters != nil {
- _, err := m.Parameters.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Responses != nil {
- _, err := m.Responses.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Security {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- if m.SecurityDefinitions != nil {
- _, err := m.SecurityDefinitions.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Tags {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- if m.ExternalDocs != nil {
- _, err := m.ExternalDocs.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Examples objects.
-func (m *Examples) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside ExternalDocs objects.
-func (m *ExternalDocs) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside FileSchema objects.
-func (m *FileSchema) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Default != nil {
- _, err := m.Default.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.ExternalDocs != nil {
- _, err := m.ExternalDocs.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Example != nil {
- _, err := m.Example.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside FormDataParameterSubSchema objects.
-func (m *FormDataParameterSubSchema) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Items != nil {
- _, err := m.Items.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Default != nil {
- _, err := m.Default.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Enum {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Header objects.
-func (m *Header) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Items != nil {
- _, err := m.Items.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Default != nil {
- _, err := m.Default.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Enum {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside HeaderParameterSubSchema objects.
-func (m *HeaderParameterSubSchema) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Items != nil {
- _, err := m.Items.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Default != nil {
- _, err := m.Default.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Enum {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Headers objects.
-func (m *Headers) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Info objects.
-func (m *Info) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Contact != nil {
- _, err := m.Contact.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.License != nil {
- _, err := m.License.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside ItemsItem objects.
-func (m *ItemsItem) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.Schema {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside JsonReference objects.
-func (m *JsonReference) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.XRef != "" {
- info, err := compiler.ReadInfoForRef(root, m.XRef)
- if err != nil {
- return nil, err
- }
- if info != nil {
- replacement, err := NewJsonReference(info, nil)
- if err == nil {
- *m = *replacement
- return m.ResolveReferences(root)
- }
- }
- return info, nil
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside License objects.
-func (m *License) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NamedAny objects.
-func (m *NamedAny) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Value != nil {
- _, err := m.Value.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NamedHeader objects.
-func (m *NamedHeader) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Value != nil {
- _, err := m.Value.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NamedParameter objects.
-func (m *NamedParameter) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Value != nil {
- _, err := m.Value.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NamedPathItem objects.
-func (m *NamedPathItem) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Value != nil {
- _, err := m.Value.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NamedResponse objects.
-func (m *NamedResponse) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Value != nil {
- _, err := m.Value.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NamedResponseValue objects.
-func (m *NamedResponseValue) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Value != nil {
- _, err := m.Value.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NamedSchema objects.
-func (m *NamedSchema) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Value != nil {
- _, err := m.Value.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NamedSecurityDefinitionsItem objects.
-func (m *NamedSecurityDefinitionsItem) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Value != nil {
- _, err := m.Value.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NamedString objects.
-func (m *NamedString) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NamedStringArray objects.
-func (m *NamedStringArray) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Value != nil {
- _, err := m.Value.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside NonBodyParameter objects.
-func (m *NonBodyParameter) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- {
- p, ok := m.Oneof.(*NonBodyParameter_HeaderParameterSubSchema)
- if ok {
- _, err := p.HeaderParameterSubSchema.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*NonBodyParameter_FormDataParameterSubSchema)
- if ok {
- _, err := p.FormDataParameterSubSchema.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*NonBodyParameter_QueryParameterSubSchema)
- if ok {
- _, err := p.QueryParameterSubSchema.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*NonBodyParameter_PathParameterSubSchema)
- if ok {
- _, err := p.PathParameterSubSchema.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Oauth2AccessCodeSecurity objects.
-func (m *Oauth2AccessCodeSecurity) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Scopes != nil {
- _, err := m.Scopes.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Oauth2ApplicationSecurity objects.
-func (m *Oauth2ApplicationSecurity) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Scopes != nil {
- _, err := m.Scopes.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Oauth2ImplicitSecurity objects.
-func (m *Oauth2ImplicitSecurity) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Scopes != nil {
- _, err := m.Scopes.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Oauth2PasswordSecurity objects.
-func (m *Oauth2PasswordSecurity) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Scopes != nil {
- _, err := m.Scopes.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Oauth2Scopes objects.
-func (m *Oauth2Scopes) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Operation objects.
-func (m *Operation) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.ExternalDocs != nil {
- _, err := m.ExternalDocs.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Parameters {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- if m.Responses != nil {
- _, err := m.Responses.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Security {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Parameter objects.
-func (m *Parameter) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- {
- p, ok := m.Oneof.(*Parameter_BodyParameter)
- if ok {
- _, err := p.BodyParameter.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*Parameter_NonBodyParameter)
- if ok {
- _, err := p.NonBodyParameter.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside ParameterDefinitions objects.
-func (m *ParameterDefinitions) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside ParametersItem objects.
-func (m *ParametersItem) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- {
- p, ok := m.Oneof.(*ParametersItem_Parameter)
- if ok {
- _, err := p.Parameter.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*ParametersItem_JsonReference)
- if ok {
- info, err := p.JsonReference.ResolveReferences(root)
- if err != nil {
- return nil, err
- } else if info != nil {
- n, err := NewParametersItem(info, nil)
- if err != nil {
- return nil, err
- } else if n != nil {
- *m = *n
- return nil, nil
- }
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside PathItem objects.
-func (m *PathItem) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.XRef != "" {
- info, err := compiler.ReadInfoForRef(root, m.XRef)
- if err != nil {
- return nil, err
- }
- if info != nil {
- replacement, err := NewPathItem(info, nil)
- if err == nil {
- *m = *replacement
- return m.ResolveReferences(root)
- }
- }
- return info, nil
- }
- if m.Get != nil {
- _, err := m.Get.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Put != nil {
- _, err := m.Put.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Post != nil {
- _, err := m.Post.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Delete != nil {
- _, err := m.Delete.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Options != nil {
- _, err := m.Options.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Head != nil {
- _, err := m.Head.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Patch != nil {
- _, err := m.Patch.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Parameters {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside PathParameterSubSchema objects.
-func (m *PathParameterSubSchema) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Items != nil {
- _, err := m.Items.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Default != nil {
- _, err := m.Default.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Enum {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Paths objects.
-func (m *Paths) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- for _, item := range m.Path {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside PrimitivesItems objects.
-func (m *PrimitivesItems) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Items != nil {
- _, err := m.Items.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Default != nil {
- _, err := m.Default.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Enum {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Properties objects.
-func (m *Properties) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside QueryParameterSubSchema objects.
-func (m *QueryParameterSubSchema) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Items != nil {
- _, err := m.Items.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Default != nil {
- _, err := m.Default.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Enum {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Response objects.
-func (m *Response) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.Schema != nil {
- _, err := m.Schema.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Headers != nil {
- _, err := m.Headers.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Examples != nil {
- _, err := m.Examples.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside ResponseDefinitions objects.
-func (m *ResponseDefinitions) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside ResponseValue objects.
-func (m *ResponseValue) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- {
- p, ok := m.Oneof.(*ResponseValue_Response)
- if ok {
- _, err := p.Response.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*ResponseValue_JsonReference)
- if ok {
- info, err := p.JsonReference.ResolveReferences(root)
- if err != nil {
- return nil, err
- } else if info != nil {
- n, err := NewResponseValue(info, nil)
- if err != nil {
- return nil, err
- } else if n != nil {
- *m = *n
- return nil, nil
- }
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Responses objects.
-func (m *Responses) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.ResponseCode {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Schema objects.
-func (m *Schema) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.XRef != "" {
- info, err := compiler.ReadInfoForRef(root, m.XRef)
- if err != nil {
- return nil, err
- }
- if info != nil {
- replacement, err := NewSchema(info, nil)
- if err == nil {
- *m = *replacement
- return m.ResolveReferences(root)
- }
- }
- return info, nil
- }
- if m.Default != nil {
- _, err := m.Default.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.Enum {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- if m.AdditionalProperties != nil {
- _, err := m.AdditionalProperties.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Type != nil {
- _, err := m.Type.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Items != nil {
- _, err := m.Items.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.AllOf {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- if m.Properties != nil {
- _, err := m.Properties.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Xml != nil {
- _, err := m.Xml.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.ExternalDocs != nil {
- _, err := m.ExternalDocs.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- if m.Example != nil {
- _, err := m.Example.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside SchemaItem objects.
-func (m *SchemaItem) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- {
- p, ok := m.Oneof.(*SchemaItem_Schema)
- if ok {
- _, err := p.Schema.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*SchemaItem_FileSchema)
- if ok {
- _, err := p.FileSchema.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside SecurityDefinitions objects.
-func (m *SecurityDefinitions) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside SecurityDefinitionsItem objects.
-func (m *SecurityDefinitionsItem) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- {
- p, ok := m.Oneof.(*SecurityDefinitionsItem_BasicAuthenticationSecurity)
- if ok {
- _, err := p.BasicAuthenticationSecurity.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*SecurityDefinitionsItem_ApiKeySecurity)
- if ok {
- _, err := p.ApiKeySecurity.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2ImplicitSecurity)
- if ok {
- _, err := p.Oauth2ImplicitSecurity.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2PasswordSecurity)
- if ok {
- _, err := p.Oauth2PasswordSecurity.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2ApplicationSecurity)
- if ok {
- _, err := p.Oauth2ApplicationSecurity.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- {
- p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2AccessCodeSecurity)
- if ok {
- _, err := p.Oauth2AccessCodeSecurity.ResolveReferences(root)
- if err != nil {
- return nil, err
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside SecurityRequirement objects.
-func (m *SecurityRequirement) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside StringArray objects.
-func (m *StringArray) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Tag objects.
-func (m *Tag) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- if m.ExternalDocs != nil {
- _, err := m.ExternalDocs.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside TypeItem objects.
-func (m *TypeItem) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside VendorExtension objects.
-func (m *VendorExtension) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.AdditionalProperties {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ResolveReferences resolves references found inside Xml objects.
-func (m *Xml) ResolveReferences(root string) (interface{}, error) {
- errors := make([]error, 0)
- for _, item := range m.VendorExtension {
- if item != nil {
- _, err := item.ResolveReferences(root)
- if err != nil {
- errors = append(errors, err)
- }
- }
- }
- return nil, compiler.NewErrorGroupOrNil(errors)
-}
-
-// ToRawInfo returns a description of AdditionalPropertiesItem suitable for JSON or YAML export.
-func (m *AdditionalPropertiesItem) ToRawInfo() interface{} {
- // ONE OF WRAPPER
- // AdditionalPropertiesItem
- // {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v0 := m.GetSchema()
- if v0 != nil {
- return v0.ToRawInfo()
- }
- // {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if v1, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok {
- return v1.Boolean
- }
- return nil
-}
-
-// ToRawInfo returns a description of Any suitable for JSON or YAML export.
-func (m *Any) ToRawInfo() interface{} {
- var err error
- var info1 []yaml.MapSlice
- err = yaml.Unmarshal([]byte(m.Yaml), &info1)
- if err == nil {
- return info1
- }
- var info2 yaml.MapSlice
- err = yaml.Unmarshal([]byte(m.Yaml), &info2)
- if err == nil {
- return info2
- }
- var info3 interface{}
- err = yaml.Unmarshal([]byte(m.Yaml), &info3)
- if err == nil {
- return info3
- }
- return nil
-}
-
-// ToRawInfo returns a description of ApiKeySecurity suitable for JSON or YAML export.
-func (m *ApiKeySecurity) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.In != "" {
- info = append(info, yaml.MapItem{"in", m.In})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of BasicAuthenticationSecurity suitable for JSON or YAML export.
-func (m *BasicAuthenticationSecurity) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of BodyParameter suitable for JSON or YAML export.
-func (m *BodyParameter) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.In != "" {
- info = append(info, yaml.MapItem{"in", m.In})
- }
- if m.Required != false {
- info = append(info, yaml.MapItem{"required", m.Required})
- }
- if m.Schema != nil {
- info = append(info, yaml.MapItem{"schema", m.Schema.ToRawInfo()})
- }
- // &{Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Contact suitable for JSON or YAML export.
-func (m *Contact) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.Url != "" {
- info = append(info, yaml.MapItem{"url", m.Url})
- }
- if m.Email != "" {
- info = append(info, yaml.MapItem{"email", m.Email})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Default suitable for JSON or YAML export.
-func (m *Default) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.AdditionalProperties != nil {
- for _, item := range m.AdditionalProperties {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:false Description:}
- return info
-}
-
-// ToRawInfo returns a description of Definitions suitable for JSON or YAML export.
-func (m *Definitions) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.AdditionalProperties != nil {
- for _, item := range m.AdditionalProperties {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:additionalProperties Type:NamedSchema StringEnumValues:[] MapType:Schema Repeated:true Pattern: Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Document suitable for JSON or YAML export.
-func (m *Document) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Swagger != "" {
- info = append(info, yaml.MapItem{"swagger", m.Swagger})
- }
- if m.Info != nil {
- info = append(info, yaml.MapItem{"info", m.Info.ToRawInfo()})
- }
- // &{Name:info Type:Info StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Host != "" {
- info = append(info, yaml.MapItem{"host", m.Host})
- }
- if m.BasePath != "" {
- info = append(info, yaml.MapItem{"basePath", m.BasePath})
- }
- if len(m.Schemes) != 0 {
- info = append(info, yaml.MapItem{"schemes", m.Schemes})
- }
- if len(m.Consumes) != 0 {
- info = append(info, yaml.MapItem{"consumes", m.Consumes})
- }
- if len(m.Produces) != 0 {
- info = append(info, yaml.MapItem{"produces", m.Produces})
- }
- if m.Paths != nil {
- info = append(info, yaml.MapItem{"paths", m.Paths.ToRawInfo()})
- }
- // &{Name:paths Type:Paths StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Definitions != nil {
- info = append(info, yaml.MapItem{"definitions", m.Definitions.ToRawInfo()})
- }
- // &{Name:definitions Type:Definitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Parameters != nil {
- info = append(info, yaml.MapItem{"parameters", m.Parameters.ToRawInfo()})
- }
- // &{Name:parameters Type:ParameterDefinitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Responses != nil {
- info = append(info, yaml.MapItem{"responses", m.Responses.ToRawInfo()})
- }
- // &{Name:responses Type:ResponseDefinitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if len(m.Security) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Security {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"security", items})
- }
- // &{Name:security Type:SecurityRequirement StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.SecurityDefinitions != nil {
- info = append(info, yaml.MapItem{"securityDefinitions", m.SecurityDefinitions.ToRawInfo()})
- }
- // &{Name:securityDefinitions Type:SecurityDefinitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if len(m.Tags) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Tags {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"tags", items})
- }
- // &{Name:tags Type:Tag StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.ExternalDocs != nil {
- info = append(info, yaml.MapItem{"externalDocs", m.ExternalDocs.ToRawInfo()})
- }
- // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Examples suitable for JSON or YAML export.
-func (m *Examples) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.AdditionalProperties != nil {
- for _, item := range m.AdditionalProperties {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of ExternalDocs suitable for JSON or YAML export.
-func (m *ExternalDocs) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.Url != "" {
- info = append(info, yaml.MapItem{"url", m.Url})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of FileSchema suitable for JSON or YAML export.
-func (m *FileSchema) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Format != "" {
- info = append(info, yaml.MapItem{"format", m.Format})
- }
- if m.Title != "" {
- info = append(info, yaml.MapItem{"title", m.Title})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.Default != nil {
- info = append(info, yaml.MapItem{"default", m.Default.ToRawInfo()})
- }
- // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if len(m.Required) != 0 {
- info = append(info, yaml.MapItem{"required", m.Required})
- }
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.ReadOnly != false {
- info = append(info, yaml.MapItem{"readOnly", m.ReadOnly})
- }
- if m.ExternalDocs != nil {
- info = append(info, yaml.MapItem{"externalDocs", m.ExternalDocs.ToRawInfo()})
- }
- // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Example != nil {
- info = append(info, yaml.MapItem{"example", m.Example.ToRawInfo()})
- }
- // &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of FormDataParameterSubSchema suitable for JSON or YAML export.
-func (m *FormDataParameterSubSchema) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Required != false {
- info = append(info, yaml.MapItem{"required", m.Required})
- }
- if m.In != "" {
- info = append(info, yaml.MapItem{"in", m.In})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.AllowEmptyValue != false {
- info = append(info, yaml.MapItem{"allowEmptyValue", m.AllowEmptyValue})
- }
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Format != "" {
- info = append(info, yaml.MapItem{"format", m.Format})
- }
- if m.Items != nil {
- info = append(info, yaml.MapItem{"items", m.Items.ToRawInfo()})
- }
- // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.CollectionFormat != "" {
- info = append(info, yaml.MapItem{"collectionFormat", m.CollectionFormat})
- }
- if m.Default != nil {
- info = append(info, yaml.MapItem{"default", m.Default.ToRawInfo()})
- }
- // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Maximum != 0.0 {
- info = append(info, yaml.MapItem{"maximum", m.Maximum})
- }
- if m.ExclusiveMaximum != false {
- info = append(info, yaml.MapItem{"exclusiveMaximum", m.ExclusiveMaximum})
- }
- if m.Minimum != 0.0 {
- info = append(info, yaml.MapItem{"minimum", m.Minimum})
- }
- if m.ExclusiveMinimum != false {
- info = append(info, yaml.MapItem{"exclusiveMinimum", m.ExclusiveMinimum})
- }
- if m.MaxLength != 0 {
- info = append(info, yaml.MapItem{"maxLength", m.MaxLength})
- }
- if m.MinLength != 0 {
- info = append(info, yaml.MapItem{"minLength", m.MinLength})
- }
- if m.Pattern != "" {
- info = append(info, yaml.MapItem{"pattern", m.Pattern})
- }
- if m.MaxItems != 0 {
- info = append(info, yaml.MapItem{"maxItems", m.MaxItems})
- }
- if m.MinItems != 0 {
- info = append(info, yaml.MapItem{"minItems", m.MinItems})
- }
- if m.UniqueItems != false {
- info = append(info, yaml.MapItem{"uniqueItems", m.UniqueItems})
- }
- if len(m.Enum) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Enum {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"enum", items})
- }
- // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.MultipleOf != 0.0 {
- info = append(info, yaml.MapItem{"multipleOf", m.MultipleOf})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Header suitable for JSON or YAML export.
-func (m *Header) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Format != "" {
- info = append(info, yaml.MapItem{"format", m.Format})
- }
- if m.Items != nil {
- info = append(info, yaml.MapItem{"items", m.Items.ToRawInfo()})
- }
- // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.CollectionFormat != "" {
- info = append(info, yaml.MapItem{"collectionFormat", m.CollectionFormat})
- }
- if m.Default != nil {
- info = append(info, yaml.MapItem{"default", m.Default.ToRawInfo()})
- }
- // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Maximum != 0.0 {
- info = append(info, yaml.MapItem{"maximum", m.Maximum})
- }
- if m.ExclusiveMaximum != false {
- info = append(info, yaml.MapItem{"exclusiveMaximum", m.ExclusiveMaximum})
- }
- if m.Minimum != 0.0 {
- info = append(info, yaml.MapItem{"minimum", m.Minimum})
- }
- if m.ExclusiveMinimum != false {
- info = append(info, yaml.MapItem{"exclusiveMinimum", m.ExclusiveMinimum})
- }
- if m.MaxLength != 0 {
- info = append(info, yaml.MapItem{"maxLength", m.MaxLength})
- }
- if m.MinLength != 0 {
- info = append(info, yaml.MapItem{"minLength", m.MinLength})
- }
- if m.Pattern != "" {
- info = append(info, yaml.MapItem{"pattern", m.Pattern})
- }
- if m.MaxItems != 0 {
- info = append(info, yaml.MapItem{"maxItems", m.MaxItems})
- }
- if m.MinItems != 0 {
- info = append(info, yaml.MapItem{"minItems", m.MinItems})
- }
- if m.UniqueItems != false {
- info = append(info, yaml.MapItem{"uniqueItems", m.UniqueItems})
- }
- if len(m.Enum) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Enum {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"enum", items})
- }
- // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.MultipleOf != 0.0 {
- info = append(info, yaml.MapItem{"multipleOf", m.MultipleOf})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of HeaderParameterSubSchema suitable for JSON or YAML export.
-func (m *HeaderParameterSubSchema) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Required != false {
- info = append(info, yaml.MapItem{"required", m.Required})
- }
- if m.In != "" {
- info = append(info, yaml.MapItem{"in", m.In})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Format != "" {
- info = append(info, yaml.MapItem{"format", m.Format})
- }
- if m.Items != nil {
- info = append(info, yaml.MapItem{"items", m.Items.ToRawInfo()})
- }
- // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.CollectionFormat != "" {
- info = append(info, yaml.MapItem{"collectionFormat", m.CollectionFormat})
- }
- if m.Default != nil {
- info = append(info, yaml.MapItem{"default", m.Default.ToRawInfo()})
- }
- // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Maximum != 0.0 {
- info = append(info, yaml.MapItem{"maximum", m.Maximum})
- }
- if m.ExclusiveMaximum != false {
- info = append(info, yaml.MapItem{"exclusiveMaximum", m.ExclusiveMaximum})
- }
- if m.Minimum != 0.0 {
- info = append(info, yaml.MapItem{"minimum", m.Minimum})
- }
- if m.ExclusiveMinimum != false {
- info = append(info, yaml.MapItem{"exclusiveMinimum", m.ExclusiveMinimum})
- }
- if m.MaxLength != 0 {
- info = append(info, yaml.MapItem{"maxLength", m.MaxLength})
- }
- if m.MinLength != 0 {
- info = append(info, yaml.MapItem{"minLength", m.MinLength})
- }
- if m.Pattern != "" {
- info = append(info, yaml.MapItem{"pattern", m.Pattern})
- }
- if m.MaxItems != 0 {
- info = append(info, yaml.MapItem{"maxItems", m.MaxItems})
- }
- if m.MinItems != 0 {
- info = append(info, yaml.MapItem{"minItems", m.MinItems})
- }
- if m.UniqueItems != false {
- info = append(info, yaml.MapItem{"uniqueItems", m.UniqueItems})
- }
- if len(m.Enum) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Enum {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"enum", items})
- }
- // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.MultipleOf != 0.0 {
- info = append(info, yaml.MapItem{"multipleOf", m.MultipleOf})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Headers suitable for JSON or YAML export.
-func (m *Headers) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.AdditionalProperties != nil {
- for _, item := range m.AdditionalProperties {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:additionalProperties Type:NamedHeader StringEnumValues:[] MapType:Header Repeated:true Pattern: Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Info suitable for JSON or YAML export.
-func (m *Info) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Title != "" {
- info = append(info, yaml.MapItem{"title", m.Title})
- }
- if m.Version != "" {
- info = append(info, yaml.MapItem{"version", m.Version})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.TermsOfService != "" {
- info = append(info, yaml.MapItem{"termsOfService", m.TermsOfService})
- }
- if m.Contact != nil {
- info = append(info, yaml.MapItem{"contact", m.Contact.ToRawInfo()})
- }
- // &{Name:contact Type:Contact StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.License != nil {
- info = append(info, yaml.MapItem{"license", m.License.ToRawInfo()})
- }
- // &{Name:license Type:License StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of ItemsItem suitable for JSON or YAML export.
-func (m *ItemsItem) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if len(m.Schema) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Schema {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"schema", items})
- }
- // &{Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- return info
-}
-
-// ToRawInfo returns a description of JsonReference suitable for JSON or YAML export.
-func (m *JsonReference) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.XRef != "" {
- info = append(info, yaml.MapItem{"$ref", m.XRef})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- return info
-}
-
-// ToRawInfo returns a description of License suitable for JSON or YAML export.
-func (m *License) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.Url != "" {
- info = append(info, yaml.MapItem{"url", m.Url})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of NamedAny suitable for JSON or YAML export.
-func (m *NamedAny) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- // &{Name:value Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
- return info
-}
-
-// ToRawInfo returns a description of NamedHeader suitable for JSON or YAML export.
-func (m *NamedHeader) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- // &{Name:value Type:Header StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
- return info
-}
-
-// ToRawInfo returns a description of NamedParameter suitable for JSON or YAML export.
-func (m *NamedParameter) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- // &{Name:value Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
- return info
-}
-
-// ToRawInfo returns a description of NamedPathItem suitable for JSON or YAML export.
-func (m *NamedPathItem) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- // &{Name:value Type:PathItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
- return info
-}
-
-// ToRawInfo returns a description of NamedResponse suitable for JSON or YAML export.
-func (m *NamedResponse) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- // &{Name:value Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
- return info
-}
-
-// ToRawInfo returns a description of NamedResponseValue suitable for JSON or YAML export.
-func (m *NamedResponseValue) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- // &{Name:value Type:ResponseValue StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
- return info
-}
-
-// ToRawInfo returns a description of NamedSchema suitable for JSON or YAML export.
-func (m *NamedSchema) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- // &{Name:value Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
- return info
-}
-
-// ToRawInfo returns a description of NamedSecurityDefinitionsItem suitable for JSON or YAML export.
-func (m *NamedSecurityDefinitionsItem) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- // &{Name:value Type:SecurityDefinitionsItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
- return info
-}
-
-// ToRawInfo returns a description of NamedString suitable for JSON or YAML export.
-func (m *NamedString) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.Value != "" {
- info = append(info, yaml.MapItem{"value", m.Value})
- }
- return info
-}
-
-// ToRawInfo returns a description of NamedStringArray suitable for JSON or YAML export.
-func (m *NamedStringArray) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- // &{Name:value Type:StringArray StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
- return info
-}
-
-// ToRawInfo returns a description of NonBodyParameter suitable for JSON or YAML export.
-func (m *NonBodyParameter) ToRawInfo() interface{} {
- // ONE OF WRAPPER
- // NonBodyParameter
- // {Name:headerParameterSubSchema Type:HeaderParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v0 := m.GetHeaderParameterSubSchema()
- if v0 != nil {
- return v0.ToRawInfo()
- }
- // {Name:formDataParameterSubSchema Type:FormDataParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v1 := m.GetFormDataParameterSubSchema()
- if v1 != nil {
- return v1.ToRawInfo()
- }
- // {Name:queryParameterSubSchema Type:QueryParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v2 := m.GetQueryParameterSubSchema()
- if v2 != nil {
- return v2.ToRawInfo()
- }
- // {Name:pathParameterSubSchema Type:PathParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v3 := m.GetPathParameterSubSchema()
- if v3 != nil {
- return v3.ToRawInfo()
- }
- return nil
-}
-
-// ToRawInfo returns a description of Oauth2AccessCodeSecurity suitable for JSON or YAML export.
-func (m *Oauth2AccessCodeSecurity) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Flow != "" {
- info = append(info, yaml.MapItem{"flow", m.Flow})
- }
- if m.Scopes != nil {
- info = append(info, yaml.MapItem{"scopes", m.Scopes.ToRawInfo()})
- }
- // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.AuthorizationUrl != "" {
- info = append(info, yaml.MapItem{"authorizationUrl", m.AuthorizationUrl})
- }
- if m.TokenUrl != "" {
- info = append(info, yaml.MapItem{"tokenUrl", m.TokenUrl})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Oauth2ApplicationSecurity suitable for JSON or YAML export.
-func (m *Oauth2ApplicationSecurity) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Flow != "" {
- info = append(info, yaml.MapItem{"flow", m.Flow})
- }
- if m.Scopes != nil {
- info = append(info, yaml.MapItem{"scopes", m.Scopes.ToRawInfo()})
- }
- // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.TokenUrl != "" {
- info = append(info, yaml.MapItem{"tokenUrl", m.TokenUrl})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Oauth2ImplicitSecurity suitable for JSON or YAML export.
-func (m *Oauth2ImplicitSecurity) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Flow != "" {
- info = append(info, yaml.MapItem{"flow", m.Flow})
- }
- if m.Scopes != nil {
- info = append(info, yaml.MapItem{"scopes", m.Scopes.ToRawInfo()})
- }
- // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.AuthorizationUrl != "" {
- info = append(info, yaml.MapItem{"authorizationUrl", m.AuthorizationUrl})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Oauth2PasswordSecurity suitable for JSON or YAML export.
-func (m *Oauth2PasswordSecurity) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Flow != "" {
- info = append(info, yaml.MapItem{"flow", m.Flow})
- }
- if m.Scopes != nil {
- info = append(info, yaml.MapItem{"scopes", m.Scopes.ToRawInfo()})
- }
- // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.TokenUrl != "" {
- info = append(info, yaml.MapItem{"tokenUrl", m.TokenUrl})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Oauth2Scopes suitable for JSON or YAML export.
-func (m *Oauth2Scopes) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- // &{Name:additionalProperties Type:NamedString StringEnumValues:[] MapType:string Repeated:true Pattern: Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Operation suitable for JSON or YAML export.
-func (m *Operation) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if len(m.Tags) != 0 {
- info = append(info, yaml.MapItem{"tags", m.Tags})
- }
- if m.Summary != "" {
- info = append(info, yaml.MapItem{"summary", m.Summary})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.ExternalDocs != nil {
- info = append(info, yaml.MapItem{"externalDocs", m.ExternalDocs.ToRawInfo()})
- }
- // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.OperationId != "" {
- info = append(info, yaml.MapItem{"operationId", m.OperationId})
- }
- if len(m.Produces) != 0 {
- info = append(info, yaml.MapItem{"produces", m.Produces})
- }
- if len(m.Consumes) != 0 {
- info = append(info, yaml.MapItem{"consumes", m.Consumes})
- }
- if len(m.Parameters) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Parameters {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"parameters", items})
- }
- // &{Name:parameters Type:ParametersItem StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:The parameters needed to send a valid API call.}
- if m.Responses != nil {
- info = append(info, yaml.MapItem{"responses", m.Responses.ToRawInfo()})
- }
- // &{Name:responses Type:Responses StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if len(m.Schemes) != 0 {
- info = append(info, yaml.MapItem{"schemes", m.Schemes})
- }
- if m.Deprecated != false {
- info = append(info, yaml.MapItem{"deprecated", m.Deprecated})
- }
- if len(m.Security) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Security {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"security", items})
- }
- // &{Name:security Type:SecurityRequirement StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Parameter suitable for JSON or YAML export.
-func (m *Parameter) ToRawInfo() interface{} {
- // ONE OF WRAPPER
- // Parameter
- // {Name:bodyParameter Type:BodyParameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v0 := m.GetBodyParameter()
- if v0 != nil {
- return v0.ToRawInfo()
- }
- // {Name:nonBodyParameter Type:NonBodyParameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v1 := m.GetNonBodyParameter()
- if v1 != nil {
- return v1.ToRawInfo()
- }
- return nil
-}
-
-// ToRawInfo returns a description of ParameterDefinitions suitable for JSON or YAML export.
-func (m *ParameterDefinitions) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.AdditionalProperties != nil {
- for _, item := range m.AdditionalProperties {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:additionalProperties Type:NamedParameter StringEnumValues:[] MapType:Parameter Repeated:true Pattern: Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of ParametersItem suitable for JSON or YAML export.
-func (m *ParametersItem) ToRawInfo() interface{} {
- // ONE OF WRAPPER
- // ParametersItem
- // {Name:parameter Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v0 := m.GetParameter()
- if v0 != nil {
- return v0.ToRawInfo()
- }
- // {Name:jsonReference Type:JsonReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v1 := m.GetJsonReference()
- if v1 != nil {
- return v1.ToRawInfo()
- }
- return nil
-}
-
-// ToRawInfo returns a description of PathItem suitable for JSON or YAML export.
-func (m *PathItem) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.XRef != "" {
- info = append(info, yaml.MapItem{"$ref", m.XRef})
- }
- if m.Get != nil {
- info = append(info, yaml.MapItem{"get", m.Get.ToRawInfo()})
- }
- // &{Name:get Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Put != nil {
- info = append(info, yaml.MapItem{"put", m.Put.ToRawInfo()})
- }
- // &{Name:put Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Post != nil {
- info = append(info, yaml.MapItem{"post", m.Post.ToRawInfo()})
- }
- // &{Name:post Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Delete != nil {
- info = append(info, yaml.MapItem{"delete", m.Delete.ToRawInfo()})
- }
- // &{Name:delete Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Options != nil {
- info = append(info, yaml.MapItem{"options", m.Options.ToRawInfo()})
- }
- // &{Name:options Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Head != nil {
- info = append(info, yaml.MapItem{"head", m.Head.ToRawInfo()})
- }
- // &{Name:head Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Patch != nil {
- info = append(info, yaml.MapItem{"patch", m.Patch.ToRawInfo()})
- }
- // &{Name:patch Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if len(m.Parameters) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Parameters {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"parameters", items})
- }
- // &{Name:parameters Type:ParametersItem StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:The parameters needed to send a valid API call.}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of PathParameterSubSchema suitable for JSON or YAML export.
-func (m *PathParameterSubSchema) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Required != false {
- info = append(info, yaml.MapItem{"required", m.Required})
- }
- if m.In != "" {
- info = append(info, yaml.MapItem{"in", m.In})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Format != "" {
- info = append(info, yaml.MapItem{"format", m.Format})
- }
- if m.Items != nil {
- info = append(info, yaml.MapItem{"items", m.Items.ToRawInfo()})
- }
- // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.CollectionFormat != "" {
- info = append(info, yaml.MapItem{"collectionFormat", m.CollectionFormat})
- }
- if m.Default != nil {
- info = append(info, yaml.MapItem{"default", m.Default.ToRawInfo()})
- }
- // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Maximum != 0.0 {
- info = append(info, yaml.MapItem{"maximum", m.Maximum})
- }
- if m.ExclusiveMaximum != false {
- info = append(info, yaml.MapItem{"exclusiveMaximum", m.ExclusiveMaximum})
- }
- if m.Minimum != 0.0 {
- info = append(info, yaml.MapItem{"minimum", m.Minimum})
- }
- if m.ExclusiveMinimum != false {
- info = append(info, yaml.MapItem{"exclusiveMinimum", m.ExclusiveMinimum})
- }
- if m.MaxLength != 0 {
- info = append(info, yaml.MapItem{"maxLength", m.MaxLength})
- }
- if m.MinLength != 0 {
- info = append(info, yaml.MapItem{"minLength", m.MinLength})
- }
- if m.Pattern != "" {
- info = append(info, yaml.MapItem{"pattern", m.Pattern})
- }
- if m.MaxItems != 0 {
- info = append(info, yaml.MapItem{"maxItems", m.MaxItems})
- }
- if m.MinItems != 0 {
- info = append(info, yaml.MapItem{"minItems", m.MinItems})
- }
- if m.UniqueItems != false {
- info = append(info, yaml.MapItem{"uniqueItems", m.UniqueItems})
- }
- if len(m.Enum) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Enum {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"enum", items})
- }
- // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.MultipleOf != 0.0 {
- info = append(info, yaml.MapItem{"multipleOf", m.MultipleOf})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Paths suitable for JSON or YAML export.
-func (m *Paths) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- if m.Path != nil {
- for _, item := range m.Path {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:Path Type:NamedPathItem StringEnumValues:[] MapType:PathItem Repeated:true Pattern:^/ Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of PrimitivesItems suitable for JSON or YAML export.
-func (m *PrimitivesItems) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Format != "" {
- info = append(info, yaml.MapItem{"format", m.Format})
- }
- if m.Items != nil {
- info = append(info, yaml.MapItem{"items", m.Items.ToRawInfo()})
- }
- // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.CollectionFormat != "" {
- info = append(info, yaml.MapItem{"collectionFormat", m.CollectionFormat})
- }
- if m.Default != nil {
- info = append(info, yaml.MapItem{"default", m.Default.ToRawInfo()})
- }
- // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Maximum != 0.0 {
- info = append(info, yaml.MapItem{"maximum", m.Maximum})
- }
- if m.ExclusiveMaximum != false {
- info = append(info, yaml.MapItem{"exclusiveMaximum", m.ExclusiveMaximum})
- }
- if m.Minimum != 0.0 {
- info = append(info, yaml.MapItem{"minimum", m.Minimum})
- }
- if m.ExclusiveMinimum != false {
- info = append(info, yaml.MapItem{"exclusiveMinimum", m.ExclusiveMinimum})
- }
- if m.MaxLength != 0 {
- info = append(info, yaml.MapItem{"maxLength", m.MaxLength})
- }
- if m.MinLength != 0 {
- info = append(info, yaml.MapItem{"minLength", m.MinLength})
- }
- if m.Pattern != "" {
- info = append(info, yaml.MapItem{"pattern", m.Pattern})
- }
- if m.MaxItems != 0 {
- info = append(info, yaml.MapItem{"maxItems", m.MaxItems})
- }
- if m.MinItems != 0 {
- info = append(info, yaml.MapItem{"minItems", m.MinItems})
- }
- if m.UniqueItems != false {
- info = append(info, yaml.MapItem{"uniqueItems", m.UniqueItems})
- }
- if len(m.Enum) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Enum {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"enum", items})
- }
- // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.MultipleOf != 0.0 {
- info = append(info, yaml.MapItem{"multipleOf", m.MultipleOf})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Properties suitable for JSON or YAML export.
-func (m *Properties) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.AdditionalProperties != nil {
- for _, item := range m.AdditionalProperties {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:additionalProperties Type:NamedSchema StringEnumValues:[] MapType:Schema Repeated:true Pattern: Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of QueryParameterSubSchema suitable for JSON or YAML export.
-func (m *QueryParameterSubSchema) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Required != false {
- info = append(info, yaml.MapItem{"required", m.Required})
- }
- if m.In != "" {
- info = append(info, yaml.MapItem{"in", m.In})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.AllowEmptyValue != false {
- info = append(info, yaml.MapItem{"allowEmptyValue", m.AllowEmptyValue})
- }
- if m.Type != "" {
- info = append(info, yaml.MapItem{"type", m.Type})
- }
- if m.Format != "" {
- info = append(info, yaml.MapItem{"format", m.Format})
- }
- if m.Items != nil {
- info = append(info, yaml.MapItem{"items", m.Items.ToRawInfo()})
- }
- // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.CollectionFormat != "" {
- info = append(info, yaml.MapItem{"collectionFormat", m.CollectionFormat})
- }
- if m.Default != nil {
- info = append(info, yaml.MapItem{"default", m.Default.ToRawInfo()})
- }
- // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Maximum != 0.0 {
- info = append(info, yaml.MapItem{"maximum", m.Maximum})
- }
- if m.ExclusiveMaximum != false {
- info = append(info, yaml.MapItem{"exclusiveMaximum", m.ExclusiveMaximum})
- }
- if m.Minimum != 0.0 {
- info = append(info, yaml.MapItem{"minimum", m.Minimum})
- }
- if m.ExclusiveMinimum != false {
- info = append(info, yaml.MapItem{"exclusiveMinimum", m.ExclusiveMinimum})
- }
- if m.MaxLength != 0 {
- info = append(info, yaml.MapItem{"maxLength", m.MaxLength})
- }
- if m.MinLength != 0 {
- info = append(info, yaml.MapItem{"minLength", m.MinLength})
- }
- if m.Pattern != "" {
- info = append(info, yaml.MapItem{"pattern", m.Pattern})
- }
- if m.MaxItems != 0 {
- info = append(info, yaml.MapItem{"maxItems", m.MaxItems})
- }
- if m.MinItems != 0 {
- info = append(info, yaml.MapItem{"minItems", m.MinItems})
- }
- if m.UniqueItems != false {
- info = append(info, yaml.MapItem{"uniqueItems", m.UniqueItems})
- }
- if len(m.Enum) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Enum {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"enum", items})
- }
- // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.MultipleOf != 0.0 {
- info = append(info, yaml.MapItem{"multipleOf", m.MultipleOf})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Response suitable for JSON or YAML export.
-func (m *Response) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.Schema != nil {
- info = append(info, yaml.MapItem{"schema", m.Schema.ToRawInfo()})
- }
- // &{Name:schema Type:SchemaItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Headers != nil {
- info = append(info, yaml.MapItem{"headers", m.Headers.ToRawInfo()})
- }
- // &{Name:headers Type:Headers StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Examples != nil {
- info = append(info, yaml.MapItem{"examples", m.Examples.ToRawInfo()})
- }
- // &{Name:examples Type:Examples StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of ResponseDefinitions suitable for JSON or YAML export.
-func (m *ResponseDefinitions) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.AdditionalProperties != nil {
- for _, item := range m.AdditionalProperties {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:additionalProperties Type:NamedResponse StringEnumValues:[] MapType:Response Repeated:true Pattern: Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of ResponseValue suitable for JSON or YAML export.
-func (m *ResponseValue) ToRawInfo() interface{} {
- // ONE OF WRAPPER
- // ResponseValue
- // {Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v0 := m.GetResponse()
- if v0 != nil {
- return v0.ToRawInfo()
- }
- // {Name:jsonReference Type:JsonReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v1 := m.GetJsonReference()
- if v1 != nil {
- return v1.ToRawInfo()
- }
- return nil
-}
-
-// ToRawInfo returns a description of Responses suitable for JSON or YAML export.
-func (m *Responses) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.ResponseCode != nil {
- for _, item := range m.ResponseCode {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:ResponseCode Type:NamedResponseValue StringEnumValues:[] MapType:ResponseValue Repeated:true Pattern:^([0-9]{3})$|^(default)$ Implicit:true Description:}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Schema suitable for JSON or YAML export.
-func (m *Schema) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.XRef != "" {
- info = append(info, yaml.MapItem{"$ref", m.XRef})
- }
- if m.Format != "" {
- info = append(info, yaml.MapItem{"format", m.Format})
- }
- if m.Title != "" {
- info = append(info, yaml.MapItem{"title", m.Title})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.Default != nil {
- info = append(info, yaml.MapItem{"default", m.Default.ToRawInfo()})
- }
- // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.MultipleOf != 0.0 {
- info = append(info, yaml.MapItem{"multipleOf", m.MultipleOf})
- }
- if m.Maximum != 0.0 {
- info = append(info, yaml.MapItem{"maximum", m.Maximum})
- }
- if m.ExclusiveMaximum != false {
- info = append(info, yaml.MapItem{"exclusiveMaximum", m.ExclusiveMaximum})
- }
- if m.Minimum != 0.0 {
- info = append(info, yaml.MapItem{"minimum", m.Minimum})
- }
- if m.ExclusiveMinimum != false {
- info = append(info, yaml.MapItem{"exclusiveMinimum", m.ExclusiveMinimum})
- }
- if m.MaxLength != 0 {
- info = append(info, yaml.MapItem{"maxLength", m.MaxLength})
- }
- if m.MinLength != 0 {
- info = append(info, yaml.MapItem{"minLength", m.MinLength})
- }
- if m.Pattern != "" {
- info = append(info, yaml.MapItem{"pattern", m.Pattern})
- }
- if m.MaxItems != 0 {
- info = append(info, yaml.MapItem{"maxItems", m.MaxItems})
- }
- if m.MinItems != 0 {
- info = append(info, yaml.MapItem{"minItems", m.MinItems})
- }
- if m.UniqueItems != false {
- info = append(info, yaml.MapItem{"uniqueItems", m.UniqueItems})
- }
- if m.MaxProperties != 0 {
- info = append(info, yaml.MapItem{"maxProperties", m.MaxProperties})
- }
- if m.MinProperties != 0 {
- info = append(info, yaml.MapItem{"minProperties", m.MinProperties})
- }
- if len(m.Required) != 0 {
- info = append(info, yaml.MapItem{"required", m.Required})
- }
- if len(m.Enum) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.Enum {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"enum", items})
- }
- // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.AdditionalProperties != nil {
- info = append(info, yaml.MapItem{"additionalProperties", m.AdditionalProperties.ToRawInfo()})
- }
- // &{Name:additionalProperties Type:AdditionalPropertiesItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Type != nil {
- if len(m.Type.Value) == 1 {
- info = append(info, yaml.MapItem{"type", m.Type.Value[0]})
- } else {
- info = append(info, yaml.MapItem{"type", m.Type.Value})
- }
- }
- // &{Name:type Type:TypeItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Items != nil {
- items := make([]interface{}, 0)
- for _, item := range m.Items.Schema {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"items", items[0]})
- }
- // &{Name:items Type:ItemsItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if len(m.AllOf) != 0 {
- items := make([]interface{}, 0)
- for _, item := range m.AllOf {
- items = append(items, item.ToRawInfo())
- }
- info = append(info, yaml.MapItem{"allOf", items})
- }
- // &{Name:allOf Type:Schema StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
- if m.Properties != nil {
- info = append(info, yaml.MapItem{"properties", m.Properties.ToRawInfo()})
- }
- // &{Name:properties Type:Properties StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Discriminator != "" {
- info = append(info, yaml.MapItem{"discriminator", m.Discriminator})
- }
- if m.ReadOnly != false {
- info = append(info, yaml.MapItem{"readOnly", m.ReadOnly})
- }
- if m.Xml != nil {
- info = append(info, yaml.MapItem{"xml", m.Xml.ToRawInfo()})
- }
- // &{Name:xml Type:Xml StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.ExternalDocs != nil {
- info = append(info, yaml.MapItem{"externalDocs", m.ExternalDocs.ToRawInfo()})
- }
- // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.Example != nil {
- info = append(info, yaml.MapItem{"example", m.Example.ToRawInfo()})
- }
- // &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of SchemaItem suitable for JSON or YAML export.
-func (m *SchemaItem) ToRawInfo() interface{} {
- // ONE OF WRAPPER
- // SchemaItem
- // {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v0 := m.GetSchema()
- if v0 != nil {
- return v0.ToRawInfo()
- }
- // {Name:fileSchema Type:FileSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v1 := m.GetFileSchema()
- if v1 != nil {
- return v1.ToRawInfo()
- }
- return nil
-}
-
-// ToRawInfo returns a description of SecurityDefinitions suitable for JSON or YAML export.
-func (m *SecurityDefinitions) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.AdditionalProperties != nil {
- for _, item := range m.AdditionalProperties {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:additionalProperties Type:NamedSecurityDefinitionsItem StringEnumValues:[] MapType:SecurityDefinitionsItem Repeated:true Pattern: Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of SecurityDefinitionsItem suitable for JSON or YAML export.
-func (m *SecurityDefinitionsItem) ToRawInfo() interface{} {
- // ONE OF WRAPPER
- // SecurityDefinitionsItem
- // {Name:basicAuthenticationSecurity Type:BasicAuthenticationSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v0 := m.GetBasicAuthenticationSecurity()
- if v0 != nil {
- return v0.ToRawInfo()
- }
- // {Name:apiKeySecurity Type:ApiKeySecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v1 := m.GetApiKeySecurity()
- if v1 != nil {
- return v1.ToRawInfo()
- }
- // {Name:oauth2ImplicitSecurity Type:Oauth2ImplicitSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v2 := m.GetOauth2ImplicitSecurity()
- if v2 != nil {
- return v2.ToRawInfo()
- }
- // {Name:oauth2PasswordSecurity Type:Oauth2PasswordSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v3 := m.GetOauth2PasswordSecurity()
- if v3 != nil {
- return v3.ToRawInfo()
- }
- // {Name:oauth2ApplicationSecurity Type:Oauth2ApplicationSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v4 := m.GetOauth2ApplicationSecurity()
- if v4 != nil {
- return v4.ToRawInfo()
- }
- // {Name:oauth2AccessCodeSecurity Type:Oauth2AccessCodeSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- v5 := m.GetOauth2AccessCodeSecurity()
- if v5 != nil {
- return v5.ToRawInfo()
- }
- return nil
-}
-
-// ToRawInfo returns a description of SecurityRequirement suitable for JSON or YAML export.
-func (m *SecurityRequirement) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.AdditionalProperties != nil {
- for _, item := range m.AdditionalProperties {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:additionalProperties Type:NamedStringArray StringEnumValues:[] MapType:StringArray Repeated:true Pattern: Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of StringArray suitable for JSON or YAML export.
-func (m *StringArray) ToRawInfo() interface{} {
- return m.Value
-}
-
-// ToRawInfo returns a description of Tag suitable for JSON or YAML export.
-func (m *Tag) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.Description != "" {
- info = append(info, yaml.MapItem{"description", m.Description})
- }
- if m.ExternalDocs != nil {
- info = append(info, yaml.MapItem{"externalDocs", m.ExternalDocs.ToRawInfo()})
- }
- // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of TypeItem suitable for JSON or YAML export.
-func (m *TypeItem) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if len(m.Value) != 0 {
- info = append(info, yaml.MapItem{"value", m.Value})
- }
- return info
-}
-
-// ToRawInfo returns a description of VendorExtension suitable for JSON or YAML export.
-func (m *VendorExtension) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.AdditionalProperties != nil {
- for _, item := range m.AdditionalProperties {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:true Description:}
- return info
-}
-
-// ToRawInfo returns a description of Xml suitable for JSON or YAML export.
-func (m *Xml) ToRawInfo() interface{} {
- info := yaml.MapSlice{}
- if m.Name != "" {
- info = append(info, yaml.MapItem{"name", m.Name})
- }
- if m.Namespace != "" {
- info = append(info, yaml.MapItem{"namespace", m.Namespace})
- }
- if m.Prefix != "" {
- info = append(info, yaml.MapItem{"prefix", m.Prefix})
- }
- if m.Attribute != false {
- info = append(info, yaml.MapItem{"attribute", m.Attribute})
- }
- if m.Wrapped != false {
- info = append(info, yaml.MapItem{"wrapped", m.Wrapped})
- }
- if m.VendorExtension != nil {
- for _, item := range m.VendorExtension {
- info = append(info, yaml.MapItem{item.Name, item.Value.ToRawInfo()})
- }
- }
- // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
- return info
-}
-
-var (
- pattern0 = regexp.MustCompile("^x-")
- pattern1 = regexp.MustCompile("^/")
- pattern2 = regexp.MustCompile("^([0-9]{3})$|^(default)$")
-)
diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go
deleted file mode 100644
index 37da7df25..000000000
--- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go
+++ /dev/null
@@ -1,4456 +0,0 @@
-// Code generated by protoc-gen-go.
-// source: OpenAPIv2/OpenAPIv2.proto
-// DO NOT EDIT!
-
-/*
-Package openapi_v2 is a generated protocol buffer package.
-
-It is generated from these files:
- OpenAPIv2/OpenAPIv2.proto
-
-It has these top-level messages:
- AdditionalPropertiesItem
- Any
- ApiKeySecurity
- BasicAuthenticationSecurity
- BodyParameter
- Contact
- Default
- Definitions
- Document
- Examples
- ExternalDocs
- FileSchema
- FormDataParameterSubSchema
- Header
- HeaderParameterSubSchema
- Headers
- Info
- ItemsItem
- JsonReference
- License
- NamedAny
- NamedHeader
- NamedParameter
- NamedPathItem
- NamedResponse
- NamedResponseValue
- NamedSchema
- NamedSecurityDefinitionsItem
- NamedString
- NamedStringArray
- NonBodyParameter
- Oauth2AccessCodeSecurity
- Oauth2ApplicationSecurity
- Oauth2ImplicitSecurity
- Oauth2PasswordSecurity
- Oauth2Scopes
- Operation
- Parameter
- ParameterDefinitions
- ParametersItem
- PathItem
- PathParameterSubSchema
- Paths
- PrimitivesItems
- Properties
- QueryParameterSubSchema
- Response
- ResponseDefinitions
- ResponseValue
- Responses
- Schema
- SchemaItem
- SecurityDefinitions
- SecurityDefinitionsItem
- SecurityRequirement
- StringArray
- Tag
- TypeItem
- VendorExtension
- Xml
-*/
-package openapi_v2
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/golang/protobuf/ptypes/any"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type AdditionalPropertiesItem struct {
- // Types that are valid to be assigned to Oneof:
- // *AdditionalPropertiesItem_Schema
- // *AdditionalPropertiesItem_Boolean
- Oneof isAdditionalPropertiesItem_Oneof `protobuf_oneof:"oneof"`
-}
-
-func (m *AdditionalPropertiesItem) Reset() { *m = AdditionalPropertiesItem{} }
-func (m *AdditionalPropertiesItem) String() string { return proto.CompactTextString(m) }
-func (*AdditionalPropertiesItem) ProtoMessage() {}
-func (*AdditionalPropertiesItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-type isAdditionalPropertiesItem_Oneof interface {
- isAdditionalPropertiesItem_Oneof()
-}
-
-type AdditionalPropertiesItem_Schema struct {
- Schema *Schema `protobuf:"bytes,1,opt,name=schema,oneof"`
-}
-type AdditionalPropertiesItem_Boolean struct {
- Boolean bool `protobuf:"varint,2,opt,name=boolean,oneof"`
-}
-
-func (*AdditionalPropertiesItem_Schema) isAdditionalPropertiesItem_Oneof() {}
-func (*AdditionalPropertiesItem_Boolean) isAdditionalPropertiesItem_Oneof() {}
-
-func (m *AdditionalPropertiesItem) GetOneof() isAdditionalPropertiesItem_Oneof {
- if m != nil {
- return m.Oneof
- }
- return nil
-}
-
-func (m *AdditionalPropertiesItem) GetSchema() *Schema {
- if x, ok := m.GetOneof().(*AdditionalPropertiesItem_Schema); ok {
- return x.Schema
- }
- return nil
-}
-
-func (m *AdditionalPropertiesItem) GetBoolean() bool {
- if x, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok {
- return x.Boolean
- }
- return false
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*AdditionalPropertiesItem) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _AdditionalPropertiesItem_OneofMarshaler, _AdditionalPropertiesItem_OneofUnmarshaler, _AdditionalPropertiesItem_OneofSizer, []interface{}{
- (*AdditionalPropertiesItem_Schema)(nil),
- (*AdditionalPropertiesItem_Boolean)(nil),
- }
-}
-
-func _AdditionalPropertiesItem_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*AdditionalPropertiesItem)
- // oneof
- switch x := m.Oneof.(type) {
- case *AdditionalPropertiesItem_Schema:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Schema); err != nil {
- return err
- }
- case *AdditionalPropertiesItem_Boolean:
- t := uint64(0)
- if x.Boolean {
- t = 1
- }
- b.EncodeVarint(2<<3 | proto.WireVarint)
- b.EncodeVarint(t)
- case nil:
- default:
- return fmt.Errorf("AdditionalPropertiesItem.Oneof has unexpected type %T", x)
- }
- return nil
-}
-
-func _AdditionalPropertiesItem_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*AdditionalPropertiesItem)
- switch tag {
- case 1: // oneof.schema
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Schema)
- err := b.DecodeMessage(msg)
- m.Oneof = &AdditionalPropertiesItem_Schema{msg}
- return true, err
- case 2: // oneof.boolean
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Oneof = &AdditionalPropertiesItem_Boolean{x != 0}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _AdditionalPropertiesItem_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*AdditionalPropertiesItem)
- // oneof
- switch x := m.Oneof.(type) {
- case *AdditionalPropertiesItem_Schema:
- s := proto.Size(x.Schema)
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *AdditionalPropertiesItem_Boolean:
- n += proto.SizeVarint(2<<3 | proto.WireVarint)
- n += 1
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type Any struct {
- Value *google_protobuf.Any `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
- Yaml string `protobuf:"bytes,2,opt,name=yaml" json:"yaml,omitempty"`
-}
-
-func (m *Any) Reset() { *m = Any{} }
-func (m *Any) String() string { return proto.CompactTextString(m) }
-func (*Any) ProtoMessage() {}
-func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-func (m *Any) GetValue() *google_protobuf.Any {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *Any) GetYaml() string {
- if m != nil {
- return m.Yaml
- }
- return ""
-}
-
-type ApiKeySecurity struct {
- Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
- Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
- In string `protobuf:"bytes,3,opt,name=in" json:"in,omitempty"`
- Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,5,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *ApiKeySecurity) Reset() { *m = ApiKeySecurity{} }
-func (m *ApiKeySecurity) String() string { return proto.CompactTextString(m) }
-func (*ApiKeySecurity) ProtoMessage() {}
-func (*ApiKeySecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-
-func (m *ApiKeySecurity) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *ApiKeySecurity) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *ApiKeySecurity) GetIn() string {
- if m != nil {
- return m.In
- }
- return ""
-}
-
-func (m *ApiKeySecurity) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *ApiKeySecurity) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type BasicAuthenticationSecurity struct {
- Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
- Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *BasicAuthenticationSecurity) Reset() { *m = BasicAuthenticationSecurity{} }
-func (m *BasicAuthenticationSecurity) String() string { return proto.CompactTextString(m) }
-func (*BasicAuthenticationSecurity) ProtoMessage() {}
-func (*BasicAuthenticationSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
-
-func (m *BasicAuthenticationSecurity) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *BasicAuthenticationSecurity) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *BasicAuthenticationSecurity) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type BodyParameter struct {
- // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
- Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"`
- // The name of the parameter.
- Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
- // Determines the location of the parameter.
- In string `protobuf:"bytes,3,opt,name=in" json:"in,omitempty"`
- // Determines whether or not this parameter is required or optional.
- Required bool `protobuf:"varint,4,opt,name=required" json:"required,omitempty"`
- Schema *Schema `protobuf:"bytes,5,opt,name=schema" json:"schema,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *BodyParameter) Reset() { *m = BodyParameter{} }
-func (m *BodyParameter) String() string { return proto.CompactTextString(m) }
-func (*BodyParameter) ProtoMessage() {}
-func (*BodyParameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
-
-func (m *BodyParameter) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *BodyParameter) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *BodyParameter) GetIn() string {
- if m != nil {
- return m.In
- }
- return ""
-}
-
-func (m *BodyParameter) GetRequired() bool {
- if m != nil {
- return m.Required
- }
- return false
-}
-
-func (m *BodyParameter) GetSchema() *Schema {
- if m != nil {
- return m.Schema
- }
- return nil
-}
-
-func (m *BodyParameter) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-// Contact information for the owners of the API.
-type Contact struct {
- // The identifying name of the contact person/organization.
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // The URL pointing to the contact information.
- Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
- // The email address of the contact person/organization.
- Email string `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,4,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Contact) Reset() { *m = Contact{} }
-func (m *Contact) String() string { return proto.CompactTextString(m) }
-func (*Contact) ProtoMessage() {}
-func (*Contact) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
-
-func (m *Contact) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *Contact) GetUrl() string {
- if m != nil {
- return m.Url
- }
- return ""
-}
-
-func (m *Contact) GetEmail() string {
- if m != nil {
- return m.Email
- }
- return ""
-}
-
-func (m *Contact) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Default struct {
- AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *Default) Reset() { *m = Default{} }
-func (m *Default) String() string { return proto.CompactTextString(m) }
-func (*Default) ProtoMessage() {}
-func (*Default) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
-
-func (m *Default) GetAdditionalProperties() []*NamedAny {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-// One or more JSON objects describing the schemas being consumed and produced by the API.
-type Definitions struct {
- AdditionalProperties []*NamedSchema `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *Definitions) Reset() { *m = Definitions{} }
-func (m *Definitions) String() string { return proto.CompactTextString(m) }
-func (*Definitions) ProtoMessage() {}
-func (*Definitions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
-
-func (m *Definitions) GetAdditionalProperties() []*NamedSchema {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-type Document struct {
- // The Swagger version of this document.
- Swagger string `protobuf:"bytes,1,opt,name=swagger" json:"swagger,omitempty"`
- Info *Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"`
- // The host (name or ip) of the API. Example: 'swagger.io'
- Host string `protobuf:"bytes,3,opt,name=host" json:"host,omitempty"`
- // The base path to the API. Example: '/api'.
- BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath" json:"base_path,omitempty"`
- // The transfer protocol of the API.
- Schemes []string `protobuf:"bytes,5,rep,name=schemes" json:"schemes,omitempty"`
- // A list of MIME types accepted by the API.
- Consumes []string `protobuf:"bytes,6,rep,name=consumes" json:"consumes,omitempty"`
- // A list of MIME types the API can produce.
- Produces []string `protobuf:"bytes,7,rep,name=produces" json:"produces,omitempty"`
- Paths *Paths `protobuf:"bytes,8,opt,name=paths" json:"paths,omitempty"`
- Definitions *Definitions `protobuf:"bytes,9,opt,name=definitions" json:"definitions,omitempty"`
- Parameters *ParameterDefinitions `protobuf:"bytes,10,opt,name=parameters" json:"parameters,omitempty"`
- Responses *ResponseDefinitions `protobuf:"bytes,11,opt,name=responses" json:"responses,omitempty"`
- Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security" json:"security,omitempty"`
- SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,13,opt,name=security_definitions,json=securityDefinitions" json:"security_definitions,omitempty"`
- Tags []*Tag `protobuf:"bytes,14,rep,name=tags" json:"tags,omitempty"`
- ExternalDocs *ExternalDocs `protobuf:"bytes,15,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,16,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Document) Reset() { *m = Document{} }
-func (m *Document) String() string { return proto.CompactTextString(m) }
-func (*Document) ProtoMessage() {}
-func (*Document) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
-
-func (m *Document) GetSwagger() string {
- if m != nil {
- return m.Swagger
- }
- return ""
-}
-
-func (m *Document) GetInfo() *Info {
- if m != nil {
- return m.Info
- }
- return nil
-}
-
-func (m *Document) GetHost() string {
- if m != nil {
- return m.Host
- }
- return ""
-}
-
-func (m *Document) GetBasePath() string {
- if m != nil {
- return m.BasePath
- }
- return ""
-}
-
-func (m *Document) GetSchemes() []string {
- if m != nil {
- return m.Schemes
- }
- return nil
-}
-
-func (m *Document) GetConsumes() []string {
- if m != nil {
- return m.Consumes
- }
- return nil
-}
-
-func (m *Document) GetProduces() []string {
- if m != nil {
- return m.Produces
- }
- return nil
-}
-
-func (m *Document) GetPaths() *Paths {
- if m != nil {
- return m.Paths
- }
- return nil
-}
-
-func (m *Document) GetDefinitions() *Definitions {
- if m != nil {
- return m.Definitions
- }
- return nil
-}
-
-func (m *Document) GetParameters() *ParameterDefinitions {
- if m != nil {
- return m.Parameters
- }
- return nil
-}
-
-func (m *Document) GetResponses() *ResponseDefinitions {
- if m != nil {
- return m.Responses
- }
- return nil
-}
-
-func (m *Document) GetSecurity() []*SecurityRequirement {
- if m != nil {
- return m.Security
- }
- return nil
-}
-
-func (m *Document) GetSecurityDefinitions() *SecurityDefinitions {
- if m != nil {
- return m.SecurityDefinitions
- }
- return nil
-}
-
-func (m *Document) GetTags() []*Tag {
- if m != nil {
- return m.Tags
- }
- return nil
-}
-
-func (m *Document) GetExternalDocs() *ExternalDocs {
- if m != nil {
- return m.ExternalDocs
- }
- return nil
-}
-
-func (m *Document) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Examples struct {
- AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *Examples) Reset() { *m = Examples{} }
-func (m *Examples) String() string { return proto.CompactTextString(m) }
-func (*Examples) ProtoMessage() {}
-func (*Examples) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
-
-func (m *Examples) GetAdditionalProperties() []*NamedAny {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-// information about external documentation
-type ExternalDocs struct {
- Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"`
- Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *ExternalDocs) Reset() { *m = ExternalDocs{} }
-func (m *ExternalDocs) String() string { return proto.CompactTextString(m) }
-func (*ExternalDocs) ProtoMessage() {}
-func (*ExternalDocs) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
-
-func (m *ExternalDocs) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *ExternalDocs) GetUrl() string {
- if m != nil {
- return m.Url
- }
- return ""
-}
-
-func (m *ExternalDocs) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-// A deterministic version of a JSON Schema object.
-type FileSchema struct {
- Format string `protobuf:"bytes,1,opt,name=format" json:"format,omitempty"`
- Title string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
- Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
- Default *Any `protobuf:"bytes,4,opt,name=default" json:"default,omitempty"`
- Required []string `protobuf:"bytes,5,rep,name=required" json:"required,omitempty"`
- Type string `protobuf:"bytes,6,opt,name=type" json:"type,omitempty"`
- ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
- ExternalDocs *ExternalDocs `protobuf:"bytes,8,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"`
- Example *Any `protobuf:"bytes,9,opt,name=example" json:"example,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,10,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *FileSchema) Reset() { *m = FileSchema{} }
-func (m *FileSchema) String() string { return proto.CompactTextString(m) }
-func (*FileSchema) ProtoMessage() {}
-func (*FileSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
-
-func (m *FileSchema) GetFormat() string {
- if m != nil {
- return m.Format
- }
- return ""
-}
-
-func (m *FileSchema) GetTitle() string {
- if m != nil {
- return m.Title
- }
- return ""
-}
-
-func (m *FileSchema) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *FileSchema) GetDefault() *Any {
- if m != nil {
- return m.Default
- }
- return nil
-}
-
-func (m *FileSchema) GetRequired() []string {
- if m != nil {
- return m.Required
- }
- return nil
-}
-
-func (m *FileSchema) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *FileSchema) GetReadOnly() bool {
- if m != nil {
- return m.ReadOnly
- }
- return false
-}
-
-func (m *FileSchema) GetExternalDocs() *ExternalDocs {
- if m != nil {
- return m.ExternalDocs
- }
- return nil
-}
-
-func (m *FileSchema) GetExample() *Any {
- if m != nil {
- return m.Example
- }
- return nil
-}
-
-func (m *FileSchema) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type FormDataParameterSubSchema struct {
- // Determines whether or not this parameter is required or optional.
- Required bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
- // Determines the location of the parameter.
- In string `protobuf:"bytes,2,opt,name=in" json:"in,omitempty"`
- // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
- Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
- // The name of the parameter.
- Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
- // allows sending a parameter by name only or with an empty value.
- AllowEmptyValue bool `protobuf:"varint,5,opt,name=allow_empty_value,json=allowEmptyValue" json:"allow_empty_value,omitempty"`
- Type string `protobuf:"bytes,6,opt,name=type" json:"type,omitempty"`
- Format string `protobuf:"bytes,7,opt,name=format" json:"format,omitempty"`
- Items *PrimitivesItems `protobuf:"bytes,8,opt,name=items" json:"items,omitempty"`
- CollectionFormat string `protobuf:"bytes,9,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"`
- Default *Any `protobuf:"bytes,10,opt,name=default" json:"default,omitempty"`
- Maximum float64 `protobuf:"fixed64,11,opt,name=maximum" json:"maximum,omitempty"`
- ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"`
- Minimum float64 `protobuf:"fixed64,13,opt,name=minimum" json:"minimum,omitempty"`
- ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"`
- MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength" json:"max_length,omitempty"`
- MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength" json:"min_length,omitempty"`
- Pattern string `protobuf:"bytes,17,opt,name=pattern" json:"pattern,omitempty"`
- MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems" json:"max_items,omitempty"`
- MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems" json:"min_items,omitempty"`
- UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"`
- Enum []*Any `protobuf:"bytes,21,rep,name=enum" json:"enum,omitempty"`
- MultipleOf float64 `protobuf:"fixed64,22,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,23,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *FormDataParameterSubSchema) Reset() { *m = FormDataParameterSubSchema{} }
-func (m *FormDataParameterSubSchema) String() string { return proto.CompactTextString(m) }
-func (*FormDataParameterSubSchema) ProtoMessage() {}
-func (*FormDataParameterSubSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
-
-func (m *FormDataParameterSubSchema) GetRequired() bool {
- if m != nil {
- return m.Required
- }
- return false
-}
-
-func (m *FormDataParameterSubSchema) GetIn() string {
- if m != nil {
- return m.In
- }
- return ""
-}
-
-func (m *FormDataParameterSubSchema) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *FormDataParameterSubSchema) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *FormDataParameterSubSchema) GetAllowEmptyValue() bool {
- if m != nil {
- return m.AllowEmptyValue
- }
- return false
-}
-
-func (m *FormDataParameterSubSchema) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *FormDataParameterSubSchema) GetFormat() string {
- if m != nil {
- return m.Format
- }
- return ""
-}
-
-func (m *FormDataParameterSubSchema) GetItems() *PrimitivesItems {
- if m != nil {
- return m.Items
- }
- return nil
-}
-
-func (m *FormDataParameterSubSchema) GetCollectionFormat() string {
- if m != nil {
- return m.CollectionFormat
- }
- return ""
-}
-
-func (m *FormDataParameterSubSchema) GetDefault() *Any {
- if m != nil {
- return m.Default
- }
- return nil
-}
-
-func (m *FormDataParameterSubSchema) GetMaximum() float64 {
- if m != nil {
- return m.Maximum
- }
- return 0
-}
-
-func (m *FormDataParameterSubSchema) GetExclusiveMaximum() bool {
- if m != nil {
- return m.ExclusiveMaximum
- }
- return false
-}
-
-func (m *FormDataParameterSubSchema) GetMinimum() float64 {
- if m != nil {
- return m.Minimum
- }
- return 0
-}
-
-func (m *FormDataParameterSubSchema) GetExclusiveMinimum() bool {
- if m != nil {
- return m.ExclusiveMinimum
- }
- return false
-}
-
-func (m *FormDataParameterSubSchema) GetMaxLength() int64 {
- if m != nil {
- return m.MaxLength
- }
- return 0
-}
-
-func (m *FormDataParameterSubSchema) GetMinLength() int64 {
- if m != nil {
- return m.MinLength
- }
- return 0
-}
-
-func (m *FormDataParameterSubSchema) GetPattern() string {
- if m != nil {
- return m.Pattern
- }
- return ""
-}
-
-func (m *FormDataParameterSubSchema) GetMaxItems() int64 {
- if m != nil {
- return m.MaxItems
- }
- return 0
-}
-
-func (m *FormDataParameterSubSchema) GetMinItems() int64 {
- if m != nil {
- return m.MinItems
- }
- return 0
-}
-
-func (m *FormDataParameterSubSchema) GetUniqueItems() bool {
- if m != nil {
- return m.UniqueItems
- }
- return false
-}
-
-func (m *FormDataParameterSubSchema) GetEnum() []*Any {
- if m != nil {
- return m.Enum
- }
- return nil
-}
-
-func (m *FormDataParameterSubSchema) GetMultipleOf() float64 {
- if m != nil {
- return m.MultipleOf
- }
- return 0
-}
-
-func (m *FormDataParameterSubSchema) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Header struct {
- Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
- Format string `protobuf:"bytes,2,opt,name=format" json:"format,omitempty"`
- Items *PrimitivesItems `protobuf:"bytes,3,opt,name=items" json:"items,omitempty"`
- CollectionFormat string `protobuf:"bytes,4,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"`
- Default *Any `protobuf:"bytes,5,opt,name=default" json:"default,omitempty"`
- Maximum float64 `protobuf:"fixed64,6,opt,name=maximum" json:"maximum,omitempty"`
- ExclusiveMaximum bool `protobuf:"varint,7,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"`
- Minimum float64 `protobuf:"fixed64,8,opt,name=minimum" json:"minimum,omitempty"`
- ExclusiveMinimum bool `protobuf:"varint,9,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"`
- MaxLength int64 `protobuf:"varint,10,opt,name=max_length,json=maxLength" json:"max_length,omitempty"`
- MinLength int64 `protobuf:"varint,11,opt,name=min_length,json=minLength" json:"min_length,omitempty"`
- Pattern string `protobuf:"bytes,12,opt,name=pattern" json:"pattern,omitempty"`
- MaxItems int64 `protobuf:"varint,13,opt,name=max_items,json=maxItems" json:"max_items,omitempty"`
- MinItems int64 `protobuf:"varint,14,opt,name=min_items,json=minItems" json:"min_items,omitempty"`
- UniqueItems bool `protobuf:"varint,15,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"`
- Enum []*Any `protobuf:"bytes,16,rep,name=enum" json:"enum,omitempty"`
- MultipleOf float64 `protobuf:"fixed64,17,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"`
- Description string `protobuf:"bytes,18,opt,name=description" json:"description,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,19,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Header) Reset() { *m = Header{} }
-func (m *Header) String() string { return proto.CompactTextString(m) }
-func (*Header) ProtoMessage() {}
-func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
-
-func (m *Header) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *Header) GetFormat() string {
- if m != nil {
- return m.Format
- }
- return ""
-}
-
-func (m *Header) GetItems() *PrimitivesItems {
- if m != nil {
- return m.Items
- }
- return nil
-}
-
-func (m *Header) GetCollectionFormat() string {
- if m != nil {
- return m.CollectionFormat
- }
- return ""
-}
-
-func (m *Header) GetDefault() *Any {
- if m != nil {
- return m.Default
- }
- return nil
-}
-
-func (m *Header) GetMaximum() float64 {
- if m != nil {
- return m.Maximum
- }
- return 0
-}
-
-func (m *Header) GetExclusiveMaximum() bool {
- if m != nil {
- return m.ExclusiveMaximum
- }
- return false
-}
-
-func (m *Header) GetMinimum() float64 {
- if m != nil {
- return m.Minimum
- }
- return 0
-}
-
-func (m *Header) GetExclusiveMinimum() bool {
- if m != nil {
- return m.ExclusiveMinimum
- }
- return false
-}
-
-func (m *Header) GetMaxLength() int64 {
- if m != nil {
- return m.MaxLength
- }
- return 0
-}
-
-func (m *Header) GetMinLength() int64 {
- if m != nil {
- return m.MinLength
- }
- return 0
-}
-
-func (m *Header) GetPattern() string {
- if m != nil {
- return m.Pattern
- }
- return ""
-}
-
-func (m *Header) GetMaxItems() int64 {
- if m != nil {
- return m.MaxItems
- }
- return 0
-}
-
-func (m *Header) GetMinItems() int64 {
- if m != nil {
- return m.MinItems
- }
- return 0
-}
-
-func (m *Header) GetUniqueItems() bool {
- if m != nil {
- return m.UniqueItems
- }
- return false
-}
-
-func (m *Header) GetEnum() []*Any {
- if m != nil {
- return m.Enum
- }
- return nil
-}
-
-func (m *Header) GetMultipleOf() float64 {
- if m != nil {
- return m.MultipleOf
- }
- return 0
-}
-
-func (m *Header) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *Header) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type HeaderParameterSubSchema struct {
- // Determines whether or not this parameter is required or optional.
- Required bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
- // Determines the location of the parameter.
- In string `protobuf:"bytes,2,opt,name=in" json:"in,omitempty"`
- // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
- Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
- // The name of the parameter.
- Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
- Type string `protobuf:"bytes,5,opt,name=type" json:"type,omitempty"`
- Format string `protobuf:"bytes,6,opt,name=format" json:"format,omitempty"`
- Items *PrimitivesItems `protobuf:"bytes,7,opt,name=items" json:"items,omitempty"`
- CollectionFormat string `protobuf:"bytes,8,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"`
- Default *Any `protobuf:"bytes,9,opt,name=default" json:"default,omitempty"`
- Maximum float64 `protobuf:"fixed64,10,opt,name=maximum" json:"maximum,omitempty"`
- ExclusiveMaximum bool `protobuf:"varint,11,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"`
- Minimum float64 `protobuf:"fixed64,12,opt,name=minimum" json:"minimum,omitempty"`
- ExclusiveMinimum bool `protobuf:"varint,13,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"`
- MaxLength int64 `protobuf:"varint,14,opt,name=max_length,json=maxLength" json:"max_length,omitempty"`
- MinLength int64 `protobuf:"varint,15,opt,name=min_length,json=minLength" json:"min_length,omitempty"`
- Pattern string `protobuf:"bytes,16,opt,name=pattern" json:"pattern,omitempty"`
- MaxItems int64 `protobuf:"varint,17,opt,name=max_items,json=maxItems" json:"max_items,omitempty"`
- MinItems int64 `protobuf:"varint,18,opt,name=min_items,json=minItems" json:"min_items,omitempty"`
- UniqueItems bool `protobuf:"varint,19,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"`
- Enum []*Any `protobuf:"bytes,20,rep,name=enum" json:"enum,omitempty"`
- MultipleOf float64 `protobuf:"fixed64,21,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,22,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *HeaderParameterSubSchema) Reset() { *m = HeaderParameterSubSchema{} }
-func (m *HeaderParameterSubSchema) String() string { return proto.CompactTextString(m) }
-func (*HeaderParameterSubSchema) ProtoMessage() {}
-func (*HeaderParameterSubSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
-
-func (m *HeaderParameterSubSchema) GetRequired() bool {
- if m != nil {
- return m.Required
- }
- return false
-}
-
-func (m *HeaderParameterSubSchema) GetIn() string {
- if m != nil {
- return m.In
- }
- return ""
-}
-
-func (m *HeaderParameterSubSchema) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *HeaderParameterSubSchema) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *HeaderParameterSubSchema) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *HeaderParameterSubSchema) GetFormat() string {
- if m != nil {
- return m.Format
- }
- return ""
-}
-
-func (m *HeaderParameterSubSchema) GetItems() *PrimitivesItems {
- if m != nil {
- return m.Items
- }
- return nil
-}
-
-func (m *HeaderParameterSubSchema) GetCollectionFormat() string {
- if m != nil {
- return m.CollectionFormat
- }
- return ""
-}
-
-func (m *HeaderParameterSubSchema) GetDefault() *Any {
- if m != nil {
- return m.Default
- }
- return nil
-}
-
-func (m *HeaderParameterSubSchema) GetMaximum() float64 {
- if m != nil {
- return m.Maximum
- }
- return 0
-}
-
-func (m *HeaderParameterSubSchema) GetExclusiveMaximum() bool {
- if m != nil {
- return m.ExclusiveMaximum
- }
- return false
-}
-
-func (m *HeaderParameterSubSchema) GetMinimum() float64 {
- if m != nil {
- return m.Minimum
- }
- return 0
-}
-
-func (m *HeaderParameterSubSchema) GetExclusiveMinimum() bool {
- if m != nil {
- return m.ExclusiveMinimum
- }
- return false
-}
-
-func (m *HeaderParameterSubSchema) GetMaxLength() int64 {
- if m != nil {
- return m.MaxLength
- }
- return 0
-}
-
-func (m *HeaderParameterSubSchema) GetMinLength() int64 {
- if m != nil {
- return m.MinLength
- }
- return 0
-}
-
-func (m *HeaderParameterSubSchema) GetPattern() string {
- if m != nil {
- return m.Pattern
- }
- return ""
-}
-
-func (m *HeaderParameterSubSchema) GetMaxItems() int64 {
- if m != nil {
- return m.MaxItems
- }
- return 0
-}
-
-func (m *HeaderParameterSubSchema) GetMinItems() int64 {
- if m != nil {
- return m.MinItems
- }
- return 0
-}
-
-func (m *HeaderParameterSubSchema) GetUniqueItems() bool {
- if m != nil {
- return m.UniqueItems
- }
- return false
-}
-
-func (m *HeaderParameterSubSchema) GetEnum() []*Any {
- if m != nil {
- return m.Enum
- }
- return nil
-}
-
-func (m *HeaderParameterSubSchema) GetMultipleOf() float64 {
- if m != nil {
- return m.MultipleOf
- }
- return 0
-}
-
-func (m *HeaderParameterSubSchema) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Headers struct {
- AdditionalProperties []*NamedHeader `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *Headers) Reset() { *m = Headers{} }
-func (m *Headers) String() string { return proto.CompactTextString(m) }
-func (*Headers) ProtoMessage() {}
-func (*Headers) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
-
-func (m *Headers) GetAdditionalProperties() []*NamedHeader {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-// General information about the API.
-type Info struct {
- // A unique and precise title of the API.
- Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
- // A semantic version number of the API.
- Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
- // A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed.
- Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
- // The terms of service for the API.
- TermsOfService string `protobuf:"bytes,4,opt,name=terms_of_service,json=termsOfService" json:"terms_of_service,omitempty"`
- Contact *Contact `protobuf:"bytes,5,opt,name=contact" json:"contact,omitempty"`
- License *License `protobuf:"bytes,6,opt,name=license" json:"license,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,7,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Info) Reset() { *m = Info{} }
-func (m *Info) String() string { return proto.CompactTextString(m) }
-func (*Info) ProtoMessage() {}
-func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
-
-func (m *Info) GetTitle() string {
- if m != nil {
- return m.Title
- }
- return ""
-}
-
-func (m *Info) GetVersion() string {
- if m != nil {
- return m.Version
- }
- return ""
-}
-
-func (m *Info) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *Info) GetTermsOfService() string {
- if m != nil {
- return m.TermsOfService
- }
- return ""
-}
-
-func (m *Info) GetContact() *Contact {
- if m != nil {
- return m.Contact
- }
- return nil
-}
-
-func (m *Info) GetLicense() *License {
- if m != nil {
- return m.License
- }
- return nil
-}
-
-func (m *Info) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type ItemsItem struct {
- Schema []*Schema `protobuf:"bytes,1,rep,name=schema" json:"schema,omitempty"`
-}
-
-func (m *ItemsItem) Reset() { *m = ItemsItem{} }
-func (m *ItemsItem) String() string { return proto.CompactTextString(m) }
-func (*ItemsItem) ProtoMessage() {}
-func (*ItemsItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
-
-func (m *ItemsItem) GetSchema() []*Schema {
- if m != nil {
- return m.Schema
- }
- return nil
-}
-
-type JsonReference struct {
- XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref" json:"_ref,omitempty"`
- Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
-}
-
-func (m *JsonReference) Reset() { *m = JsonReference{} }
-func (m *JsonReference) String() string { return proto.CompactTextString(m) }
-func (*JsonReference) ProtoMessage() {}
-func (*JsonReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
-
-func (m *JsonReference) GetXRef() string {
- if m != nil {
- return m.XRef
- }
- return ""
-}
-
-func (m *JsonReference) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-type License struct {
- // The name of the license type. It's encouraged to use an OSI compatible license.
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // The URL pointing to the license.
- Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *License) Reset() { *m = License{} }
-func (m *License) String() string { return proto.CompactTextString(m) }
-func (*License) ProtoMessage() {}
-func (*License) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
-
-func (m *License) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *License) GetUrl() string {
- if m != nil {
- return m.Url
- }
- return ""
-}
-
-func (m *License) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs.
-type NamedAny struct {
- // Map key
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Mapped value
- Value *Any `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *NamedAny) Reset() { *m = NamedAny{} }
-func (m *NamedAny) String() string { return proto.CompactTextString(m) }
-func (*NamedAny) ProtoMessage() {}
-func (*NamedAny) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
-
-func (m *NamedAny) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *NamedAny) GetValue() *Any {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs.
-type NamedHeader struct {
- // Map key
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Mapped value
- Value *Header `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *NamedHeader) Reset() { *m = NamedHeader{} }
-func (m *NamedHeader) String() string { return proto.CompactTextString(m) }
-func (*NamedHeader) ProtoMessage() {}
-func (*NamedHeader) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }
-
-func (m *NamedHeader) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *NamedHeader) GetValue() *Header {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs.
-type NamedParameter struct {
- // Map key
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Mapped value
- Value *Parameter `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *NamedParameter) Reset() { *m = NamedParameter{} }
-func (m *NamedParameter) String() string { return proto.CompactTextString(m) }
-func (*NamedParameter) ProtoMessage() {}
-func (*NamedParameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }
-
-func (m *NamedParameter) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *NamedParameter) GetValue() *Parameter {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs.
-type NamedPathItem struct {
- // Map key
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Mapped value
- Value *PathItem `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *NamedPathItem) Reset() { *m = NamedPathItem{} }
-func (m *NamedPathItem) String() string { return proto.CompactTextString(m) }
-func (*NamedPathItem) ProtoMessage() {}
-func (*NamedPathItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }
-
-func (m *NamedPathItem) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *NamedPathItem) GetValue() *PathItem {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs.
-type NamedResponse struct {
- // Map key
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Mapped value
- Value *Response `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *NamedResponse) Reset() { *m = NamedResponse{} }
-func (m *NamedResponse) String() string { return proto.CompactTextString(m) }
-func (*NamedResponse) ProtoMessage() {}
-func (*NamedResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }
-
-func (m *NamedResponse) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *NamedResponse) GetValue() *Response {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs.
-type NamedResponseValue struct {
- // Map key
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Mapped value
- Value *ResponseValue `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *NamedResponseValue) Reset() { *m = NamedResponseValue{} }
-func (m *NamedResponseValue) String() string { return proto.CompactTextString(m) }
-func (*NamedResponseValue) ProtoMessage() {}
-func (*NamedResponseValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }
-
-func (m *NamedResponseValue) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *NamedResponseValue) GetValue() *ResponseValue {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs.
-type NamedSchema struct {
- // Map key
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Mapped value
- Value *Schema `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *NamedSchema) Reset() { *m = NamedSchema{} }
-func (m *NamedSchema) String() string { return proto.CompactTextString(m) }
-func (*NamedSchema) ProtoMessage() {}
-func (*NamedSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} }
-
-func (m *NamedSchema) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *NamedSchema) GetValue() *Schema {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs.
-type NamedSecurityDefinitionsItem struct {
- // Map key
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Mapped value
- Value *SecurityDefinitionsItem `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *NamedSecurityDefinitionsItem) Reset() { *m = NamedSecurityDefinitionsItem{} }
-func (m *NamedSecurityDefinitionsItem) String() string { return proto.CompactTextString(m) }
-func (*NamedSecurityDefinitionsItem) ProtoMessage() {}
-func (*NamedSecurityDefinitionsItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} }
-
-func (m *NamedSecurityDefinitionsItem) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *NamedSecurityDefinitionsItem) GetValue() *SecurityDefinitionsItem {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-// Automatically-generated message used to represent maps of string as ordered (name,value) pairs.
-type NamedString struct {
- // Map key
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Mapped value
- Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *NamedString) Reset() { *m = NamedString{} }
-func (m *NamedString) String() string { return proto.CompactTextString(m) }
-func (*NamedString) ProtoMessage() {}
-func (*NamedString) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} }
-
-func (m *NamedString) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *NamedString) GetValue() string {
- if m != nil {
- return m.Value
- }
- return ""
-}
-
-// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs.
-type NamedStringArray struct {
- // Map key
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Mapped value
- Value *StringArray `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *NamedStringArray) Reset() { *m = NamedStringArray{} }
-func (m *NamedStringArray) String() string { return proto.CompactTextString(m) }
-func (*NamedStringArray) ProtoMessage() {}
-func (*NamedStringArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} }
-
-func (m *NamedStringArray) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *NamedStringArray) GetValue() *StringArray {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-type NonBodyParameter struct {
- // Types that are valid to be assigned to Oneof:
- // *NonBodyParameter_HeaderParameterSubSchema
- // *NonBodyParameter_FormDataParameterSubSchema
- // *NonBodyParameter_QueryParameterSubSchema
- // *NonBodyParameter_PathParameterSubSchema
- Oneof isNonBodyParameter_Oneof `protobuf_oneof:"oneof"`
-}
-
-func (m *NonBodyParameter) Reset() { *m = NonBodyParameter{} }
-func (m *NonBodyParameter) String() string { return proto.CompactTextString(m) }
-func (*NonBodyParameter) ProtoMessage() {}
-func (*NonBodyParameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} }
-
-type isNonBodyParameter_Oneof interface {
- isNonBodyParameter_Oneof()
-}
-
-type NonBodyParameter_HeaderParameterSubSchema struct {
- HeaderParameterSubSchema *HeaderParameterSubSchema `protobuf:"bytes,1,opt,name=header_parameter_sub_schema,json=headerParameterSubSchema,oneof"`
-}
-type NonBodyParameter_FormDataParameterSubSchema struct {
- FormDataParameterSubSchema *FormDataParameterSubSchema `protobuf:"bytes,2,opt,name=form_data_parameter_sub_schema,json=formDataParameterSubSchema,oneof"`
-}
-type NonBodyParameter_QueryParameterSubSchema struct {
- QueryParameterSubSchema *QueryParameterSubSchema `protobuf:"bytes,3,opt,name=query_parameter_sub_schema,json=queryParameterSubSchema,oneof"`
-}
-type NonBodyParameter_PathParameterSubSchema struct {
- PathParameterSubSchema *PathParameterSubSchema `protobuf:"bytes,4,opt,name=path_parameter_sub_schema,json=pathParameterSubSchema,oneof"`
-}
-
-func (*NonBodyParameter_HeaderParameterSubSchema) isNonBodyParameter_Oneof() {}
-func (*NonBodyParameter_FormDataParameterSubSchema) isNonBodyParameter_Oneof() {}
-func (*NonBodyParameter_QueryParameterSubSchema) isNonBodyParameter_Oneof() {}
-func (*NonBodyParameter_PathParameterSubSchema) isNonBodyParameter_Oneof() {}
-
-func (m *NonBodyParameter) GetOneof() isNonBodyParameter_Oneof {
- if m != nil {
- return m.Oneof
- }
- return nil
-}
-
-func (m *NonBodyParameter) GetHeaderParameterSubSchema() *HeaderParameterSubSchema {
- if x, ok := m.GetOneof().(*NonBodyParameter_HeaderParameterSubSchema); ok {
- return x.HeaderParameterSubSchema
- }
- return nil
-}
-
-func (m *NonBodyParameter) GetFormDataParameterSubSchema() *FormDataParameterSubSchema {
- if x, ok := m.GetOneof().(*NonBodyParameter_FormDataParameterSubSchema); ok {
- return x.FormDataParameterSubSchema
- }
- return nil
-}
-
-func (m *NonBodyParameter) GetQueryParameterSubSchema() *QueryParameterSubSchema {
- if x, ok := m.GetOneof().(*NonBodyParameter_QueryParameterSubSchema); ok {
- return x.QueryParameterSubSchema
- }
- return nil
-}
-
-func (m *NonBodyParameter) GetPathParameterSubSchema() *PathParameterSubSchema {
- if x, ok := m.GetOneof().(*NonBodyParameter_PathParameterSubSchema); ok {
- return x.PathParameterSubSchema
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*NonBodyParameter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _NonBodyParameter_OneofMarshaler, _NonBodyParameter_OneofUnmarshaler, _NonBodyParameter_OneofSizer, []interface{}{
- (*NonBodyParameter_HeaderParameterSubSchema)(nil),
- (*NonBodyParameter_FormDataParameterSubSchema)(nil),
- (*NonBodyParameter_QueryParameterSubSchema)(nil),
- (*NonBodyParameter_PathParameterSubSchema)(nil),
- }
-}
-
-func _NonBodyParameter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*NonBodyParameter)
- // oneof
- switch x := m.Oneof.(type) {
- case *NonBodyParameter_HeaderParameterSubSchema:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.HeaderParameterSubSchema); err != nil {
- return err
- }
- case *NonBodyParameter_FormDataParameterSubSchema:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.FormDataParameterSubSchema); err != nil {
- return err
- }
- case *NonBodyParameter_QueryParameterSubSchema:
- b.EncodeVarint(3<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.QueryParameterSubSchema); err != nil {
- return err
- }
- case *NonBodyParameter_PathParameterSubSchema:
- b.EncodeVarint(4<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.PathParameterSubSchema); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("NonBodyParameter.Oneof has unexpected type %T", x)
- }
- return nil
-}
-
-func _NonBodyParameter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*NonBodyParameter)
- switch tag {
- case 1: // oneof.header_parameter_sub_schema
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(HeaderParameterSubSchema)
- err := b.DecodeMessage(msg)
- m.Oneof = &NonBodyParameter_HeaderParameterSubSchema{msg}
- return true, err
- case 2: // oneof.form_data_parameter_sub_schema
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(FormDataParameterSubSchema)
- err := b.DecodeMessage(msg)
- m.Oneof = &NonBodyParameter_FormDataParameterSubSchema{msg}
- return true, err
- case 3: // oneof.query_parameter_sub_schema
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(QueryParameterSubSchema)
- err := b.DecodeMessage(msg)
- m.Oneof = &NonBodyParameter_QueryParameterSubSchema{msg}
- return true, err
- case 4: // oneof.path_parameter_sub_schema
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(PathParameterSubSchema)
- err := b.DecodeMessage(msg)
- m.Oneof = &NonBodyParameter_PathParameterSubSchema{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _NonBodyParameter_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*NonBodyParameter)
- // oneof
- switch x := m.Oneof.(type) {
- case *NonBodyParameter_HeaderParameterSubSchema:
- s := proto.Size(x.HeaderParameterSubSchema)
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *NonBodyParameter_FormDataParameterSubSchema:
- s := proto.Size(x.FormDataParameterSubSchema)
- n += proto.SizeVarint(2<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *NonBodyParameter_QueryParameterSubSchema:
- s := proto.Size(x.QueryParameterSubSchema)
- n += proto.SizeVarint(3<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *NonBodyParameter_PathParameterSubSchema:
- s := proto.Size(x.PathParameterSubSchema)
- n += proto.SizeVarint(4<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type Oauth2AccessCodeSecurity struct {
- Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
- Flow string `protobuf:"bytes,2,opt,name=flow" json:"flow,omitempty"`
- Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes" json:"scopes,omitempty"`
- AuthorizationUrl string `protobuf:"bytes,4,opt,name=authorization_url,json=authorizationUrl" json:"authorization_url,omitempty"`
- TokenUrl string `protobuf:"bytes,5,opt,name=token_url,json=tokenUrl" json:"token_url,omitempty"`
- Description string `protobuf:"bytes,6,opt,name=description" json:"description,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,7,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Oauth2AccessCodeSecurity) Reset() { *m = Oauth2AccessCodeSecurity{} }
-func (m *Oauth2AccessCodeSecurity) String() string { return proto.CompactTextString(m) }
-func (*Oauth2AccessCodeSecurity) ProtoMessage() {}
-func (*Oauth2AccessCodeSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} }
-
-func (m *Oauth2AccessCodeSecurity) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *Oauth2AccessCodeSecurity) GetFlow() string {
- if m != nil {
- return m.Flow
- }
- return ""
-}
-
-func (m *Oauth2AccessCodeSecurity) GetScopes() *Oauth2Scopes {
- if m != nil {
- return m.Scopes
- }
- return nil
-}
-
-func (m *Oauth2AccessCodeSecurity) GetAuthorizationUrl() string {
- if m != nil {
- return m.AuthorizationUrl
- }
- return ""
-}
-
-func (m *Oauth2AccessCodeSecurity) GetTokenUrl() string {
- if m != nil {
- return m.TokenUrl
- }
- return ""
-}
-
-func (m *Oauth2AccessCodeSecurity) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *Oauth2AccessCodeSecurity) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Oauth2ApplicationSecurity struct {
- Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
- Flow string `protobuf:"bytes,2,opt,name=flow" json:"flow,omitempty"`
- Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes" json:"scopes,omitempty"`
- TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl" json:"token_url,omitempty"`
- Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Oauth2ApplicationSecurity) Reset() { *m = Oauth2ApplicationSecurity{} }
-func (m *Oauth2ApplicationSecurity) String() string { return proto.CompactTextString(m) }
-func (*Oauth2ApplicationSecurity) ProtoMessage() {}
-func (*Oauth2ApplicationSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} }
-
-func (m *Oauth2ApplicationSecurity) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *Oauth2ApplicationSecurity) GetFlow() string {
- if m != nil {
- return m.Flow
- }
- return ""
-}
-
-func (m *Oauth2ApplicationSecurity) GetScopes() *Oauth2Scopes {
- if m != nil {
- return m.Scopes
- }
- return nil
-}
-
-func (m *Oauth2ApplicationSecurity) GetTokenUrl() string {
- if m != nil {
- return m.TokenUrl
- }
- return ""
-}
-
-func (m *Oauth2ApplicationSecurity) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *Oauth2ApplicationSecurity) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Oauth2ImplicitSecurity struct {
- Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
- Flow string `protobuf:"bytes,2,opt,name=flow" json:"flow,omitempty"`
- Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes" json:"scopes,omitempty"`
- AuthorizationUrl string `protobuf:"bytes,4,opt,name=authorization_url,json=authorizationUrl" json:"authorization_url,omitempty"`
- Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Oauth2ImplicitSecurity) Reset() { *m = Oauth2ImplicitSecurity{} }
-func (m *Oauth2ImplicitSecurity) String() string { return proto.CompactTextString(m) }
-func (*Oauth2ImplicitSecurity) ProtoMessage() {}
-func (*Oauth2ImplicitSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} }
-
-func (m *Oauth2ImplicitSecurity) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *Oauth2ImplicitSecurity) GetFlow() string {
- if m != nil {
- return m.Flow
- }
- return ""
-}
-
-func (m *Oauth2ImplicitSecurity) GetScopes() *Oauth2Scopes {
- if m != nil {
- return m.Scopes
- }
- return nil
-}
-
-func (m *Oauth2ImplicitSecurity) GetAuthorizationUrl() string {
- if m != nil {
- return m.AuthorizationUrl
- }
- return ""
-}
-
-func (m *Oauth2ImplicitSecurity) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *Oauth2ImplicitSecurity) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Oauth2PasswordSecurity struct {
- Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
- Flow string `protobuf:"bytes,2,opt,name=flow" json:"flow,omitempty"`
- Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes" json:"scopes,omitempty"`
- TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl" json:"token_url,omitempty"`
- Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Oauth2PasswordSecurity) Reset() { *m = Oauth2PasswordSecurity{} }
-func (m *Oauth2PasswordSecurity) String() string { return proto.CompactTextString(m) }
-func (*Oauth2PasswordSecurity) ProtoMessage() {}
-func (*Oauth2PasswordSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} }
-
-func (m *Oauth2PasswordSecurity) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *Oauth2PasswordSecurity) GetFlow() string {
- if m != nil {
- return m.Flow
- }
- return ""
-}
-
-func (m *Oauth2PasswordSecurity) GetScopes() *Oauth2Scopes {
- if m != nil {
- return m.Scopes
- }
- return nil
-}
-
-func (m *Oauth2PasswordSecurity) GetTokenUrl() string {
- if m != nil {
- return m.TokenUrl
- }
- return ""
-}
-
-func (m *Oauth2PasswordSecurity) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *Oauth2PasswordSecurity) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Oauth2Scopes struct {
- AdditionalProperties []*NamedString `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *Oauth2Scopes) Reset() { *m = Oauth2Scopes{} }
-func (m *Oauth2Scopes) String() string { return proto.CompactTextString(m) }
-func (*Oauth2Scopes) ProtoMessage() {}
-func (*Oauth2Scopes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} }
-
-func (m *Oauth2Scopes) GetAdditionalProperties() []*NamedString {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-type Operation struct {
- Tags []string `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"`
- // A brief summary of the operation.
- Summary string `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"`
- // A longer description of the operation, GitHub Flavored Markdown is allowed.
- Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
- ExternalDocs *ExternalDocs `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"`
- // A unique identifier of the operation.
- OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId" json:"operation_id,omitempty"`
- // A list of MIME types the API can produce.
- Produces []string `protobuf:"bytes,6,rep,name=produces" json:"produces,omitempty"`
- // A list of MIME types the API can consume.
- Consumes []string `protobuf:"bytes,7,rep,name=consumes" json:"consumes,omitempty"`
- // The parameters needed to send a valid API call.
- Parameters []*ParametersItem `protobuf:"bytes,8,rep,name=parameters" json:"parameters,omitempty"`
- Responses *Responses `protobuf:"bytes,9,opt,name=responses" json:"responses,omitempty"`
- // The transfer protocol of the API.
- Schemes []string `protobuf:"bytes,10,rep,name=schemes" json:"schemes,omitempty"`
- Deprecated bool `protobuf:"varint,11,opt,name=deprecated" json:"deprecated,omitempty"`
- Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security" json:"security,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,13,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Operation) Reset() { *m = Operation{} }
-func (m *Operation) String() string { return proto.CompactTextString(m) }
-func (*Operation) ProtoMessage() {}
-func (*Operation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} }
-
-func (m *Operation) GetTags() []string {
- if m != nil {
- return m.Tags
- }
- return nil
-}
-
-func (m *Operation) GetSummary() string {
- if m != nil {
- return m.Summary
- }
- return ""
-}
-
-func (m *Operation) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *Operation) GetExternalDocs() *ExternalDocs {
- if m != nil {
- return m.ExternalDocs
- }
- return nil
-}
-
-func (m *Operation) GetOperationId() string {
- if m != nil {
- return m.OperationId
- }
- return ""
-}
-
-func (m *Operation) GetProduces() []string {
- if m != nil {
- return m.Produces
- }
- return nil
-}
-
-func (m *Operation) GetConsumes() []string {
- if m != nil {
- return m.Consumes
- }
- return nil
-}
-
-func (m *Operation) GetParameters() []*ParametersItem {
- if m != nil {
- return m.Parameters
- }
- return nil
-}
-
-func (m *Operation) GetResponses() *Responses {
- if m != nil {
- return m.Responses
- }
- return nil
-}
-
-func (m *Operation) GetSchemes() []string {
- if m != nil {
- return m.Schemes
- }
- return nil
-}
-
-func (m *Operation) GetDeprecated() bool {
- if m != nil {
- return m.Deprecated
- }
- return false
-}
-
-func (m *Operation) GetSecurity() []*SecurityRequirement {
- if m != nil {
- return m.Security
- }
- return nil
-}
-
-func (m *Operation) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Parameter struct {
- // Types that are valid to be assigned to Oneof:
- // *Parameter_BodyParameter
- // *Parameter_NonBodyParameter
- Oneof isParameter_Oneof `protobuf_oneof:"oneof"`
-}
-
-func (m *Parameter) Reset() { *m = Parameter{} }
-func (m *Parameter) String() string { return proto.CompactTextString(m) }
-func (*Parameter) ProtoMessage() {}
-func (*Parameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} }
-
-type isParameter_Oneof interface {
- isParameter_Oneof()
-}
-
-type Parameter_BodyParameter struct {
- BodyParameter *BodyParameter `protobuf:"bytes,1,opt,name=body_parameter,json=bodyParameter,oneof"`
-}
-type Parameter_NonBodyParameter struct {
- NonBodyParameter *NonBodyParameter `protobuf:"bytes,2,opt,name=non_body_parameter,json=nonBodyParameter,oneof"`
-}
-
-func (*Parameter_BodyParameter) isParameter_Oneof() {}
-func (*Parameter_NonBodyParameter) isParameter_Oneof() {}
-
-func (m *Parameter) GetOneof() isParameter_Oneof {
- if m != nil {
- return m.Oneof
- }
- return nil
-}
-
-func (m *Parameter) GetBodyParameter() *BodyParameter {
- if x, ok := m.GetOneof().(*Parameter_BodyParameter); ok {
- return x.BodyParameter
- }
- return nil
-}
-
-func (m *Parameter) GetNonBodyParameter() *NonBodyParameter {
- if x, ok := m.GetOneof().(*Parameter_NonBodyParameter); ok {
- return x.NonBodyParameter
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Parameter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Parameter_OneofMarshaler, _Parameter_OneofUnmarshaler, _Parameter_OneofSizer, []interface{}{
- (*Parameter_BodyParameter)(nil),
- (*Parameter_NonBodyParameter)(nil),
- }
-}
-
-func _Parameter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Parameter)
- // oneof
- switch x := m.Oneof.(type) {
- case *Parameter_BodyParameter:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.BodyParameter); err != nil {
- return err
- }
- case *Parameter_NonBodyParameter:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.NonBodyParameter); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("Parameter.Oneof has unexpected type %T", x)
- }
- return nil
-}
-
-func _Parameter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Parameter)
- switch tag {
- case 1: // oneof.body_parameter
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(BodyParameter)
- err := b.DecodeMessage(msg)
- m.Oneof = &Parameter_BodyParameter{msg}
- return true, err
- case 2: // oneof.non_body_parameter
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(NonBodyParameter)
- err := b.DecodeMessage(msg)
- m.Oneof = &Parameter_NonBodyParameter{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Parameter_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Parameter)
- // oneof
- switch x := m.Oneof.(type) {
- case *Parameter_BodyParameter:
- s := proto.Size(x.BodyParameter)
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *Parameter_NonBodyParameter:
- s := proto.Size(x.NonBodyParameter)
- n += proto.SizeVarint(2<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// One or more JSON representations for parameters
-type ParameterDefinitions struct {
- AdditionalProperties []*NamedParameter `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *ParameterDefinitions) Reset() { *m = ParameterDefinitions{} }
-func (m *ParameterDefinitions) String() string { return proto.CompactTextString(m) }
-func (*ParameterDefinitions) ProtoMessage() {}
-func (*ParameterDefinitions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} }
-
-func (m *ParameterDefinitions) GetAdditionalProperties() []*NamedParameter {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-type ParametersItem struct {
- // Types that are valid to be assigned to Oneof:
- // *ParametersItem_Parameter
- // *ParametersItem_JsonReference
- Oneof isParametersItem_Oneof `protobuf_oneof:"oneof"`
-}
-
-func (m *ParametersItem) Reset() { *m = ParametersItem{} }
-func (m *ParametersItem) String() string { return proto.CompactTextString(m) }
-func (*ParametersItem) ProtoMessage() {}
-func (*ParametersItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} }
-
-type isParametersItem_Oneof interface {
- isParametersItem_Oneof()
-}
-
-type ParametersItem_Parameter struct {
- Parameter *Parameter `protobuf:"bytes,1,opt,name=parameter,oneof"`
-}
-type ParametersItem_JsonReference struct {
- JsonReference *JsonReference `protobuf:"bytes,2,opt,name=json_reference,json=jsonReference,oneof"`
-}
-
-func (*ParametersItem_Parameter) isParametersItem_Oneof() {}
-func (*ParametersItem_JsonReference) isParametersItem_Oneof() {}
-
-func (m *ParametersItem) GetOneof() isParametersItem_Oneof {
- if m != nil {
- return m.Oneof
- }
- return nil
-}
-
-func (m *ParametersItem) GetParameter() *Parameter {
- if x, ok := m.GetOneof().(*ParametersItem_Parameter); ok {
- return x.Parameter
- }
- return nil
-}
-
-func (m *ParametersItem) GetJsonReference() *JsonReference {
- if x, ok := m.GetOneof().(*ParametersItem_JsonReference); ok {
- return x.JsonReference
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*ParametersItem) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _ParametersItem_OneofMarshaler, _ParametersItem_OneofUnmarshaler, _ParametersItem_OneofSizer, []interface{}{
- (*ParametersItem_Parameter)(nil),
- (*ParametersItem_JsonReference)(nil),
- }
-}
-
-func _ParametersItem_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*ParametersItem)
- // oneof
- switch x := m.Oneof.(type) {
- case *ParametersItem_Parameter:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Parameter); err != nil {
- return err
- }
- case *ParametersItem_JsonReference:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.JsonReference); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("ParametersItem.Oneof has unexpected type %T", x)
- }
- return nil
-}
-
-func _ParametersItem_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*ParametersItem)
- switch tag {
- case 1: // oneof.parameter
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Parameter)
- err := b.DecodeMessage(msg)
- m.Oneof = &ParametersItem_Parameter{msg}
- return true, err
- case 2: // oneof.json_reference
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(JsonReference)
- err := b.DecodeMessage(msg)
- m.Oneof = &ParametersItem_JsonReference{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _ParametersItem_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*ParametersItem)
- // oneof
- switch x := m.Oneof.(type) {
- case *ParametersItem_Parameter:
- s := proto.Size(x.Parameter)
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *ParametersItem_JsonReference:
- s := proto.Size(x.JsonReference)
- n += proto.SizeVarint(2<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type PathItem struct {
- XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref" json:"_ref,omitempty"`
- Get *Operation `protobuf:"bytes,2,opt,name=get" json:"get,omitempty"`
- Put *Operation `protobuf:"bytes,3,opt,name=put" json:"put,omitempty"`
- Post *Operation `protobuf:"bytes,4,opt,name=post" json:"post,omitempty"`
- Delete *Operation `protobuf:"bytes,5,opt,name=delete" json:"delete,omitempty"`
- Options *Operation `protobuf:"bytes,6,opt,name=options" json:"options,omitempty"`
- Head *Operation `protobuf:"bytes,7,opt,name=head" json:"head,omitempty"`
- Patch *Operation `protobuf:"bytes,8,opt,name=patch" json:"patch,omitempty"`
- // The parameters needed to send a valid API call.
- Parameters []*ParametersItem `protobuf:"bytes,9,rep,name=parameters" json:"parameters,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,10,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *PathItem) Reset() { *m = PathItem{} }
-func (m *PathItem) String() string { return proto.CompactTextString(m) }
-func (*PathItem) ProtoMessage() {}
-func (*PathItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} }
-
-func (m *PathItem) GetXRef() string {
- if m != nil {
- return m.XRef
- }
- return ""
-}
-
-func (m *PathItem) GetGet() *Operation {
- if m != nil {
- return m.Get
- }
- return nil
-}
-
-func (m *PathItem) GetPut() *Operation {
- if m != nil {
- return m.Put
- }
- return nil
-}
-
-func (m *PathItem) GetPost() *Operation {
- if m != nil {
- return m.Post
- }
- return nil
-}
-
-func (m *PathItem) GetDelete() *Operation {
- if m != nil {
- return m.Delete
- }
- return nil
-}
-
-func (m *PathItem) GetOptions() *Operation {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-func (m *PathItem) GetHead() *Operation {
- if m != nil {
- return m.Head
- }
- return nil
-}
-
-func (m *PathItem) GetPatch() *Operation {
- if m != nil {
- return m.Patch
- }
- return nil
-}
-
-func (m *PathItem) GetParameters() []*ParametersItem {
- if m != nil {
- return m.Parameters
- }
- return nil
-}
-
-func (m *PathItem) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type PathParameterSubSchema struct {
- // Determines whether or not this parameter is required or optional.
- Required bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
- // Determines the location of the parameter.
- In string `protobuf:"bytes,2,opt,name=in" json:"in,omitempty"`
- // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
- Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
- // The name of the parameter.
- Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
- Type string `protobuf:"bytes,5,opt,name=type" json:"type,omitempty"`
- Format string `protobuf:"bytes,6,opt,name=format" json:"format,omitempty"`
- Items *PrimitivesItems `protobuf:"bytes,7,opt,name=items" json:"items,omitempty"`
- CollectionFormat string `protobuf:"bytes,8,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"`
- Default *Any `protobuf:"bytes,9,opt,name=default" json:"default,omitempty"`
- Maximum float64 `protobuf:"fixed64,10,opt,name=maximum" json:"maximum,omitempty"`
- ExclusiveMaximum bool `protobuf:"varint,11,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"`
- Minimum float64 `protobuf:"fixed64,12,opt,name=minimum" json:"minimum,omitempty"`
- ExclusiveMinimum bool `protobuf:"varint,13,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"`
- MaxLength int64 `protobuf:"varint,14,opt,name=max_length,json=maxLength" json:"max_length,omitempty"`
- MinLength int64 `protobuf:"varint,15,opt,name=min_length,json=minLength" json:"min_length,omitempty"`
- Pattern string `protobuf:"bytes,16,opt,name=pattern" json:"pattern,omitempty"`
- MaxItems int64 `protobuf:"varint,17,opt,name=max_items,json=maxItems" json:"max_items,omitempty"`
- MinItems int64 `protobuf:"varint,18,opt,name=min_items,json=minItems" json:"min_items,omitempty"`
- UniqueItems bool `protobuf:"varint,19,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"`
- Enum []*Any `protobuf:"bytes,20,rep,name=enum" json:"enum,omitempty"`
- MultipleOf float64 `protobuf:"fixed64,21,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,22,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *PathParameterSubSchema) Reset() { *m = PathParameterSubSchema{} }
-func (m *PathParameterSubSchema) String() string { return proto.CompactTextString(m) }
-func (*PathParameterSubSchema) ProtoMessage() {}
-func (*PathParameterSubSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} }
-
-func (m *PathParameterSubSchema) GetRequired() bool {
- if m != nil {
- return m.Required
- }
- return false
-}
-
-func (m *PathParameterSubSchema) GetIn() string {
- if m != nil {
- return m.In
- }
- return ""
-}
-
-func (m *PathParameterSubSchema) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *PathParameterSubSchema) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *PathParameterSubSchema) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *PathParameterSubSchema) GetFormat() string {
- if m != nil {
- return m.Format
- }
- return ""
-}
-
-func (m *PathParameterSubSchema) GetItems() *PrimitivesItems {
- if m != nil {
- return m.Items
- }
- return nil
-}
-
-func (m *PathParameterSubSchema) GetCollectionFormat() string {
- if m != nil {
- return m.CollectionFormat
- }
- return ""
-}
-
-func (m *PathParameterSubSchema) GetDefault() *Any {
- if m != nil {
- return m.Default
- }
- return nil
-}
-
-func (m *PathParameterSubSchema) GetMaximum() float64 {
- if m != nil {
- return m.Maximum
- }
- return 0
-}
-
-func (m *PathParameterSubSchema) GetExclusiveMaximum() bool {
- if m != nil {
- return m.ExclusiveMaximum
- }
- return false
-}
-
-func (m *PathParameterSubSchema) GetMinimum() float64 {
- if m != nil {
- return m.Minimum
- }
- return 0
-}
-
-func (m *PathParameterSubSchema) GetExclusiveMinimum() bool {
- if m != nil {
- return m.ExclusiveMinimum
- }
- return false
-}
-
-func (m *PathParameterSubSchema) GetMaxLength() int64 {
- if m != nil {
- return m.MaxLength
- }
- return 0
-}
-
-func (m *PathParameterSubSchema) GetMinLength() int64 {
- if m != nil {
- return m.MinLength
- }
- return 0
-}
-
-func (m *PathParameterSubSchema) GetPattern() string {
- if m != nil {
- return m.Pattern
- }
- return ""
-}
-
-func (m *PathParameterSubSchema) GetMaxItems() int64 {
- if m != nil {
- return m.MaxItems
- }
- return 0
-}
-
-func (m *PathParameterSubSchema) GetMinItems() int64 {
- if m != nil {
- return m.MinItems
- }
- return 0
-}
-
-func (m *PathParameterSubSchema) GetUniqueItems() bool {
- if m != nil {
- return m.UniqueItems
- }
- return false
-}
-
-func (m *PathParameterSubSchema) GetEnum() []*Any {
- if m != nil {
- return m.Enum
- }
- return nil
-}
-
-func (m *PathParameterSubSchema) GetMultipleOf() float64 {
- if m != nil {
- return m.MultipleOf
- }
- return 0
-}
-
-func (m *PathParameterSubSchema) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-// Relative paths to the individual endpoints. They must be relative to the 'basePath'.
-type Paths struct {
- VendorExtension []*NamedAny `protobuf:"bytes,1,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
- Path []*NamedPathItem `protobuf:"bytes,2,rep,name=path" json:"path,omitempty"`
-}
-
-func (m *Paths) Reset() { *m = Paths{} }
-func (m *Paths) String() string { return proto.CompactTextString(m) }
-func (*Paths) ProtoMessage() {}
-func (*Paths) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} }
-
-func (m *Paths) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-func (m *Paths) GetPath() []*NamedPathItem {
- if m != nil {
- return m.Path
- }
- return nil
-}
-
-type PrimitivesItems struct {
- Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
- Format string `protobuf:"bytes,2,opt,name=format" json:"format,omitempty"`
- Items *PrimitivesItems `protobuf:"bytes,3,opt,name=items" json:"items,omitempty"`
- CollectionFormat string `protobuf:"bytes,4,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"`
- Default *Any `protobuf:"bytes,5,opt,name=default" json:"default,omitempty"`
- Maximum float64 `protobuf:"fixed64,6,opt,name=maximum" json:"maximum,omitempty"`
- ExclusiveMaximum bool `protobuf:"varint,7,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"`
- Minimum float64 `protobuf:"fixed64,8,opt,name=minimum" json:"minimum,omitempty"`
- ExclusiveMinimum bool `protobuf:"varint,9,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"`
- MaxLength int64 `protobuf:"varint,10,opt,name=max_length,json=maxLength" json:"max_length,omitempty"`
- MinLength int64 `protobuf:"varint,11,opt,name=min_length,json=minLength" json:"min_length,omitempty"`
- Pattern string `protobuf:"bytes,12,opt,name=pattern" json:"pattern,omitempty"`
- MaxItems int64 `protobuf:"varint,13,opt,name=max_items,json=maxItems" json:"max_items,omitempty"`
- MinItems int64 `protobuf:"varint,14,opt,name=min_items,json=minItems" json:"min_items,omitempty"`
- UniqueItems bool `protobuf:"varint,15,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"`
- Enum []*Any `protobuf:"bytes,16,rep,name=enum" json:"enum,omitempty"`
- MultipleOf float64 `protobuf:"fixed64,17,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,18,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *PrimitivesItems) Reset() { *m = PrimitivesItems{} }
-func (m *PrimitivesItems) String() string { return proto.CompactTextString(m) }
-func (*PrimitivesItems) ProtoMessage() {}
-func (*PrimitivesItems) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} }
-
-func (m *PrimitivesItems) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *PrimitivesItems) GetFormat() string {
- if m != nil {
- return m.Format
- }
- return ""
-}
-
-func (m *PrimitivesItems) GetItems() *PrimitivesItems {
- if m != nil {
- return m.Items
- }
- return nil
-}
-
-func (m *PrimitivesItems) GetCollectionFormat() string {
- if m != nil {
- return m.CollectionFormat
- }
- return ""
-}
-
-func (m *PrimitivesItems) GetDefault() *Any {
- if m != nil {
- return m.Default
- }
- return nil
-}
-
-func (m *PrimitivesItems) GetMaximum() float64 {
- if m != nil {
- return m.Maximum
- }
- return 0
-}
-
-func (m *PrimitivesItems) GetExclusiveMaximum() bool {
- if m != nil {
- return m.ExclusiveMaximum
- }
- return false
-}
-
-func (m *PrimitivesItems) GetMinimum() float64 {
- if m != nil {
- return m.Minimum
- }
- return 0
-}
-
-func (m *PrimitivesItems) GetExclusiveMinimum() bool {
- if m != nil {
- return m.ExclusiveMinimum
- }
- return false
-}
-
-func (m *PrimitivesItems) GetMaxLength() int64 {
- if m != nil {
- return m.MaxLength
- }
- return 0
-}
-
-func (m *PrimitivesItems) GetMinLength() int64 {
- if m != nil {
- return m.MinLength
- }
- return 0
-}
-
-func (m *PrimitivesItems) GetPattern() string {
- if m != nil {
- return m.Pattern
- }
- return ""
-}
-
-func (m *PrimitivesItems) GetMaxItems() int64 {
- if m != nil {
- return m.MaxItems
- }
- return 0
-}
-
-func (m *PrimitivesItems) GetMinItems() int64 {
- if m != nil {
- return m.MinItems
- }
- return 0
-}
-
-func (m *PrimitivesItems) GetUniqueItems() bool {
- if m != nil {
- return m.UniqueItems
- }
- return false
-}
-
-func (m *PrimitivesItems) GetEnum() []*Any {
- if m != nil {
- return m.Enum
- }
- return nil
-}
-
-func (m *PrimitivesItems) GetMultipleOf() float64 {
- if m != nil {
- return m.MultipleOf
- }
- return 0
-}
-
-func (m *PrimitivesItems) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Properties struct {
- AdditionalProperties []*NamedSchema `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *Properties) Reset() { *m = Properties{} }
-func (m *Properties) String() string { return proto.CompactTextString(m) }
-func (*Properties) ProtoMessage() {}
-func (*Properties) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} }
-
-func (m *Properties) GetAdditionalProperties() []*NamedSchema {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-type QueryParameterSubSchema struct {
- // Determines whether or not this parameter is required or optional.
- Required bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
- // Determines the location of the parameter.
- In string `protobuf:"bytes,2,opt,name=in" json:"in,omitempty"`
- // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
- Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
- // The name of the parameter.
- Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
- // allows sending a parameter by name only or with an empty value.
- AllowEmptyValue bool `protobuf:"varint,5,opt,name=allow_empty_value,json=allowEmptyValue" json:"allow_empty_value,omitempty"`
- Type string `protobuf:"bytes,6,opt,name=type" json:"type,omitempty"`
- Format string `protobuf:"bytes,7,opt,name=format" json:"format,omitempty"`
- Items *PrimitivesItems `protobuf:"bytes,8,opt,name=items" json:"items,omitempty"`
- CollectionFormat string `protobuf:"bytes,9,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"`
- Default *Any `protobuf:"bytes,10,opt,name=default" json:"default,omitempty"`
- Maximum float64 `protobuf:"fixed64,11,opt,name=maximum" json:"maximum,omitempty"`
- ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"`
- Minimum float64 `protobuf:"fixed64,13,opt,name=minimum" json:"minimum,omitempty"`
- ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"`
- MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength" json:"max_length,omitempty"`
- MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength" json:"min_length,omitempty"`
- Pattern string `protobuf:"bytes,17,opt,name=pattern" json:"pattern,omitempty"`
- MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems" json:"max_items,omitempty"`
- MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems" json:"min_items,omitempty"`
- UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"`
- Enum []*Any `protobuf:"bytes,21,rep,name=enum" json:"enum,omitempty"`
- MultipleOf float64 `protobuf:"fixed64,22,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,23,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *QueryParameterSubSchema) Reset() { *m = QueryParameterSubSchema{} }
-func (m *QueryParameterSubSchema) String() string { return proto.CompactTextString(m) }
-func (*QueryParameterSubSchema) ProtoMessage() {}
-func (*QueryParameterSubSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} }
-
-func (m *QueryParameterSubSchema) GetRequired() bool {
- if m != nil {
- return m.Required
- }
- return false
-}
-
-func (m *QueryParameterSubSchema) GetIn() string {
- if m != nil {
- return m.In
- }
- return ""
-}
-
-func (m *QueryParameterSubSchema) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *QueryParameterSubSchema) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *QueryParameterSubSchema) GetAllowEmptyValue() bool {
- if m != nil {
- return m.AllowEmptyValue
- }
- return false
-}
-
-func (m *QueryParameterSubSchema) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *QueryParameterSubSchema) GetFormat() string {
- if m != nil {
- return m.Format
- }
- return ""
-}
-
-func (m *QueryParameterSubSchema) GetItems() *PrimitivesItems {
- if m != nil {
- return m.Items
- }
- return nil
-}
-
-func (m *QueryParameterSubSchema) GetCollectionFormat() string {
- if m != nil {
- return m.CollectionFormat
- }
- return ""
-}
-
-func (m *QueryParameterSubSchema) GetDefault() *Any {
- if m != nil {
- return m.Default
- }
- return nil
-}
-
-func (m *QueryParameterSubSchema) GetMaximum() float64 {
- if m != nil {
- return m.Maximum
- }
- return 0
-}
-
-func (m *QueryParameterSubSchema) GetExclusiveMaximum() bool {
- if m != nil {
- return m.ExclusiveMaximum
- }
- return false
-}
-
-func (m *QueryParameterSubSchema) GetMinimum() float64 {
- if m != nil {
- return m.Minimum
- }
- return 0
-}
-
-func (m *QueryParameterSubSchema) GetExclusiveMinimum() bool {
- if m != nil {
- return m.ExclusiveMinimum
- }
- return false
-}
-
-func (m *QueryParameterSubSchema) GetMaxLength() int64 {
- if m != nil {
- return m.MaxLength
- }
- return 0
-}
-
-func (m *QueryParameterSubSchema) GetMinLength() int64 {
- if m != nil {
- return m.MinLength
- }
- return 0
-}
-
-func (m *QueryParameterSubSchema) GetPattern() string {
- if m != nil {
- return m.Pattern
- }
- return ""
-}
-
-func (m *QueryParameterSubSchema) GetMaxItems() int64 {
- if m != nil {
- return m.MaxItems
- }
- return 0
-}
-
-func (m *QueryParameterSubSchema) GetMinItems() int64 {
- if m != nil {
- return m.MinItems
- }
- return 0
-}
-
-func (m *QueryParameterSubSchema) GetUniqueItems() bool {
- if m != nil {
- return m.UniqueItems
- }
- return false
-}
-
-func (m *QueryParameterSubSchema) GetEnum() []*Any {
- if m != nil {
- return m.Enum
- }
- return nil
-}
-
-func (m *QueryParameterSubSchema) GetMultipleOf() float64 {
- if m != nil {
- return m.MultipleOf
- }
- return 0
-}
-
-func (m *QueryParameterSubSchema) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type Response struct {
- Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"`
- Schema *SchemaItem `protobuf:"bytes,2,opt,name=schema" json:"schema,omitempty"`
- Headers *Headers `protobuf:"bytes,3,opt,name=headers" json:"headers,omitempty"`
- Examples *Examples `protobuf:"bytes,4,opt,name=examples" json:"examples,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,5,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Response) Reset() { *m = Response{} }
-func (m *Response) String() string { return proto.CompactTextString(m) }
-func (*Response) ProtoMessage() {}
-func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{46} }
-
-func (m *Response) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *Response) GetSchema() *SchemaItem {
- if m != nil {
- return m.Schema
- }
- return nil
-}
-
-func (m *Response) GetHeaders() *Headers {
- if m != nil {
- return m.Headers
- }
- return nil
-}
-
-func (m *Response) GetExamples() *Examples {
- if m != nil {
- return m.Examples
- }
- return nil
-}
-
-func (m *Response) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-// One or more JSON representations for parameters
-type ResponseDefinitions struct {
- AdditionalProperties []*NamedResponse `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *ResponseDefinitions) Reset() { *m = ResponseDefinitions{} }
-func (m *ResponseDefinitions) String() string { return proto.CompactTextString(m) }
-func (*ResponseDefinitions) ProtoMessage() {}
-func (*ResponseDefinitions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{47} }
-
-func (m *ResponseDefinitions) GetAdditionalProperties() []*NamedResponse {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-type ResponseValue struct {
- // Types that are valid to be assigned to Oneof:
- // *ResponseValue_Response
- // *ResponseValue_JsonReference
- Oneof isResponseValue_Oneof `protobuf_oneof:"oneof"`
-}
-
-func (m *ResponseValue) Reset() { *m = ResponseValue{} }
-func (m *ResponseValue) String() string { return proto.CompactTextString(m) }
-func (*ResponseValue) ProtoMessage() {}
-func (*ResponseValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{48} }
-
-type isResponseValue_Oneof interface {
- isResponseValue_Oneof()
-}
-
-type ResponseValue_Response struct {
- Response *Response `protobuf:"bytes,1,opt,name=response,oneof"`
-}
-type ResponseValue_JsonReference struct {
- JsonReference *JsonReference `protobuf:"bytes,2,opt,name=json_reference,json=jsonReference,oneof"`
-}
-
-func (*ResponseValue_Response) isResponseValue_Oneof() {}
-func (*ResponseValue_JsonReference) isResponseValue_Oneof() {}
-
-func (m *ResponseValue) GetOneof() isResponseValue_Oneof {
- if m != nil {
- return m.Oneof
- }
- return nil
-}
-
-func (m *ResponseValue) GetResponse() *Response {
- if x, ok := m.GetOneof().(*ResponseValue_Response); ok {
- return x.Response
- }
- return nil
-}
-
-func (m *ResponseValue) GetJsonReference() *JsonReference {
- if x, ok := m.GetOneof().(*ResponseValue_JsonReference); ok {
- return x.JsonReference
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*ResponseValue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _ResponseValue_OneofMarshaler, _ResponseValue_OneofUnmarshaler, _ResponseValue_OneofSizer, []interface{}{
- (*ResponseValue_Response)(nil),
- (*ResponseValue_JsonReference)(nil),
- }
-}
-
-func _ResponseValue_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*ResponseValue)
- // oneof
- switch x := m.Oneof.(type) {
- case *ResponseValue_Response:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Response); err != nil {
- return err
- }
- case *ResponseValue_JsonReference:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.JsonReference); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("ResponseValue.Oneof has unexpected type %T", x)
- }
- return nil
-}
-
-func _ResponseValue_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*ResponseValue)
- switch tag {
- case 1: // oneof.response
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Response)
- err := b.DecodeMessage(msg)
- m.Oneof = &ResponseValue_Response{msg}
- return true, err
- case 2: // oneof.json_reference
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(JsonReference)
- err := b.DecodeMessage(msg)
- m.Oneof = &ResponseValue_JsonReference{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _ResponseValue_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*ResponseValue)
- // oneof
- switch x := m.Oneof.(type) {
- case *ResponseValue_Response:
- s := proto.Size(x.Response)
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *ResponseValue_JsonReference:
- s := proto.Size(x.JsonReference)
- n += proto.SizeVarint(2<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// Response objects names can either be any valid HTTP status code or 'default'.
-type Responses struct {
- ResponseCode []*NamedResponseValue `protobuf:"bytes,1,rep,name=response_code,json=responseCode" json:"response_code,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,2,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Responses) Reset() { *m = Responses{} }
-func (m *Responses) String() string { return proto.CompactTextString(m) }
-func (*Responses) ProtoMessage() {}
-func (*Responses) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{49} }
-
-func (m *Responses) GetResponseCode() []*NamedResponseValue {
- if m != nil {
- return m.ResponseCode
- }
- return nil
-}
-
-func (m *Responses) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-// A deterministic version of a JSON Schema object.
-type Schema struct {
- XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref" json:"_ref,omitempty"`
- Format string `protobuf:"bytes,2,opt,name=format" json:"format,omitempty"`
- Title string `protobuf:"bytes,3,opt,name=title" json:"title,omitempty"`
- Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
- Default *Any `protobuf:"bytes,5,opt,name=default" json:"default,omitempty"`
- MultipleOf float64 `protobuf:"fixed64,6,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"`
- Maximum float64 `protobuf:"fixed64,7,opt,name=maximum" json:"maximum,omitempty"`
- ExclusiveMaximum bool `protobuf:"varint,8,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"`
- Minimum float64 `protobuf:"fixed64,9,opt,name=minimum" json:"minimum,omitempty"`
- ExclusiveMinimum bool `protobuf:"varint,10,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"`
- MaxLength int64 `protobuf:"varint,11,opt,name=max_length,json=maxLength" json:"max_length,omitempty"`
- MinLength int64 `protobuf:"varint,12,opt,name=min_length,json=minLength" json:"min_length,omitempty"`
- Pattern string `protobuf:"bytes,13,opt,name=pattern" json:"pattern,omitempty"`
- MaxItems int64 `protobuf:"varint,14,opt,name=max_items,json=maxItems" json:"max_items,omitempty"`
- MinItems int64 `protobuf:"varint,15,opt,name=min_items,json=minItems" json:"min_items,omitempty"`
- UniqueItems bool `protobuf:"varint,16,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"`
- MaxProperties int64 `protobuf:"varint,17,opt,name=max_properties,json=maxProperties" json:"max_properties,omitempty"`
- MinProperties int64 `protobuf:"varint,18,opt,name=min_properties,json=minProperties" json:"min_properties,omitempty"`
- Required []string `protobuf:"bytes,19,rep,name=required" json:"required,omitempty"`
- Enum []*Any `protobuf:"bytes,20,rep,name=enum" json:"enum,omitempty"`
- AdditionalProperties *AdditionalPropertiesItem `protobuf:"bytes,21,opt,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
- Type *TypeItem `protobuf:"bytes,22,opt,name=type" json:"type,omitempty"`
- Items *ItemsItem `protobuf:"bytes,23,opt,name=items" json:"items,omitempty"`
- AllOf []*Schema `protobuf:"bytes,24,rep,name=all_of,json=allOf" json:"all_of,omitempty"`
- Properties *Properties `protobuf:"bytes,25,opt,name=properties" json:"properties,omitempty"`
- Discriminator string `protobuf:"bytes,26,opt,name=discriminator" json:"discriminator,omitempty"`
- ReadOnly bool `protobuf:"varint,27,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
- Xml *Xml `protobuf:"bytes,28,opt,name=xml" json:"xml,omitempty"`
- ExternalDocs *ExternalDocs `protobuf:"bytes,29,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"`
- Example *Any `protobuf:"bytes,30,opt,name=example" json:"example,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,31,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Schema) Reset() { *m = Schema{} }
-func (m *Schema) String() string { return proto.CompactTextString(m) }
-func (*Schema) ProtoMessage() {}
-func (*Schema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{50} }
-
-func (m *Schema) GetXRef() string {
- if m != nil {
- return m.XRef
- }
- return ""
-}
-
-func (m *Schema) GetFormat() string {
- if m != nil {
- return m.Format
- }
- return ""
-}
-
-func (m *Schema) GetTitle() string {
- if m != nil {
- return m.Title
- }
- return ""
-}
-
-func (m *Schema) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *Schema) GetDefault() *Any {
- if m != nil {
- return m.Default
- }
- return nil
-}
-
-func (m *Schema) GetMultipleOf() float64 {
- if m != nil {
- return m.MultipleOf
- }
- return 0
-}
-
-func (m *Schema) GetMaximum() float64 {
- if m != nil {
- return m.Maximum
- }
- return 0
-}
-
-func (m *Schema) GetExclusiveMaximum() bool {
- if m != nil {
- return m.ExclusiveMaximum
- }
- return false
-}
-
-func (m *Schema) GetMinimum() float64 {
- if m != nil {
- return m.Minimum
- }
- return 0
-}
-
-func (m *Schema) GetExclusiveMinimum() bool {
- if m != nil {
- return m.ExclusiveMinimum
- }
- return false
-}
-
-func (m *Schema) GetMaxLength() int64 {
- if m != nil {
- return m.MaxLength
- }
- return 0
-}
-
-func (m *Schema) GetMinLength() int64 {
- if m != nil {
- return m.MinLength
- }
- return 0
-}
-
-func (m *Schema) GetPattern() string {
- if m != nil {
- return m.Pattern
- }
- return ""
-}
-
-func (m *Schema) GetMaxItems() int64 {
- if m != nil {
- return m.MaxItems
- }
- return 0
-}
-
-func (m *Schema) GetMinItems() int64 {
- if m != nil {
- return m.MinItems
- }
- return 0
-}
-
-func (m *Schema) GetUniqueItems() bool {
- if m != nil {
- return m.UniqueItems
- }
- return false
-}
-
-func (m *Schema) GetMaxProperties() int64 {
- if m != nil {
- return m.MaxProperties
- }
- return 0
-}
-
-func (m *Schema) GetMinProperties() int64 {
- if m != nil {
- return m.MinProperties
- }
- return 0
-}
-
-func (m *Schema) GetRequired() []string {
- if m != nil {
- return m.Required
- }
- return nil
-}
-
-func (m *Schema) GetEnum() []*Any {
- if m != nil {
- return m.Enum
- }
- return nil
-}
-
-func (m *Schema) GetAdditionalProperties() *AdditionalPropertiesItem {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-func (m *Schema) GetType() *TypeItem {
- if m != nil {
- return m.Type
- }
- return nil
-}
-
-func (m *Schema) GetItems() *ItemsItem {
- if m != nil {
- return m.Items
- }
- return nil
-}
-
-func (m *Schema) GetAllOf() []*Schema {
- if m != nil {
- return m.AllOf
- }
- return nil
-}
-
-func (m *Schema) GetProperties() *Properties {
- if m != nil {
- return m.Properties
- }
- return nil
-}
-
-func (m *Schema) GetDiscriminator() string {
- if m != nil {
- return m.Discriminator
- }
- return ""
-}
-
-func (m *Schema) GetReadOnly() bool {
- if m != nil {
- return m.ReadOnly
- }
- return false
-}
-
-func (m *Schema) GetXml() *Xml {
- if m != nil {
- return m.Xml
- }
- return nil
-}
-
-func (m *Schema) GetExternalDocs() *ExternalDocs {
- if m != nil {
- return m.ExternalDocs
- }
- return nil
-}
-
-func (m *Schema) GetExample() *Any {
- if m != nil {
- return m.Example
- }
- return nil
-}
-
-func (m *Schema) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type SchemaItem struct {
- // Types that are valid to be assigned to Oneof:
- // *SchemaItem_Schema
- // *SchemaItem_FileSchema
- Oneof isSchemaItem_Oneof `protobuf_oneof:"oneof"`
-}
-
-func (m *SchemaItem) Reset() { *m = SchemaItem{} }
-func (m *SchemaItem) String() string { return proto.CompactTextString(m) }
-func (*SchemaItem) ProtoMessage() {}
-func (*SchemaItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{51} }
-
-type isSchemaItem_Oneof interface {
- isSchemaItem_Oneof()
-}
-
-type SchemaItem_Schema struct {
- Schema *Schema `protobuf:"bytes,1,opt,name=schema,oneof"`
-}
-type SchemaItem_FileSchema struct {
- FileSchema *FileSchema `protobuf:"bytes,2,opt,name=file_schema,json=fileSchema,oneof"`
-}
-
-func (*SchemaItem_Schema) isSchemaItem_Oneof() {}
-func (*SchemaItem_FileSchema) isSchemaItem_Oneof() {}
-
-func (m *SchemaItem) GetOneof() isSchemaItem_Oneof {
- if m != nil {
- return m.Oneof
- }
- return nil
-}
-
-func (m *SchemaItem) GetSchema() *Schema {
- if x, ok := m.GetOneof().(*SchemaItem_Schema); ok {
- return x.Schema
- }
- return nil
-}
-
-func (m *SchemaItem) GetFileSchema() *FileSchema {
- if x, ok := m.GetOneof().(*SchemaItem_FileSchema); ok {
- return x.FileSchema
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*SchemaItem) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _SchemaItem_OneofMarshaler, _SchemaItem_OneofUnmarshaler, _SchemaItem_OneofSizer, []interface{}{
- (*SchemaItem_Schema)(nil),
- (*SchemaItem_FileSchema)(nil),
- }
-}
-
-func _SchemaItem_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*SchemaItem)
- // oneof
- switch x := m.Oneof.(type) {
- case *SchemaItem_Schema:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Schema); err != nil {
- return err
- }
- case *SchemaItem_FileSchema:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.FileSchema); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("SchemaItem.Oneof has unexpected type %T", x)
- }
- return nil
-}
-
-func _SchemaItem_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*SchemaItem)
- switch tag {
- case 1: // oneof.schema
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Schema)
- err := b.DecodeMessage(msg)
- m.Oneof = &SchemaItem_Schema{msg}
- return true, err
- case 2: // oneof.file_schema
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(FileSchema)
- err := b.DecodeMessage(msg)
- m.Oneof = &SchemaItem_FileSchema{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _SchemaItem_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*SchemaItem)
- // oneof
- switch x := m.Oneof.(type) {
- case *SchemaItem_Schema:
- s := proto.Size(x.Schema)
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *SchemaItem_FileSchema:
- s := proto.Size(x.FileSchema)
- n += proto.SizeVarint(2<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type SecurityDefinitions struct {
- AdditionalProperties []*NamedSecurityDefinitionsItem `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *SecurityDefinitions) Reset() { *m = SecurityDefinitions{} }
-func (m *SecurityDefinitions) String() string { return proto.CompactTextString(m) }
-func (*SecurityDefinitions) ProtoMessage() {}
-func (*SecurityDefinitions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{52} }
-
-func (m *SecurityDefinitions) GetAdditionalProperties() []*NamedSecurityDefinitionsItem {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-type SecurityDefinitionsItem struct {
- // Types that are valid to be assigned to Oneof:
- // *SecurityDefinitionsItem_BasicAuthenticationSecurity
- // *SecurityDefinitionsItem_ApiKeySecurity
- // *SecurityDefinitionsItem_Oauth2ImplicitSecurity
- // *SecurityDefinitionsItem_Oauth2PasswordSecurity
- // *SecurityDefinitionsItem_Oauth2ApplicationSecurity
- // *SecurityDefinitionsItem_Oauth2AccessCodeSecurity
- Oneof isSecurityDefinitionsItem_Oneof `protobuf_oneof:"oneof"`
-}
-
-func (m *SecurityDefinitionsItem) Reset() { *m = SecurityDefinitionsItem{} }
-func (m *SecurityDefinitionsItem) String() string { return proto.CompactTextString(m) }
-func (*SecurityDefinitionsItem) ProtoMessage() {}
-func (*SecurityDefinitionsItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{53} }
-
-type isSecurityDefinitionsItem_Oneof interface {
- isSecurityDefinitionsItem_Oneof()
-}
-
-type SecurityDefinitionsItem_BasicAuthenticationSecurity struct {
- BasicAuthenticationSecurity *BasicAuthenticationSecurity `protobuf:"bytes,1,opt,name=basic_authentication_security,json=basicAuthenticationSecurity,oneof"`
-}
-type SecurityDefinitionsItem_ApiKeySecurity struct {
- ApiKeySecurity *ApiKeySecurity `protobuf:"bytes,2,opt,name=api_key_security,json=apiKeySecurity,oneof"`
-}
-type SecurityDefinitionsItem_Oauth2ImplicitSecurity struct {
- Oauth2ImplicitSecurity *Oauth2ImplicitSecurity `protobuf:"bytes,3,opt,name=oauth2_implicit_security,json=oauth2ImplicitSecurity,oneof"`
-}
-type SecurityDefinitionsItem_Oauth2PasswordSecurity struct {
- Oauth2PasswordSecurity *Oauth2PasswordSecurity `protobuf:"bytes,4,opt,name=oauth2_password_security,json=oauth2PasswordSecurity,oneof"`
-}
-type SecurityDefinitionsItem_Oauth2ApplicationSecurity struct {
- Oauth2ApplicationSecurity *Oauth2ApplicationSecurity `protobuf:"bytes,5,opt,name=oauth2_application_security,json=oauth2ApplicationSecurity,oneof"`
-}
-type SecurityDefinitionsItem_Oauth2AccessCodeSecurity struct {
- Oauth2AccessCodeSecurity *Oauth2AccessCodeSecurity `protobuf:"bytes,6,opt,name=oauth2_access_code_security,json=oauth2AccessCodeSecurity,oneof"`
-}
-
-func (*SecurityDefinitionsItem_BasicAuthenticationSecurity) isSecurityDefinitionsItem_Oneof() {}
-func (*SecurityDefinitionsItem_ApiKeySecurity) isSecurityDefinitionsItem_Oneof() {}
-func (*SecurityDefinitionsItem_Oauth2ImplicitSecurity) isSecurityDefinitionsItem_Oneof() {}
-func (*SecurityDefinitionsItem_Oauth2PasswordSecurity) isSecurityDefinitionsItem_Oneof() {}
-func (*SecurityDefinitionsItem_Oauth2ApplicationSecurity) isSecurityDefinitionsItem_Oneof() {}
-func (*SecurityDefinitionsItem_Oauth2AccessCodeSecurity) isSecurityDefinitionsItem_Oneof() {}
-
-func (m *SecurityDefinitionsItem) GetOneof() isSecurityDefinitionsItem_Oneof {
- if m != nil {
- return m.Oneof
- }
- return nil
-}
-
-func (m *SecurityDefinitionsItem) GetBasicAuthenticationSecurity() *BasicAuthenticationSecurity {
- if x, ok := m.GetOneof().(*SecurityDefinitionsItem_BasicAuthenticationSecurity); ok {
- return x.BasicAuthenticationSecurity
- }
- return nil
-}
-
-func (m *SecurityDefinitionsItem) GetApiKeySecurity() *ApiKeySecurity {
- if x, ok := m.GetOneof().(*SecurityDefinitionsItem_ApiKeySecurity); ok {
- return x.ApiKeySecurity
- }
- return nil
-}
-
-func (m *SecurityDefinitionsItem) GetOauth2ImplicitSecurity() *Oauth2ImplicitSecurity {
- if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2ImplicitSecurity); ok {
- return x.Oauth2ImplicitSecurity
- }
- return nil
-}
-
-func (m *SecurityDefinitionsItem) GetOauth2PasswordSecurity() *Oauth2PasswordSecurity {
- if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2PasswordSecurity); ok {
- return x.Oauth2PasswordSecurity
- }
- return nil
-}
-
-func (m *SecurityDefinitionsItem) GetOauth2ApplicationSecurity() *Oauth2ApplicationSecurity {
- if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2ApplicationSecurity); ok {
- return x.Oauth2ApplicationSecurity
- }
- return nil
-}
-
-func (m *SecurityDefinitionsItem) GetOauth2AccessCodeSecurity() *Oauth2AccessCodeSecurity {
- if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2AccessCodeSecurity); ok {
- return x.Oauth2AccessCodeSecurity
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*SecurityDefinitionsItem) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _SecurityDefinitionsItem_OneofMarshaler, _SecurityDefinitionsItem_OneofUnmarshaler, _SecurityDefinitionsItem_OneofSizer, []interface{}{
- (*SecurityDefinitionsItem_BasicAuthenticationSecurity)(nil),
- (*SecurityDefinitionsItem_ApiKeySecurity)(nil),
- (*SecurityDefinitionsItem_Oauth2ImplicitSecurity)(nil),
- (*SecurityDefinitionsItem_Oauth2PasswordSecurity)(nil),
- (*SecurityDefinitionsItem_Oauth2ApplicationSecurity)(nil),
- (*SecurityDefinitionsItem_Oauth2AccessCodeSecurity)(nil),
- }
-}
-
-func _SecurityDefinitionsItem_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*SecurityDefinitionsItem)
- // oneof
- switch x := m.Oneof.(type) {
- case *SecurityDefinitionsItem_BasicAuthenticationSecurity:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.BasicAuthenticationSecurity); err != nil {
- return err
- }
- case *SecurityDefinitionsItem_ApiKeySecurity:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.ApiKeySecurity); err != nil {
- return err
- }
- case *SecurityDefinitionsItem_Oauth2ImplicitSecurity:
- b.EncodeVarint(3<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Oauth2ImplicitSecurity); err != nil {
- return err
- }
- case *SecurityDefinitionsItem_Oauth2PasswordSecurity:
- b.EncodeVarint(4<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Oauth2PasswordSecurity); err != nil {
- return err
- }
- case *SecurityDefinitionsItem_Oauth2ApplicationSecurity:
- b.EncodeVarint(5<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Oauth2ApplicationSecurity); err != nil {
- return err
- }
- case *SecurityDefinitionsItem_Oauth2AccessCodeSecurity:
- b.EncodeVarint(6<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Oauth2AccessCodeSecurity); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("SecurityDefinitionsItem.Oneof has unexpected type %T", x)
- }
- return nil
-}
-
-func _SecurityDefinitionsItem_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*SecurityDefinitionsItem)
- switch tag {
- case 1: // oneof.basic_authentication_security
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(BasicAuthenticationSecurity)
- err := b.DecodeMessage(msg)
- m.Oneof = &SecurityDefinitionsItem_BasicAuthenticationSecurity{msg}
- return true, err
- case 2: // oneof.api_key_security
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(ApiKeySecurity)
- err := b.DecodeMessage(msg)
- m.Oneof = &SecurityDefinitionsItem_ApiKeySecurity{msg}
- return true, err
- case 3: // oneof.oauth2_implicit_security
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Oauth2ImplicitSecurity)
- err := b.DecodeMessage(msg)
- m.Oneof = &SecurityDefinitionsItem_Oauth2ImplicitSecurity{msg}
- return true, err
- case 4: // oneof.oauth2_password_security
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Oauth2PasswordSecurity)
- err := b.DecodeMessage(msg)
- m.Oneof = &SecurityDefinitionsItem_Oauth2PasswordSecurity{msg}
- return true, err
- case 5: // oneof.oauth2_application_security
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Oauth2ApplicationSecurity)
- err := b.DecodeMessage(msg)
- m.Oneof = &SecurityDefinitionsItem_Oauth2ApplicationSecurity{msg}
- return true, err
- case 6: // oneof.oauth2_access_code_security
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Oauth2AccessCodeSecurity)
- err := b.DecodeMessage(msg)
- m.Oneof = &SecurityDefinitionsItem_Oauth2AccessCodeSecurity{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _SecurityDefinitionsItem_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*SecurityDefinitionsItem)
- // oneof
- switch x := m.Oneof.(type) {
- case *SecurityDefinitionsItem_BasicAuthenticationSecurity:
- s := proto.Size(x.BasicAuthenticationSecurity)
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *SecurityDefinitionsItem_ApiKeySecurity:
- s := proto.Size(x.ApiKeySecurity)
- n += proto.SizeVarint(2<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *SecurityDefinitionsItem_Oauth2ImplicitSecurity:
- s := proto.Size(x.Oauth2ImplicitSecurity)
- n += proto.SizeVarint(3<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *SecurityDefinitionsItem_Oauth2PasswordSecurity:
- s := proto.Size(x.Oauth2PasswordSecurity)
- n += proto.SizeVarint(4<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *SecurityDefinitionsItem_Oauth2ApplicationSecurity:
- s := proto.Size(x.Oauth2ApplicationSecurity)
- n += proto.SizeVarint(5<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *SecurityDefinitionsItem_Oauth2AccessCodeSecurity:
- s := proto.Size(x.Oauth2AccessCodeSecurity)
- n += proto.SizeVarint(6<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type SecurityRequirement struct {
- AdditionalProperties []*NamedStringArray `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *SecurityRequirement) Reset() { *m = SecurityRequirement{} }
-func (m *SecurityRequirement) String() string { return proto.CompactTextString(m) }
-func (*SecurityRequirement) ProtoMessage() {}
-func (*SecurityRequirement) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{54} }
-
-func (m *SecurityRequirement) GetAdditionalProperties() []*NamedStringArray {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-type StringArray struct {
- Value []string `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"`
-}
-
-func (m *StringArray) Reset() { *m = StringArray{} }
-func (m *StringArray) String() string { return proto.CompactTextString(m) }
-func (*StringArray) ProtoMessage() {}
-func (*StringArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{55} }
-
-func (m *StringArray) GetValue() []string {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-type Tag struct {
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
- ExternalDocs *ExternalDocs `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,4,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Tag) Reset() { *m = Tag{} }
-func (m *Tag) String() string { return proto.CompactTextString(m) }
-func (*Tag) ProtoMessage() {}
-func (*Tag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{56} }
-
-func (m *Tag) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *Tag) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *Tag) GetExternalDocs() *ExternalDocs {
- if m != nil {
- return m.ExternalDocs
- }
- return nil
-}
-
-func (m *Tag) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-type TypeItem struct {
- Value []string `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"`
-}
-
-func (m *TypeItem) Reset() { *m = TypeItem{} }
-func (m *TypeItem) String() string { return proto.CompactTextString(m) }
-func (*TypeItem) ProtoMessage() {}
-func (*TypeItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{57} }
-
-func (m *TypeItem) GetValue() []string {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-// Any property starting with x- is valid.
-type VendorExtension struct {
- AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"`
-}
-
-func (m *VendorExtension) Reset() { *m = VendorExtension{} }
-func (m *VendorExtension) String() string { return proto.CompactTextString(m) }
-func (*VendorExtension) ProtoMessage() {}
-func (*VendorExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{58} }
-
-func (m *VendorExtension) GetAdditionalProperties() []*NamedAny {
- if m != nil {
- return m.AdditionalProperties
- }
- return nil
-}
-
-type Xml struct {
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Namespace string `protobuf:"bytes,2,opt,name=namespace" json:"namespace,omitempty"`
- Prefix string `protobuf:"bytes,3,opt,name=prefix" json:"prefix,omitempty"`
- Attribute bool `protobuf:"varint,4,opt,name=attribute" json:"attribute,omitempty"`
- Wrapped bool `protobuf:"varint,5,opt,name=wrapped" json:"wrapped,omitempty"`
- VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"`
-}
-
-func (m *Xml) Reset() { *m = Xml{} }
-func (m *Xml) String() string { return proto.CompactTextString(m) }
-func (*Xml) ProtoMessage() {}
-func (*Xml) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{59} }
-
-func (m *Xml) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *Xml) GetNamespace() string {
- if m != nil {
- return m.Namespace
- }
- return ""
-}
-
-func (m *Xml) GetPrefix() string {
- if m != nil {
- return m.Prefix
- }
- return ""
-}
-
-func (m *Xml) GetAttribute() bool {
- if m != nil {
- return m.Attribute
- }
- return false
-}
-
-func (m *Xml) GetWrapped() bool {
- if m != nil {
- return m.Wrapped
- }
- return false
-}
-
-func (m *Xml) GetVendorExtension() []*NamedAny {
- if m != nil {
- return m.VendorExtension
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*AdditionalPropertiesItem)(nil), "openapi.v2.AdditionalPropertiesItem")
- proto.RegisterType((*Any)(nil), "openapi.v2.Any")
- proto.RegisterType((*ApiKeySecurity)(nil), "openapi.v2.ApiKeySecurity")
- proto.RegisterType((*BasicAuthenticationSecurity)(nil), "openapi.v2.BasicAuthenticationSecurity")
- proto.RegisterType((*BodyParameter)(nil), "openapi.v2.BodyParameter")
- proto.RegisterType((*Contact)(nil), "openapi.v2.Contact")
- proto.RegisterType((*Default)(nil), "openapi.v2.Default")
- proto.RegisterType((*Definitions)(nil), "openapi.v2.Definitions")
- proto.RegisterType((*Document)(nil), "openapi.v2.Document")
- proto.RegisterType((*Examples)(nil), "openapi.v2.Examples")
- proto.RegisterType((*ExternalDocs)(nil), "openapi.v2.ExternalDocs")
- proto.RegisterType((*FileSchema)(nil), "openapi.v2.FileSchema")
- proto.RegisterType((*FormDataParameterSubSchema)(nil), "openapi.v2.FormDataParameterSubSchema")
- proto.RegisterType((*Header)(nil), "openapi.v2.Header")
- proto.RegisterType((*HeaderParameterSubSchema)(nil), "openapi.v2.HeaderParameterSubSchema")
- proto.RegisterType((*Headers)(nil), "openapi.v2.Headers")
- proto.RegisterType((*Info)(nil), "openapi.v2.Info")
- proto.RegisterType((*ItemsItem)(nil), "openapi.v2.ItemsItem")
- proto.RegisterType((*JsonReference)(nil), "openapi.v2.JsonReference")
- proto.RegisterType((*License)(nil), "openapi.v2.License")
- proto.RegisterType((*NamedAny)(nil), "openapi.v2.NamedAny")
- proto.RegisterType((*NamedHeader)(nil), "openapi.v2.NamedHeader")
- proto.RegisterType((*NamedParameter)(nil), "openapi.v2.NamedParameter")
- proto.RegisterType((*NamedPathItem)(nil), "openapi.v2.NamedPathItem")
- proto.RegisterType((*NamedResponse)(nil), "openapi.v2.NamedResponse")
- proto.RegisterType((*NamedResponseValue)(nil), "openapi.v2.NamedResponseValue")
- proto.RegisterType((*NamedSchema)(nil), "openapi.v2.NamedSchema")
- proto.RegisterType((*NamedSecurityDefinitionsItem)(nil), "openapi.v2.NamedSecurityDefinitionsItem")
- proto.RegisterType((*NamedString)(nil), "openapi.v2.NamedString")
- proto.RegisterType((*NamedStringArray)(nil), "openapi.v2.NamedStringArray")
- proto.RegisterType((*NonBodyParameter)(nil), "openapi.v2.NonBodyParameter")
- proto.RegisterType((*Oauth2AccessCodeSecurity)(nil), "openapi.v2.Oauth2AccessCodeSecurity")
- proto.RegisterType((*Oauth2ApplicationSecurity)(nil), "openapi.v2.Oauth2ApplicationSecurity")
- proto.RegisterType((*Oauth2ImplicitSecurity)(nil), "openapi.v2.Oauth2ImplicitSecurity")
- proto.RegisterType((*Oauth2PasswordSecurity)(nil), "openapi.v2.Oauth2PasswordSecurity")
- proto.RegisterType((*Oauth2Scopes)(nil), "openapi.v2.Oauth2Scopes")
- proto.RegisterType((*Operation)(nil), "openapi.v2.Operation")
- proto.RegisterType((*Parameter)(nil), "openapi.v2.Parameter")
- proto.RegisterType((*ParameterDefinitions)(nil), "openapi.v2.ParameterDefinitions")
- proto.RegisterType((*ParametersItem)(nil), "openapi.v2.ParametersItem")
- proto.RegisterType((*PathItem)(nil), "openapi.v2.PathItem")
- proto.RegisterType((*PathParameterSubSchema)(nil), "openapi.v2.PathParameterSubSchema")
- proto.RegisterType((*Paths)(nil), "openapi.v2.Paths")
- proto.RegisterType((*PrimitivesItems)(nil), "openapi.v2.PrimitivesItems")
- proto.RegisterType((*Properties)(nil), "openapi.v2.Properties")
- proto.RegisterType((*QueryParameterSubSchema)(nil), "openapi.v2.QueryParameterSubSchema")
- proto.RegisterType((*Response)(nil), "openapi.v2.Response")
- proto.RegisterType((*ResponseDefinitions)(nil), "openapi.v2.ResponseDefinitions")
- proto.RegisterType((*ResponseValue)(nil), "openapi.v2.ResponseValue")
- proto.RegisterType((*Responses)(nil), "openapi.v2.Responses")
- proto.RegisterType((*Schema)(nil), "openapi.v2.Schema")
- proto.RegisterType((*SchemaItem)(nil), "openapi.v2.SchemaItem")
- proto.RegisterType((*SecurityDefinitions)(nil), "openapi.v2.SecurityDefinitions")
- proto.RegisterType((*SecurityDefinitionsItem)(nil), "openapi.v2.SecurityDefinitionsItem")
- proto.RegisterType((*SecurityRequirement)(nil), "openapi.v2.SecurityRequirement")
- proto.RegisterType((*StringArray)(nil), "openapi.v2.StringArray")
- proto.RegisterType((*Tag)(nil), "openapi.v2.Tag")
- proto.RegisterType((*TypeItem)(nil), "openapi.v2.TypeItem")
- proto.RegisterType((*VendorExtension)(nil), "openapi.v2.VendorExtension")
- proto.RegisterType((*Xml)(nil), "openapi.v2.Xml")
-}
-
-func init() { proto.RegisterFile("OpenAPIv2/OpenAPIv2.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 3129 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x3b, 0x4b, 0x73, 0x1c, 0x57,
- 0xd5, 0xf3, 0x7e, 0x1c, 0x69, 0x46, 0xa3, 0x96, 0x2c, 0xb7, 0x24, 0xc7, 0x71, 0xe4, 0x3c, 0x6c,
- 0xe7, 0xb3, 0x9c, 0x4f, 0x29, 0x48, 0x05, 0x2a, 0x05, 0xf2, 0xab, 0xc6, 0xc4, 0x44, 0x4a, 0xcb,
- 0x0e, 0x09, 0x04, 0xba, 0xae, 0x66, 0xee, 0x48, 0x9d, 0x74, 0xf7, 0x6d, 0x77, 0xf7, 0xc8, 0x1a,
- 0x16, 0x2c, 0xa0, 0x8a, 0x35, 0x50, 0x59, 0x53, 0x15, 0x16, 0x14, 0x55, 0x59, 0xb0, 0x62, 0xc5,
- 0x1f, 0x60, 0xc7, 0x3f, 0x60, 0x0d, 0x5b, 0xaa, 0x58, 0x51, 0x3c, 0xea, 0xbe, 0xfa, 0x31, 0x7d,
- 0x7b, 0x1e, 0x96, 0x0b, 0x28, 0xd0, 0x6a, 0xe6, 0xde, 0x73, 0xee, 0xb9, 0xa7, 0x4f, 0x9f, 0xd7,
- 0x3d, 0xe7, 0x36, 0xac, 0xef, 0x79, 0xd8, 0xdd, 0xdd, 0x7f, 0x70, 0xb2, 0x73, 0x2b, 0xfa, 0xb7,
- 0xed, 0xf9, 0x24, 0x24, 0x1a, 0x10, 0x0f, 0xbb, 0xc8, 0xb3, 0xb6, 0x4f, 0x76, 0x36, 0xd6, 0x8f,
- 0x08, 0x39, 0xb2, 0xf1, 0x2d, 0x06, 0x39, 0x1c, 0x0e, 0x6e, 0x21, 0x77, 0xc4, 0xd1, 0xb6, 0x1c,
- 0xd0, 0x77, 0xfb, 0x7d, 0x2b, 0xb4, 0x88, 0x8b, 0xec, 0x7d, 0x9f, 0x78, 0xd8, 0x0f, 0x2d, 0x1c,
- 0x3c, 0x08, 0xb1, 0xa3, 0xfd, 0x1f, 0xd4, 0x82, 0xde, 0x31, 0x76, 0x90, 0x5e, 0xbc, 0x52, 0xbc,
- 0xb6, 0xb0, 0xa3, 0x6d, 0xc7, 0x34, 0xb7, 0x0f, 0x18, 0xa4, 0x5b, 0x30, 0x04, 0x8e, 0xb6, 0x01,
- 0xf5, 0x43, 0x42, 0x6c, 0x8c, 0x5c, 0xbd, 0x74, 0xa5, 0x78, 0xad, 0xd1, 0x2d, 0x18, 0x72, 0xe2,
- 0x76, 0x1d, 0xaa, 0xc4, 0xc5, 0x64, 0xb0, 0x75, 0x0f, 0xca, 0xbb, 0xee, 0x48, 0xbb, 0x01, 0xd5,
- 0x13, 0x64, 0x0f, 0xb1, 0x20, 0xbc, 0xba, 0xcd, 0x19, 0xdc, 0x96, 0x0c, 0x6e, 0xef, 0xba, 0x23,
- 0x83, 0xa3, 0x68, 0x1a, 0x54, 0x46, 0xc8, 0xb1, 0x19, 0xd1, 0xa6, 0xc1, 0xfe, 0x6f, 0x7d, 0x51,
- 0x84, 0xf6, 0xae, 0x67, 0xbd, 0x8b, 0x47, 0x07, 0xb8, 0x37, 0xf4, 0xad, 0x70, 0x44, 0xd1, 0xc2,
- 0x91, 0xc7, 0x29, 0x36, 0x0d, 0xf6, 0x9f, 0xce, 0xb9, 0xc8, 0xc1, 0x72, 0x29, 0xfd, 0xaf, 0xb5,
- 0xa1, 0x64, 0xb9, 0x7a, 0x99, 0xcd, 0x94, 0x2c, 0x57, 0xbb, 0x02, 0x0b, 0x7d, 0x1c, 0xf4, 0x7c,
- 0xcb, 0xa3, 0x32, 0xd0, 0x2b, 0x0c, 0x90, 0x9c, 0xd2, 0xbe, 0x06, 0x9d, 0x13, 0xec, 0xf6, 0x89,
- 0x6f, 0xe2, 0xd3, 0x10, 0xbb, 0x01, 0x45, 0xab, 0x5e, 0x29, 0x33, 0xbe, 0x13, 0x02, 0x79, 0x0f,
- 0x39, 0xb8, 0x4f, 0xf9, 0x5e, 0xe2, 0xd8, 0xf7, 0x24, 0xf2, 0xd6, 0x67, 0x45, 0xd8, 0xbc, 0x8d,
- 0x02, 0xab, 0xb7, 0x3b, 0x0c, 0x8f, 0xb1, 0x1b, 0x5a, 0x3d, 0x44, 0x09, 0x4f, 0x64, 0x7d, 0x8c,
- 0xad, 0xd2, 0x6c, 0x6c, 0x95, 0xe7, 0x61, 0xeb, 0x0f, 0x45, 0x68, 0xdd, 0x26, 0xfd, 0xd1, 0x3e,
- 0xf2, 0x91, 0x83, 0x43, 0xec, 0x8f, 0x6f, 0x5a, 0xcc, 0x6e, 0x3a, 0x8b, 0x44, 0x37, 0xa0, 0xe1,
- 0xe3, 0x27, 0x43, 0xcb, 0xc7, 0x7d, 0x26, 0xce, 0x86, 0x11, 0x8d, 0xb5, 0x1b, 0x91, 0x4a, 0x55,
- 0xf3, 0x54, 0x2a, 0x52, 0x28, 0xd5, 0x03, 0xd6, 0xe6, 0x79, 0xc0, 0x1f, 0x17, 0xa1, 0x7e, 0x87,
- 0xb8, 0x21, 0xea, 0x85, 0x11, 0xe3, 0xc5, 0x04, 0xe3, 0x1d, 0x28, 0x0f, 0x7d, 0xa9, 0x58, 0xf4,
- 0xaf, 0xb6, 0x0a, 0x55, 0xec, 0x20, 0xcb, 0x16, 0x4f, 0xc3, 0x07, 0x4a, 0x46, 0x2a, 0xf3, 0x30,
- 0xf2, 0x08, 0xea, 0x77, 0xf1, 0x00, 0x0d, 0xed, 0x50, 0x7b, 0x00, 0x17, 0x50, 0x64, 0x6f, 0xa6,
- 0x17, 0x19, 0x9c, 0x5e, 0x9c, 0x40, 0x70, 0x15, 0x29, 0x4c, 0x74, 0xeb, 0x3b, 0xb0, 0x70, 0x17,
- 0x0f, 0x2c, 0x97, 0x41, 0x02, 0xed, 0xe1, 0x64, 0xca, 0x17, 0x33, 0x94, 0x85, 0xb8, 0xd5, 0xc4,
- 0xff, 0x58, 0x85, 0xc6, 0x5d, 0xd2, 0x1b, 0x3a, 0xd8, 0x0d, 0x35, 0x1d, 0xea, 0xc1, 0x53, 0x74,
- 0x74, 0x84, 0x7d, 0x21, 0x3f, 0x39, 0xd4, 0x5e, 0x86, 0x8a, 0xe5, 0x0e, 0x08, 0x93, 0xe1, 0xc2,
- 0x4e, 0x27, 0xb9, 0xc7, 0x03, 0x77, 0x40, 0x0c, 0x06, 0xa5, 0xc2, 0x3f, 0x26, 0x41, 0x28, 0xa4,
- 0xca, 0xfe, 0x6b, 0x9b, 0xd0, 0x3c, 0x44, 0x01, 0x36, 0x3d, 0x14, 0x1e, 0x0b, 0xab, 0x6b, 0xd0,
- 0x89, 0x7d, 0x14, 0x1e, 0xb3, 0x0d, 0x29, 0x77, 0x38, 0x60, 0x96, 0x46, 0x37, 0xe4, 0x43, 0xaa,
- 0x5c, 0x3d, 0xe2, 0x06, 0x43, 0x0a, 0xaa, 0x31, 0x50, 0x34, 0xa6, 0x30, 0xcf, 0x27, 0xfd, 0x61,
- 0x0f, 0x07, 0x7a, 0x9d, 0xc3, 0xe4, 0x58, 0x7b, 0x0d, 0xaa, 0x74, 0xa7, 0x40, 0x6f, 0x30, 0x4e,
- 0x97, 0x93, 0x9c, 0xd2, 0x2d, 0x03, 0x83, 0xc3, 0xb5, 0xb7, 0xa9, 0x0d, 0x44, 0x52, 0xd5, 0x9b,
- 0x0c, 0x3d, 0x25, 0xbc, 0x84, 0xd0, 0x8d, 0x24, 0xae, 0xf6, 0x75, 0x00, 0x4f, 0xda, 0x52, 0xa0,
- 0x03, 0x5b, 0x79, 0x25, 0xbd, 0x91, 0x80, 0x26, 0x49, 0x24, 0xd6, 0x68, 0xef, 0x40, 0xd3, 0xc7,
- 0x81, 0x47, 0xdc, 0x00, 0x07, 0xfa, 0x02, 0x23, 0xf0, 0x62, 0x92, 0x80, 0x21, 0x80, 0xc9, 0xf5,
- 0xf1, 0x0a, 0xed, 0xab, 0xd0, 0x08, 0x84, 0x53, 0xd1, 0x17, 0xd9, 0x5b, 0x4f, 0xad, 0x96, 0x0e,
- 0xc7, 0xe0, 0xd6, 0x48, 0x5f, 0xad, 0x11, 0x2d, 0xd0, 0x0c, 0x58, 0x95, 0xff, 0xcd, 0xa4, 0x04,
- 0x5a, 0x59, 0x36, 0x24, 0xa1, 0x24, 0x1b, 0x2b, 0x41, 0x76, 0x52, 0xbb, 0x0a, 0x95, 0x10, 0x1d,
- 0x05, 0x7a, 0x9b, 0x31, 0xb3, 0x94, 0xa4, 0xf1, 0x08, 0x1d, 0x19, 0x0c, 0xa8, 0xbd, 0x03, 0x2d,
- 0x6a, 0x57, 0x3e, 0x55, 0xdb, 0x3e, 0xe9, 0x05, 0xfa, 0x12, 0xdb, 0x51, 0x4f, 0x62, 0xdf, 0x13,
- 0x08, 0x77, 0x49, 0x2f, 0x30, 0x16, 0x71, 0x62, 0xa4, 0xb4, 0xce, 0xce, 0x3c, 0xd6, 0xf9, 0x18,
- 0x1a, 0xf7, 0x4e, 0x91, 0xe3, 0xd9, 0x38, 0x78, 0x9e, 0xe6, 0xf9, 0xa3, 0x22, 0x2c, 0x26, 0xd9,
- 0x9e, 0xc1, 0xbb, 0x66, 0x1d, 0xd2, 0x99, 0x9d, 0xfc, 0x3f, 0x4a, 0x00, 0xf7, 0x2d, 0x1b, 0x73,
- 0x63, 0xd7, 0xd6, 0xa0, 0x36, 0x20, 0xbe, 0x83, 0x42, 0xb1, 0xbd, 0x18, 0x51, 0xc7, 0x17, 0x5a,
- 0xa1, 0x2d, 0x1d, 0x3b, 0x1f, 0x8c, 0x73, 0x5c, 0xce, 0x72, 0x7c, 0x1d, 0xea, 0x7d, 0xee, 0xd9,
- 0x98, 0x0d, 0x8f, 0xbd, 0x63, 0xca, 0x91, 0x84, 0xa7, 0xc2, 0x02, 0x37, 0xea, 0x38, 0x2c, 0xc8,
- 0x08, 0x58, 0x4b, 0x44, 0xc0, 0x4d, 0x6a, 0x0b, 0xa8, 0x6f, 0x12, 0xd7, 0x1e, 0xe9, 0x75, 0x19,
- 0x47, 0x50, 0x7f, 0xcf, 0xb5, 0x47, 0x59, 0x9d, 0x69, 0xcc, 0xa5, 0x33, 0xd7, 0xa1, 0x8e, 0xf9,
- 0x2b, 0x17, 0x06, 0x9e, 0x65, 0x5b, 0xc0, 0x95, 0x6f, 0x00, 0xe6, 0x79, 0x03, 0x5f, 0xd4, 0x60,
- 0xe3, 0x3e, 0xf1, 0x9d, 0xbb, 0x28, 0x44, 0x91, 0x03, 0x38, 0x18, 0x1e, 0x1e, 0xc8, 0xb4, 0x29,
- 0x16, 0x4b, 0x71, 0x2c, 0x5a, 0xf2, 0xc8, 0x5a, 0xca, 0xcb, 0x55, 0xca, 0xf9, 0xf1, 0xb9, 0x92,
- 0x08, 0x73, 0x37, 0x60, 0x19, 0xd9, 0x36, 0x79, 0x6a, 0x62, 0xc7, 0x0b, 0x47, 0x26, 0x4f, 0xbc,
- 0xaa, 0x6c, 0xab, 0x25, 0x06, 0xb8, 0x47, 0xe7, 0x3f, 0x90, 0xc9, 0x56, 0xe6, 0x45, 0xc4, 0x3a,
- 0x53, 0x4f, 0xe9, 0xcc, 0xff, 0x43, 0xd5, 0x0a, 0xb1, 0x23, 0x65, 0xbf, 0x99, 0xf2, 0x74, 0xbe,
- 0xe5, 0x58, 0xa1, 0x75, 0xc2, 0x33, 0xc9, 0xc0, 0xe0, 0x98, 0xda, 0xeb, 0xb0, 0xdc, 0x23, 0xb6,
- 0x8d, 0x7b, 0x94, 0x59, 0x53, 0x50, 0x6d, 0x32, 0xaa, 0x9d, 0x18, 0x70, 0x9f, 0xd3, 0x4f, 0xe8,
- 0x16, 0x4c, 0xd1, 0x2d, 0x1d, 0xea, 0x0e, 0x3a, 0xb5, 0x9c, 0xa1, 0xc3, 0xbc, 0x66, 0xd1, 0x90,
- 0x43, 0xba, 0x23, 0x3e, 0xed, 0xd9, 0xc3, 0xc0, 0x3a, 0xc1, 0xa6, 0xc4, 0x59, 0x64, 0x0f, 0xdf,
- 0x89, 0x00, 0xdf, 0x14, 0xc8, 0x94, 0x8c, 0xe5, 0x32, 0x94, 0x96, 0x20, 0xc3, 0x87, 0x63, 0x64,
- 0x04, 0x4e, 0x7b, 0x9c, 0x8c, 0x40, 0x7e, 0x01, 0xc0, 0x41, 0xa7, 0xa6, 0x8d, 0xdd, 0xa3, 0xf0,
- 0x98, 0x79, 0xb3, 0xb2, 0xd1, 0x74, 0xd0, 0xe9, 0x43, 0x36, 0xc1, 0xc0, 0x96, 0x2b, 0xc1, 0x1d,
- 0x01, 0xb6, 0x5c, 0x01, 0xd6, 0xa1, 0xee, 0xa1, 0x90, 0x2a, 0xab, 0xbe, 0xcc, 0x83, 0xad, 0x18,
- 0x52, 0x8b, 0xa0, 0x74, 0xb9, 0xd0, 0x35, 0xb6, 0xae, 0xe1, 0xa0, 0x53, 0x26, 0x61, 0x06, 0xb4,
- 0x5c, 0x01, 0x5c, 0x11, 0x40, 0xcb, 0xe5, 0xc0, 0x97, 0x60, 0x71, 0xe8, 0x5a, 0x4f, 0x86, 0x58,
- 0xc0, 0x57, 0x19, 0xe7, 0x0b, 0x7c, 0x8e, 0xa3, 0x5c, 0x85, 0x0a, 0x76, 0x87, 0x8e, 0x7e, 0x21,
- 0xeb, 0xaa, 0xa9, 0xa8, 0x19, 0x50, 0x7b, 0x11, 0x16, 0x9c, 0xa1, 0x1d, 0x5a, 0x9e, 0x8d, 0x4d,
- 0x32, 0xd0, 0xd7, 0x98, 0x90, 0x40, 0x4e, 0xed, 0x0d, 0x94, 0xd6, 0x72, 0x71, 0x2e, 0x6b, 0xa9,
- 0x42, 0xad, 0x8b, 0x51, 0x1f, 0xfb, 0xca, 0xb4, 0x38, 0xd6, 0xc5, 0x92, 0x5a, 0x17, 0xcb, 0x67,
- 0xd3, 0xc5, 0xca, 0x74, 0x5d, 0xac, 0xce, 0xae, 0x8b, 0xb5, 0x19, 0x74, 0xb1, 0x3e, 0x5d, 0x17,
- 0x1b, 0x33, 0xe8, 0x62, 0x73, 0x26, 0x5d, 0x84, 0xc9, 0xba, 0xb8, 0x30, 0x41, 0x17, 0x17, 0x27,
- 0xe8, 0x62, 0x6b, 0x92, 0x2e, 0xb6, 0xa7, 0xe8, 0xe2, 0x52, 0xbe, 0x2e, 0x76, 0xe6, 0xd0, 0xc5,
- 0xe5, 0x8c, 0x2e, 0x8e, 0x79, 0x4b, 0x6d, 0xb6, 0x23, 0xd4, 0xca, 0x3c, 0xda, 0xfa, 0xb7, 0x2a,
- 0xe8, 0x5c, 0x5b, 0xff, 0x2d, 0x9e, 0x5d, 0x5a, 0x48, 0x55, 0x69, 0x21, 0x35, 0xb5, 0x85, 0xd4,
- 0xcf, 0x66, 0x21, 0x8d, 0xe9, 0x16, 0xd2, 0x9c, 0xdd, 0x42, 0x60, 0x06, 0x0b, 0x59, 0x98, 0x6e,
- 0x21, 0x8b, 0x33, 0x58, 0x48, 0x6b, 0x26, 0x0b, 0x69, 0x4f, 0xb6, 0x90, 0xa5, 0x09, 0x16, 0xd2,
- 0x99, 0x60, 0x21, 0xcb, 0x93, 0x2c, 0x44, 0x9b, 0x62, 0x21, 0x2b, 0xf9, 0x16, 0xb2, 0x3a, 0x87,
- 0x85, 0x5c, 0x98, 0xc9, 0x5b, 0xaf, 0xcd, 0xa3, 0xff, 0xdf, 0x82, 0x3a, 0x57, 0xff, 0x67, 0x38,
- 0x7e, 0xf2, 0x85, 0x39, 0xc9, 0xf3, 0xe7, 0x25, 0xa8, 0xd0, 0x03, 0x64, 0x9c, 0x98, 0x16, 0x93,
- 0x89, 0xa9, 0x0e, 0xf5, 0x13, 0xec, 0x07, 0x71, 0x65, 0x44, 0x0e, 0x67, 0x30, 0xa4, 0x6b, 0xd0,
- 0x09, 0xb1, 0xef, 0x04, 0x26, 0x19, 0x98, 0x01, 0xf6, 0x4f, 0xac, 0x9e, 0x34, 0xaa, 0x36, 0x9b,
- 0xdf, 0x1b, 0x1c, 0xf0, 0x59, 0xed, 0x26, 0xd4, 0x7b, 0xbc, 0x7c, 0x20, 0x9c, 0xfe, 0x4a, 0xf2,
- 0x21, 0x44, 0x65, 0xc1, 0x90, 0x38, 0x14, 0xdd, 0xb6, 0x7a, 0xd8, 0x0d, 0x78, 0xfa, 0x34, 0x86,
- 0xfe, 0x90, 0x83, 0x0c, 0x89, 0xa3, 0x14, 0x7e, 0x7d, 0x1e, 0xe1, 0xbf, 0x05, 0x4d, 0xa6, 0x0c,
- 0xac, 0x56, 0x77, 0x23, 0x51, 0xab, 0x2b, 0x4f, 0x2e, 0xac, 0x6c, 0xdd, 0x85, 0xd6, 0x37, 0x02,
- 0xe2, 0x1a, 0x78, 0x80, 0x7d, 0xec, 0xf6, 0xb0, 0xb6, 0x0c, 0x15, 0xd3, 0xc7, 0x03, 0x21, 0xe3,
- 0xb2, 0x81, 0x07, 0xd3, 0xeb, 0x4f, 0x5b, 0x1e, 0xd4, 0xc5, 0x33, 0xcd, 0x58, 0x5c, 0x39, 0xf3,
- 0x59, 0xe6, 0x1e, 0x34, 0x24, 0x50, 0xb9, 0xe5, 0x2b, 0xb2, 0xaa, 0x58, 0x52, 0x3b, 0x20, 0x0e,
- 0xdd, 0x7a, 0x17, 0x16, 0x12, 0x0a, 0xa8, 0xa4, 0x74, 0x2d, 0x4d, 0x29, 0x25, 0x4c, 0xa1, 0xb7,
- 0x82, 0xd8, 0xfb, 0xd0, 0x66, 0xc4, 0xe2, 0x22, 0x9a, 0x8a, 0xde, 0xeb, 0x69, 0x7a, 0x17, 0x94,
- 0x45, 0x01, 0x49, 0x72, 0x0f, 0x5a, 0x82, 0x64, 0x78, 0xcc, 0xde, 0xad, 0x8a, 0xe2, 0x8d, 0x34,
- 0xc5, 0xd5, 0xf1, 0x7a, 0x06, 0x5d, 0x38, 0x4e, 0x50, 0x56, 0x0f, 0xe6, 0x26, 0x28, 0x17, 0x4a,
- 0x82, 0x1f, 0x81, 0x96, 0x22, 0x18, 0x9d, 0x1d, 0x32, 0x54, 0x6f, 0xa5, 0xa9, 0xae, 0xab, 0xa8,
- 0xb2, 0xd5, 0xe3, 0x2f, 0x47, 0xc4, 0xd0, 0x79, 0x5f, 0x8e, 0xd0, 0x74, 0x41, 0xcc, 0x81, 0x4b,
- 0x9c, 0x58, 0xb6, 0x34, 0x91, 0x2b, 0xd8, 0xb7, 0xd3, 0xd4, 0xaf, 0x4e, 0xa9, 0x7b, 0x24, 0xe5,
- 0xfc, 0x96, 0xe4, 0x3d, 0xf4, 0x2d, 0xf7, 0x48, 0x49, 0x7d, 0x35, 0x49, 0xbd, 0x29, 0x17, 0x3e,
- 0x86, 0x4e, 0x62, 0xe1, 0xae, 0xef, 0x23, 0xb5, 0x82, 0xdf, 0x4c, 0xf3, 0x96, 0xf2, 0xa9, 0x89,
- 0xb5, 0x92, 0xec, 0x6f, 0xca, 0xd0, 0x79, 0x8f, 0xb8, 0xe9, 0x1a, 0x2f, 0x86, 0xcd, 0x63, 0xa6,
- 0xc1, 0x66, 0x54, 0x77, 0x32, 0x83, 0xe1, 0xa1, 0x99, 0xaa, 0xf4, 0xbf, 0x9c, 0x55, 0xf8, 0x6c,
- 0x82, 0xd3, 0x2d, 0x18, 0xfa, 0x71, 0x5e, 0xf2, 0x63, 0xc3, 0x65, 0x9a, 0x30, 0x98, 0x7d, 0x14,
- 0x22, 0xf5, 0x4e, 0xfc, 0x19, 0x5e, 0x4d, 0xee, 0x94, 0x7f, 0x4c, 0xee, 0x16, 0x8c, 0x8d, 0x41,
- 0xfe, 0x21, 0xfa, 0x10, 0x36, 0x9e, 0x0c, 0xb1, 0x3f, 0x52, 0xef, 0x54, 0xce, 0xbe, 0xc9, 0xf7,
- 0x29, 0xb6, 0x72, 0x9b, 0x8b, 0x4f, 0xd4, 0x20, 0xcd, 0x84, 0x75, 0x0f, 0x85, 0xc7, 0xea, 0x2d,
- 0x78, 0xf1, 0x63, 0x6b, 0xdc, 0x0a, 0x95, 0x3b, 0xac, 0x79, 0x4a, 0x48, 0xdc, 0x24, 0xf9, 0xbc,
- 0x04, 0xfa, 0x1e, 0x1a, 0x86, 0xc7, 0x3b, 0xbb, 0xbd, 0x1e, 0x0e, 0x82, 0x3b, 0xa4, 0x8f, 0xa7,
- 0xf5, 0x39, 0x06, 0x36, 0x79, 0x2a, 0xab, 0xf2, 0xf4, 0xbf, 0xf6, 0x06, 0x0d, 0x08, 0xc4, 0xc3,
- 0xf2, 0x48, 0x94, 0x2a, 0x8d, 0x70, 0xea, 0x07, 0x0c, 0x6e, 0x08, 0x3c, 0x9a, 0x35, 0xd1, 0x69,
- 0xe2, 0x5b, 0xdf, 0x67, 0xfd, 0x09, 0x93, 0xfa, 0x6f, 0x71, 0x20, 0x4a, 0x01, 0x1e, 0xfb, 0x36,
- 0x4d, 0x60, 0x42, 0xf2, 0x29, 0xe6, 0x48, 0x3c, 0xff, 0x6c, 0xb0, 0x09, 0x0a, 0x1c, 0x0b, 0x1e,
- 0xb5, 0xd9, 0x32, 0xef, 0xb9, 0x82, 0xdf, 0x5f, 0x8a, 0xb0, 0x2e, 0x64, 0xe4, 0x79, 0xf6, 0x2c,
- 0x1d, 0x95, 0xe7, 0x23, 0xa4, 0xd4, 0x73, 0x57, 0x26, 0x3f, 0x77, 0x75, 0xb6, 0xe7, 0x9e, 0xab,
- 0xa7, 0xf1, 0xc3, 0x12, 0xac, 0x71, 0xc6, 0x1e, 0x38, 0xf4, 0xb9, 0xad, 0xf0, 0x3f, 0x4d, 0x33,
- 0xfe, 0x05, 0x42, 0xf8, 0x73, 0x51, 0x0a, 0x61, 0x1f, 0x05, 0xc1, 0x53, 0xe2, 0xf7, 0xff, 0x07,
- 0xde, 0xfc, 0xc7, 0xb0, 0x98, 0xe4, 0xeb, 0x19, 0xfa, 0x3d, 0x2c, 0x42, 0xe4, 0x24, 0xdc, 0x3f,
- 0xaf, 0x40, 0x73, 0xcf, 0xc3, 0x3e, 0x92, 0x87, 0x4d, 0x56, 0xb7, 0x2f, 0xb2, 0x3a, 0x2d, 0x2f,
- 0xd3, 0xeb, 0x50, 0x0f, 0x86, 0x8e, 0x83, 0xfc, 0x91, 0xcc, 0xb9, 0xc5, 0x70, 0x86, 0x9c, 0x3b,
- 0x53, 0xae, 0xad, 0xcc, 0x55, 0xae, 0x7d, 0x09, 0x16, 0x89, 0xe4, 0xcd, 0xb4, 0xfa, 0x52, 0xbc,
- 0xd1, 0xdc, 0x83, 0x7e, 0xaa, 0xf7, 0x53, 0x1b, 0xeb, 0xfd, 0x24, 0x7b, 0x46, 0xf5, 0xb1, 0x9e,
- 0xd1, 0x57, 0x52, 0x3d, 0x9b, 0x06, 0x13, 0xdd, 0x86, 0x32, 0x3d, 0xe3, 0xa1, 0x3e, 0xd9, 0xad,
- 0x79, 0x33, 0xd9, 0xad, 0x69, 0x66, 0x33, 0x3b, 0x99, 0xe0, 0xa4, 0x7a, 0x34, 0x89, 0xd6, 0x16,
- 0xa4, 0x5b, 0x5b, 0x97, 0x01, 0xfa, 0xd8, 0xf3, 0x71, 0x0f, 0x85, 0xb8, 0x2f, 0x4e, 0xbd, 0x89,
- 0x99, 0xb3, 0x75, 0x77, 0x54, 0xea, 0xd7, 0x9a, 0x47, 0xfd, 0x7e, 0x59, 0x84, 0x66, 0x9c, 0x45,
- 0xdc, 0x86, 0xf6, 0x21, 0xe9, 0x27, 0xe2, 0xad, 0x48, 0x1c, 0x52, 0x09, 0x5e, 0x2a, 0xf1, 0xe8,
- 0x16, 0x8c, 0xd6, 0x61, 0x2a, 0x13, 0x79, 0x08, 0x9a, 0x4b, 0x5c, 0x73, 0x8c, 0x0e, 0x4f, 0x0b,
- 0x2e, 0xa5, 0x98, 0x1a, 0xcb, 0x61, 0xba, 0x05, 0xa3, 0xe3, 0x8e, 0xcd, 0xc5, 0xd1, 0xf3, 0x08,
- 0x56, 0x55, 0x7d, 0x36, 0x6d, 0x6f, 0xb2, 0xbd, 0x6c, 0x64, 0xc4, 0x10, 0x27, 0xe6, 0x6a, 0x93,
- 0xf9, 0xac, 0x08, 0xed, 0xb4, 0x76, 0x68, 0x5f, 0x82, 0xe6, 0xb8, 0x44, 0xd4, 0xb9, 0x7e, 0xb7,
- 0x60, 0xc4, 0x98, 0x54, 0x9a, 0x9f, 0x04, 0xc4, 0xa5, 0x67, 0x30, 0x7e, 0x22, 0x53, 0xa5, 0xcb,
- 0xa9, 0x23, 0x1b, 0x95, 0xe6, 0x27, 0xc9, 0x89, 0xf8, 0xf9, 0x7f, 0x5f, 0x86, 0x46, 0x74, 0x74,
- 0x50, 0x9c, 0xec, 0x5e, 0x83, 0xf2, 0x11, 0x0e, 0x55, 0x27, 0x91, 0xc8, 0xfe, 0x0d, 0x8a, 0x41,
- 0x11, 0xbd, 0x61, 0x28, 0xfc, 0x63, 0x1e, 0xa2, 0x37, 0x0c, 0xb5, 0xeb, 0x50, 0xf1, 0x48, 0x20,
- 0x3b, 0x40, 0x39, 0x98, 0x0c, 0x45, 0xbb, 0x09, 0xb5, 0x3e, 0xb6, 0x71, 0x88, 0xc5, 0x89, 0x3a,
- 0x07, 0x59, 0x20, 0x69, 0xb7, 0xa0, 0x4e, 0x3c, 0xde, 0x86, 0xac, 0x4d, 0xc2, 0x97, 0x58, 0x94,
- 0x15, 0x9a, 0x92, 0x8a, 0x22, 0x57, 0x1e, 0x2b, 0x14, 0x85, 0x9e, 0xc9, 0x3c, 0x14, 0xf6, 0x8e,
- 0x45, 0xfb, 0x22, 0x07, 0x97, 0xe3, 0x8c, 0xb9, 0x89, 0xe6, 0x5c, 0x6e, 0xe2, 0xcc, 0x1d, 0xa4,
- 0xbf, 0x56, 0x61, 0x4d, 0x9d, 0x4d, 0x9e, 0xd7, 0x18, 0xcf, 0x6b, 0x8c, 0xff, 0xed, 0x35, 0xc6,
- 0xa7, 0x50, 0x65, 0x17, 0x34, 0x94, 0x94, 0x8a, 0x73, 0x50, 0xd2, 0x6e, 0x42, 0x85, 0xdd, 0x36,
- 0x29, 0xb1, 0x45, 0xeb, 0x0a, 0x87, 0x2f, 0xea, 0x26, 0x0c, 0x6d, 0xeb, 0x67, 0x55, 0x58, 0x1a,
- 0xd3, 0xda, 0xf3, 0x9e, 0xd4, 0x79, 0x4f, 0xea, 0x4c, 0x3d, 0x29, 0x95, 0x0e, 0x6b, 0xf3, 0x58,
- 0xc3, 0xb7, 0x01, 0xe2, 0x14, 0xe4, 0x39, 0xdf, 0xf9, 0xfa, 0x55, 0x0d, 0x2e, 0xe6, 0x14, 0x46,
- 0xce, 0xaf, 0x29, 0x9c, 0x5f, 0x53, 0x38, 0xbf, 0xa6, 0x10, 0x9b, 0xe1, 0xdf, 0x8b, 0xd0, 0x88,
- 0xca, 0xe9, 0xd3, 0x2f, 0x76, 0x6d, 0x47, 0xdd, 0x19, 0x9e, 0x76, 0xaf, 0x65, 0x6b, 0xd6, 0x2c,
- 0xf0, 0xc8, 0xab, 0xaf, 0x37, 0xa1, 0xce, 0x2b, 0xab, 0x32, 0x78, 0xac, 0x64, 0x0b, 0xb2, 0x81,
- 0x21, 0x71, 0xb4, 0x37, 0xa0, 0x21, 0xae, 0x2b, 0xc9, 0x93, 0xf5, 0x6a, 0xfa, 0x64, 0xcd, 0x61,
- 0x46, 0x84, 0x75, 0xf6, 0x3b, 0xcd, 0x18, 0x56, 0x14, 0x97, 0x11, 0xb5, 0xf7, 0x26, 0x3b, 0xa4,
- 0x6c, 0xcc, 0x8d, 0x5a, 0x0b, 0x6a, 0x97, 0xf4, 0x93, 0x22, 0xb4, 0xd2, 0x5d, 0x86, 0x1d, 0xea,
- 0x88, 0xf8, 0x44, 0x74, 0x7b, 0x5c, 0x71, 0xe6, 0xee, 0x16, 0x8c, 0x08, 0xef, 0xf9, 0x9e, 0xaf,
- 0x7e, 0x5a, 0x84, 0x66, 0x74, 0xb2, 0xd7, 0xee, 0x40, 0x4b, 0x6e, 0x63, 0xf6, 0x48, 0x1f, 0x8b,
- 0x07, 0xbd, 0x9c, 0xfb, 0xa0, 0xbc, 0xdb, 0xb1, 0x28, 0x17, 0xdd, 0x21, 0x7d, 0x75, 0x2b, 0xb0,
- 0x34, 0xcf, 0xdb, 0xf8, 0x75, 0x13, 0x6a, 0xc2, 0x51, 0x2b, 0x4e, 0x7c, 0x79, 0x09, 0x4a, 0xd4,
- 0x5b, 0x2d, 0x4f, 0xb8, 0xf4, 0x57, 0x99, 0x78, 0xe9, 0x6f, 0x5a, 0xe2, 0x31, 0x66, 0x89, 0xb5,
- 0x8c, 0x25, 0x26, 0x5c, 0x62, 0x7d, 0x06, 0x97, 0xd8, 0x98, 0xee, 0x12, 0x9b, 0x33, 0xb8, 0x44,
- 0x98, 0xc9, 0x25, 0x2e, 0x4c, 0x76, 0x89, 0x8b, 0x13, 0x5c, 0x62, 0x6b, 0x82, 0x4b, 0x6c, 0x4f,
- 0x72, 0x89, 0x4b, 0x53, 0x5c, 0x62, 0x27, 0xeb, 0x12, 0x5f, 0x81, 0x36, 0x25, 0x9e, 0x30, 0x36,
- 0x7e, 0x12, 0x68, 0x39, 0xe8, 0x34, 0x91, 0x2b, 0x50, 0x34, 0xcb, 0x4d, 0xa2, 0x69, 0x02, 0xcd,
- 0x72, 0x13, 0x68, 0xc9, 0x40, 0xbf, 0x32, 0x76, 0x4d, 0x73, 0xa6, 0x13, 0xc1, 0x47, 0x79, 0x2e,
- 0xe0, 0x42, 0xb6, 0xb5, 0x94, 0xf7, 0xe9, 0x89, 0xda, 0x1b, 0x68, 0xd7, 0x44, 0xd8, 0x5f, 0xcb,
- 0xda, 0xfd, 0xa3, 0x91, 0x87, 0x79, 0xee, 0xce, 0x92, 0x81, 0xd7, 0x65, 0xd0, 0xbf, 0x98, 0x3d,
- 0xdc, 0x47, 0x4d, 0x73, 0x19, 0xee, 0xaf, 0x43, 0x0d, 0xd9, 0x36, 0xd5, 0x4f, 0x3d, 0xb7, 0x77,
- 0x5e, 0x45, 0xb6, 0xbd, 0x37, 0xd0, 0xbe, 0x0c, 0x90, 0x78, 0xa2, 0xf5, 0xac, 0x33, 0x8f, 0xb9,
- 0x35, 0x12, 0x98, 0xda, 0xcb, 0xd0, 0xea, 0x5b, 0xd4, 0x82, 0x1c, 0xcb, 0x45, 0x21, 0xf1, 0xf5,
- 0x0d, 0xa6, 0x20, 0xe9, 0xc9, 0xf4, 0x95, 0xd7, 0xcd, 0xb1, 0x2b, 0xaf, 0x2f, 0x41, 0xf9, 0xd4,
- 0xb1, 0xf5, 0x4b, 0x59, 0x8b, 0xfb, 0xd0, 0xb1, 0x0d, 0x0a, 0xcb, 0x96, 0x59, 0x5f, 0x78, 0xd6,
- 0x5b, 0xb1, 0x97, 0x9f, 0xe1, 0x56, 0xec, 0x8b, 0xf3, 0x78, 0xac, 0x1f, 0x00, 0xc4, 0x71, 0x6f,
- 0xce, 0x2f, 0x8d, 0xde, 0x86, 0x85, 0x81, 0x65, 0x63, 0x33, 0x3f, 0xa4, 0xc6, 0x37, 0x9e, 0xbb,
- 0x05, 0x03, 0x06, 0xd1, 0x28, 0xf6, 0xe2, 0x21, 0xac, 0x28, 0xba, 0xb9, 0xda, 0x77, 0x27, 0xc7,
- 0xaf, 0x6b, 0xd9, 0x84, 0x3a, 0xa7, 0x25, 0xac, 0x0e, 0x67, 0x7f, 0xaa, 0xc0, 0xc5, 0xbc, 0x66,
- 0xb4, 0x03, 0x2f, 0x1c, 0xa2, 0xc0, 0xea, 0x99, 0x28, 0xf5, 0x95, 0x90, 0x19, 0xd5, 0x7c, 0xb9,
- 0x68, 0x5e, 0x4b, 0x55, 0x58, 0xf3, 0xbf, 0x2a, 0xea, 0x16, 0x8c, 0xcd, 0xc3, 0x09, 0x1f, 0x1d,
- 0xdd, 0x87, 0x0e, 0xf2, 0x2c, 0xf3, 0x53, 0x3c, 0x8a, 0x77, 0xe0, 0x92, 0x4c, 0xd5, 0xb5, 0xd2,
- 0x5f, 0x59, 0x75, 0x0b, 0x46, 0x1b, 0xa5, 0xbf, 0xbb, 0xfa, 0x1e, 0xe8, 0x84, 0xb5, 0x25, 0x4c,
- 0x4b, 0x34, 0xa4, 0x62, 0x7a, 0xe5, 0x6c, 0x57, 0x54, 0xdd, 0xbb, 0xea, 0x16, 0x8c, 0x35, 0xa2,
- 0xee, 0x6a, 0xc5, 0xf4, 0x3d, 0xd1, 0xeb, 0x89, 0xe9, 0x57, 0xf2, 0xe8, 0x8f, 0xb7, 0x85, 0x62,
- 0xfa, 0x99, 0x86, 0xd1, 0x11, 0x6c, 0x0a, 0xfa, 0x28, 0x6e, 0x24, 0xc6, 0x5b, 0xf0, 0x00, 0xf7,
- 0x4a, 0x76, 0x0b, 0x45, 0xdb, 0xb1, 0x5b, 0x30, 0xd6, 0x49, 0x6e, 0x4f, 0x12, 0xc7, 0x1b, 0xb1,
- 0xae, 0x2e, 0x4b, 0x17, 0xe2, 0x8d, 0x6a, 0x59, 0xef, 0x98, 0xd7, 0x03, 0xee, 0x16, 0x0c, 0x21,
- 0x93, 0x2c, 0x2c, 0xd6, 0xf0, 0xe3, 0x58, 0xc3, 0x13, 0x2d, 0x01, 0xed, 0xfd, 0xc9, 0x1a, 0x7e,
- 0x29, 0xa7, 0x6d, 0xc4, 0x2f, 0x16, 0xa8, 0xb5, 0xfa, 0x2a, 0x2c, 0x24, 0x6f, 0x2e, 0xac, 0xc6,
- 0x1f, 0xf7, 0x95, 0xe3, 0x3b, 0x0e, 0xbf, 0x2d, 0x42, 0xf9, 0x11, 0x52, 0xdf, 0x8a, 0x98, 0xfe,
- 0xb1, 0x5b, 0xc6, 0xb3, 0x95, 0xcf, 0xfc, 0x8d, 0xc8, 0x5c, 0x5f, 0x70, 0x5d, 0x81, 0x86, 0x8c,
- 0x30, 0x39, 0xcf, 0xf7, 0x31, 0x2c, 0x7d, 0x30, 0x56, 0x6f, 0x7a, 0x8e, 0x1f, 0x93, 0xfc, 0xae,
- 0x08, 0xe5, 0x0f, 0x1d, 0x5b, 0x29, 0xbd, 0x4b, 0xd0, 0xa4, 0xbf, 0x81, 0x87, 0x7a, 0xf2, 0x5e,
- 0x49, 0x3c, 0x41, 0x93, 0x3f, 0xcf, 0xc7, 0x03, 0xeb, 0x54, 0x64, 0x79, 0x62, 0x44, 0x57, 0xa1,
- 0x30, 0xf4, 0xad, 0xc3, 0x61, 0x88, 0xc5, 0x67, 0x7a, 0xf1, 0x04, 0x4d, 0x65, 0x9e, 0xfa, 0xc8,
- 0xf3, 0x70, 0x5f, 0x1c, 0xc1, 0xe5, 0xf0, 0xcc, 0x7d, 0xcc, 0xdb, 0xaf, 0x42, 0x9b, 0xf8, 0x47,
- 0x12, 0xd7, 0x3c, 0xd9, 0xb9, 0xbd, 0x28, 0xbe, 0x5d, 0xdd, 0xf7, 0x49, 0x48, 0xf6, 0x8b, 0xbf,
- 0x28, 0x95, 0xf7, 0x76, 0x0f, 0x0e, 0x6b, 0xec, 0x63, 0xd0, 0x37, 0xff, 0x19, 0x00, 0x00, 0xff,
- 0xff, 0xd4, 0x0a, 0xef, 0xca, 0xe4, 0x3a, 0x00, 0x00,
-}
diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto
deleted file mode 100644
index 557c88072..000000000
--- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto
+++ /dev/null
@@ -1,663 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// 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 IS AUTOMATICALLY GENERATED.
-
-syntax = "proto3";
-
-package openapi.v2;
-
-import "google/protobuf/any.proto";
-
-// This option lets the proto compiler generate Java code inside the package
-// name (see below) instead of inside an outer class. It creates a simpler
-// developer experience by reducing one-level of name nesting and be
-// consistent with most programming languages that don't support outer classes.
-option java_multiple_files = true;
-
-// The Java outer classname should be the filename in UpperCamelCase. This
-// class is only used to hold proto descriptor, so developers don't need to
-// work with it directly.
-option java_outer_classname = "OpenAPIProto";
-
-// The Java package name must be proto package name with proper prefix.
-option java_package = "org.openapi_v2";
-
-// A reasonable prefix for the Objective-C symbols generated from the package.
-// It should at a minimum be 3 characters long, all uppercase, and convention
-// is to use an abbreviation of the package name. Something short, but
-// hopefully unique enough to not conflict with things that may come along in
-// the future. 'GPB' is reserved for the protocol buffer implementation itself.
-option objc_class_prefix = "OAS";
-
-message AdditionalPropertiesItem {
- oneof oneof {
- Schema schema = 1;
- bool boolean = 2;
- }
-}
-
-message Any {
- google.protobuf.Any value = 1;
- string yaml = 2;
-}
-
-message ApiKeySecurity {
- string type = 1;
- string name = 2;
- string in = 3;
- string description = 4;
- repeated NamedAny vendor_extension = 5;
-}
-
-message BasicAuthenticationSecurity {
- string type = 1;
- string description = 2;
- repeated NamedAny vendor_extension = 3;
-}
-
-message BodyParameter {
- // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
- string description = 1;
- // The name of the parameter.
- string name = 2;
- // Determines the location of the parameter.
- string in = 3;
- // Determines whether or not this parameter is required or optional.
- bool required = 4;
- Schema schema = 5;
- repeated NamedAny vendor_extension = 6;
-}
-
-// Contact information for the owners of the API.
-message Contact {
- // The identifying name of the contact person/organization.
- string name = 1;
- // The URL pointing to the contact information.
- string url = 2;
- // The email address of the contact person/organization.
- string email = 3;
- repeated NamedAny vendor_extension = 4;
-}
-
-message Default {
- repeated NamedAny additional_properties = 1;
-}
-
-// One or more JSON objects describing the schemas being consumed and produced by the API.
-message Definitions {
- repeated NamedSchema additional_properties = 1;
-}
-
-message Document {
- // The Swagger version of this document.
- string swagger = 1;
- Info info = 2;
- // The host (name or ip) of the API. Example: 'swagger.io'
- string host = 3;
- // The base path to the API. Example: '/api'.
- string base_path = 4;
- // The transfer protocol of the API.
- repeated string schemes = 5;
- // A list of MIME types accepted by the API.
- repeated string consumes = 6;
- // A list of MIME types the API can produce.
- repeated string produces = 7;
- Paths paths = 8;
- Definitions definitions = 9;
- ParameterDefinitions parameters = 10;
- ResponseDefinitions responses = 11;
- repeated SecurityRequirement security = 12;
- SecurityDefinitions security_definitions = 13;
- repeated Tag tags = 14;
- ExternalDocs external_docs = 15;
- repeated NamedAny vendor_extension = 16;
-}
-
-message Examples {
- repeated NamedAny additional_properties = 1;
-}
-
-// information about external documentation
-message ExternalDocs {
- string description = 1;
- string url = 2;
- repeated NamedAny vendor_extension = 3;
-}
-
-// A deterministic version of a JSON Schema object.
-message FileSchema {
- string format = 1;
- string title = 2;
- string description = 3;
- Any default = 4;
- repeated string required = 5;
- string type = 6;
- bool read_only = 7;
- ExternalDocs external_docs = 8;
- Any example = 9;
- repeated NamedAny vendor_extension = 10;
-}
-
-message FormDataParameterSubSchema {
- // Determines whether or not this parameter is required or optional.
- bool required = 1;
- // Determines the location of the parameter.
- string in = 2;
- // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
- string description = 3;
- // The name of the parameter.
- string name = 4;
- // allows sending a parameter by name only or with an empty value.
- bool allow_empty_value = 5;
- string type = 6;
- string format = 7;
- PrimitivesItems items = 8;
- string collection_format = 9;
- Any default = 10;
- double maximum = 11;
- bool exclusive_maximum = 12;
- double minimum = 13;
- bool exclusive_minimum = 14;
- int64 max_length = 15;
- int64 min_length = 16;
- string pattern = 17;
- int64 max_items = 18;
- int64 min_items = 19;
- bool unique_items = 20;
- repeated Any enum = 21;
- double multiple_of = 22;
- repeated NamedAny vendor_extension = 23;
-}
-
-message Header {
- string type = 1;
- string format = 2;
- PrimitivesItems items = 3;
- string collection_format = 4;
- Any default = 5;
- double maximum = 6;
- bool exclusive_maximum = 7;
- double minimum = 8;
- bool exclusive_minimum = 9;
- int64 max_length = 10;
- int64 min_length = 11;
- string pattern = 12;
- int64 max_items = 13;
- int64 min_items = 14;
- bool unique_items = 15;
- repeated Any enum = 16;
- double multiple_of = 17;
- string description = 18;
- repeated NamedAny vendor_extension = 19;
-}
-
-message HeaderParameterSubSchema {
- // Determines whether or not this parameter is required or optional.
- bool required = 1;
- // Determines the location of the parameter.
- string in = 2;
- // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
- string description = 3;
- // The name of the parameter.
- string name = 4;
- string type = 5;
- string format = 6;
- PrimitivesItems items = 7;
- string collection_format = 8;
- Any default = 9;
- double maximum = 10;
- bool exclusive_maximum = 11;
- double minimum = 12;
- bool exclusive_minimum = 13;
- int64 max_length = 14;
- int64 min_length = 15;
- string pattern = 16;
- int64 max_items = 17;
- int64 min_items = 18;
- bool unique_items = 19;
- repeated Any enum = 20;
- double multiple_of = 21;
- repeated NamedAny vendor_extension = 22;
-}
-
-message Headers {
- repeated NamedHeader additional_properties = 1;
-}
-
-// General information about the API.
-message Info {
- // A unique and precise title of the API.
- string title = 1;
- // A semantic version number of the API.
- string version = 2;
- // A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed.
- string description = 3;
- // The terms of service for the API.
- string terms_of_service = 4;
- Contact contact = 5;
- License license = 6;
- repeated NamedAny vendor_extension = 7;
-}
-
-message ItemsItem {
- repeated Schema schema = 1;
-}
-
-message JsonReference {
- string _ref = 1;
- string description = 2;
-}
-
-message License {
- // The name of the license type. It's encouraged to use an OSI compatible license.
- string name = 1;
- // The URL pointing to the license.
- string url = 2;
- repeated NamedAny vendor_extension = 3;
-}
-
-// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs.
-message NamedAny {
- // Map key
- string name = 1;
- // Mapped value
- Any value = 2;
-}
-
-// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs.
-message NamedHeader {
- // Map key
- string name = 1;
- // Mapped value
- Header value = 2;
-}
-
-// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs.
-message NamedParameter {
- // Map key
- string name = 1;
- // Mapped value
- Parameter value = 2;
-}
-
-// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs.
-message NamedPathItem {
- // Map key
- string name = 1;
- // Mapped value
- PathItem value = 2;
-}
-
-// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs.
-message NamedResponse {
- // Map key
- string name = 1;
- // Mapped value
- Response value = 2;
-}
-
-// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs.
-message NamedResponseValue {
- // Map key
- string name = 1;
- // Mapped value
- ResponseValue value = 2;
-}
-
-// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs.
-message NamedSchema {
- // Map key
- string name = 1;
- // Mapped value
- Schema value = 2;
-}
-
-// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs.
-message NamedSecurityDefinitionsItem {
- // Map key
- string name = 1;
- // Mapped value
- SecurityDefinitionsItem value = 2;
-}
-
-// Automatically-generated message used to represent maps of string as ordered (name,value) pairs.
-message NamedString {
- // Map key
- string name = 1;
- // Mapped value
- string value = 2;
-}
-
-// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs.
-message NamedStringArray {
- // Map key
- string name = 1;
- // Mapped value
- StringArray value = 2;
-}
-
-message NonBodyParameter {
- oneof oneof {
- HeaderParameterSubSchema header_parameter_sub_schema = 1;
- FormDataParameterSubSchema form_data_parameter_sub_schema = 2;
- QueryParameterSubSchema query_parameter_sub_schema = 3;
- PathParameterSubSchema path_parameter_sub_schema = 4;
- }
-}
-
-message Oauth2AccessCodeSecurity {
- string type = 1;
- string flow = 2;
- Oauth2Scopes scopes = 3;
- string authorization_url = 4;
- string token_url = 5;
- string description = 6;
- repeated NamedAny vendor_extension = 7;
-}
-
-message Oauth2ApplicationSecurity {
- string type = 1;
- string flow = 2;
- Oauth2Scopes scopes = 3;
- string token_url = 4;
- string description = 5;
- repeated NamedAny vendor_extension = 6;
-}
-
-message Oauth2ImplicitSecurity {
- string type = 1;
- string flow = 2;
- Oauth2Scopes scopes = 3;
- string authorization_url = 4;
- string description = 5;
- repeated NamedAny vendor_extension = 6;
-}
-
-message Oauth2PasswordSecurity {
- string type = 1;
- string flow = 2;
- Oauth2Scopes scopes = 3;
- string token_url = 4;
- string description = 5;
- repeated NamedAny vendor_extension = 6;
-}
-
-message Oauth2Scopes {
- repeated NamedString additional_properties = 1;
-}
-
-message Operation {
- repeated string tags = 1;
- // A brief summary of the operation.
- string summary = 2;
- // A longer description of the operation, GitHub Flavored Markdown is allowed.
- string description = 3;
- ExternalDocs external_docs = 4;
- // A unique identifier of the operation.
- string operation_id = 5;
- // A list of MIME types the API can produce.
- repeated string produces = 6;
- // A list of MIME types the API can consume.
- repeated string consumes = 7;
- // The parameters needed to send a valid API call.
- repeated ParametersItem parameters = 8;
- Responses responses = 9;
- // The transfer protocol of the API.
- repeated string schemes = 10;
- bool deprecated = 11;
- repeated SecurityRequirement security = 12;
- repeated NamedAny vendor_extension = 13;
-}
-
-message Parameter {
- oneof oneof {
- BodyParameter body_parameter = 1;
- NonBodyParameter non_body_parameter = 2;
- }
-}
-
-// One or more JSON representations for parameters
-message ParameterDefinitions {
- repeated NamedParameter additional_properties = 1;
-}
-
-message ParametersItem {
- oneof oneof {
- Parameter parameter = 1;
- JsonReference json_reference = 2;
- }
-}
-
-message PathItem {
- string _ref = 1;
- Operation get = 2;
- Operation put = 3;
- Operation post = 4;
- Operation delete = 5;
- Operation options = 6;
- Operation head = 7;
- Operation patch = 8;
- // The parameters needed to send a valid API call.
- repeated ParametersItem parameters = 9;
- repeated NamedAny vendor_extension = 10;
-}
-
-message PathParameterSubSchema {
- // Determines whether or not this parameter is required or optional.
- bool required = 1;
- // Determines the location of the parameter.
- string in = 2;
- // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
- string description = 3;
- // The name of the parameter.
- string name = 4;
- string type = 5;
- string format = 6;
- PrimitivesItems items = 7;
- string collection_format = 8;
- Any default = 9;
- double maximum = 10;
- bool exclusive_maximum = 11;
- double minimum = 12;
- bool exclusive_minimum = 13;
- int64 max_length = 14;
- int64 min_length = 15;
- string pattern = 16;
- int64 max_items = 17;
- int64 min_items = 18;
- bool unique_items = 19;
- repeated Any enum = 20;
- double multiple_of = 21;
- repeated NamedAny vendor_extension = 22;
-}
-
-// Relative paths to the individual endpoints. They must be relative to the 'basePath'.
-message Paths {
- repeated NamedAny vendor_extension = 1;
- repeated NamedPathItem path = 2;
-}
-
-message PrimitivesItems {
- string type = 1;
- string format = 2;
- PrimitivesItems items = 3;
- string collection_format = 4;
- Any default = 5;
- double maximum = 6;
- bool exclusive_maximum = 7;
- double minimum = 8;
- bool exclusive_minimum = 9;
- int64 max_length = 10;
- int64 min_length = 11;
- string pattern = 12;
- int64 max_items = 13;
- int64 min_items = 14;
- bool unique_items = 15;
- repeated Any enum = 16;
- double multiple_of = 17;
- repeated NamedAny vendor_extension = 18;
-}
-
-message Properties {
- repeated NamedSchema additional_properties = 1;
-}
-
-message QueryParameterSubSchema {
- // Determines whether or not this parameter is required or optional.
- bool required = 1;
- // Determines the location of the parameter.
- string in = 2;
- // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
- string description = 3;
- // The name of the parameter.
- string name = 4;
- // allows sending a parameter by name only or with an empty value.
- bool allow_empty_value = 5;
- string type = 6;
- string format = 7;
- PrimitivesItems items = 8;
- string collection_format = 9;
- Any default = 10;
- double maximum = 11;
- bool exclusive_maximum = 12;
- double minimum = 13;
- bool exclusive_minimum = 14;
- int64 max_length = 15;
- int64 min_length = 16;
- string pattern = 17;
- int64 max_items = 18;
- int64 min_items = 19;
- bool unique_items = 20;
- repeated Any enum = 21;
- double multiple_of = 22;
- repeated NamedAny vendor_extension = 23;
-}
-
-message Response {
- string description = 1;
- SchemaItem schema = 2;
- Headers headers = 3;
- Examples examples = 4;
- repeated NamedAny vendor_extension = 5;
-}
-
-// One or more JSON representations for parameters
-message ResponseDefinitions {
- repeated NamedResponse additional_properties = 1;
-}
-
-message ResponseValue {
- oneof oneof {
- Response response = 1;
- JsonReference json_reference = 2;
- }
-}
-
-// Response objects names can either be any valid HTTP status code or 'default'.
-message Responses {
- repeated NamedResponseValue response_code = 1;
- repeated NamedAny vendor_extension = 2;
-}
-
-// A deterministic version of a JSON Schema object.
-message Schema {
- string _ref = 1;
- string format = 2;
- string title = 3;
- string description = 4;
- Any default = 5;
- double multiple_of = 6;
- double maximum = 7;
- bool exclusive_maximum = 8;
- double minimum = 9;
- bool exclusive_minimum = 10;
- int64 max_length = 11;
- int64 min_length = 12;
- string pattern = 13;
- int64 max_items = 14;
- int64 min_items = 15;
- bool unique_items = 16;
- int64 max_properties = 17;
- int64 min_properties = 18;
- repeated string required = 19;
- repeated Any enum = 20;
- AdditionalPropertiesItem additional_properties = 21;
- TypeItem type = 22;
- ItemsItem items = 23;
- repeated Schema all_of = 24;
- Properties properties = 25;
- string discriminator = 26;
- bool read_only = 27;
- Xml xml = 28;
- ExternalDocs external_docs = 29;
- Any example = 30;
- repeated NamedAny vendor_extension = 31;
-}
-
-message SchemaItem {
- oneof oneof {
- Schema schema = 1;
- FileSchema file_schema = 2;
- }
-}
-
-message SecurityDefinitions {
- repeated NamedSecurityDefinitionsItem additional_properties = 1;
-}
-
-message SecurityDefinitionsItem {
- oneof oneof {
- BasicAuthenticationSecurity basic_authentication_security = 1;
- ApiKeySecurity api_key_security = 2;
- Oauth2ImplicitSecurity oauth2_implicit_security = 3;
- Oauth2PasswordSecurity oauth2_password_security = 4;
- Oauth2ApplicationSecurity oauth2_application_security = 5;
- Oauth2AccessCodeSecurity oauth2_access_code_security = 6;
- }
-}
-
-message SecurityRequirement {
- repeated NamedStringArray additional_properties = 1;
-}
-
-message StringArray {
- repeated string value = 1;
-}
-
-message Tag {
- string name = 1;
- string description = 2;
- ExternalDocs external_docs = 3;
- repeated NamedAny vendor_extension = 4;
-}
-
-message TypeItem {
- repeated string value = 1;
-}
-
-// Any property starting with x- is valid.
-message VendorExtension {
- repeated NamedAny additional_properties = 1;
-}
-
-message Xml {
- string name = 1;
- string namespace = 2;
- string prefix = 3;
- bool attribute = 4;
- bool wrapped = 5;
- repeated NamedAny vendor_extension = 6;
-}
-
diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md b/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md
deleted file mode 100644
index 836fb32a7..000000000
--- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# OpenAPI v2 Protocol Buffer Models
-
-This directory contains a Protocol Buffer-language model
-and related code for supporting OpenAPI v2.
-
-Gnostic applications and plugins can use OpenAPIv2.proto
-to generate Protocol Buffer support code for their preferred languages.
-
-OpenAPIv2.go is used by Gnostic to read JSON and YAML OpenAPI
-descriptions into the Protocol Buffer-based datastructures
-generated from OpenAPIv2.proto.
-
-OpenAPIv2.proto and OpenAPIv2.go are generated by the Gnostic
-compiler generator, and OpenAPIv2.pb.go is generated by
-protoc, the Protocol Buffer compiler, and protoc-gen-go, the
-Protocol Buffer Go code generation plugin.
diff --git a/vendor/github.com/googleapis/gnostic/README.md b/vendor/github.com/googleapis/gnostic/README.md
deleted file mode 100644
index d350f3f01..000000000
--- a/vendor/github.com/googleapis/gnostic/README.md
+++ /dev/null
@@ -1,103 +0,0 @@
-[![Build Status](https://travis-ci.org/googleapis/gnostic.svg?branch=master)](https://travis-ci.org/googleapis/gnostic)
-
-# ⨁ gnostic
-
-This repository contains a Go command line tool which converts
-JSON and YAML [OpenAPI](https://github.com/OAI/OpenAPI-Specification)
-descriptions to and from equivalent Protocol Buffer representations.
-
-[Protocol Buffers](https://developers.google.com/protocol-buffers/)
-provide a language-neutral, platform-neutral, extensible mechanism
-for serializing structured data.
-**gnostic**'s Protocol Buffer models for the OpenAPI Specification
-can be used to generate code that includes data structures with
-explicit fields for the elements of an OpenAPI description.
-This makes it possible for developers to work with OpenAPI
-descriptions in type-safe ways, which is particularly useful
-in strongly-typed languages like Go and Swift.
-
-**gnostic** reads OpenAPI descriptions into
-these generated data structures, reports errors,
-resolves internal dependencies, and writes the results
-in a binary form that can be used in any language that is
-supported by the Protocol Buffer tools.
-A plugin interface simplifies integration with API
-tools written in a variety of different languages,
-and when necessary, Protocol Buffer OpenAPI descriptions
-can be reexported as JSON or YAML.
-
-**gnostic** compilation code and OpenAPI Protocol Buffer
-models are automatically generated from an
-[OpenAPI JSON Schema](https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json).
-Source code for the generator is in the [generate-gnostic](generate-gnostic) directory.
-
-## Disclaimer
-
-This is prerelease software and work in progress. Feedback and
-contributions are welcome, but we currently make no guarantees of
-function or stability.
-
-## Requirements
-
-**gnostic** can be run in any environment that supports [Go](http://golang.org)
-and the [Google Protocol Buffer Compiler](https://github.com/google/protobuf).
-
-## Installation
-
-1. Get this package by downloading it with `go get`.
-
- go get github.com/googleapis/gnostic
-
-2. [Optional] Build and run the compiler generator.
-This uses the OpenAPI JSON schema to generate a Protocol Buffer language file
-that describes the OpenAPI specification and a Go-language file of code that
-will read a JSON or YAML OpenAPI representation into the generated protocol
-buffers. Pre-generated versions of these files are in the OpenAPIv2 directory.
-
- cd $GOPATH/src/github.com/googleapis/gnostic/generate-gnostic
- go install
- cd ..
- generate-gnostic --v2
-
-3. [Optional] Generate Protocol Buffer support code.
-A pre-generated version of this file is checked into the OpenAPIv2 directory.
-This step requires a local installation of protoc, the Protocol Buffer Compiler.
-You can get protoc [here](https://github.com/google/protobuf).
-
- ./COMPILE-PROTOS.sh
-
-4. [Optional] Rebuild **gnostic**. This is only necessary if you've performed steps
-2 or 3 above.
-
- go install github.com/googleapis/gnostic
-
-5. Run **gnostic**. This will create a file in the current directory named "petstore.pb" that contains a binary
-Protocol Buffer description of a sample API.
-
- gnostic --pb-out=. examples/petstore.json
-
-6. You can also compile files that you specify with a URL. Here's another way to compile the previous
-example. This time we're creating "petstore.text", which contains a textual representation of the
-Protocol Buffer description. This is mainly for use in testing and debugging.
-
- gnostic --text-out=petstore.text https://raw.githubusercontent.com/googleapis/gnostic/master/examples/petstore.json
-
-7. For a sample application, see apps/report.
-
- go install github.com/googleapis/gnostic/apps/report
- report petstore.pb
-
-8. **gnostic** supports plugins. This builds and runs a sample plugin
-that reports some basic information about an API. The "-" causes the plugin to
-write its output to stdout.
-
- go install github.com/googleapis/gnostic/plugins/gnostic-go-sample
- gnostic examples/petstore.json --go-sample-out=-
-
-## Copyright
-
-Copyright 2017, Google Inc.
-
-## License
-
-Released under the Apache 2.0 license.
diff --git a/vendor/github.com/googleapis/gnostic/compiler/README.md b/vendor/github.com/googleapis/gnostic/compiler/README.md
deleted file mode 100644
index 848b16c69..000000000
--- a/vendor/github.com/googleapis/gnostic/compiler/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Compiler support code
-
-This directory contains compiler support code used by Gnostic and Gnostic extensions. \ No newline at end of file
diff --git a/vendor/github.com/googleapis/gnostic/compiler/context.go b/vendor/github.com/googleapis/gnostic/compiler/context.go
deleted file mode 100644
index a64c1b75d..000000000
--- a/vendor/github.com/googleapis/gnostic/compiler/context.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// 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 compiler
-
-// Context contains state of the compiler as it traverses a document.
-type Context struct {
- Parent *Context
- Name string
- ExtensionHandlers *[]ExtensionHandler
-}
-
-// NewContextWithExtensions returns a new object representing the compiler state
-func NewContextWithExtensions(name string, parent *Context, extensionHandlers *[]ExtensionHandler) *Context {
- return &Context{Name: name, Parent: parent, ExtensionHandlers: extensionHandlers}
-}
-
-// NewContext returns a new object representing the compiler state
-func NewContext(name string, parent *Context) *Context {
- if parent != nil {
- return &Context{Name: name, Parent: parent, ExtensionHandlers: parent.ExtensionHandlers}
- }
- return &Context{Name: name, Parent: parent, ExtensionHandlers: nil}
-}
-
-// Description returns a text description of the compiler state
-func (context *Context) Description() string {
- if context.Parent != nil {
- return context.Parent.Description() + "." + context.Name
- }
- return context.Name
-}
diff --git a/vendor/github.com/googleapis/gnostic/compiler/error.go b/vendor/github.com/googleapis/gnostic/compiler/error.go
deleted file mode 100644
index d8672c100..000000000
--- a/vendor/github.com/googleapis/gnostic/compiler/error.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// 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 compiler
-
-// Error represents compiler errors and their location in the document.
-type Error struct {
- Context *Context
- Message string
-}
-
-// NewError creates an Error.
-func NewError(context *Context, message string) *Error {
- return &Error{Context: context, Message: message}
-}
-
-// Error returns the string value of an Error.
-func (err *Error) Error() string {
- if err.Context == nil {
- return "ERROR " + err.Message
- }
- return "ERROR " + err.Context.Description() + " " + err.Message
-}
-
-// ErrorGroup is a container for groups of Error values.
-type ErrorGroup struct {
- Errors []error
-}
-
-// NewErrorGroupOrNil returns a new ErrorGroup for a slice of errors or nil if the slice is empty.
-func NewErrorGroupOrNil(errors []error) error {
- if len(errors) == 0 {
- return nil
- } else if len(errors) == 1 {
- return errors[0]
- } else {
- return &ErrorGroup{Errors: errors}
- }
-}
-
-func (group *ErrorGroup) Error() string {
- result := ""
- for i, err := range group.Errors {
- if i > 0 {
- result += "\n"
- }
- result += err.Error()
- }
- return result
-}
diff --git a/vendor/github.com/googleapis/gnostic/compiler/extension-handler.go b/vendor/github.com/googleapis/gnostic/compiler/extension-handler.go
deleted file mode 100644
index 1f85b650e..000000000
--- a/vendor/github.com/googleapis/gnostic/compiler/extension-handler.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// 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 compiler
-
-import (
- "bytes"
- "fmt"
- "os/exec"
-
- "strings"
-
- "errors"
-
- "github.com/golang/protobuf/proto"
- "github.com/golang/protobuf/ptypes/any"
- ext_plugin "github.com/googleapis/gnostic/extensions"
- yaml "gopkg.in/yaml.v2"
-)
-
-// ExtensionHandler describes a binary that is called by the compiler to handle specification extensions.
-type ExtensionHandler struct {
- Name string
-}
-
-// HandleExtension calls a binary extension handler.
-func HandleExtension(context *Context, in interface{}, extensionName string) (bool, *any.Any, error) {
- handled := false
- var errFromPlugin error
- var outFromPlugin *any.Any
-
- if context != nil && context.ExtensionHandlers != nil && len(*(context.ExtensionHandlers)) != 0 {
- for _, customAnyProtoGenerator := range *(context.ExtensionHandlers) {
- outFromPlugin, errFromPlugin = customAnyProtoGenerator.handle(in, extensionName)
- if outFromPlugin == nil {
- continue
- } else {
- handled = true
- break
- }
- }
- }
- return handled, outFromPlugin, errFromPlugin
-}
-
-func (extensionHandlers *ExtensionHandler) handle(in interface{}, extensionName string) (*any.Any, error) {
- if extensionHandlers.Name != "" {
- binary, _ := yaml.Marshal(in)
-
- request := &ext_plugin.ExtensionHandlerRequest{}
-
- version := &ext_plugin.Version{}
- version.Major = 0
- version.Minor = 1
- version.Patch = 0
- request.CompilerVersion = version
-
- request.Wrapper = &ext_plugin.Wrapper{}
-
- request.Wrapper.Version = "v2"
- request.Wrapper.Yaml = string(binary)
- request.Wrapper.ExtensionName = extensionName
-
- requestBytes, _ := proto.Marshal(request)
- cmd := exec.Command(extensionHandlers.Name)
- cmd.Stdin = bytes.NewReader(requestBytes)
- output, err := cmd.Output()
-
- if err != nil {
- fmt.Printf("Error: %+v\n", err)
- return nil, err
- }
- response := &ext_plugin.ExtensionHandlerResponse{}
- err = proto.Unmarshal(output, response)
- if err != nil {
- fmt.Printf("Error: %+v\n", err)
- fmt.Printf("%s\n", string(output))
- return nil, err
- }
- if !response.Handled {
- return nil, nil
- }
- if len(response.Error) != 0 {
- message := fmt.Sprintf("Errors when parsing: %+v for field %s by vendor extension handler %s. Details %+v", in, extensionName, extensionHandlers.Name, strings.Join(response.Error, ","))
- return nil, errors.New(message)
- }
- return response.Value, nil
- }
- return nil, nil
-}
diff --git a/vendor/github.com/googleapis/gnostic/compiler/helpers.go b/vendor/github.com/googleapis/gnostic/compiler/helpers.go
deleted file mode 100644
index 76df635ff..000000000
--- a/vendor/github.com/googleapis/gnostic/compiler/helpers.go
+++ /dev/null
@@ -1,197 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// 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 compiler
-
-import (
- "fmt"
- "gopkg.in/yaml.v2"
- "regexp"
- "sort"
- "strconv"
-)
-
-// compiler helper functions, usually called from generated code
-
-// UnpackMap gets a yaml.MapSlice if possible.
-func UnpackMap(in interface{}) (yaml.MapSlice, bool) {
- m, ok := in.(yaml.MapSlice)
- if ok {
- return m, true
- }
- // do we have an empty array?
- a, ok := in.([]interface{})
- if ok && len(a) == 0 {
- // if so, return an empty map
- return yaml.MapSlice{}, true
- }
- return nil, false
-}
-
-// SortedKeysForMap returns the sorted keys of a yaml.MapSlice.
-func SortedKeysForMap(m yaml.MapSlice) []string {
- keys := make([]string, 0)
- for _, item := range m {
- keys = append(keys, item.Key.(string))
- }
- sort.Strings(keys)
- return keys
-}
-
-// MapHasKey returns true if a yaml.MapSlice contains a specified key.
-func MapHasKey(m yaml.MapSlice, key string) bool {
- for _, item := range m {
- itemKey, ok := item.Key.(string)
- if ok && key == itemKey {
- return true
- }
- }
- return false
-}
-
-// MapValueForKey gets the value of a map value for a specified key.
-func MapValueForKey(m yaml.MapSlice, key string) interface{} {
- for _, item := range m {
- itemKey, ok := item.Key.(string)
- if ok && key == itemKey {
- return item.Value
- }
- }
- return nil
-}
-
-// ConvertInterfaceArrayToStringArray converts an array of interfaces to an array of strings, if possible.
-func ConvertInterfaceArrayToStringArray(interfaceArray []interface{}) []string {
- stringArray := make([]string, 0)
- for _, item := range interfaceArray {
- v, ok := item.(string)
- if ok {
- stringArray = append(stringArray, v)
- }
- }
- return stringArray
-}
-
-// MissingKeysInMap identifies which keys from a list of required keys are not in a map.
-func MissingKeysInMap(m yaml.MapSlice, requiredKeys []string) []string {
- missingKeys := make([]string, 0)
- for _, k := range requiredKeys {
- if !MapHasKey(m, k) {
- missingKeys = append(missingKeys, k)
- }
- }
- return missingKeys
-}
-
-// InvalidKeysInMap returns keys in a map that don't match a list of allowed keys and patterns.
-func InvalidKeysInMap(m yaml.MapSlice, allowedKeys []string, allowedPatterns []*regexp.Regexp) []string {
- invalidKeys := make([]string, 0)
- for _, item := range m {
- itemKey, ok := item.Key.(string)
- if ok {
- key := itemKey
- found := false
- // does the key match an allowed key?
- for _, allowedKey := range allowedKeys {
- if key == allowedKey {
- found = true
- break
- }
- }
- if !found {
- // does the key match an allowed pattern?
- for _, allowedPattern := range allowedPatterns {
- if allowedPattern.MatchString(key) {
- found = true
- break
- }
- }
- if !found {
- invalidKeys = append(invalidKeys, key)
- }
- }
- }
- }
- return invalidKeys
-}
-
-// DescribeMap describes a map (for debugging purposes).
-func DescribeMap(in interface{}, indent string) string {
- description := ""
- m, ok := in.(map[string]interface{})
- if ok {
- keys := make([]string, 0)
- for k := range m {
- keys = append(keys, k)
- }
- sort.Strings(keys)
- for _, k := range keys {
- v := m[k]
- description += fmt.Sprintf("%s%s:\n", indent, k)
- description += DescribeMap(v, indent+" ")
- }
- return description
- }
- a, ok := in.([]interface{})
- if ok {
- for i, v := range a {
- description += fmt.Sprintf("%s%d:\n", indent, i)
- description += DescribeMap(v, indent+" ")
- }
- return description
- }
- description += fmt.Sprintf("%s%+v\n", indent, in)
- return description
-}
-
-// PluralProperties returns the string "properties" pluralized.
-func PluralProperties(count int) string {
- if count == 1 {
- return "property"
- }
- return "properties"
-}
-
-// StringArrayContainsValue returns true if a string array contains a specified value.
-func StringArrayContainsValue(array []string, value string) bool {
- for _, item := range array {
- if item == value {
- return true
- }
- }
- return false
-}
-
-// StringArrayContainsValues returns true if a string array contains all of a list of specified values.
-func StringArrayContainsValues(array []string, values []string) bool {
- for _, value := range values {
- if !StringArrayContainsValue(array, value) {
- return false
- }
- }
- return true
-}
-
-// StringValue returns the string value of an item.
-func StringValue(item interface{}) (value string, ok bool) {
- value, ok = item.(string)
- if ok {
- return value, ok
- }
- intValue, ok := item.(int)
- if ok {
- return strconv.Itoa(intValue), true
- }
- return "", false
-}
diff --git a/vendor/github.com/googleapis/gnostic/compiler/main.go b/vendor/github.com/googleapis/gnostic/compiler/main.go
deleted file mode 100644
index 9713a21cc..000000000
--- a/vendor/github.com/googleapis/gnostic/compiler/main.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// 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 compiler provides support functions to generated compiler code.
-package compiler
diff --git a/vendor/github.com/googleapis/gnostic/compiler/reader.go b/vendor/github.com/googleapis/gnostic/compiler/reader.go
deleted file mode 100644
index 604a46a6a..000000000
--- a/vendor/github.com/googleapis/gnostic/compiler/reader.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// 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 compiler
-
-import (
- "fmt"
- "gopkg.in/yaml.v2"
- "io/ioutil"
- "log"
- "net/http"
- "net/url"
- "path/filepath"
- "strings"
-)
-
-var fileCache map[string][]byte
-var infoCache map[string]interface{}
-var count int64
-
-var verboseReader = false
-
-func initializeFileCache() {
- if fileCache == nil {
- fileCache = make(map[string][]byte, 0)
- }
-}
-
-func initializeInfoCache() {
- if infoCache == nil {
- infoCache = make(map[string]interface{}, 0)
- }
-}
-
-// FetchFile gets a specified file from the local filesystem or a remote location.
-func FetchFile(fileurl string) ([]byte, error) {
- initializeFileCache()
- bytes, ok := fileCache[fileurl]
- if ok {
- if verboseReader {
- log.Printf("Cache hit %s", fileurl)
- }
- return bytes, nil
- }
- log.Printf("Fetching %s", fileurl)
- response, err := http.Get(fileurl)
- if err != nil {
- return nil, err
- }
- defer response.Body.Close()
- bytes, err = ioutil.ReadAll(response.Body)
- if err == nil {
- fileCache[fileurl] = bytes
- }
- return bytes, err
-}
-
-// ReadBytesForFile reads the bytes of a file.
-func ReadBytesForFile(filename string) ([]byte, error) {
- // is the filename a url?
- fileurl, _ := url.Parse(filename)
- if fileurl.Scheme != "" {
- // yes, fetch it
- bytes, err := FetchFile(filename)
- if err != nil {
- return nil, err
- }
- return bytes, nil
- }
- // no, it's a local filename
- bytes, err := ioutil.ReadFile(filename)
- if err != nil {
- return nil, err
- }
- return bytes, nil
-}
-
-// ReadInfoFromBytes unmarshals a file as a yaml.MapSlice.
-func ReadInfoFromBytes(filename string, bytes []byte) (interface{}, error) {
- initializeInfoCache()
- cachedInfo, ok := infoCache[filename]
- if ok {
- if verboseReader {
- log.Printf("Cache hit info for file %s", filename)
- }
- return cachedInfo, nil
- }
- if verboseReader {
- log.Printf("Reading info for file %s", filename)
- }
- var info yaml.MapSlice
- err := yaml.Unmarshal(bytes, &info)
- if err != nil {
- return nil, err
- }
- infoCache[filename] = info
- return info, nil
-}
-
-// ReadInfoForRef reads a file and return the fragment needed to resolve a $ref.
-func ReadInfoForRef(basefile string, ref string) (interface{}, error) {
- initializeInfoCache()
- {
- info, ok := infoCache[ref]
- if ok {
- if verboseReader {
- log.Printf("Cache hit for ref %s#%s", basefile, ref)
- }
- return info, nil
- }
- }
- if verboseReader {
- log.Printf("Reading info for ref %s#%s", basefile, ref)
- }
- count = count + 1
- basedir, _ := filepath.Split(basefile)
- parts := strings.Split(ref, "#")
- var filename string
- if parts[0] != "" {
- filename = basedir + parts[0]
- } else {
- filename = basefile
- }
- bytes, err := ReadBytesForFile(filename)
- if err != nil {
- return nil, err
- }
- info, err := ReadInfoFromBytes(filename, bytes)
- if err != nil {
- log.Printf("File error: %v\n", err)
- } else {
- if len(parts) > 1 {
- path := strings.Split(parts[1], "/")
- for i, key := range path {
- if i > 0 {
- m, ok := info.(yaml.MapSlice)
- if ok {
- found := false
- for _, section := range m {
- if section.Key == key {
- info = section.Value
- found = true
- }
- }
- if !found {
- infoCache[ref] = nil
- return nil, NewError(nil, fmt.Sprintf("could not resolve %s", ref))
- }
- }
- }
- }
- }
- }
- infoCache[ref] = info
- return info, nil
-}
diff --git a/vendor/github.com/googleapis/gnostic/extensions/README.md b/vendor/github.com/googleapis/gnostic/extensions/README.md
deleted file mode 100644
index ff1c2eb1e..000000000
--- a/vendor/github.com/googleapis/gnostic/extensions/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Extensions
-
-This directory contains support code for building Gnostic extensions and associated examples.
-
-Extensions are used to compile vendor or specification extensions into protocol buffer structures.
diff --git a/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go b/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go
deleted file mode 100644
index b14f1f945..000000000
--- a/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go
+++ /dev/null
@@ -1,219 +0,0 @@
-// Code generated by protoc-gen-go.
-// source: extension.proto
-// DO NOT EDIT!
-
-/*
-Package openapiextension_v1 is a generated protocol buffer package.
-
-It is generated from these files:
- extension.proto
-
-It has these top-level messages:
- Version
- ExtensionHandlerRequest
- ExtensionHandlerResponse
- Wrapper
-*/
-package openapiextension_v1
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/golang/protobuf/ptypes/any"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// The version number of OpenAPI compiler.
-type Version struct {
- Major int32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
- Minor int32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
- Patch int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"`
- // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
- // be empty for mainline stable releases.
- Suffix string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"`
-}
-
-func (m *Version) Reset() { *m = Version{} }
-func (m *Version) String() string { return proto.CompactTextString(m) }
-func (*Version) ProtoMessage() {}
-func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-func (m *Version) GetMajor() int32 {
- if m != nil {
- return m.Major
- }
- return 0
-}
-
-func (m *Version) GetMinor() int32 {
- if m != nil {
- return m.Minor
- }
- return 0
-}
-
-func (m *Version) GetPatch() int32 {
- if m != nil {
- return m.Patch
- }
- return 0
-}
-
-func (m *Version) GetSuffix() string {
- if m != nil {
- return m.Suffix
- }
- return ""
-}
-
-// An encoded Request is written to the ExtensionHandler's stdin.
-type ExtensionHandlerRequest struct {
- // The OpenAPI descriptions that were explicitly listed on the command line.
- // The specifications will appear in the order they are specified to openapic.
- Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper" json:"wrapper,omitempty"`
- // The version number of openapi compiler.
- CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
-}
-
-func (m *ExtensionHandlerRequest) Reset() { *m = ExtensionHandlerRequest{} }
-func (m *ExtensionHandlerRequest) String() string { return proto.CompactTextString(m) }
-func (*ExtensionHandlerRequest) ProtoMessage() {}
-func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-func (m *ExtensionHandlerRequest) GetWrapper() *Wrapper {
- if m != nil {
- return m.Wrapper
- }
- return nil
-}
-
-func (m *ExtensionHandlerRequest) GetCompilerVersion() *Version {
- if m != nil {
- return m.CompilerVersion
- }
- return nil
-}
-
-// The extensions writes an encoded ExtensionHandlerResponse to stdout.
-type ExtensionHandlerResponse struct {
- // true if the extension is handled by the extension handler; false otherwise
- Handled bool `protobuf:"varint,1,opt,name=handled" json:"handled,omitempty"`
- // Error message. If non-empty, the extension handling failed.
- // The extension handler process should exit with status code zero
- // even if it reports an error in this way.
- //
- // This should be used to indicate errors which prevent the extension from
- // operating as intended. Errors which indicate a problem in gnostic
- // itself -- such as the input Document being unparseable -- should be
- // reported by writing a message to stderr and exiting with a non-zero
- // status code.
- Error []string `protobuf:"bytes,2,rep,name=error" json:"error,omitempty"`
- // text output
- Value *google_protobuf.Any `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *ExtensionHandlerResponse) Reset() { *m = ExtensionHandlerResponse{} }
-func (m *ExtensionHandlerResponse) String() string { return proto.CompactTextString(m) }
-func (*ExtensionHandlerResponse) ProtoMessage() {}
-func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-
-func (m *ExtensionHandlerResponse) GetHandled() bool {
- if m != nil {
- return m.Handled
- }
- return false
-}
-
-func (m *ExtensionHandlerResponse) GetError() []string {
- if m != nil {
- return m.Error
- }
- return nil
-}
-
-func (m *ExtensionHandlerResponse) GetValue() *google_protobuf.Any {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-type Wrapper struct {
- // version of the OpenAPI specification in which this extension was written.
- Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
- // Name of the extension
- ExtensionName string `protobuf:"bytes,2,opt,name=extension_name,json=extensionName" json:"extension_name,omitempty"`
- // Must be a valid yaml for the proto
- Yaml string `protobuf:"bytes,3,opt,name=yaml" json:"yaml,omitempty"`
-}
-
-func (m *Wrapper) Reset() { *m = Wrapper{} }
-func (m *Wrapper) String() string { return proto.CompactTextString(m) }
-func (*Wrapper) ProtoMessage() {}
-func (*Wrapper) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
-
-func (m *Wrapper) GetVersion() string {
- if m != nil {
- return m.Version
- }
- return ""
-}
-
-func (m *Wrapper) GetExtensionName() string {
- if m != nil {
- return m.ExtensionName
- }
- return ""
-}
-
-func (m *Wrapper) GetYaml() string {
- if m != nil {
- return m.Yaml
- }
- return ""
-}
-
-func init() {
- proto.RegisterType((*Version)(nil), "openapiextension.v1.Version")
- proto.RegisterType((*ExtensionHandlerRequest)(nil), "openapiextension.v1.ExtensionHandlerRequest")
- proto.RegisterType((*ExtensionHandlerResponse)(nil), "openapiextension.v1.ExtensionHandlerResponse")
- proto.RegisterType((*Wrapper)(nil), "openapiextension.v1.Wrapper")
-}
-
-func init() { proto.RegisterFile("extension.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 355 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x91, 0x4d, 0x4b, 0xf3, 0x40,
- 0x1c, 0xc4, 0x49, 0xdf, 0xf2, 0x64, 0x1f, 0xb4, 0xb2, 0x16, 0x8d, 0xe2, 0xa1, 0x04, 0x84, 0x22,
- 0xb8, 0xa5, 0x0a, 0xde, 0x5b, 0x28, 0xea, 0xc5, 0x96, 0x3d, 0xd4, 0x9b, 0x65, 0x9b, 0xfe, 0xdb,
- 0x46, 0x92, 0xdd, 0x75, 0xf3, 0x62, 0xfb, 0x55, 0x3c, 0xfa, 0x49, 0x25, 0xbb, 0xd9, 0x7a, 0x50,
- 0x6f, 0x99, 0x1f, 0x93, 0xfc, 0x67, 0x26, 0xa8, 0x0d, 0xdb, 0x0c, 0x78, 0x1a, 0x09, 0x4e, 0xa4,
- 0x12, 0x99, 0xc0, 0xc7, 0x42, 0x02, 0x67, 0x32, 0xfa, 0xe6, 0xc5, 0xe0, 0xfc, 0x6c, 0x2d, 0xc4,
- 0x3a, 0x86, 0xbe, 0xb6, 0x2c, 0xf2, 0x55, 0x9f, 0xf1, 0x9d, 0xf1, 0x07, 0x21, 0x72, 0x67, 0xa0,
- 0x4a, 0x23, 0xee, 0xa0, 0x66, 0xc2, 0x5e, 0x85, 0xf2, 0x9d, 0xae, 0xd3, 0x6b, 0x52, 0x23, 0x34,
- 0x8d, 0xb8, 0x50, 0x7e, 0xad, 0xa2, 0xa5, 0x28, 0xa9, 0x64, 0x59, 0xb8, 0xf1, 0xeb, 0x86, 0x6a,
- 0x81, 0x4f, 0x50, 0x2b, 0xcd, 0x57, 0xab, 0x68, 0xeb, 0x37, 0xba, 0x4e, 0xcf, 0xa3, 0x95, 0x0a,
- 0x3e, 0x1c, 0x74, 0x3a, 0xb6, 0x81, 0x1e, 0x18, 0x5f, 0xc6, 0xa0, 0x28, 0xbc, 0xe5, 0x90, 0x66,
- 0xf8, 0x0e, 0xb9, 0xef, 0x8a, 0x49, 0x09, 0xe6, 0xee, 0xff, 0x9b, 0x0b, 0xf2, 0x4b, 0x05, 0xf2,
- 0x6c, 0x3c, 0xd4, 0x9a, 0xf1, 0x3d, 0x3a, 0x0a, 0x45, 0x22, 0xa3, 0x18, 0xd4, 0xbc, 0x30, 0x0d,
- 0x74, 0x98, 0xbf, 0x3e, 0x50, 0xb5, 0xa4, 0x6d, 0xfb, 0x56, 0x05, 0x82, 0x02, 0xf9, 0x3f, 0xb3,
- 0xa5, 0x52, 0xf0, 0x14, 0xb0, 0x8f, 0xdc, 0x8d, 0x46, 0x4b, 0x1d, 0xee, 0x1f, 0xb5, 0xb2, 0x1c,
- 0x00, 0x94, 0xd2, 0xb3, 0xd4, 0x7b, 0x1e, 0x35, 0x02, 0x5f, 0xa1, 0x66, 0xc1, 0xe2, 0x1c, 0xaa,
- 0x24, 0x1d, 0x62, 0x86, 0x27, 0x76, 0x78, 0x32, 0xe4, 0x3b, 0x6a, 0x2c, 0xc1, 0x0b, 0x72, 0xab,
- 0x52, 0xe5, 0x19, 0x5b, 0xc1, 0xd1, 0xc3, 0x59, 0x89, 0x2f, 0xd1, 0xe1, 0xbe, 0xc5, 0x9c, 0xb3,
- 0x04, 0xf4, 0x6f, 0xf0, 0xe8, 0xc1, 0x9e, 0x3e, 0xb1, 0x04, 0x30, 0x46, 0x8d, 0x1d, 0x4b, 0x62,
- 0x7d, 0xd6, 0xa3, 0xfa, 0x79, 0x74, 0x8d, 0xda, 0x42, 0xad, 0xed, 0x16, 0x21, 0x29, 0x06, 0x23,
- 0x3c, 0x91, 0xc0, 0x87, 0xd3, 0xc7, 0x7d, 0xdf, 0xd9, 0x60, 0xea, 0x7c, 0xd6, 0xea, 0x93, 0xe1,
- 0x78, 0xd1, 0xd2, 0x19, 0x6f, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x56, 0x40, 0x4d, 0x52,
- 0x02, 0x00, 0x00,
-}
diff --git a/vendor/github.com/googleapis/gnostic/extensions/extension.proto b/vendor/github.com/googleapis/gnostic/extensions/extension.proto
deleted file mode 100644
index 806760a13..000000000
--- a/vendor/github.com/googleapis/gnostic/extensions/extension.proto
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// 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.
-
-syntax = "proto3";
-
-import "google/protobuf/any.proto";
-package openapiextension.v1;
-
-// This option lets the proto compiler generate Java code inside the package
-// name (see below) instead of inside an outer class. It creates a simpler
-// developer experience by reducing one-level of name nesting and be
-// consistent with most programming languages that don't support outer classes.
-option java_multiple_files = true;
-
-// The Java outer classname should be the filename in UpperCamelCase. This
-// class is only used to hold proto descriptor, so developers don't need to
-// work with it directly.
-option java_outer_classname = "OpenAPIExtensionV1";
-
-// The Java package name must be proto package name with proper prefix.
-option java_package = "org.openapic.v1";
-
-// A reasonable prefix for the Objective-C symbols generated from the package.
-// It should at a minimum be 3 characters long, all uppercase, and convention
-// is to use an abbreviation of the package name. Something short, but
-// hopefully unique enough to not conflict with things that may come along in
-// the future. 'GPB' is reserved for the protocol buffer implementation itself.
-//
-option objc_class_prefix = "OAE"; // "OpenAPI Extension"
-
-// The version number of OpenAPI compiler.
-message Version {
- int32 major = 1;
- int32 minor = 2;
- int32 patch = 3;
- // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
- // be empty for mainline stable releases.
- string suffix = 4;
-}
-
-// An encoded Request is written to the ExtensionHandler's stdin.
-message ExtensionHandlerRequest {
-
- // The OpenAPI descriptions that were explicitly listed on the command line.
- // The specifications will appear in the order they are specified to openapic.
- Wrapper wrapper = 1;
-
- // The version number of openapi compiler.
- Version compiler_version = 3;
-}
-
-// The extensions writes an encoded ExtensionHandlerResponse to stdout.
-message ExtensionHandlerResponse {
-
- // true if the extension is handled by the extension handler; false otherwise
- bool handled = 1;
-
- // Error message. If non-empty, the extension handling failed.
- // The extension handler process should exit with status code zero
- // even if it reports an error in this way.
- //
- // This should be used to indicate errors which prevent the extension from
- // operating as intended. Errors which indicate a problem in gnostic
- // itself -- such as the input Document being unparseable -- should be
- // reported by writing a message to stderr and exiting with a non-zero
- // status code.
- repeated string error = 2;
-
- // text output
- google.protobuf.Any value = 3;
-}
-
-message Wrapper {
- // version of the OpenAPI specification in which this extension was written.
- string version = 1;
-
- // Name of the extension
- string extension_name = 2;
-
- // Must be a valid yaml for the proto
- string yaml = 3;
-}
diff --git a/vendor/github.com/googleapis/gnostic/extensions/extensions.go b/vendor/github.com/googleapis/gnostic/extensions/extensions.go
deleted file mode 100644
index 94a8e62a7..000000000
--- a/vendor/github.com/googleapis/gnostic/extensions/extensions.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// 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 openapiextension_v1
-
-import (
- "fmt"
- "io/ioutil"
- "os"
-
- "github.com/golang/protobuf/proto"
- "github.com/golang/protobuf/ptypes"
-)
-
-type documentHandler func(version string, extensionName string, document string)
-type extensionHandler func(name string, yamlInput string) (bool, proto.Message, error)
-
-func forInputYamlFromOpenapic(handler documentHandler) {
- data, err := ioutil.ReadAll(os.Stdin)
- if err != nil {
- fmt.Println("File error:", err.Error())
- os.Exit(1)
- }
- if len(data) == 0 {
- fmt.Println("No input data.")
- os.Exit(1)
- }
- request := &ExtensionHandlerRequest{}
- err = proto.Unmarshal(data, request)
- if err != nil {
- fmt.Println("Input error:", err.Error())
- os.Exit(1)
- }
- handler(request.Wrapper.Version, request.Wrapper.ExtensionName, request.Wrapper.Yaml)
-}
-
-// ProcessExtension calles the handler for a specified extension.
-func ProcessExtension(handleExtension extensionHandler) {
- response := &ExtensionHandlerResponse{}
- forInputYamlFromOpenapic(
- func(version string, extensionName string, yamlInput string) {
- var newObject proto.Message
- var err error
-
- handled, newObject, err := handleExtension(extensionName, yamlInput)
- if !handled {
- responseBytes, _ := proto.Marshal(response)
- os.Stdout.Write(responseBytes)
- os.Exit(0)
- }
-
- // If we reach here, then the extension is handled
- response.Handled = true
- if err != nil {
- response.Error = append(response.Error, err.Error())
- responseBytes, _ := proto.Marshal(response)
- os.Stdout.Write(responseBytes)
- os.Exit(0)
- }
- response.Value, err = ptypes.MarshalAny(newObject)
- if err != nil {
- response.Error = append(response.Error, err.Error())
- responseBytes, _ := proto.Marshal(response)
- os.Stdout.Write(responseBytes)
- os.Exit(0)
- }
- })
-
- responseBytes, _ := proto.Marshal(response)
- os.Stdout.Write(responseBytes)
-}
diff --git a/vendor/github.com/hashicorp/golang-lru/2q.go b/vendor/github.com/hashicorp/golang-lru/2q.go
deleted file mode 100644
index 337d96329..000000000
--- a/vendor/github.com/hashicorp/golang-lru/2q.go
+++ /dev/null
@@ -1,212 +0,0 @@
-package lru
-
-import (
- "fmt"
- "sync"
-
- "github.com/hashicorp/golang-lru/simplelru"
-)
-
-const (
- // Default2QRecentRatio is the ratio of the 2Q cache dedicated
- // to recently added entries that have only been accessed once.
- Default2QRecentRatio = 0.25
-
- // Default2QGhostEntries is the default ratio of ghost
- // entries kept to track entries recently evicted
- Default2QGhostEntries = 0.50
-)
-
-// TwoQueueCache is a thread-safe fixed size 2Q cache.
-// 2Q is an enhancement over the standard LRU cache
-// in that it tracks both frequently and recently used
-// entries separately. This avoids a burst in access to new
-// entries from evicting frequently used entries. It adds some
-// additional tracking overhead to the standard LRU cache, and is
-// computationally about 2x the cost, and adds some metadata over
-// head. The ARCCache is similar, but does not require setting any
-// parameters.
-type TwoQueueCache struct {
- size int
- recentSize int
-
- recent *simplelru.LRU
- frequent *simplelru.LRU
- recentEvict *simplelru.LRU
- lock sync.RWMutex
-}
-
-// New2Q creates a new TwoQueueCache using the default
-// values for the parameters.
-func New2Q(size int) (*TwoQueueCache, error) {
- return New2QParams(size, Default2QRecentRatio, Default2QGhostEntries)
-}
-
-// New2QParams creates a new TwoQueueCache using the provided
-// parameter values.
-func New2QParams(size int, recentRatio float64, ghostRatio float64) (*TwoQueueCache, error) {
- if size <= 0 {
- return nil, fmt.Errorf("invalid size")
- }
- if recentRatio < 0.0 || recentRatio > 1.0 {
- return nil, fmt.Errorf("invalid recent ratio")
- }
- if ghostRatio < 0.0 || ghostRatio > 1.0 {
- return nil, fmt.Errorf("invalid ghost ratio")
- }
-
- // Determine the sub-sizes
- recentSize := int(float64(size) * recentRatio)
- evictSize := int(float64(size) * ghostRatio)
-
- // Allocate the LRUs
- recent, err := simplelru.NewLRU(size, nil)
- if err != nil {
- return nil, err
- }
- frequent, err := simplelru.NewLRU(size, nil)
- if err != nil {
- return nil, err
- }
- recentEvict, err := simplelru.NewLRU(evictSize, nil)
- if err != nil {
- return nil, err
- }
-
- // Initialize the cache
- c := &TwoQueueCache{
- size: size,
- recentSize: recentSize,
- recent: recent,
- frequent: frequent,
- recentEvict: recentEvict,
- }
- return c, nil
-}
-
-func (c *TwoQueueCache) Get(key interface{}) (interface{}, bool) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- // Check if this is a frequent value
- if val, ok := c.frequent.Get(key); ok {
- return val, ok
- }
-
- // If the value is contained in recent, then we
- // promote it to frequent
- if val, ok := c.recent.Peek(key); ok {
- c.recent.Remove(key)
- c.frequent.Add(key, val)
- return val, ok
- }
-
- // No hit
- return nil, false
-}
-
-func (c *TwoQueueCache) Add(key, value interface{}) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- // Check if the value is frequently used already,
- // and just update the value
- if c.frequent.Contains(key) {
- c.frequent.Add(key, value)
- return
- }
-
- // Check if the value is recently used, and promote
- // the value into the frequent list
- if c.recent.Contains(key) {
- c.recent.Remove(key)
- c.frequent.Add(key, value)
- return
- }
-
- // If the value was recently evicted, add it to the
- // frequently used list
- if c.recentEvict.Contains(key) {
- c.ensureSpace(true)
- c.recentEvict.Remove(key)
- c.frequent.Add(key, value)
- return
- }
-
- // Add to the recently seen list
- c.ensureSpace(false)
- c.recent.Add(key, value)
- return
-}
-
-// ensureSpace is used to ensure we have space in the cache
-func (c *TwoQueueCache) ensureSpace(recentEvict bool) {
- // If we have space, nothing to do
- recentLen := c.recent.Len()
- freqLen := c.frequent.Len()
- if recentLen+freqLen < c.size {
- return
- }
-
- // If the recent buffer is larger than
- // the target, evict from there
- if recentLen > 0 && (recentLen > c.recentSize || (recentLen == c.recentSize && !recentEvict)) {
- k, _, _ := c.recent.RemoveOldest()
- c.recentEvict.Add(k, nil)
- return
- }
-
- // Remove from the frequent list otherwise
- c.frequent.RemoveOldest()
-}
-
-func (c *TwoQueueCache) Len() int {
- c.lock.RLock()
- defer c.lock.RUnlock()
- return c.recent.Len() + c.frequent.Len()
-}
-
-func (c *TwoQueueCache) Keys() []interface{} {
- c.lock.RLock()
- defer c.lock.RUnlock()
- k1 := c.frequent.Keys()
- k2 := c.recent.Keys()
- return append(k1, k2...)
-}
-
-func (c *TwoQueueCache) Remove(key interface{}) {
- c.lock.Lock()
- defer c.lock.Unlock()
- if c.frequent.Remove(key) {
- return
- }
- if c.recent.Remove(key) {
- return
- }
- if c.recentEvict.Remove(key) {
- return
- }
-}
-
-func (c *TwoQueueCache) Purge() {
- c.lock.Lock()
- defer c.lock.Unlock()
- c.recent.Purge()
- c.frequent.Purge()
- c.recentEvict.Purge()
-}
-
-func (c *TwoQueueCache) Contains(key interface{}) bool {
- c.lock.RLock()
- defer c.lock.RUnlock()
- return c.frequent.Contains(key) || c.recent.Contains(key)
-}
-
-func (c *TwoQueueCache) Peek(key interface{}) (interface{}, bool) {
- c.lock.RLock()
- defer c.lock.RUnlock()
- if val, ok := c.frequent.Peek(key); ok {
- return val, ok
- }
- return c.recent.Peek(key)
-}
diff --git a/vendor/github.com/hashicorp/golang-lru/LICENSE b/vendor/github.com/hashicorp/golang-lru/LICENSE
deleted file mode 100644
index be2cc4dfb..000000000
--- a/vendor/github.com/hashicorp/golang-lru/LICENSE
+++ /dev/null
@@ -1,362 +0,0 @@
-Mozilla Public License, version 2.0
-
-1. Definitions
-
-1.1. "Contributor"
-
- means each individual or legal entity that creates, contributes to the
- creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
-
- means the combination of the Contributions of others (if any) used by a
- Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
-
- means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
-
- means Source Code Form to which the initial Contributor has attached the
- notice in Exhibit A, the Executable Form of such Source Code Form, and
- Modifications of such Source Code Form, in each case including portions
- thereof.
-
-1.5. "Incompatible With Secondary Licenses"
- means
-
- a. that the initial Contributor has attached the notice described in
- Exhibit B to the Covered Software; or
-
- b. that the Covered Software was made available under the terms of
- version 1.1 or earlier of the License, but not also under the terms of
- a Secondary License.
-
-1.6. "Executable Form"
-
- means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
-
- means a work that combines Covered Software with other material, in a
- separate file or files, that is not Covered Software.
-
-1.8. "License"
-
- means this document.
-
-1.9. "Licensable"
-
- means having the right to grant, to the maximum extent possible, whether
- at the time of the initial grant or subsequently, any and all of the
- rights conveyed by this License.
-
-1.10. "Modifications"
-
- means any of the following:
-
- a. any file in Source Code Form that results from an addition to,
- deletion from, or modification of the contents of Covered Software; or
-
- b. any new file in Source Code Form that contains any Covered Software.
-
-1.11. "Patent Claims" of a Contributor
-
- means any patent claim(s), including without limitation, method,
- process, and apparatus claims, in any patent Licensable by such
- Contributor that would be infringed, but for the grant of the License,
- by the making, using, selling, offering for sale, having made, import,
- or transfer of either its Contributions or its Contributor Version.
-
-1.12. "Secondary License"
-
- means either the GNU General Public License, Version 2.0, the GNU Lesser
- General Public License, Version 2.1, the GNU Affero General Public
- License, Version 3.0, or any later versions of those licenses.
-
-1.13. "Source Code Form"
-
- means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
-
- means an individual or a legal entity exercising rights under this
- License. For legal entities, "You" includes any entity that controls, is
- controlled by, or is under common control with You. For purposes of this
- definition, "control" means (a) the power, direct or indirect, to cause
- the direction or management of such entity, whether by contract or
- otherwise, or (b) ownership of more than fifty percent (50%) of the
- outstanding shares or beneficial ownership of such entity.
-
-
-2. License Grants and Conditions
-
-2.1. Grants
-
- Each Contributor hereby grants You a world-wide, royalty-free,
- non-exclusive license:
-
- a. under intellectual property rights (other than patent or trademark)
- Licensable by such Contributor to use, reproduce, make available,
- modify, display, perform, distribute, and otherwise exploit its
- Contributions, either on an unmodified basis, with Modifications, or
- as part of a Larger Work; and
-
- b. under Patent Claims of such Contributor to make, use, sell, offer for
- sale, have made, import, and otherwise transfer either its
- Contributions or its Contributor Version.
-
-2.2. Effective Date
-
- The licenses granted in Section 2.1 with respect to any Contribution
- become effective for each Contribution on the date the Contributor first
- distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
- The licenses granted in this Section 2 are the only rights granted under
- this License. No additional rights or licenses will be implied from the
- distribution or licensing of Covered Software under this License.
- Notwithstanding Section 2.1(b) above, no patent license is granted by a
- Contributor:
-
- a. for any code that a Contributor has removed from Covered Software; or
-
- b. for infringements caused by: (i) Your and any other third party's
- modifications of Covered Software, or (ii) the combination of its
- Contributions with other software (except as part of its Contributor
- Version); or
-
- c. under Patent Claims infringed by Covered Software in the absence of
- its Contributions.
-
- This License does not grant any rights in the trademarks, service marks,
- or logos of any Contributor (except as may be necessary to comply with
- the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
- No Contributor makes additional grants as a result of Your choice to
- distribute the Covered Software under a subsequent version of this
- License (see Section 10.2) or under the terms of a Secondary License (if
- permitted under the terms of Section 3.3).
-
-2.5. Representation
-
- Each Contributor represents that the Contributor believes its
- Contributions are its original creation(s) or it has sufficient rights to
- grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
- This License is not intended to limit any rights You have under
- applicable copyright doctrines of fair use, fair dealing, or other
- equivalents.
-
-2.7. Conditions
-
- Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
- Section 2.1.
-
-
-3. Responsibilities
-
-3.1. Distribution of Source Form
-
- All distribution of Covered Software in Source Code Form, including any
- Modifications that You create or to which You contribute, must be under
- the terms of this License. You must inform recipients that the Source
- Code Form of the Covered Software is governed by the terms of this
- License, and how they can obtain a copy of this License. You may not
- attempt to alter or restrict the recipients' rights in the Source Code
- Form.
-
-3.2. Distribution of Executable Form
-
- If You distribute Covered Software in Executable Form then:
-
- a. such Covered Software must also be made available in Source Code Form,
- as described in Section 3.1, and You must inform recipients of the
- Executable Form how they can obtain a copy of such Source Code Form by
- reasonable means in a timely manner, at a charge no more than the cost
- of distribution to the recipient; and
-
- b. You may distribute such Executable Form under the terms of this
- License, or sublicense it under different terms, provided that the
- license for the Executable Form does not attempt to limit or alter the
- recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
- You may create and distribute a Larger Work under terms of Your choice,
- provided that You also comply with the requirements of this License for
- the Covered Software. If the Larger Work is a combination of Covered
- Software with a work governed by one or more Secondary Licenses, and the
- Covered Software is not Incompatible With Secondary Licenses, this
- License permits You to additionally distribute such Covered Software
- under the terms of such Secondary License(s), so that the recipient of
- the Larger Work may, at their option, further distribute the Covered
- Software under the terms of either this License or such Secondary
- License(s).
-
-3.4. Notices
-
- You may not remove or alter the substance of any license notices
- (including copyright notices, patent notices, disclaimers of warranty, or
- limitations of liability) contained within the Source Code Form of the
- Covered Software, except that You may alter any license notices to the
- extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
- You may choose to offer, and to charge a fee for, warranty, support,
- indemnity or liability obligations to one or more recipients of Covered
- Software. However, You may do so only on Your own behalf, and not on
- behalf of any Contributor. You must make it absolutely clear that any
- such warranty, support, indemnity, or liability obligation is offered by
- You alone, and You hereby agree to indemnify every Contributor for any
- liability incurred by such Contributor as a result of warranty, support,
- indemnity or liability terms You offer. You may include additional
- disclaimers of warranty and limitations of liability specific to any
- jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
-
- If it is impossible for You to comply with any of the terms of this License
- with respect to some or all of the Covered Software due to statute,
- judicial order, or regulation then You must: (a) comply with the terms of
- this License to the maximum extent possible; and (b) describe the
- limitations and the code they affect. Such description must be placed in a
- text file included with all distributions of the Covered Software under
- this License. Except to the extent prohibited by statute or regulation,
- such description must be sufficiently detailed for a recipient of ordinary
- skill to be able to understand it.
-
-5. Termination
-
-5.1. The rights granted under this License will terminate automatically if You
- fail to comply with any of its terms. However, if You become compliant,
- then the rights granted under this License from a particular Contributor
- are reinstated (a) provisionally, unless and until such Contributor
- explicitly and finally terminates Your grants, and (b) on an ongoing
- basis, if such Contributor fails to notify You of the non-compliance by
- some reasonable means prior to 60 days after You have come back into
- compliance. Moreover, Your grants from a particular Contributor are
- reinstated on an ongoing basis if such Contributor notifies You of the
- non-compliance by some reasonable means, this is the first time You have
- received notice of non-compliance with this License from such
- Contributor, and You become compliant prior to 30 days after Your receipt
- of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
- infringement claim (excluding declaratory judgment actions,
- counter-claims, and cross-claims) alleging that a Contributor Version
- directly or indirectly infringes any patent, then the rights granted to
- You by any and all Contributors for the Covered Software under Section
- 2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
- license agreements (excluding distributors and resellers) which have been
- validly granted by You or Your distributors under this License prior to
- termination shall survive termination.
-
-6. Disclaimer of Warranty
-
- Covered Software is provided under this License on an "as is" basis,
- without warranty of any kind, either expressed, implied, or statutory,
- including, without limitation, warranties that the Covered Software is free
- of defects, merchantable, fit for a particular purpose or non-infringing.
- The entire risk as to the quality and performance of the Covered Software
- is with You. Should any Covered Software prove defective in any respect,
- You (not any Contributor) assume the cost of any necessary servicing,
- repair, or correction. This disclaimer of warranty constitutes an essential
- part of this License. No use of any Covered Software is authorized under
- this License except under this disclaimer.
-
-7. Limitation of Liability
-
- Under no circumstances and under no legal theory, whether tort (including
- negligence), contract, or otherwise, shall any Contributor, or anyone who
- distributes Covered Software as permitted above, be liable to You for any
- direct, indirect, special, incidental, or consequential damages of any
- character including, without limitation, damages for lost profits, loss of
- goodwill, work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses, even if such party shall have been
- informed of the possibility of such damages. This limitation of liability
- shall not apply to liability for death or personal injury resulting from
- such party's negligence to the extent applicable law prohibits such
- limitation. Some jurisdictions do not allow the exclusion or limitation of
- incidental or consequential damages, so this exclusion and limitation may
- not apply to You.
-
-8. Litigation
-
- Any litigation relating to this License may be brought only in the courts
- of a jurisdiction where the defendant maintains its principal place of
- business and such litigation shall be governed by laws of that
- jurisdiction, without reference to its conflict-of-law provisions. Nothing
- in this Section shall prevent a party's ability to bring cross-claims or
- counter-claims.
-
-9. Miscellaneous
-
- This License represents the complete agreement concerning the subject
- matter hereof. If any provision of this License is held to be
- unenforceable, such provision shall be reformed only to the extent
- necessary to make it enforceable. Any law or regulation which provides that
- the language of a contract shall be construed against the drafter shall not
- be used to construe this License against a Contributor.
-
-
-10. Versions of the License
-
-10.1. New Versions
-
- Mozilla Foundation is the license steward. Except as provided in Section
- 10.3, no one other than the license steward has the right to modify or
- publish new versions of this License. Each version will be given a
- distinguishing version number.
-
-10.2. Effect of New Versions
-
- You may distribute the Covered Software under the terms of the version
- of the License under which You originally received the Covered Software,
- or under the terms of any subsequent version published by the license
- steward.
-
-10.3. Modified Versions
-
- If you create software not governed by this License, and you want to
- create a new license for such software, you may create and use a
- modified version of this License if you rename the license and remove
- any references to the name of the license steward (except to note that
- such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
- Licenses If You choose to distribute Source Code Form that is
- Incompatible With Secondary Licenses under the terms of this version of
- the License, the notice described in Exhibit B of this License must be
- attached.
-
-Exhibit A - Source Code Form License Notice
-
- This Source Code Form is subject to the
- terms of the Mozilla Public License, v.
- 2.0. If a copy of the MPL was not
- distributed with this file, You can
- obtain one at
- http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular file,
-then You may include the notice in a location (such as a LICENSE file in a
-relevant directory) where a recipient would be likely to look for such a
-notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
-
- This Source Code Form is "Incompatible
- With Secondary Licenses", as defined by
- the Mozilla Public License, v. 2.0.
diff --git a/vendor/github.com/hashicorp/golang-lru/README.md b/vendor/github.com/hashicorp/golang-lru/README.md
deleted file mode 100644
index 33e58cfaf..000000000
--- a/vendor/github.com/hashicorp/golang-lru/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-golang-lru
-==========
-
-This provides the `lru` package which implements a fixed-size
-thread safe LRU cache. It is based on the cache in Groupcache.
-
-Documentation
-=============
-
-Full docs are available on [Godoc](http://godoc.org/github.com/hashicorp/golang-lru)
-
-Example
-=======
-
-Using the LRU is very simple:
-
-```go
-l, _ := New(128)
-for i := 0; i < 256; i++ {
- l.Add(i, nil)
-}
-if l.Len() != 128 {
- panic(fmt.Sprintf("bad len: %v", l.Len()))
-}
-```
diff --git a/vendor/github.com/hashicorp/golang-lru/arc.go b/vendor/github.com/hashicorp/golang-lru/arc.go
deleted file mode 100644
index a2a252817..000000000
--- a/vendor/github.com/hashicorp/golang-lru/arc.go
+++ /dev/null
@@ -1,257 +0,0 @@
-package lru
-
-import (
- "sync"
-
- "github.com/hashicorp/golang-lru/simplelru"
-)
-
-// ARCCache is a thread-safe fixed size Adaptive Replacement Cache (ARC).
-// ARC is an enhancement over the standard LRU cache in that tracks both
-// frequency and recency of use. This avoids a burst in access to new
-// entries from evicting the frequently used older entries. It adds some
-// additional tracking overhead to a standard LRU cache, computationally
-// it is roughly 2x the cost, and the extra memory overhead is linear
-// with the size of the cache. ARC has been patented by IBM, but is
-// similar to the TwoQueueCache (2Q) which requires setting parameters.
-type ARCCache struct {
- size int // Size is the total capacity of the cache
- p int // P is the dynamic preference towards T1 or T2
-
- t1 *simplelru.LRU // T1 is the LRU for recently accessed items
- b1 *simplelru.LRU // B1 is the LRU for evictions from t1
-
- t2 *simplelru.LRU // T2 is the LRU for frequently accessed items
- b2 *simplelru.LRU // B2 is the LRU for evictions from t2
-
- lock sync.RWMutex
-}
-
-// NewARC creates an ARC of the given size
-func NewARC(size int) (*ARCCache, error) {
- // Create the sub LRUs
- b1, err := simplelru.NewLRU(size, nil)
- if err != nil {
- return nil, err
- }
- b2, err := simplelru.NewLRU(size, nil)
- if err != nil {
- return nil, err
- }
- t1, err := simplelru.NewLRU(size, nil)
- if err != nil {
- return nil, err
- }
- t2, err := simplelru.NewLRU(size, nil)
- if err != nil {
- return nil, err
- }
-
- // Initialize the ARC
- c := &ARCCache{
- size: size,
- p: 0,
- t1: t1,
- b1: b1,
- t2: t2,
- b2: b2,
- }
- return c, nil
-}
-
-// Get looks up a key's value from the cache.
-func (c *ARCCache) Get(key interface{}) (interface{}, bool) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- // Ff the value is contained in T1 (recent), then
- // promote it to T2 (frequent)
- if val, ok := c.t1.Peek(key); ok {
- c.t1.Remove(key)
- c.t2.Add(key, val)
- return val, ok
- }
-
- // Check if the value is contained in T2 (frequent)
- if val, ok := c.t2.Get(key); ok {
- return val, ok
- }
-
- // No hit
- return nil, false
-}
-
-// Add adds a value to the cache.
-func (c *ARCCache) Add(key, value interface{}) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- // Check if the value is contained in T1 (recent), and potentially
- // promote it to frequent T2
- if c.t1.Contains(key) {
- c.t1.Remove(key)
- c.t2.Add(key, value)
- return
- }
-
- // Check if the value is already in T2 (frequent) and update it
- if c.t2.Contains(key) {
- c.t2.Add(key, value)
- return
- }
-
- // Check if this value was recently evicted as part of the
- // recently used list
- if c.b1.Contains(key) {
- // T1 set is too small, increase P appropriately
- delta := 1
- b1Len := c.b1.Len()
- b2Len := c.b2.Len()
- if b2Len > b1Len {
- delta = b2Len / b1Len
- }
- if c.p+delta >= c.size {
- c.p = c.size
- } else {
- c.p += delta
- }
-
- // Potentially need to make room in the cache
- if c.t1.Len()+c.t2.Len() >= c.size {
- c.replace(false)
- }
-
- // Remove from B1
- c.b1.Remove(key)
-
- // Add the key to the frequently used list
- c.t2.Add(key, value)
- return
- }
-
- // Check if this value was recently evicted as part of the
- // frequently used list
- if c.b2.Contains(key) {
- // T2 set is too small, decrease P appropriately
- delta := 1
- b1Len := c.b1.Len()
- b2Len := c.b2.Len()
- if b1Len > b2Len {
- delta = b1Len / b2Len
- }
- if delta >= c.p {
- c.p = 0
- } else {
- c.p -= delta
- }
-
- // Potentially need to make room in the cache
- if c.t1.Len()+c.t2.Len() >= c.size {
- c.replace(true)
- }
-
- // Remove from B2
- c.b2.Remove(key)
-
- // Add the key to the frequntly used list
- c.t2.Add(key, value)
- return
- }
-
- // Potentially need to make room in the cache
- if c.t1.Len()+c.t2.Len() >= c.size {
- c.replace(false)
- }
-
- // Keep the size of the ghost buffers trim
- if c.b1.Len() > c.size-c.p {
- c.b1.RemoveOldest()
- }
- if c.b2.Len() > c.p {
- c.b2.RemoveOldest()
- }
-
- // Add to the recently seen list
- c.t1.Add(key, value)
- return
-}
-
-// replace is used to adaptively evict from either T1 or T2
-// based on the current learned value of P
-func (c *ARCCache) replace(b2ContainsKey bool) {
- t1Len := c.t1.Len()
- if t1Len > 0 && (t1Len > c.p || (t1Len == c.p && b2ContainsKey)) {
- k, _, ok := c.t1.RemoveOldest()
- if ok {
- c.b1.Add(k, nil)
- }
- } else {
- k, _, ok := c.t2.RemoveOldest()
- if ok {
- c.b2.Add(k, nil)
- }
- }
-}
-
-// Len returns the number of cached entries
-func (c *ARCCache) Len() int {
- c.lock.RLock()
- defer c.lock.RUnlock()
- return c.t1.Len() + c.t2.Len()
-}
-
-// Keys returns all the cached keys
-func (c *ARCCache) Keys() []interface{} {
- c.lock.RLock()
- defer c.lock.RUnlock()
- k1 := c.t1.Keys()
- k2 := c.t2.Keys()
- return append(k1, k2...)
-}
-
-// Remove is used to purge a key from the cache
-func (c *ARCCache) Remove(key interface{}) {
- c.lock.Lock()
- defer c.lock.Unlock()
- if c.t1.Remove(key) {
- return
- }
- if c.t2.Remove(key) {
- return
- }
- if c.b1.Remove(key) {
- return
- }
- if c.b2.Remove(key) {
- return
- }
-}
-
-// Purge is used to clear the cache
-func (c *ARCCache) Purge() {
- c.lock.Lock()
- defer c.lock.Unlock()
- c.t1.Purge()
- c.t2.Purge()
- c.b1.Purge()
- c.b2.Purge()
-}
-
-// Contains is used to check if the cache contains a key
-// without updating recency or frequency.
-func (c *ARCCache) Contains(key interface{}) bool {
- c.lock.RLock()
- defer c.lock.RUnlock()
- return c.t1.Contains(key) || c.t2.Contains(key)
-}
-
-// Peek is used to inspect the cache value of a key
-// without updating recency or frequency.
-func (c *ARCCache) Peek(key interface{}) (interface{}, bool) {
- c.lock.RLock()
- defer c.lock.RUnlock()
- if val, ok := c.t1.Peek(key); ok {
- return val, ok
- }
- return c.t2.Peek(key)
-}
diff --git a/vendor/github.com/hashicorp/golang-lru/lru.go b/vendor/github.com/hashicorp/golang-lru/lru.go
deleted file mode 100644
index a6285f989..000000000
--- a/vendor/github.com/hashicorp/golang-lru/lru.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// This package provides a simple LRU cache. It is based on the
-// LRU implementation in groupcache:
-// https://github.com/golang/groupcache/tree/master/lru
-package lru
-
-import (
- "sync"
-
- "github.com/hashicorp/golang-lru/simplelru"
-)
-
-// Cache is a thread-safe fixed size LRU cache.
-type Cache struct {
- lru *simplelru.LRU
- lock sync.RWMutex
-}
-
-// New creates an LRU of the given size
-func New(size int) (*Cache, error) {
- return NewWithEvict(size, nil)
-}
-
-// NewWithEvict constructs a fixed size cache with the given eviction
-// callback.
-func NewWithEvict(size int, onEvicted func(key interface{}, value interface{})) (*Cache, error) {
- lru, err := simplelru.NewLRU(size, simplelru.EvictCallback(onEvicted))
- if err != nil {
- return nil, err
- }
- c := &Cache{
- lru: lru,
- }
- return c, nil
-}
-
-// Purge is used to completely clear the cache
-func (c *Cache) Purge() {
- c.lock.Lock()
- c.lru.Purge()
- c.lock.Unlock()
-}
-
-// Add adds a value to the cache. Returns true if an eviction occurred.
-func (c *Cache) Add(key, value interface{}) bool {
- c.lock.Lock()
- defer c.lock.Unlock()
- return c.lru.Add(key, value)
-}
-
-// Get looks up a key's value from the cache.
-func (c *Cache) Get(key interface{}) (interface{}, bool) {
- c.lock.Lock()
- defer c.lock.Unlock()
- return c.lru.Get(key)
-}
-
-// Check if a key is in the cache, without updating the recent-ness
-// or deleting it for being stale.
-func (c *Cache) Contains(key interface{}) bool {
- c.lock.RLock()
- defer c.lock.RUnlock()
- return c.lru.Contains(key)
-}
-
-// Returns the key value (or undefined if not found) without updating
-// the "recently used"-ness of the key.
-func (c *Cache) Peek(key interface{}) (interface{}, bool) {
- c.lock.RLock()
- defer c.lock.RUnlock()
- return c.lru.Peek(key)
-}
-
-// ContainsOrAdd checks if a key is in the cache without updating the
-// recent-ness or deleting it for being stale, and if not, adds the value.
-// Returns whether found and whether an eviction occurred.
-func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evict bool) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- if c.lru.Contains(key) {
- return true, false
- } else {
- evict := c.lru.Add(key, value)
- return false, evict
- }
-}
-
-// Remove removes the provided key from the cache.
-func (c *Cache) Remove(key interface{}) {
- c.lock.Lock()
- c.lru.Remove(key)
- c.lock.Unlock()
-}
-
-// RemoveOldest removes the oldest item from the cache.
-func (c *Cache) RemoveOldest() {
- c.lock.Lock()
- c.lru.RemoveOldest()
- c.lock.Unlock()
-}
-
-// Keys returns a slice of the keys in the cache, from oldest to newest.
-func (c *Cache) Keys() []interface{} {
- c.lock.RLock()
- defer c.lock.RUnlock()
- return c.lru.Keys()
-}
-
-// Len returns the number of items in the cache.
-func (c *Cache) Len() int {
- c.lock.RLock()
- defer c.lock.RUnlock()
- return c.lru.Len()
-}
diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
deleted file mode 100644
index cb416b394..000000000
--- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
+++ /dev/null
@@ -1,160 +0,0 @@
-package simplelru
-
-import (
- "container/list"
- "errors"
-)
-
-// EvictCallback is used to get a callback when a cache entry is evicted
-type EvictCallback func(key interface{}, value interface{})
-
-// LRU implements a non-thread safe fixed size LRU cache
-type LRU struct {
- size int
- evictList *list.List
- items map[interface{}]*list.Element
- onEvict EvictCallback
-}
-
-// entry is used to hold a value in the evictList
-type entry struct {
- key interface{}
- value interface{}
-}
-
-// NewLRU constructs an LRU of the given size
-func NewLRU(size int, onEvict EvictCallback) (*LRU, error) {
- if size <= 0 {
- return nil, errors.New("Must provide a positive size")
- }
- c := &LRU{
- size: size,
- evictList: list.New(),
- items: make(map[interface{}]*list.Element),
- onEvict: onEvict,
- }
- return c, nil
-}
-
-// Purge is used to completely clear the cache
-func (c *LRU) Purge() {
- for k, v := range c.items {
- if c.onEvict != nil {
- c.onEvict(k, v.Value.(*entry).value)
- }
- delete(c.items, k)
- }
- c.evictList.Init()
-}
-
-// Add adds a value to the cache. Returns true if an eviction occurred.
-func (c *LRU) Add(key, value interface{}) bool {
- // Check for existing item
- if ent, ok := c.items[key]; ok {
- c.evictList.MoveToFront(ent)
- ent.Value.(*entry).value = value
- return false
- }
-
- // Add new item
- ent := &entry{key, value}
- entry := c.evictList.PushFront(ent)
- c.items[key] = entry
-
- evict := c.evictList.Len() > c.size
- // Verify size not exceeded
- if evict {
- c.removeOldest()
- }
- return evict
-}
-
-// Get looks up a key's value from the cache.
-func (c *LRU) Get(key interface{}) (value interface{}, ok bool) {
- if ent, ok := c.items[key]; ok {
- c.evictList.MoveToFront(ent)
- return ent.Value.(*entry).value, true
- }
- return
-}
-
-// Check if a key is in the cache, without updating the recent-ness
-// or deleting it for being stale.
-func (c *LRU) Contains(key interface{}) (ok bool) {
- _, ok = c.items[key]
- return ok
-}
-
-// Returns the key value (or undefined if not found) without updating
-// the "recently used"-ness of the key.
-func (c *LRU) Peek(key interface{}) (value interface{}, ok bool) {
- if ent, ok := c.items[key]; ok {
- return ent.Value.(*entry).value, true
- }
- return nil, ok
-}
-
-// Remove removes the provided key from the cache, returning if the
-// key was contained.
-func (c *LRU) Remove(key interface{}) bool {
- if ent, ok := c.items[key]; ok {
- c.removeElement(ent)
- return true
- }
- return false
-}
-
-// RemoveOldest removes the oldest item from the cache.
-func (c *LRU) RemoveOldest() (interface{}, interface{}, bool) {
- ent := c.evictList.Back()
- if ent != nil {
- c.removeElement(ent)
- kv := ent.Value.(*entry)
- return kv.key, kv.value, true
- }
- return nil, nil, false
-}
-
-// GetOldest returns the oldest entry
-func (c *LRU) GetOldest() (interface{}, interface{}, bool) {
- ent := c.evictList.Back()
- if ent != nil {
- kv := ent.Value.(*entry)
- return kv.key, kv.value, true
- }
- return nil, nil, false
-}
-
-// Keys returns a slice of the keys in the cache, from oldest to newest.
-func (c *LRU) Keys() []interface{} {
- keys := make([]interface{}, len(c.items))
- i := 0
- for ent := c.evictList.Back(); ent != nil; ent = ent.Prev() {
- keys[i] = ent.Value.(*entry).key
- i++
- }
- return keys
-}
-
-// Len returns the number of items in the cache.
-func (c *LRU) Len() int {
- return c.evictList.Len()
-}
-
-// removeOldest removes the oldest item from the cache.
-func (c *LRU) removeOldest() {
- ent := c.evictList.Back()
- if ent != nil {
- c.removeElement(ent)
- }
-}
-
-// removeElement is used to remove a given list element from the cache
-func (c *LRU) removeElement(e *list.Element) {
- c.evictList.Remove(e)
- kv := e.Value.(*entry)
- delete(c.items, kv.key)
- if c.onEvict != nil {
- c.onEvict(kv.key, kv.value)
- }
-}
diff --git a/vendor/github.com/kr/pty/License b/vendor/github.com/kr/pty/License
deleted file mode 100644
index 6b7558b6b..000000000
--- a/vendor/github.com/kr/pty/License
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright (c) 2011 Keith Rarick
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute,
-sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall
-be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/kr/pty/README.md b/vendor/github.com/kr/pty/README.md
deleted file mode 100644
index 7b7900c3a..000000000
--- a/vendor/github.com/kr/pty/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# pty
-
-Pty is a Go package for using unix pseudo-terminals.
-
-## Install
-
- go get github.com/kr/pty
-
-## Example
-
-```go
-package main
-
-import (
- "github.com/kr/pty"
- "io"
- "os"
- "os/exec"
-)
-
-func main() {
- c := exec.Command("grep", "--color=auto", "bar")
- f, err := pty.Start(c)
- if err != nil {
- panic(err)
- }
-
- go func() {
- f.Write([]byte("foo\n"))
- f.Write([]byte("bar\n"))
- f.Write([]byte("baz\n"))
- f.Write([]byte{4}) // EOT
- }()
- io.Copy(os.Stdout, f)
-}
-```
diff --git a/vendor/github.com/kr/pty/doc.go b/vendor/github.com/kr/pty/doc.go
deleted file mode 100644
index 190cfbea9..000000000
--- a/vendor/github.com/kr/pty/doc.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Package pty provides functions for working with Unix terminals.
-package pty
-
-import (
- "errors"
- "os"
-)
-
-// ErrUnsupported is returned if a function is not
-// available on the current platform.
-var ErrUnsupported = errors.New("unsupported")
-
-// Opens a pty and its corresponding tty.
-func Open() (pty, tty *os.File, err error) {
- return open()
-}
diff --git a/vendor/github.com/kr/pty/ioctl.go b/vendor/github.com/kr/pty/ioctl.go
deleted file mode 100644
index c57c19e7e..000000000
--- a/vendor/github.com/kr/pty/ioctl.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build !windows
-
-package pty
-
-import "syscall"
-
-func ioctl(fd, cmd, ptr uintptr) error {
- _, _, e := syscall.Syscall(syscall.SYS_IOCTL, fd, cmd, ptr)
- if e != 0 {
- return e
- }
- return nil
-}
diff --git a/vendor/github.com/kr/pty/ioctl_bsd.go b/vendor/github.com/kr/pty/ioctl_bsd.go
deleted file mode 100644
index 73b12c53c..000000000
--- a/vendor/github.com/kr/pty/ioctl_bsd.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package pty
-
-// from <sys/ioccom.h>
-const (
- _IOC_VOID uintptr = 0x20000000
- _IOC_OUT uintptr = 0x40000000
- _IOC_IN uintptr = 0x80000000
- _IOC_IN_OUT uintptr = _IOC_OUT | _IOC_IN
- _IOC_DIRMASK = _IOC_VOID | _IOC_OUT | _IOC_IN
-
- _IOC_PARAM_SHIFT = 13
- _IOC_PARAM_MASK = (1 << _IOC_PARAM_SHIFT) - 1
-)
-
-func _IOC_PARM_LEN(ioctl uintptr) uintptr {
- return (ioctl >> 16) & _IOC_PARAM_MASK
-}
-
-func _IOC(inout uintptr, group byte, ioctl_num uintptr, param_len uintptr) uintptr {
- return inout | (param_len&_IOC_PARAM_MASK)<<16 | uintptr(group)<<8 | ioctl_num
-}
-
-func _IO(group byte, ioctl_num uintptr) uintptr {
- return _IOC(_IOC_VOID, group, ioctl_num, 0)
-}
-
-func _IOR(group byte, ioctl_num uintptr, param_len uintptr) uintptr {
- return _IOC(_IOC_OUT, group, ioctl_num, param_len)
-}
-
-func _IOW(group byte, ioctl_num uintptr, param_len uintptr) uintptr {
- return _IOC(_IOC_IN, group, ioctl_num, param_len)
-}
-
-func _IOWR(group byte, ioctl_num uintptr, param_len uintptr) uintptr {
- return _IOC(_IOC_IN_OUT, group, ioctl_num, param_len)
-}
diff --git a/vendor/github.com/kr/pty/pty_darwin.go b/vendor/github.com/kr/pty/pty_darwin.go
deleted file mode 100644
index 4f4d5ca26..000000000
--- a/vendor/github.com/kr/pty/pty_darwin.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package pty
-
-import (
- "errors"
- "os"
- "syscall"
- "unsafe"
-)
-
-func open() (pty, tty *os.File, err error) {
- p, err := os.OpenFile("/dev/ptmx", os.O_RDWR, 0)
- if err != nil {
- return nil, nil, err
- }
-
- sname, err := ptsname(p)
- if err != nil {
- return nil, nil, err
- }
-
- err = grantpt(p)
- if err != nil {
- return nil, nil, err
- }
-
- err = unlockpt(p)
- if err != nil {
- return nil, nil, err
- }
-
- t, err := os.OpenFile(sname, os.O_RDWR, 0)
- if err != nil {
- return nil, nil, err
- }
- return p, t, nil
-}
-
-func ptsname(f *os.File) (string, error) {
- n := make([]byte, _IOC_PARM_LEN(syscall.TIOCPTYGNAME))
-
- err := ioctl(f.Fd(), syscall.TIOCPTYGNAME, uintptr(unsafe.Pointer(&n[0])))
- if err != nil {
- return "", err
- }
-
- for i, c := range n {
- if c == 0 {
- return string(n[:i]), nil
- }
- }
- return "", errors.New("TIOCPTYGNAME string not NUL-terminated")
-}
-
-func grantpt(f *os.File) error {
- return ioctl(f.Fd(), syscall.TIOCPTYGRANT, 0)
-}
-
-func unlockpt(f *os.File) error {
- return ioctl(f.Fd(), syscall.TIOCPTYUNLK, 0)
-}
diff --git a/vendor/github.com/kr/pty/pty_dragonfly.go b/vendor/github.com/kr/pty/pty_dragonfly.go
deleted file mode 100644
index 5431fb5ae..000000000
--- a/vendor/github.com/kr/pty/pty_dragonfly.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package pty
-
-import (
- "errors"
- "os"
- "strings"
- "syscall"
- "unsafe"
-)
-
-// same code as pty_darwin.go
-func open() (pty, tty *os.File, err error) {
- p, err := os.OpenFile("/dev/ptmx", os.O_RDWR, 0)
- if err != nil {
- return nil, nil, err
- }
-
- sname, err := ptsname(p)
- if err != nil {
- return nil, nil, err
- }
-
- err = grantpt(p)
- if err != nil {
- return nil, nil, err
- }
-
- err = unlockpt(p)
- if err != nil {
- return nil, nil, err
- }
-
- t, err := os.OpenFile(sname, os.O_RDWR, 0)
- if err != nil {
- return nil, nil, err
- }
- return p, t, nil
-}
-
-func grantpt(f *os.File) error {
- _, err := isptmaster(f.Fd())
- return err
-}
-
-func unlockpt(f *os.File) error {
- _, err := isptmaster(f.Fd())
- return err
-}
-
-func isptmaster(fd uintptr) (bool, error) {
- err := ioctl(fd, syscall.TIOCISPTMASTER, 0)
- return err == nil, err
-}
-
-var (
- emptyFiodgnameArg fiodgnameArg
- ioctl_FIODNAME = _IOW('f', 120, unsafe.Sizeof(emptyFiodgnameArg))
-)
-
-func ptsname(f *os.File) (string, error) {
- name := make([]byte, _C_SPECNAMELEN)
- fa := fiodgnameArg{Name: (*byte)(unsafe.Pointer(&name[0])), Len: _C_SPECNAMELEN, Pad_cgo_0: [4]byte{0, 0, 0, 0}}
-
- err := ioctl(f.Fd(), ioctl_FIODNAME, uintptr(unsafe.Pointer(&fa)))
- if err != nil {
- return "", err
- }
-
- for i, c := range name {
- if c == 0 {
- s := "/dev/" + string(name[:i])
- return strings.Replace(s, "ptm", "pts", -1), nil
- }
- }
- return "", errors.New("TIOCPTYGNAME string not NUL-terminated")
-}
diff --git a/vendor/github.com/kr/pty/pty_freebsd.go b/vendor/github.com/kr/pty/pty_freebsd.go
deleted file mode 100644
index b341babd0..000000000
--- a/vendor/github.com/kr/pty/pty_freebsd.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package pty
-
-import (
- "errors"
- "os"
- "syscall"
- "unsafe"
-)
-
-func posix_openpt(oflag int) (fd int, err error) {
- r0, _, e1 := syscall.Syscall(syscall.SYS_POSIX_OPENPT, uintptr(oflag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func open() (pty, tty *os.File, err error) {
- fd, err := posix_openpt(syscall.O_RDWR | syscall.O_CLOEXEC)
- if err != nil {
- return nil, nil, err
- }
-
- p := os.NewFile(uintptr(fd), "/dev/pts")
- sname, err := ptsname(p)
- if err != nil {
- return nil, nil, err
- }
-
- t, err := os.OpenFile("/dev/"+sname, os.O_RDWR, 0)
- if err != nil {
- return nil, nil, err
- }
- return p, t, nil
-}
-
-func isptmaster(fd uintptr) (bool, error) {
- err := ioctl(fd, syscall.TIOCPTMASTER, 0)
- return err == nil, err
-}
-
-var (
- emptyFiodgnameArg fiodgnameArg
- ioctl_FIODGNAME = _IOW('f', 120, unsafe.Sizeof(emptyFiodgnameArg))
-)
-
-func ptsname(f *os.File) (string, error) {
- master, err := isptmaster(f.Fd())
- if err != nil {
- return "", err
- }
- if !master {
- return "", syscall.EINVAL
- }
-
- const n = _C_SPECNAMELEN + 1
- var (
- buf = make([]byte, n)
- arg = fiodgnameArg{Len: n, Buf: (*byte)(unsafe.Pointer(&buf[0]))}
- )
- err = ioctl(f.Fd(), ioctl_FIODGNAME, uintptr(unsafe.Pointer(&arg)))
- if err != nil {
- return "", err
- }
-
- for i, c := range buf {
- if c == 0 {
- return string(buf[:i]), nil
- }
- }
- return "", errors.New("FIODGNAME string not NUL-terminated")
-}
diff --git a/vendor/github.com/kr/pty/pty_linux.go b/vendor/github.com/kr/pty/pty_linux.go
deleted file mode 100644
index cb901a21e..000000000
--- a/vendor/github.com/kr/pty/pty_linux.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package pty
-
-import (
- "os"
- "strconv"
- "syscall"
- "unsafe"
-)
-
-func open() (pty, tty *os.File, err error) {
- p, err := os.OpenFile("/dev/ptmx", os.O_RDWR, 0)
- if err != nil {
- return nil, nil, err
- }
-
- sname, err := ptsname(p)
- if err != nil {
- return nil, nil, err
- }
-
- err = unlockpt(p)
- if err != nil {
- return nil, nil, err
- }
-
- t, err := os.OpenFile(sname, os.O_RDWR|syscall.O_NOCTTY, 0)
- if err != nil {
- return nil, nil, err
- }
- return p, t, nil
-}
-
-func ptsname(f *os.File) (string, error) {
- var n _C_uint
- err := ioctl(f.Fd(), syscall.TIOCGPTN, uintptr(unsafe.Pointer(&n)))
- if err != nil {
- return "", err
- }
- return "/dev/pts/" + strconv.Itoa(int(n)), nil
-}
-
-func unlockpt(f *os.File) error {
- var u _C_int
- // use TIOCSPTLCK with a zero valued arg to clear the slave pty lock
- return ioctl(f.Fd(), syscall.TIOCSPTLCK, uintptr(unsafe.Pointer(&u)))
-}
diff --git a/vendor/github.com/kr/pty/pty_unsupported.go b/vendor/github.com/kr/pty/pty_unsupported.go
deleted file mode 100644
index bd3d1e7e0..000000000
--- a/vendor/github.com/kr/pty/pty_unsupported.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build !linux,!darwin,!freebsd,!dragonfly
-
-package pty
-
-import (
- "os"
-)
-
-func open() (pty, tty *os.File, err error) {
- return nil, nil, ErrUnsupported
-}
diff --git a/vendor/github.com/kr/pty/run.go b/vendor/github.com/kr/pty/run.go
deleted file mode 100644
index baecca8af..000000000
--- a/vendor/github.com/kr/pty/run.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// +build !windows
-
-package pty
-
-import (
- "os"
- "os/exec"
- "syscall"
-)
-
-// Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout,
-// and c.Stderr, calls c.Start, and returns the File of the tty's
-// corresponding pty.
-func Start(c *exec.Cmd) (pty *os.File, err error) {
- pty, tty, err := Open()
- if err != nil {
- return nil, err
- }
- defer tty.Close()
- c.Stdout = tty
- c.Stdin = tty
- c.Stderr = tty
- if c.SysProcAttr == nil {
- c.SysProcAttr = &syscall.SysProcAttr{}
- }
- c.SysProcAttr.Setctty = true
- c.SysProcAttr.Setsid = true
- err = c.Start()
- if err != nil {
- pty.Close()
- return nil, err
- }
- return pty, err
-}
diff --git a/vendor/github.com/kr/pty/util.go b/vendor/github.com/kr/pty/util.go
deleted file mode 100644
index a4fab9a7c..000000000
--- a/vendor/github.com/kr/pty/util.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// +build !windows
-
-package pty
-
-import (
- "os"
- "syscall"
- "unsafe"
-)
-
-// Getsize returns the number of rows (lines) and cols (positions
-// in each line) in terminal t.
-func Getsize(t *os.File) (rows, cols int, err error) {
- var ws winsize
- err = windowrect(&ws, t.Fd())
- return int(ws.ws_row), int(ws.ws_col), err
-}
-
-type winsize struct {
- ws_row uint16
- ws_col uint16
- ws_xpixel uint16
- ws_ypixel uint16
-}
-
-func windowrect(ws *winsize, fd uintptr) error {
- _, _, errno := syscall.Syscall(
- syscall.SYS_IOCTL,
- fd,
- syscall.TIOCGWINSZ,
- uintptr(unsafe.Pointer(ws)),
- )
- if errno != 0 {
- return syscall.Errno(errno)
- }
- return nil
-}
diff --git a/vendor/github.com/kr/pty/ztypes_386.go b/vendor/github.com/kr/pty/ztypes_386.go
deleted file mode 100644
index ff0b8fd83..000000000
--- a/vendor/github.com/kr/pty/ztypes_386.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types.go
-
-package pty
-
-type (
- _C_int int32
- _C_uint uint32
-)
diff --git a/vendor/github.com/kr/pty/ztypes_amd64.go b/vendor/github.com/kr/pty/ztypes_amd64.go
deleted file mode 100644
index ff0b8fd83..000000000
--- a/vendor/github.com/kr/pty/ztypes_amd64.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types.go
-
-package pty
-
-type (
- _C_int int32
- _C_uint uint32
-)
diff --git a/vendor/github.com/kr/pty/ztypes_arm.go b/vendor/github.com/kr/pty/ztypes_arm.go
deleted file mode 100644
index ff0b8fd83..000000000
--- a/vendor/github.com/kr/pty/ztypes_arm.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types.go
-
-package pty
-
-type (
- _C_int int32
- _C_uint uint32
-)
diff --git a/vendor/github.com/kr/pty/ztypes_arm64.go b/vendor/github.com/kr/pty/ztypes_arm64.go
deleted file mode 100644
index 6c29a4b91..000000000
--- a/vendor/github.com/kr/pty/ztypes_arm64.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types.go
-
-// +build arm64
-
-package pty
-
-type (
- _C_int int32
- _C_uint uint32
-)
diff --git a/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go b/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go
deleted file mode 100644
index 6b0ba037f..000000000
--- a/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_dragonfly.go
-
-package pty
-
-const (
- _C_SPECNAMELEN = 0x3f
-)
-
-type fiodgnameArg struct {
- Name *byte
- Len uint32
- Pad_cgo_0 [4]byte
-}
diff --git a/vendor/github.com/kr/pty/ztypes_freebsd_386.go b/vendor/github.com/kr/pty/ztypes_freebsd_386.go
deleted file mode 100644
index d9975374e..000000000
--- a/vendor/github.com/kr/pty/ztypes_freebsd_386.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_freebsd.go
-
-package pty
-
-const (
- _C_SPECNAMELEN = 0x3f
-)
-
-type fiodgnameArg struct {
- Len int32
- Buf *byte
-}
diff --git a/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go b/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go
deleted file mode 100644
index 5fa102fcd..000000000
--- a/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_freebsd.go
-
-package pty
-
-const (
- _C_SPECNAMELEN = 0x3f
-)
-
-type fiodgnameArg struct {
- Len int32
- Pad_cgo_0 [4]byte
- Buf *byte
-}
diff --git a/vendor/github.com/kr/pty/ztypes_freebsd_arm.go b/vendor/github.com/kr/pty/ztypes_freebsd_arm.go
deleted file mode 100644
index d9975374e..000000000
--- a/vendor/github.com/kr/pty/ztypes_freebsd_arm.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_freebsd.go
-
-package pty
-
-const (
- _C_SPECNAMELEN = 0x3f
-)
-
-type fiodgnameArg struct {
- Len int32
- Buf *byte
-}
diff --git a/vendor/github.com/kr/pty/ztypes_mipsx.go b/vendor/github.com/kr/pty/ztypes_mipsx.go
deleted file mode 100644
index f0ce74086..000000000
--- a/vendor/github.com/kr/pty/ztypes_mipsx.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types.go
-
-// +build linux
-// +build mips mipsle mips64 mips64le
-
-package pty
-
-type (
- _C_int int32
- _C_uint uint32
-)
diff --git a/vendor/github.com/kr/pty/ztypes_ppc64.go b/vendor/github.com/kr/pty/ztypes_ppc64.go
deleted file mode 100644
index 4e1af8431..000000000
--- a/vendor/github.com/kr/pty/ztypes_ppc64.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build ppc64
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types.go
-
-package pty
-
-type (
- _C_int int32
- _C_uint uint32
-)
diff --git a/vendor/github.com/kr/pty/ztypes_ppc64le.go b/vendor/github.com/kr/pty/ztypes_ppc64le.go
deleted file mode 100644
index e6780f4e2..000000000
--- a/vendor/github.com/kr/pty/ztypes_ppc64le.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build ppc64le
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types.go
-
-package pty
-
-type (
- _C_int int32
- _C_uint uint32
-)
diff --git a/vendor/github.com/kr/pty/ztypes_s390x.go b/vendor/github.com/kr/pty/ztypes_s390x.go
deleted file mode 100644
index a7452b61c..000000000
--- a/vendor/github.com/kr/pty/ztypes_s390x.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build s390x
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types.go
-
-package pty
-
-type (
- _C_int int32
- _C_uint uint32
-)
diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go
deleted file mode 100644
index 16cd38546..000000000
--- a/vendor/golang.org/x/crypto/ed25519/ed25519.go
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package ed25519 implements the Ed25519 signature algorithm. See
-// https://ed25519.cr.yp.to/.
-//
-// These functions are also compatible with the “Ed25519” function defined in
-// https://tools.ietf.org/html/draft-irtf-cfrg-eddsa-05.
-package ed25519
-
-// This code is a port of the public domain, “ref10” implementation of ed25519
-// from SUPERCOP.
-
-import (
- "bytes"
- "crypto"
- cryptorand "crypto/rand"
- "crypto/sha512"
- "errors"
- "io"
- "strconv"
-
- "golang.org/x/crypto/ed25519/internal/edwards25519"
-)
-
-const (
- // PublicKeySize is the size, in bytes, of public keys as used in this package.
- PublicKeySize = 32
- // PrivateKeySize is the size, in bytes, of private keys as used in this package.
- PrivateKeySize = 64
- // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
- SignatureSize = 64
-)
-
-// PublicKey is the type of Ed25519 public keys.
-type PublicKey []byte
-
-// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
-type PrivateKey []byte
-
-// Public returns the PublicKey corresponding to priv.
-func (priv PrivateKey) Public() crypto.PublicKey {
- publicKey := make([]byte, PublicKeySize)
- copy(publicKey, priv[32:])
- return PublicKey(publicKey)
-}
-
-// Sign signs the given message with priv.
-// Ed25519 performs two passes over messages to be signed and therefore cannot
-// handle pre-hashed messages. Thus opts.HashFunc() must return zero to
-// indicate the message hasn't been hashed. This can be achieved by passing
-// crypto.Hash(0) as the value for opts.
-func (priv PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error) {
- if opts.HashFunc() != crypto.Hash(0) {
- return nil, errors.New("ed25519: cannot sign hashed message")
- }
-
- return Sign(priv, message), nil
-}
-
-// GenerateKey generates a public/private key pair using entropy from rand.
-// If rand is nil, crypto/rand.Reader will be used.
-func GenerateKey(rand io.Reader) (publicKey PublicKey, privateKey PrivateKey, err error) {
- if rand == nil {
- rand = cryptorand.Reader
- }
-
- privateKey = make([]byte, PrivateKeySize)
- publicKey = make([]byte, PublicKeySize)
- _, err = io.ReadFull(rand, privateKey[:32])
- if err != nil {
- return nil, nil, err
- }
-
- digest := sha512.Sum512(privateKey[:32])
- digest[0] &= 248
- digest[31] &= 127
- digest[31] |= 64
-
- var A edwards25519.ExtendedGroupElement
- var hBytes [32]byte
- copy(hBytes[:], digest[:])
- edwards25519.GeScalarMultBase(&A, &hBytes)
- var publicKeyBytes [32]byte
- A.ToBytes(&publicKeyBytes)
-
- copy(privateKey[32:], publicKeyBytes[:])
- copy(publicKey, publicKeyBytes[:])
-
- return publicKey, privateKey, nil
-}
-
-// Sign signs the message with privateKey and returns a signature. It will
-// panic if len(privateKey) is not PrivateKeySize.
-func Sign(privateKey PrivateKey, message []byte) []byte {
- if l := len(privateKey); l != PrivateKeySize {
- panic("ed25519: bad private key length: " + strconv.Itoa(l))
- }
-
- h := sha512.New()
- h.Write(privateKey[:32])
-
- var digest1, messageDigest, hramDigest [64]byte
- var expandedSecretKey [32]byte
- h.Sum(digest1[:0])
- copy(expandedSecretKey[:], digest1[:])
- expandedSecretKey[0] &= 248
- expandedSecretKey[31] &= 63
- expandedSecretKey[31] |= 64
-
- h.Reset()
- h.Write(digest1[32:])
- h.Write(message)
- h.Sum(messageDigest[:0])
-
- var messageDigestReduced [32]byte
- edwards25519.ScReduce(&messageDigestReduced, &messageDigest)
- var R edwards25519.ExtendedGroupElement
- edwards25519.GeScalarMultBase(&R, &messageDigestReduced)
-
- var encodedR [32]byte
- R.ToBytes(&encodedR)
-
- h.Reset()
- h.Write(encodedR[:])
- h.Write(privateKey[32:])
- h.Write(message)
- h.Sum(hramDigest[:0])
- var hramDigestReduced [32]byte
- edwards25519.ScReduce(&hramDigestReduced, &hramDigest)
-
- var s [32]byte
- edwards25519.ScMulAdd(&s, &hramDigestReduced, &expandedSecretKey, &messageDigestReduced)
-
- signature := make([]byte, SignatureSize)
- copy(signature[:], encodedR[:])
- copy(signature[32:], s[:])
-
- return signature
-}
-
-// Verify reports whether sig is a valid signature of message by publicKey. It
-// will panic if len(publicKey) is not PublicKeySize.
-func Verify(publicKey PublicKey, message, sig []byte) bool {
- if l := len(publicKey); l != PublicKeySize {
- panic("ed25519: bad public key length: " + strconv.Itoa(l))
- }
-
- if len(sig) != SignatureSize || sig[63]&224 != 0 {
- return false
- }
-
- var A edwards25519.ExtendedGroupElement
- var publicKeyBytes [32]byte
- copy(publicKeyBytes[:], publicKey)
- if !A.FromBytes(&publicKeyBytes) {
- return false
- }
- edwards25519.FeNeg(&A.X, &A.X)
- edwards25519.FeNeg(&A.T, &A.T)
-
- h := sha512.New()
- h.Write(sig[:32])
- h.Write(publicKey[:])
- h.Write(message)
- var digest [64]byte
- h.Sum(digest[:0])
-
- var hReduced [32]byte
- edwards25519.ScReduce(&hReduced, &digest)
-
- var R edwards25519.ProjectiveGroupElement
- var b [32]byte
- copy(b[:], sig[32:])
- edwards25519.GeDoubleScalarMultVartime(&R, &hReduced, &A, &b)
-
- var checkR [32]byte
- R.ToBytes(&checkR)
- return bytes.Equal(sig[:32], checkR[:])
-}
diff --git a/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go b/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go
deleted file mode 100644
index e39f086c1..000000000
--- a/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go
+++ /dev/null
@@ -1,1422 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package edwards25519
-
-// These values are from the public domain, “ref10” implementation of ed25519
-// from SUPERCOP.
-
-// d is a constant in the Edwards curve equation.
-var d = FieldElement{
- -10913610, 13857413, -15372611, 6949391, 114729, -8787816, -6275908, -3247719, -18696448, -12055116,
-}
-
-// d2 is 2*d.
-var d2 = FieldElement{
- -21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199,
-}
-
-// SqrtM1 is the square-root of -1 in the field.
-var SqrtM1 = FieldElement{
- -32595792, -7943725, 9377950, 3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482,
-}
-
-// A is a constant in the Montgomery-form of curve25519.
-var A = FieldElement{
- 486662, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-}
-
-// bi contains precomputed multiples of the base-point. See the Ed25519 paper
-// for a discussion about how these values are used.
-var bi = [8]PreComputedGroupElement{
- {
- FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605},
- FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378},
- FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546},
- },
- {
- FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024},
- FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574},
- FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357},
- },
- {
- FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380},
- FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306},
- FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942},
- },
- {
- FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766},
- FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701},
- FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300},
- },
- {
- FieldElement{-22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211, -1361450, -13062696, 13821877},
- FieldElement{-6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028, -7212327, 18853322, -14220951},
- FieldElement{4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358, -10431137, 2207753, -3209784},
- },
- {
- FieldElement{-25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364, -663000, -31111463, -16132436},
- FieldElement{25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789, 15725684, 171356, 6466918},
- FieldElement{23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339, -14088058, -30714912, 16193877},
- },
- {
- FieldElement{-33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398, 4729455, -18074513, 9256800},
- FieldElement{-25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405, 9761698, -19827198, 630305},
- FieldElement{-13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551, -15960994, -2449256, -14291300},
- },
- {
- FieldElement{-3151181, -5046075, 9282714, 6866145, -31907062, -863023, -18940575, 15033784, 25105118, -7894876},
- FieldElement{-24326370, 15950226, -31801215, -14592823, -11662737, -5090925, 1573892, -2625887, 2198790, -15804619},
- FieldElement{-3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022, -16236442, -32461234, -12290683},
- },
-}
-
-// base contains precomputed multiples of the base-point. See the Ed25519 paper
-// for a discussion about how these values are used.
-var base = [32][8]PreComputedGroupElement{
- {
- {
- FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605},
- FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378},
- FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546},
- },
- {
- FieldElement{-12815894, -12976347, -21581243, 11784320, -25355658, -2750717, -11717903, -3814571, -358445, -10211303},
- FieldElement{-21703237, 6903825, 27185491, 6451973, -29577724, -9554005, -15616551, 11189268, -26829678, -5319081},
- FieldElement{26966642, 11152617, 32442495, 15396054, 14353839, -12752335, -3128826, -9541118, -15472047, -4166697},
- },
- {
- FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024},
- FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574},
- FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357},
- },
- {
- FieldElement{-17036878, 13921892, 10945806, -6033431, 27105052, -16084379, -28926210, 15006023, 3284568, -6276540},
- FieldElement{23599295, -8306047, -11193664, -7687416, 13236774, 10506355, 7464579, 9656445, 13059162, 10374397},
- FieldElement{7798556, 16710257, 3033922, 2874086, 28997861, 2835604, 32406664, -3839045, -641708, -101325},
- },
- {
- FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380},
- FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306},
- FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942},
- },
- {
- FieldElement{-15371964, -12862754, 32573250, 4720197, -26436522, 5875511, -19188627, -15224819, -9818940, -12085777},
- FieldElement{-8549212, 109983, 15149363, 2178705, 22900618, 4543417, 3044240, -15689887, 1762328, 14866737},
- FieldElement{-18199695, -15951423, -10473290, 1707278, -17185920, 3916101, -28236412, 3959421, 27914454, 4383652},
- },
- {
- FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766},
- FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701},
- FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300},
- },
- {
- FieldElement{14499471, -2729599, -33191113, -4254652, 28494862, 14271267, 30290735, 10876454, -33154098, 2381726},
- FieldElement{-7195431, -2655363, -14730155, 462251, -27724326, 3941372, -6236617, 3696005, -32300832, 15351955},
- FieldElement{27431194, 8222322, 16448760, -3907995, -18707002, 11938355, -32961401, -2970515, 29551813, 10109425},
- },
- },
- {
- {
- FieldElement{-13657040, -13155431, -31283750, 11777098, 21447386, 6519384, -2378284, -1627556, 10092783, -4764171},
- FieldElement{27939166, 14210322, 4677035, 16277044, -22964462, -12398139, -32508754, 12005538, -17810127, 12803510},
- FieldElement{17228999, -15661624, -1233527, 300140, -1224870, -11714777, 30364213, -9038194, 18016357, 4397660},
- },
- {
- FieldElement{-10958843, -7690207, 4776341, -14954238, 27850028, -15602212, -26619106, 14544525, -17477504, 982639},
- FieldElement{29253598, 15796703, -2863982, -9908884, 10057023, 3163536, 7332899, -4120128, -21047696, 9934963},
- FieldElement{5793303, 16271923, -24131614, -10116404, 29188560, 1206517, -14747930, 4559895, -30123922, -10897950},
- },
- {
- FieldElement{-27643952, -11493006, 16282657, -11036493, 28414021, -15012264, 24191034, 4541697, -13338309, 5500568},
- FieldElement{12650548, -1497113, 9052871, 11355358, -17680037, -8400164, -17430592, 12264343, 10874051, 13524335},
- FieldElement{25556948, -3045990, 714651, 2510400, 23394682, -10415330, 33119038, 5080568, -22528059, 5376628},
- },
- {
- FieldElement{-26088264, -4011052, -17013699, -3537628, -6726793, 1920897, -22321305, -9447443, 4535768, 1569007},
- FieldElement{-2255422, 14606630, -21692440, -8039818, 28430649, 8775819, -30494562, 3044290, 31848280, 12543772},
- FieldElement{-22028579, 2943893, -31857513, 6777306, 13784462, -4292203, -27377195, -2062731, 7718482, 14474653},
- },
- {
- FieldElement{2385315, 2454213, -22631320, 46603, -4437935, -15680415, 656965, -7236665, 24316168, -5253567},
- FieldElement{13741529, 10911568, -33233417, -8603737, -20177830, -1033297, 33040651, -13424532, -20729456, 8321686},
- FieldElement{21060490, -2212744, 15712757, -4336099, 1639040, 10656336, 23845965, -11874838, -9984458, 608372},
- },
- {
- FieldElement{-13672732, -15087586, -10889693, -7557059, -6036909, 11305547, 1123968, -6780577, 27229399, 23887},
- FieldElement{-23244140, -294205, -11744728, 14712571, -29465699, -2029617, 12797024, -6440308, -1633405, 16678954},
- FieldElement{-29500620, 4770662, -16054387, 14001338, 7830047, 9564805, -1508144, -4795045, -17169265, 4904953},
- },
- {
- FieldElement{24059557, 14617003, 19037157, -15039908, 19766093, -14906429, 5169211, 16191880, 2128236, -4326833},
- FieldElement{-16981152, 4124966, -8540610, -10653797, 30336522, -14105247, -29806336, 916033, -6882542, -2986532},
- FieldElement{-22630907, 12419372, -7134229, -7473371, -16478904, 16739175, 285431, 2763829, 15736322, 4143876},
- },
- {
- FieldElement{2379352, 11839345, -4110402, -5988665, 11274298, 794957, 212801, -14594663, 23527084, -16458268},
- FieldElement{33431127, -11130478, -17838966, -15626900, 8909499, 8376530, -32625340, 4087881, -15188911, -14416214},
- FieldElement{1767683, 7197987, -13205226, -2022635, -13091350, 448826, 5799055, 4357868, -4774191, -16323038},
- },
- },
- {
- {
- FieldElement{6721966, 13833823, -23523388, -1551314, 26354293, -11863321, 23365147, -3949732, 7390890, 2759800},
- FieldElement{4409041, 2052381, 23373853, 10530217, 7676779, -12885954, 21302353, -4264057, 1244380, -12919645},
- FieldElement{-4421239, 7169619, 4982368, -2957590, 30256825, -2777540, 14086413, 9208236, 15886429, 16489664},
- },
- {
- FieldElement{1996075, 10375649, 14346367, 13311202, -6874135, -16438411, -13693198, 398369, -30606455, -712933},
- FieldElement{-25307465, 9795880, -2777414, 14878809, -33531835, 14780363, 13348553, 12076947, -30836462, 5113182},
- FieldElement{-17770784, 11797796, 31950843, 13929123, -25888302, 12288344, -30341101, -7336386, 13847711, 5387222},
- },
- {
- FieldElement{-18582163, -3416217, 17824843, -2340966, 22744343, -10442611, 8763061, 3617786, -19600662, 10370991},
- FieldElement{20246567, -14369378, 22358229, -543712, 18507283, -10413996, 14554437, -8746092, 32232924, 16763880},
- FieldElement{9648505, 10094563, 26416693, 14745928, -30374318, -6472621, 11094161, 15689506, 3140038, -16510092},
- },
- {
- FieldElement{-16160072, 5472695, 31895588, 4744994, 8823515, 10365685, -27224800, 9448613, -28774454, 366295},
- FieldElement{19153450, 11523972, -11096490, -6503142, -24647631, 5420647, 28344573, 8041113, 719605, 11671788},
- FieldElement{8678025, 2694440, -6808014, 2517372, 4964326, 11152271, -15432916, -15266516, 27000813, -10195553},
- },
- {
- FieldElement{-15157904, 7134312, 8639287, -2814877, -7235688, 10421742, 564065, 5336097, 6750977, -14521026},
- FieldElement{11836410, -3979488, 26297894, 16080799, 23455045, 15735944, 1695823, -8819122, 8169720, 16220347},
- FieldElement{-18115838, 8653647, 17578566, -6092619, -8025777, -16012763, -11144307, -2627664, -5990708, -14166033},
- },
- {
- FieldElement{-23308498, -10968312, 15213228, -10081214, -30853605, -11050004, 27884329, 2847284, 2655861, 1738395},
- FieldElement{-27537433, -14253021, -25336301, -8002780, -9370762, 8129821, 21651608, -3239336, -19087449, -11005278},
- FieldElement{1533110, 3437855, 23735889, 459276, 29970501, 11335377, 26030092, 5821408, 10478196, 8544890},
- },
- {
- FieldElement{32173121, -16129311, 24896207, 3921497, 22579056, -3410854, 19270449, 12217473, 17789017, -3395995},
- FieldElement{-30552961, -2228401, -15578829, -10147201, 13243889, 517024, 15479401, -3853233, 30460520, 1052596},
- FieldElement{-11614875, 13323618, 32618793, 8175907, -15230173, 12596687, 27491595, -4612359, 3179268, -9478891},
- },
- {
- FieldElement{31947069, -14366651, -4640583, -15339921, -15125977, -6039709, -14756777, -16411740, 19072640, -9511060},
- FieldElement{11685058, 11822410, 3158003, -13952594, 33402194, -4165066, 5977896, -5215017, 473099, 5040608},
- FieldElement{-20290863, 8198642, -27410132, 11602123, 1290375, -2799760, 28326862, 1721092, -19558642, -3131606},
- },
- },
- {
- {
- FieldElement{7881532, 10687937, 7578723, 7738378, -18951012, -2553952, 21820786, 8076149, -27868496, 11538389},
- FieldElement{-19935666, 3899861, 18283497, -6801568, -15728660, -11249211, 8754525, 7446702, -5676054, 5797016},
- FieldElement{-11295600, -3793569, -15782110, -7964573, 12708869, -8456199, 2014099, -9050574, -2369172, -5877341},
- },
- {
- FieldElement{-22472376, -11568741, -27682020, 1146375, 18956691, 16640559, 1192730, -3714199, 15123619, 10811505},
- FieldElement{14352098, -3419715, -18942044, 10822655, 32750596, 4699007, -70363, 15776356, -28886779, -11974553},
- FieldElement{-28241164, -8072475, -4978962, -5315317, 29416931, 1847569, -20654173, -16484855, 4714547, -9600655},
- },
- {
- FieldElement{15200332, 8368572, 19679101, 15970074, -31872674, 1959451, 24611599, -4543832, -11745876, 12340220},
- FieldElement{12876937, -10480056, 33134381, 6590940, -6307776, 14872440, 9613953, 8241152, 15370987, 9608631},
- FieldElement{-4143277, -12014408, 8446281, -391603, 4407738, 13629032, -7724868, 15866074, -28210621, -8814099},
- },
- {
- FieldElement{26660628, -15677655, 8393734, 358047, -7401291, 992988, -23904233, 858697, 20571223, 8420556},
- FieldElement{14620715, 13067227, -15447274, 8264467, 14106269, 15080814, 33531827, 12516406, -21574435, -12476749},
- FieldElement{236881, 10476226, 57258, -14677024, 6472998, 2466984, 17258519, 7256740, 8791136, 15069930},
- },
- {
- FieldElement{1276410, -9371918, 22949635, -16322807, -23493039, -5702186, 14711875, 4874229, -30663140, -2331391},
- FieldElement{5855666, 4990204, -13711848, 7294284, -7804282, 1924647, -1423175, -7912378, -33069337, 9234253},
- FieldElement{20590503, -9018988, 31529744, -7352666, -2706834, 10650548, 31559055, -11609587, 18979186, 13396066},
- },
- {
- FieldElement{24474287, 4968103, 22267082, 4407354, 24063882, -8325180, -18816887, 13594782, 33514650, 7021958},
- FieldElement{-11566906, -6565505, -21365085, 15928892, -26158305, 4315421, -25948728, -3916677, -21480480, 12868082},
- FieldElement{-28635013, 13504661, 19988037, -2132761, 21078225, 6443208, -21446107, 2244500, -12455797, -8089383},
- },
- {
- FieldElement{-30595528, 13793479, -5852820, 319136, -25723172, -6263899, 33086546, 8957937, -15233648, 5540521},
- FieldElement{-11630176, -11503902, -8119500, -7643073, 2620056, 1022908, -23710744, -1568984, -16128528, -14962807},
- FieldElement{23152971, 775386, 27395463, 14006635, -9701118, 4649512, 1689819, 892185, -11513277, -15205948},
- },
- {
- FieldElement{9770129, 9586738, 26496094, 4324120, 1556511, -3550024, 27453819, 4763127, -19179614, 5867134},
- FieldElement{-32765025, 1927590, 31726409, -4753295, 23962434, -16019500, 27846559, 5931263, -29749703, -16108455},
- FieldElement{27461885, -2977536, 22380810, 1815854, -23033753, -3031938, 7283490, -15148073, -19526700, 7734629},
- },
- },
- {
- {
- FieldElement{-8010264, -9590817, -11120403, 6196038, 29344158, -13430885, 7585295, -3176626, 18549497, 15302069},
- FieldElement{-32658337, -6171222, -7672793, -11051681, 6258878, 13504381, 10458790, -6418461, -8872242, 8424746},
- FieldElement{24687205, 8613276, -30667046, -3233545, 1863892, -1830544, 19206234, 7134917, -11284482, -828919},
- },
- {
- FieldElement{11334899, -9218022, 8025293, 12707519, 17523892, -10476071, 10243738, -14685461, -5066034, 16498837},
- FieldElement{8911542, 6887158, -9584260, -6958590, 11145641, -9543680, 17303925, -14124238, 6536641, 10543906},
- FieldElement{-28946384, 15479763, -17466835, 568876, -1497683, 11223454, -2669190, -16625574, -27235709, 8876771},
- },
- {
- FieldElement{-25742899, -12566864, -15649966, -846607, -33026686, -796288, -33481822, 15824474, -604426, -9039817},
- FieldElement{10330056, 70051, 7957388, -9002667, 9764902, 15609756, 27698697, -4890037, 1657394, 3084098},
- FieldElement{10477963, -7470260, 12119566, -13250805, 29016247, -5365589, 31280319, 14396151, -30233575, 15272409},
- },
- {
- FieldElement{-12288309, 3169463, 28813183, 16658753, 25116432, -5630466, -25173957, -12636138, -25014757, 1950504},
- FieldElement{-26180358, 9489187, 11053416, -14746161, -31053720, 5825630, -8384306, -8767532, 15341279, 8373727},
- FieldElement{28685821, 7759505, -14378516, -12002860, -31971820, 4079242, 298136, -10232602, -2878207, 15190420},
- },
- {
- FieldElement{-32932876, 13806336, -14337485, -15794431, -24004620, 10940928, 8669718, 2742393, -26033313, -6875003},
- FieldElement{-1580388, -11729417, -25979658, -11445023, -17411874, -10912854, 9291594, -16247779, -12154742, 6048605},
- FieldElement{-30305315, 14843444, 1539301, 11864366, 20201677, 1900163, 13934231, 5128323, 11213262, 9168384},
- },
- {
- FieldElement{-26280513, 11007847, 19408960, -940758, -18592965, -4328580, -5088060, -11105150, 20470157, -16398701},
- FieldElement{-23136053, 9282192, 14855179, -15390078, -7362815, -14408560, -22783952, 14461608, 14042978, 5230683},
- FieldElement{29969567, -2741594, -16711867, -8552442, 9175486, -2468974, 21556951, 3506042, -5933891, -12449708},
- },
- {
- FieldElement{-3144746, 8744661, 19704003, 4581278, -20430686, 6830683, -21284170, 8971513, -28539189, 15326563},
- FieldElement{-19464629, 10110288, -17262528, -3503892, -23500387, 1355669, -15523050, 15300988, -20514118, 9168260},
- FieldElement{-5353335, 4488613, -23803248, 16314347, 7780487, -15638939, -28948358, 9601605, 33087103, -9011387},
- },
- {
- FieldElement{-19443170, -15512900, -20797467, -12445323, -29824447, 10229461, -27444329, -15000531, -5996870, 15664672},
- FieldElement{23294591, -16632613, -22650781, -8470978, 27844204, 11461195, 13099750, -2460356, 18151676, 13417686},
- FieldElement{-24722913, -4176517, -31150679, 5988919, -26858785, 6685065, 1661597, -12551441, 15271676, -15452665},
- },
- },
- {
- {
- FieldElement{11433042, -13228665, 8239631, -5279517, -1985436, -725718, -18698764, 2167544, -6921301, -13440182},
- FieldElement{-31436171, 15575146, 30436815, 12192228, -22463353, 9395379, -9917708, -8638997, 12215110, 12028277},
- FieldElement{14098400, 6555944, 23007258, 5757252, -15427832, -12950502, 30123440, 4617780, -16900089, -655628},
- },
- {
- FieldElement{-4026201, -15240835, 11893168, 13718664, -14809462, 1847385, -15819999, 10154009, 23973261, -12684474},
- FieldElement{-26531820, -3695990, -1908898, 2534301, -31870557, -16550355, 18341390, -11419951, 32013174, -10103539},
- FieldElement{-25479301, 10876443, -11771086, -14625140, -12369567, 1838104, 21911214, 6354752, 4425632, -837822},
- },
- {
- FieldElement{-10433389, -14612966, 22229858, -3091047, -13191166, 776729, -17415375, -12020462, 4725005, 14044970},
- FieldElement{19268650, -7304421, 1555349, 8692754, -21474059, -9910664, 6347390, -1411784, -19522291, -16109756},
- FieldElement{-24864089, 12986008, -10898878, -5558584, -11312371, -148526, 19541418, 8180106, 9282262, 10282508},
- },
- {
- FieldElement{-26205082, 4428547, -8661196, -13194263, 4098402, -14165257, 15522535, 8372215, 5542595, -10702683},
- FieldElement{-10562541, 14895633, 26814552, -16673850, -17480754, -2489360, -2781891, 6993761, -18093885, 10114655},
- FieldElement{-20107055, -929418, 31422704, 10427861, -7110749, 6150669, -29091755, -11529146, 25953725, -106158},
- },
- {
- FieldElement{-4234397, -8039292, -9119125, 3046000, 2101609, -12607294, 19390020, 6094296, -3315279, 12831125},
- FieldElement{-15998678, 7578152, 5310217, 14408357, -33548620, -224739, 31575954, 6326196, 7381791, -2421839},
- FieldElement{-20902779, 3296811, 24736065, -16328389, 18374254, 7318640, 6295303, 8082724, -15362489, 12339664},
- },
- {
- FieldElement{27724736, 2291157, 6088201, -14184798, 1792727, 5857634, 13848414, 15768922, 25091167, 14856294},
- FieldElement{-18866652, 8331043, 24373479, 8541013, -701998, -9269457, 12927300, -12695493, -22182473, -9012899},
- FieldElement{-11423429, -5421590, 11632845, 3405020, 30536730, -11674039, -27260765, 13866390, 30146206, 9142070},
- },
- {
- FieldElement{3924129, -15307516, -13817122, -10054960, 12291820, -668366, -27702774, 9326384, -8237858, 4171294},
- FieldElement{-15921940, 16037937, 6713787, 16606682, -21612135, 2790944, 26396185, 3731949, 345228, -5462949},
- FieldElement{-21327538, 13448259, 25284571, 1143661, 20614966, -8849387, 2031539, -12391231, -16253183, -13582083},
- },
- {
- FieldElement{31016211, -16722429, 26371392, -14451233, -5027349, 14854137, 17477601, 3842657, 28012650, -16405420},
- FieldElement{-5075835, 9368966, -8562079, -4600902, -15249953, 6970560, -9189873, 16292057, -8867157, 3507940},
- FieldElement{29439664, 3537914, 23333589, 6997794, -17555561, -11018068, -15209202, -15051267, -9164929, 6580396},
- },
- },
- {
- {
- FieldElement{-12185861, -7679788, 16438269, 10826160, -8696817, -6235611, 17860444, -9273846, -2095802, 9304567},
- FieldElement{20714564, -4336911, 29088195, 7406487, 11426967, -5095705, 14792667, -14608617, 5289421, -477127},
- FieldElement{-16665533, -10650790, -6160345, -13305760, 9192020, -1802462, 17271490, 12349094, 26939669, -3752294},
- },
- {
- FieldElement{-12889898, 9373458, 31595848, 16374215, 21471720, 13221525, -27283495, -12348559, -3698806, 117887},
- FieldElement{22263325, -6560050, 3984570, -11174646, -15114008, -566785, 28311253, 5358056, -23319780, 541964},
- FieldElement{16259219, 3261970, 2309254, -15534474, -16885711, -4581916, 24134070, -16705829, -13337066, -13552195},
- },
- {
- FieldElement{9378160, -13140186, -22845982, -12745264, 28198281, -7244098, -2399684, -717351, 690426, 14876244},
- FieldElement{24977353, -314384, -8223969, -13465086, 28432343, -1176353, -13068804, -12297348, -22380984, 6618999},
- FieldElement{-1538174, 11685646, 12944378, 13682314, -24389511, -14413193, 8044829, -13817328, 32239829, -5652762},
- },
- {
- FieldElement{-18603066, 4762990, -926250, 8885304, -28412480, -3187315, 9781647, -10350059, 32779359, 5095274},
- FieldElement{-33008130, -5214506, -32264887, -3685216, 9460461, -9327423, -24601656, 14506724, 21639561, -2630236},
- FieldElement{-16400943, -13112215, 25239338, 15531969, 3987758, -4499318, -1289502, -6863535, 17874574, 558605},
- },
- {
- FieldElement{-13600129, 10240081, 9171883, 16131053, -20869254, 9599700, 33499487, 5080151, 2085892, 5119761},
- FieldElement{-22205145, -2519528, -16381601, 414691, -25019550, 2170430, 30634760, -8363614, -31999993, -5759884},
- FieldElement{-6845704, 15791202, 8550074, -1312654, 29928809, -12092256, 27534430, -7192145, -22351378, 12961482},
- },
- {
- FieldElement{-24492060, -9570771, 10368194, 11582341, -23397293, -2245287, 16533930, 8206996, -30194652, -5159638},
- FieldElement{-11121496, -3382234, 2307366, 6362031, -135455, 8868177, -16835630, 7031275, 7589640, 8945490},
- FieldElement{-32152748, 8917967, 6661220, -11677616, -1192060, -15793393, 7251489, -11182180, 24099109, -14456170},
- },
- {
- FieldElement{5019558, -7907470, 4244127, -14714356, -26933272, 6453165, -19118182, -13289025, -6231896, -10280736},
- FieldElement{10853594, 10721687, 26480089, 5861829, -22995819, 1972175, -1866647, -10557898, -3363451, -6441124},
- FieldElement{-17002408, 5906790, 221599, -6563147, 7828208, -13248918, 24362661, -2008168, -13866408, 7421392},
- },
- {
- FieldElement{8139927, -6546497, 32257646, -5890546, 30375719, 1886181, -21175108, 15441252, 28826358, -4123029},
- FieldElement{6267086, 9695052, 7709135, -16603597, -32869068, -1886135, 14795160, -7840124, 13746021, -1742048},
- FieldElement{28584902, 7787108, -6732942, -15050729, 22846041, -7571236, -3181936, -363524, 4771362, -8419958},
- },
- },
- {
- {
- FieldElement{24949256, 6376279, -27466481, -8174608, -18646154, -9930606, 33543569, -12141695, 3569627, 11342593},
- FieldElement{26514989, 4740088, 27912651, 3697550, 19331575, -11472339, 6809886, 4608608, 7325975, -14801071},
- FieldElement{-11618399, -14554430, -24321212, 7655128, -1369274, 5214312, -27400540, 10258390, -17646694, -8186692},
- },
- {
- FieldElement{11431204, 15823007, 26570245, 14329124, 18029990, 4796082, -31446179, 15580664, 9280358, -3973687},
- FieldElement{-160783, -10326257, -22855316, -4304997, -20861367, -13621002, -32810901, -11181622, -15545091, 4387441},
- FieldElement{-20799378, 12194512, 3937617, -5805892, -27154820, 9340370, -24513992, 8548137, 20617071, -7482001},
- },
- {
- FieldElement{-938825, -3930586, -8714311, 16124718, 24603125, -6225393, -13775352, -11875822, 24345683, 10325460},
- FieldElement{-19855277, -1568885, -22202708, 8714034, 14007766, 6928528, 16318175, -1010689, 4766743, 3552007},
- FieldElement{-21751364, -16730916, 1351763, -803421, -4009670, 3950935, 3217514, 14481909, 10988822, -3994762},
- },
- {
- FieldElement{15564307, -14311570, 3101243, 5684148, 30446780, -8051356, 12677127, -6505343, -8295852, 13296005},
- FieldElement{-9442290, 6624296, -30298964, -11913677, -4670981, -2057379, 31521204, 9614054, -30000824, 12074674},
- FieldElement{4771191, -135239, 14290749, -13089852, 27992298, 14998318, -1413936, -1556716, 29832613, -16391035},
- },
- {
- FieldElement{7064884, -7541174, -19161962, -5067537, -18891269, -2912736, 25825242, 5293297, -27122660, 13101590},
- FieldElement{-2298563, 2439670, -7466610, 1719965, -27267541, -16328445, 32512469, -5317593, -30356070, -4190957},
- FieldElement{-30006540, 10162316, -33180176, 3981723, -16482138, -13070044, 14413974, 9515896, 19568978, 9628812},
- },
- {
- FieldElement{33053803, 199357, 15894591, 1583059, 27380243, -4580435, -17838894, -6106839, -6291786, 3437740},
- FieldElement{-18978877, 3884493, 19469877, 12726490, 15913552, 13614290, -22961733, 70104, 7463304, 4176122},
- FieldElement{-27124001, 10659917, 11482427, -16070381, 12771467, -6635117, -32719404, -5322751, 24216882, 5944158},
- },
- {
- FieldElement{8894125, 7450974, -2664149, -9765752, -28080517, -12389115, 19345746, 14680796, 11632993, 5847885},
- FieldElement{26942781, -2315317, 9129564, -4906607, 26024105, 11769399, -11518837, 6367194, -9727230, 4782140},
- FieldElement{19916461, -4828410, -22910704, -11414391, 25606324, -5972441, 33253853, 8220911, 6358847, -1873857},
- },
- {
- FieldElement{801428, -2081702, 16569428, 11065167, 29875704, 96627, 7908388, -4480480, -13538503, 1387155},
- FieldElement{19646058, 5720633, -11416706, 12814209, 11607948, 12749789, 14147075, 15156355, -21866831, 11835260},
- FieldElement{19299512, 1155910, 28703737, 14890794, 2925026, 7269399, 26121523, 15467869, -26560550, 5052483},
- },
- },
- {
- {
- FieldElement{-3017432, 10058206, 1980837, 3964243, 22160966, 12322533, -6431123, -12618185, 12228557, -7003677},
- FieldElement{32944382, 14922211, -22844894, 5188528, 21913450, -8719943, 4001465, 13238564, -6114803, 8653815},
- FieldElement{22865569, -4652735, 27603668, -12545395, 14348958, 8234005, 24808405, 5719875, 28483275, 2841751},
- },
- {
- FieldElement{-16420968, -1113305, -327719, -12107856, 21886282, -15552774, -1887966, -315658, 19932058, -12739203},
- FieldElement{-11656086, 10087521, -8864888, -5536143, -19278573, -3055912, 3999228, 13239134, -4777469, -13910208},
- FieldElement{1382174, -11694719, 17266790, 9194690, -13324356, 9720081, 20403944, 11284705, -14013818, 3093230},
- },
- {
- FieldElement{16650921, -11037932, -1064178, 1570629, -8329746, 7352753, -302424, 16271225, -24049421, -6691850},
- FieldElement{-21911077, -5927941, -4611316, -5560156, -31744103, -10785293, 24123614, 15193618, -21652117, -16739389},
- FieldElement{-9935934, -4289447, -25279823, 4372842, 2087473, 10399484, 31870908, 14690798, 17361620, 11864968},
- },
- {
- FieldElement{-11307610, 6210372, 13206574, 5806320, -29017692, -13967200, -12331205, -7486601, -25578460, -16240689},
- FieldElement{14668462, -12270235, 26039039, 15305210, 25515617, 4542480, 10453892, 6577524, 9145645, -6443880},
- FieldElement{5974874, 3053895, -9433049, -10385191, -31865124, 3225009, -7972642, 3936128, -5652273, -3050304},
- },
- {
- FieldElement{30625386, -4729400, -25555961, -12792866, -20484575, 7695099, 17097188, -16303496, -27999779, 1803632},
- FieldElement{-3553091, 9865099, -5228566, 4272701, -5673832, -16689700, 14911344, 12196514, -21405489, 7047412},
- FieldElement{20093277, 9920966, -11138194, -5343857, 13161587, 12044805, -32856851, 4124601, -32343828, -10257566},
- },
- {
- FieldElement{-20788824, 14084654, -13531713, 7842147, 19119038, -13822605, 4752377, -8714640, -21679658, 2288038},
- FieldElement{-26819236, -3283715, 29965059, 3039786, -14473765, 2540457, 29457502, 14625692, -24819617, 12570232},
- FieldElement{-1063558, -11551823, 16920318, 12494842, 1278292, -5869109, -21159943, -3498680, -11974704, 4724943},
- },
- {
- FieldElement{17960970, -11775534, -4140968, -9702530, -8876562, -1410617, -12907383, -8659932, -29576300, 1903856},
- FieldElement{23134274, -14279132, -10681997, -1611936, 20684485, 15770816, -12989750, 3190296, 26955097, 14109738},
- FieldElement{15308788, 5320727, -30113809, -14318877, 22902008, 7767164, 29425325, -11277562, 31960942, 11934971},
- },
- {
- FieldElement{-27395711, 8435796, 4109644, 12222639, -24627868, 14818669, 20638173, 4875028, 10491392, 1379718},
- FieldElement{-13159415, 9197841, 3875503, -8936108, -1383712, -5879801, 33518459, 16176658, 21432314, 12180697},
- FieldElement{-11787308, 11500838, 13787581, -13832590, -22430679, 10140205, 1465425, 12689540, -10301319, -13872883},
- },
- },
- {
- {
- FieldElement{5414091, -15386041, -21007664, 9643570, 12834970, 1186149, -2622916, -1342231, 26128231, 6032912},
- FieldElement{-26337395, -13766162, 32496025, -13653919, 17847801, -12669156, 3604025, 8316894, -25875034, -10437358},
- FieldElement{3296484, 6223048, 24680646, -12246460, -23052020, 5903205, -8862297, -4639164, 12376617, 3188849},
- },
- {
- FieldElement{29190488, -14659046, 27549113, -1183516, 3520066, -10697301, 32049515, -7309113, -16109234, -9852307},
- FieldElement{-14744486, -9309156, 735818, -598978, -20407687, -5057904, 25246078, -15795669, 18640741, -960977},
- FieldElement{-6928835, -16430795, 10361374, 5642961, 4910474, 12345252, -31638386, -494430, 10530747, 1053335},
- },
- {
- FieldElement{-29265967, -14186805, -13538216, -12117373, -19457059, -10655384, -31462369, -2948985, 24018831, 15026644},
- FieldElement{-22592535, -3145277, -2289276, 5953843, -13440189, 9425631, 25310643, 13003497, -2314791, -15145616},
- FieldElement{-27419985, -603321, -8043984, -1669117, -26092265, 13987819, -27297622, 187899, -23166419, -2531735},
- },
- {
- FieldElement{-21744398, -13810475, 1844840, 5021428, -10434399, -15911473, 9716667, 16266922, -5070217, 726099},
- FieldElement{29370922, -6053998, 7334071, -15342259, 9385287, 2247707, -13661962, -4839461, 30007388, -15823341},
- FieldElement{-936379, 16086691, 23751945, -543318, -1167538, -5189036, 9137109, 730663, 9835848, 4555336},
- },
- {
- FieldElement{-23376435, 1410446, -22253753, -12899614, 30867635, 15826977, 17693930, 544696, -11985298, 12422646},
- FieldElement{31117226, -12215734, -13502838, 6561947, -9876867, -12757670, -5118685, -4096706, 29120153, 13924425},
- FieldElement{-17400879, -14233209, 19675799, -2734756, -11006962, -5858820, -9383939, -11317700, 7240931, -237388},
- },
- {
- FieldElement{-31361739, -11346780, -15007447, -5856218, -22453340, -12152771, 1222336, 4389483, 3293637, -15551743},
- FieldElement{-16684801, -14444245, 11038544, 11054958, -13801175, -3338533, -24319580, 7733547, 12796905, -6335822},
- FieldElement{-8759414, -10817836, -25418864, 10783769, -30615557, -9746811, -28253339, 3647836, 3222231, -11160462},
- },
- {
- FieldElement{18606113, 1693100, -25448386, -15170272, 4112353, 10045021, 23603893, -2048234, -7550776, 2484985},
- FieldElement{9255317, -3131197, -12156162, -1004256, 13098013, -9214866, 16377220, -2102812, -19802075, -3034702},
- FieldElement{-22729289, 7496160, -5742199, 11329249, 19991973, -3347502, -31718148, 9936966, -30097688, -10618797},
- },
- {
- FieldElement{21878590, -5001297, 4338336, 13643897, -3036865, 13160960, 19708896, 5415497, -7360503, -4109293},
- FieldElement{27736861, 10103576, 12500508, 8502413, -3413016, -9633558, 10436918, -1550276, -23659143, -8132100},
- FieldElement{19492550, -12104365, -29681976, -852630, -3208171, 12403437, 30066266, 8367329, 13243957, 8709688},
- },
- },
- {
- {
- FieldElement{12015105, 2801261, 28198131, 10151021, 24818120, -4743133, -11194191, -5645734, 5150968, 7274186},
- FieldElement{2831366, -12492146, 1478975, 6122054, 23825128, -12733586, 31097299, 6083058, 31021603, -9793610},
- FieldElement{-2529932, -2229646, 445613, 10720828, -13849527, -11505937, -23507731, 16354465, 15067285, -14147707},
- },
- {
- FieldElement{7840942, 14037873, -33364863, 15934016, -728213, -3642706, 21403988, 1057586, -19379462, -12403220},
- FieldElement{915865, -16469274, 15608285, -8789130, -24357026, 6060030, -17371319, 8410997, -7220461, 16527025},
- FieldElement{32922597, -556987, 20336074, -16184568, 10903705, -5384487, 16957574, 52992, 23834301, 6588044},
- },
- {
- FieldElement{32752030, 11232950, 3381995, -8714866, 22652988, -10744103, 17159699, 16689107, -20314580, -1305992},
- FieldElement{-4689649, 9166776, -25710296, -10847306, 11576752, 12733943, 7924251, -2752281, 1976123, -7249027},
- FieldElement{21251222, 16309901, -2983015, -6783122, 30810597, 12967303, 156041, -3371252, 12331345, -8237197},
- },
- {
- FieldElement{8651614, -4477032, -16085636, -4996994, 13002507, 2950805, 29054427, -5106970, 10008136, -4667901},
- FieldElement{31486080, 15114593, -14261250, 12951354, 14369431, -7387845, 16347321, -13662089, 8684155, -10532952},
- FieldElement{19443825, 11385320, 24468943, -9659068, -23919258, 2187569, -26263207, -6086921, 31316348, 14219878},
- },
- {
- FieldElement{-28594490, 1193785, 32245219, 11392485, 31092169, 15722801, 27146014, 6992409, 29126555, 9207390},
- FieldElement{32382935, 1110093, 18477781, 11028262, -27411763, -7548111, -4980517, 10843782, -7957600, -14435730},
- FieldElement{2814918, 7836403, 27519878, -7868156, -20894015, -11553689, -21494559, 8550130, 28346258, 1994730},
- },
- {
- FieldElement{-19578299, 8085545, -14000519, -3948622, 2785838, -16231307, -19516951, 7174894, 22628102, 8115180},
- FieldElement{-30405132, 955511, -11133838, -15078069, -32447087, -13278079, -25651578, 3317160, -9943017, 930272},
- FieldElement{-15303681, -6833769, 28856490, 1357446, 23421993, 1057177, 24091212, -1388970, -22765376, -10650715},
- },
- {
- FieldElement{-22751231, -5303997, -12907607, -12768866, -15811511, -7797053, -14839018, -16554220, -1867018, 8398970},
- FieldElement{-31969310, 2106403, -4736360, 1362501, 12813763, 16200670, 22981545, -6291273, 18009408, -15772772},
- FieldElement{-17220923, -9545221, -27784654, 14166835, 29815394, 7444469, 29551787, -3727419, 19288549, 1325865},
- },
- {
- FieldElement{15100157, -15835752, -23923978, -1005098, -26450192, 15509408, 12376730, -3479146, 33166107, -8042750},
- FieldElement{20909231, 13023121, -9209752, 16251778, -5778415, -8094914, 12412151, 10018715, 2213263, -13878373},
- FieldElement{32529814, -11074689, 30361439, -16689753, -9135940, 1513226, 22922121, 6382134, -5766928, 8371348},
- },
- },
- {
- {
- FieldElement{9923462, 11271500, 12616794, 3544722, -29998368, -1721626, 12891687, -8193132, -26442943, 10486144},
- FieldElement{-22597207, -7012665, 8587003, -8257861, 4084309, -12970062, 361726, 2610596, -23921530, -11455195},
- FieldElement{5408411, -1136691, -4969122, 10561668, 24145918, 14240566, 31319731, -4235541, 19985175, -3436086},
- },
- {
- FieldElement{-13994457, 16616821, 14549246, 3341099, 32155958, 13648976, -17577068, 8849297, 65030, 8370684},
- FieldElement{-8320926, -12049626, 31204563, 5839400, -20627288, -1057277, -19442942, 6922164, 12743482, -9800518},
- FieldElement{-2361371, 12678785, 28815050, 4759974, -23893047, 4884717, 23783145, 11038569, 18800704, 255233},
- },
- {
- FieldElement{-5269658, -1773886, 13957886, 7990715, 23132995, 728773, 13393847, 9066957, 19258688, -14753793},
- FieldElement{-2936654, -10827535, -10432089, 14516793, -3640786, 4372541, -31934921, 2209390, -1524053, 2055794},
- FieldElement{580882, 16705327, 5468415, -2683018, -30926419, -14696000, -7203346, -8994389, -30021019, 7394435},
- },
- {
- FieldElement{23838809, 1822728, -15738443, 15242727, 8318092, -3733104, -21672180, -3492205, -4821741, 14799921},
- FieldElement{13345610, 9759151, 3371034, -16137791, 16353039, 8577942, 31129804, 13496856, -9056018, 7402518},
- FieldElement{2286874, -4435931, -20042458, -2008336, -13696227, 5038122, 11006906, -15760352, 8205061, 1607563},
- },
- {
- FieldElement{14414086, -8002132, 3331830, -3208217, 22249151, -5594188, 18364661, -2906958, 30019587, -9029278},
- FieldElement{-27688051, 1585953, -10775053, 931069, -29120221, -11002319, -14410829, 12029093, 9944378, 8024},
- FieldElement{4368715, -3709630, 29874200, -15022983, -20230386, -11410704, -16114594, -999085, -8142388, 5640030},
- },
- {
- FieldElement{10299610, 13746483, 11661824, 16234854, 7630238, 5998374, 9809887, -16694564, 15219798, -14327783},
- FieldElement{27425505, -5719081, 3055006, 10660664, 23458024, 595578, -15398605, -1173195, -18342183, 9742717},
- FieldElement{6744077, 2427284, 26042789, 2720740, -847906, 1118974, 32324614, 7406442, 12420155, 1994844},
- },
- {
- FieldElement{14012521, -5024720, -18384453, -9578469, -26485342, -3936439, -13033478, -10909803, 24319929, -6446333},
- FieldElement{16412690, -4507367, 10772641, 15929391, -17068788, -4658621, 10555945, -10484049, -30102368, -4739048},
- FieldElement{22397382, -7767684, -9293161, -12792868, 17166287, -9755136, -27333065, 6199366, 21880021, -12250760},
- },
- {
- FieldElement{-4283307, 5368523, -31117018, 8163389, -30323063, 3209128, 16557151, 8890729, 8840445, 4957760},
- FieldElement{-15447727, 709327, -6919446, -10870178, -29777922, 6522332, -21720181, 12130072, -14796503, 5005757},
- FieldElement{-2114751, -14308128, 23019042, 15765735, -25269683, 6002752, 10183197, -13239326, -16395286, -2176112},
- },
- },
- {
- {
- FieldElement{-19025756, 1632005, 13466291, -7995100, -23640451, 16573537, -32013908, -3057104, 22208662, 2000468},
- FieldElement{3065073, -1412761, -25598674, -361432, -17683065, -5703415, -8164212, 11248527, -3691214, -7414184},
- FieldElement{10379208, -6045554, 8877319, 1473647, -29291284, -12507580, 16690915, 2553332, -3132688, 16400289},
- },
- {
- FieldElement{15716668, 1254266, -18472690, 7446274, -8448918, 6344164, -22097271, -7285580, 26894937, 9132066},
- FieldElement{24158887, 12938817, 11085297, -8177598, -28063478, -4457083, -30576463, 64452, -6817084, -2692882},
- FieldElement{13488534, 7794716, 22236231, 5989356, 25426474, -12578208, 2350710, -3418511, -4688006, 2364226},
- },
- {
- FieldElement{16335052, 9132434, 25640582, 6678888, 1725628, 8517937, -11807024, -11697457, 15445875, -7798101},
- FieldElement{29004207, -7867081, 28661402, -640412, -12794003, -7943086, 31863255, -4135540, -278050, -15759279},
- FieldElement{-6122061, -14866665, -28614905, 14569919, -10857999, -3591829, 10343412, -6976290, -29828287, -10815811},
- },
- {
- FieldElement{27081650, 3463984, 14099042, -4517604, 1616303, -6205604, 29542636, 15372179, 17293797, 960709},
- FieldElement{20263915, 11434237, -5765435, 11236810, 13505955, -10857102, -16111345, 6493122, -19384511, 7639714},
- FieldElement{-2830798, -14839232, 25403038, -8215196, -8317012, -16173699, 18006287, -16043750, 29994677, -15808121},
- },
- {
- FieldElement{9769828, 5202651, -24157398, -13631392, -28051003, -11561624, -24613141, -13860782, -31184575, 709464},
- FieldElement{12286395, 13076066, -21775189, -1176622, -25003198, 4057652, -32018128, -8890874, 16102007, 13205847},
- FieldElement{13733362, 5599946, 10557076, 3195751, -5557991, 8536970, -25540170, 8525972, 10151379, 10394400},
- },
- {
- FieldElement{4024660, -16137551, 22436262, 12276534, -9099015, -2686099, 19698229, 11743039, -33302334, 8934414},
- FieldElement{-15879800, -4525240, -8580747, -2934061, 14634845, -698278, -9449077, 3137094, -11536886, 11721158},
- FieldElement{17555939, -5013938, 8268606, 2331751, -22738815, 9761013, 9319229, 8835153, -9205489, -1280045},
- },
- {
- FieldElement{-461409, -7830014, 20614118, 16688288, -7514766, -4807119, 22300304, 505429, 6108462, -6183415},
- FieldElement{-5070281, 12367917, -30663534, 3234473, 32617080, -8422642, 29880583, -13483331, -26898490, -7867459},
- FieldElement{-31975283, 5726539, 26934134, 10237677, -3173717, -605053, 24199304, 3795095, 7592688, -14992079},
- },
- {
- FieldElement{21594432, -14964228, 17466408, -4077222, 32537084, 2739898, 6407723, 12018833, -28256052, 4298412},
- FieldElement{-20650503, -11961496, -27236275, 570498, 3767144, -1717540, 13891942, -1569194, 13717174, 10805743},
- FieldElement{-14676630, -15644296, 15287174, 11927123, 24177847, -8175568, -796431, 14860609, -26938930, -5863836},
- },
- },
- {
- {
- FieldElement{12962541, 5311799, -10060768, 11658280, 18855286, -7954201, 13286263, -12808704, -4381056, 9882022},
- FieldElement{18512079, 11319350, -20123124, 15090309, 18818594, 5271736, -22727904, 3666879, -23967430, -3299429},
- FieldElement{-6789020, -3146043, 16192429, 13241070, 15898607, -14206114, -10084880, -6661110, -2403099, 5276065},
- },
- {
- FieldElement{30169808, -5317648, 26306206, -11750859, 27814964, 7069267, 7152851, 3684982, 1449224, 13082861},
- FieldElement{10342826, 3098505, 2119311, 193222, 25702612, 12233820, 23697382, 15056736, -21016438, -8202000},
- FieldElement{-33150110, 3261608, 22745853, 7948688, 19370557, -15177665, -26171976, 6482814, -10300080, -11060101},
- },
- {
- FieldElement{32869458, -5408545, 25609743, 15678670, -10687769, -15471071, 26112421, 2521008, -22664288, 6904815},
- FieldElement{29506923, 4457497, 3377935, -9796444, -30510046, 12935080, 1561737, 3841096, -29003639, -6657642},
- FieldElement{10340844, -6630377, -18656632, -2278430, 12621151, -13339055, 30878497, -11824370, -25584551, 5181966},
- },
- {
- FieldElement{25940115, -12658025, 17324188, -10307374, -8671468, 15029094, 24396252, -16450922, -2322852, -12388574},
- FieldElement{-21765684, 9916823, -1300409, 4079498, -1028346, 11909559, 1782390, 12641087, 20603771, -6561742},
- FieldElement{-18882287, -11673380, 24849422, 11501709, 13161720, -4768874, 1925523, 11914390, 4662781, 7820689},
- },
- {
- FieldElement{12241050, -425982, 8132691, 9393934, 32846760, -1599620, 29749456, 12172924, 16136752, 15264020},
- FieldElement{-10349955, -14680563, -8211979, 2330220, -17662549, -14545780, 10658213, 6671822, 19012087, 3772772},
- FieldElement{3753511, -3421066, 10617074, 2028709, 14841030, -6721664, 28718732, -15762884, 20527771, 12988982},
- },
- {
- FieldElement{-14822485, -5797269, -3707987, 12689773, -898983, -10914866, -24183046, -10564943, 3299665, -12424953},
- FieldElement{-16777703, -15253301, -9642417, 4978983, 3308785, 8755439, 6943197, 6461331, -25583147, 8991218},
- FieldElement{-17226263, 1816362, -1673288, -6086439, 31783888, -8175991, -32948145, 7417950, -30242287, 1507265},
- },
- {
- FieldElement{29692663, 6829891, -10498800, 4334896, 20945975, -11906496, -28887608, 8209391, 14606362, -10647073},
- FieldElement{-3481570, 8707081, 32188102, 5672294, 22096700, 1711240, -33020695, 9761487, 4170404, -2085325},
- FieldElement{-11587470, 14855945, -4127778, -1531857, -26649089, 15084046, 22186522, 16002000, -14276837, -8400798},
- },
- {
- FieldElement{-4811456, 13761029, -31703877, -2483919, -3312471, 7869047, -7113572, -9620092, 13240845, 10965870},
- FieldElement{-7742563, -8256762, -14768334, -13656260, -23232383, 12387166, 4498947, 14147411, 29514390, 4302863},
- FieldElement{-13413405, -12407859, 20757302, -13801832, 14785143, 8976368, -5061276, -2144373, 17846988, -13971927},
- },
- },
- {
- {
- FieldElement{-2244452, -754728, -4597030, -1066309, -6247172, 1455299, -21647728, -9214789, -5222701, 12650267},
- FieldElement{-9906797, -16070310, 21134160, 12198166, -27064575, 708126, 387813, 13770293, -19134326, 10958663},
- FieldElement{22470984, 12369526, 23446014, -5441109, -21520802, -9698723, -11772496, -11574455, -25083830, 4271862},
- },
- {
- FieldElement{-25169565, -10053642, -19909332, 15361595, -5984358, 2159192, 75375, -4278529, -32526221, 8469673},
- FieldElement{15854970, 4148314, -8893890, 7259002, 11666551, 13824734, -30531198, 2697372, 24154791, -9460943},
- FieldElement{15446137, -15806644, 29759747, 14019369, 30811221, -9610191, -31582008, 12840104, 24913809, 9815020},
- },
- {
- FieldElement{-4709286, -5614269, -31841498, -12288893, -14443537, 10799414, -9103676, 13438769, 18735128, 9466238},
- FieldElement{11933045, 9281483, 5081055, -5183824, -2628162, -4905629, -7727821, -10896103, -22728655, 16199064},
- FieldElement{14576810, 379472, -26786533, -8317236, -29426508, -10812974, -102766, 1876699, 30801119, 2164795},
- },
- {
- FieldElement{15995086, 3199873, 13672555, 13712240, -19378835, -4647646, -13081610, -15496269, -13492807, 1268052},
- FieldElement{-10290614, -3659039, -3286592, 10948818, 23037027, 3794475, -3470338, -12600221, -17055369, 3565904},
- FieldElement{29210088, -9419337, -5919792, -4952785, 10834811, -13327726, -16512102, -10820713, -27162222, -14030531},
- },
- {
- FieldElement{-13161890, 15508588, 16663704, -8156150, -28349942, 9019123, -29183421, -3769423, 2244111, -14001979},
- FieldElement{-5152875, -3800936, -9306475, -6071583, 16243069, 14684434, -25673088, -16180800, 13491506, 4641841},
- FieldElement{10813417, 643330, -19188515, -728916, 30292062, -16600078, 27548447, -7721242, 14476989, -12767431},
- },
- {
- FieldElement{10292079, 9984945, 6481436, 8279905, -7251514, 7032743, 27282937, -1644259, -27912810, 12651324},
- FieldElement{-31185513, -813383, 22271204, 11835308, 10201545, 15351028, 17099662, 3988035, 21721536, -3148940},
- FieldElement{10202177, -6545839, -31373232, -9574638, -32150642, -8119683, -12906320, 3852694, 13216206, 14842320},
- },
- {
- FieldElement{-15815640, -10601066, -6538952, -7258995, -6984659, -6581778, -31500847, 13765824, -27434397, 9900184},
- FieldElement{14465505, -13833331, -32133984, -14738873, -27443187, 12990492, 33046193, 15796406, -7051866, -8040114},
- FieldElement{30924417, -8279620, 6359016, -12816335, 16508377, 9071735, -25488601, 15413635, 9524356, -7018878},
- },
- {
- FieldElement{12274201, -13175547, 32627641, -1785326, 6736625, 13267305, 5237659, -5109483, 15663516, 4035784},
- FieldElement{-2951309, 8903985, 17349946, 601635, -16432815, -4612556, -13732739, -15889334, -22258478, 4659091},
- FieldElement{-16916263, -4952973, -30393711, -15158821, 20774812, 15897498, 5736189, 15026997, -2178256, -13455585},
- },
- },
- {
- {
- FieldElement{-8858980, -2219056, 28571666, -10155518, -474467, -10105698, -3801496, 278095, 23440562, -290208},
- FieldElement{10226241, -5928702, 15139956, 120818, -14867693, 5218603, 32937275, 11551483, -16571960, -7442864},
- FieldElement{17932739, -12437276, -24039557, 10749060, 11316803, 7535897, 22503767, 5561594, -3646624, 3898661},
- },
- {
- FieldElement{7749907, -969567, -16339731, -16464, -25018111, 15122143, -1573531, 7152530, 21831162, 1245233},
- FieldElement{26958459, -14658026, 4314586, 8346991, -5677764, 11960072, -32589295, -620035, -30402091, -16716212},
- FieldElement{-12165896, 9166947, 33491384, 13673479, 29787085, 13096535, 6280834, 14587357, -22338025, 13987525},
- },
- {
- FieldElement{-24349909, 7778775, 21116000, 15572597, -4833266, -5357778, -4300898, -5124639, -7469781, -2858068},
- FieldElement{9681908, -6737123, -31951644, 13591838, -6883821, 386950, 31622781, 6439245, -14581012, 4091397},
- FieldElement{-8426427, 1470727, -28109679, -1596990, 3978627, -5123623, -19622683, 12092163, 29077877, -14741988},
- },
- {
- FieldElement{5269168, -6859726, -13230211, -8020715, 25932563, 1763552, -5606110, -5505881, -20017847, 2357889},
- FieldElement{32264008, -15407652, -5387735, -1160093, -2091322, -3946900, 23104804, -12869908, 5727338, 189038},
- FieldElement{14609123, -8954470, -6000566, -16622781, -14577387, -7743898, -26745169, 10942115, -25888931, -14884697},
- },
- {
- FieldElement{20513500, 5557931, -15604613, 7829531, 26413943, -2019404, -21378968, 7471781, 13913677, -5137875},
- FieldElement{-25574376, 11967826, 29233242, 12948236, -6754465, 4713227, -8940970, 14059180, 12878652, 8511905},
- FieldElement{-25656801, 3393631, -2955415, -7075526, -2250709, 9366908, -30223418, 6812974, 5568676, -3127656},
- },
- {
- FieldElement{11630004, 12144454, 2116339, 13606037, 27378885, 15676917, -17408753, -13504373, -14395196, 8070818},
- FieldElement{27117696, -10007378, -31282771, -5570088, 1127282, 12772488, -29845906, 10483306, -11552749, -1028714},
- FieldElement{10637467, -5688064, 5674781, 1072708, -26343588, -6982302, -1683975, 9177853, -27493162, 15431203},
- },
- {
- FieldElement{20525145, 10892566, -12742472, 12779443, -29493034, 16150075, -28240519, 14943142, -15056790, -7935931},
- FieldElement{-30024462, 5626926, -551567, -9981087, 753598, 11981191, 25244767, -3239766, -3356550, 9594024},
- FieldElement{-23752644, 2636870, -5163910, -10103818, 585134, 7877383, 11345683, -6492290, 13352335, -10977084},
- },
- {
- FieldElement{-1931799, -5407458, 3304649, -12884869, 17015806, -4877091, -29783850, -7752482, -13215537, -319204},
- FieldElement{20239939, 6607058, 6203985, 3483793, -18386976, -779229, -20723742, 15077870, -22750759, 14523817},
- FieldElement{27406042, -6041657, 27423596, -4497394, 4996214, 10002360, -28842031, -4545494, -30172742, -4805667},
- },
- },
- {
- {
- FieldElement{11374242, 12660715, 17861383, -12540833, 10935568, 1099227, -13886076, -9091740, -27727044, 11358504},
- FieldElement{-12730809, 10311867, 1510375, 10778093, -2119455, -9145702, 32676003, 11149336, -26123651, 4985768},
- FieldElement{-19096303, 341147, -6197485, -239033, 15756973, -8796662, -983043, 13794114, -19414307, -15621255},
- },
- {
- FieldElement{6490081, 11940286, 25495923, -7726360, 8668373, -8751316, 3367603, 6970005, -1691065, -9004790},
- FieldElement{1656497, 13457317, 15370807, 6364910, 13605745, 8362338, -19174622, -5475723, -16796596, -5031438},
- FieldElement{-22273315, -13524424, -64685, -4334223, -18605636, -10921968, -20571065, -7007978, -99853, -10237333},
- },
- {
- FieldElement{17747465, 10039260, 19368299, -4050591, -20630635, -16041286, 31992683, -15857976, -29260363, -5511971},
- FieldElement{31932027, -4986141, -19612382, 16366580, 22023614, 88450, 11371999, -3744247, 4882242, -10626905},
- FieldElement{29796507, 37186, 19818052, 10115756, -11829032, 3352736, 18551198, 3272828, -5190932, -4162409},
- },
- {
- FieldElement{12501286, 4044383, -8612957, -13392385, -32430052, 5136599, -19230378, -3529697, 330070, -3659409},
- FieldElement{6384877, 2899513, 17807477, 7663917, -2358888, 12363165, 25366522, -8573892, -271295, 12071499},
- FieldElement{-8365515, -4042521, 25133448, -4517355, -6211027, 2265927, -32769618, 1936675, -5159697, 3829363},
- },
- {
- FieldElement{28425966, -5835433, -577090, -4697198, -14217555, 6870930, 7921550, -6567787, 26333140, 14267664},
- FieldElement{-11067219, 11871231, 27385719, -10559544, -4585914, -11189312, 10004786, -8709488, -21761224, 8930324},
- FieldElement{-21197785, -16396035, 25654216, -1725397, 12282012, 11008919, 1541940, 4757911, -26491501, -16408940},
- },
- {
- FieldElement{13537262, -7759490, -20604840, 10961927, -5922820, -13218065, -13156584, 6217254, -15943699, 13814990},
- FieldElement{-17422573, 15157790, 18705543, 29619, 24409717, -260476, 27361681, 9257833, -1956526, -1776914},
- FieldElement{-25045300, -10191966, 15366585, 15166509, -13105086, 8423556, -29171540, 12361135, -18685978, 4578290},
- },
- {
- FieldElement{24579768, 3711570, 1342322, -11180126, -27005135, 14124956, -22544529, 14074919, 21964432, 8235257},
- FieldElement{-6528613, -2411497, 9442966, -5925588, 12025640, -1487420, -2981514, -1669206, 13006806, 2355433},
- FieldElement{-16304899, -13605259, -6632427, -5142349, 16974359, -10911083, 27202044, 1719366, 1141648, -12796236},
- },
- {
- FieldElement{-12863944, -13219986, -8318266, -11018091, -6810145, -4843894, 13475066, -3133972, 32674895, 13715045},
- FieldElement{11423335, -5468059, 32344216, 8962751, 24989809, 9241752, -13265253, 16086212, -28740881, -15642093},
- FieldElement{-1409668, 12530728, -6368726, 10847387, 19531186, -14132160, -11709148, 7791794, -27245943, 4383347},
- },
- },
- {
- {
- FieldElement{-28970898, 5271447, -1266009, -9736989, -12455236, 16732599, -4862407, -4906449, 27193557, 6245191},
- FieldElement{-15193956, 5362278, -1783893, 2695834, 4960227, 12840725, 23061898, 3260492, 22510453, 8577507},
- FieldElement{-12632451, 11257346, -32692994, 13548177, -721004, 10879011, 31168030, 13952092, -29571492, -3635906},
- },
- {
- FieldElement{3877321, -9572739, 32416692, 5405324, -11004407, -13656635, 3759769, 11935320, 5611860, 8164018},
- FieldElement{-16275802, 14667797, 15906460, 12155291, -22111149, -9039718, 32003002, -8832289, 5773085, -8422109},
- FieldElement{-23788118, -8254300, 1950875, 8937633, 18686727, 16459170, -905725, 12376320, 31632953, 190926},
- },
- {
- FieldElement{-24593607, -16138885, -8423991, 13378746, 14162407, 6901328, -8288749, 4508564, -25341555, -3627528},
- FieldElement{8884438, -5884009, 6023974, 10104341, -6881569, -4941533, 18722941, -14786005, -1672488, 827625},
- FieldElement{-32720583, -16289296, -32503547, 7101210, 13354605, 2659080, -1800575, -14108036, -24878478, 1541286},
- },
- {
- FieldElement{2901347, -1117687, 3880376, -10059388, -17620940, -3612781, -21802117, -3567481, 20456845, -1885033},
- FieldElement{27019610, 12299467, -13658288, -1603234, -12861660, -4861471, -19540150, -5016058, 29439641, 15138866},
- FieldElement{21536104, -6626420, -32447818, -10690208, -22408077, 5175814, -5420040, -16361163, 7779328, 109896},
- },
- {
- FieldElement{30279744, 14648750, -8044871, 6425558, 13639621, -743509, 28698390, 12180118, 23177719, -554075},
- FieldElement{26572847, 3405927, -31701700, 12890905, -19265668, 5335866, -6493768, 2378492, 4439158, -13279347},
- FieldElement{-22716706, 3489070, -9225266, -332753, 18875722, -1140095, 14819434, -12731527, -17717757, -5461437},
- },
- {
- FieldElement{-5056483, 16566551, 15953661, 3767752, -10436499, 15627060, -820954, 2177225, 8550082, -15114165},
- FieldElement{-18473302, 16596775, -381660, 15663611, 22860960, 15585581, -27844109, -3582739, -23260460, -8428588},
- FieldElement{-32480551, 15707275, -8205912, -5652081, 29464558, 2713815, -22725137, 15860482, -21902570, 1494193},
- },
- {
- FieldElement{-19562091, -14087393, -25583872, -9299552, 13127842, 759709, 21923482, 16529112, 8742704, 12967017},
- FieldElement{-28464899, 1553205, 32536856, -10473729, -24691605, -406174, -8914625, -2933896, -29903758, 15553883},
- FieldElement{21877909, 3230008, 9881174, 10539357, -4797115, 2841332, 11543572, 14513274, 19375923, -12647961},
- },
- {
- FieldElement{8832269, -14495485, 13253511, 5137575, 5037871, 4078777, 24880818, -6222716, 2862653, 9455043},
- FieldElement{29306751, 5123106, 20245049, -14149889, 9592566, 8447059, -2077124, -2990080, 15511449, 4789663},
- FieldElement{-20679756, 7004547, 8824831, -9434977, -4045704, -3750736, -5754762, 108893, 23513200, 16652362},
- },
- },
- {
- {
- FieldElement{-33256173, 4144782, -4476029, -6579123, 10770039, -7155542, -6650416, -12936300, -18319198, 10212860},
- FieldElement{2756081, 8598110, 7383731, -6859892, 22312759, -1105012, 21179801, 2600940, -9988298, -12506466},
- FieldElement{-24645692, 13317462, -30449259, -15653928, 21365574, -10869657, 11344424, 864440, -2499677, -16710063},
- },
- {
- FieldElement{-26432803, 6148329, -17184412, -14474154, 18782929, -275997, -22561534, 211300, 2719757, 4940997},
- FieldElement{-1323882, 3911313, -6948744, 14759765, -30027150, 7851207, 21690126, 8518463, 26699843, 5276295},
- FieldElement{-13149873, -6429067, 9396249, 365013, 24703301, -10488939, 1321586, 149635, -15452774, 7159369},
- },
- {
- FieldElement{9987780, -3404759, 17507962, 9505530, 9731535, -2165514, 22356009, 8312176, 22477218, -8403385},
- FieldElement{18155857, -16504990, 19744716, 9006923, 15154154, -10538976, 24256460, -4864995, -22548173, 9334109},
- FieldElement{2986088, -4911893, 10776628, -3473844, 10620590, -7083203, -21413845, 14253545, -22587149, 536906},
- },
- {
- FieldElement{4377756, 8115836, 24567078, 15495314, 11625074, 13064599, 7390551, 10589625, 10838060, -15420424},
- FieldElement{-19342404, 867880, 9277171, -3218459, -14431572, -1986443, 19295826, -15796950, 6378260, 699185},
- FieldElement{7895026, 4057113, -7081772, -13077756, -17886831, -323126, -716039, 15693155, -5045064, -13373962},
- },
- {
- FieldElement{-7737563, -5869402, -14566319, -7406919, 11385654, 13201616, 31730678, -10962840, -3918636, -9669325},
- FieldElement{10188286, -15770834, -7336361, 13427543, 22223443, 14896287, 30743455, 7116568, -21786507, 5427593},
- FieldElement{696102, 13206899, 27047647, -10632082, 15285305, -9853179, 10798490, -4578720, 19236243, 12477404},
- },
- {
- FieldElement{-11229439, 11243796, -17054270, -8040865, -788228, -8167967, -3897669, 11180504, -23169516, 7733644},
- FieldElement{17800790, -14036179, -27000429, -11766671, 23887827, 3149671, 23466177, -10538171, 10322027, 15313801},
- FieldElement{26246234, 11968874, 32263343, -5468728, 6830755, -13323031, -15794704, -101982, -24449242, 10890804},
- },
- {
- FieldElement{-31365647, 10271363, -12660625, -6267268, 16690207, -13062544, -14982212, 16484931, 25180797, -5334884},
- FieldElement{-586574, 10376444, -32586414, -11286356, 19801893, 10997610, 2276632, 9482883, 316878, 13820577},
- FieldElement{-9882808, -4510367, -2115506, 16457136, -11100081, 11674996, 30756178, -7515054, 30696930, -3712849},
- },
- {
- FieldElement{32988917, -9603412, 12499366, 7910787, -10617257, -11931514, -7342816, -9985397, -32349517, 7392473},
- FieldElement{-8855661, 15927861, 9866406, -3649411, -2396914, -16655781, -30409476, -9134995, 25112947, -2926644},
- FieldElement{-2504044, -436966, 25621774, -5678772, 15085042, -5479877, -24884878, -13526194, 5537438, -13914319},
- },
- },
- {
- {
- FieldElement{-11225584, 2320285, -9584280, 10149187, -33444663, 5808648, -14876251, -1729667, 31234590, 6090599},
- FieldElement{-9633316, 116426, 26083934, 2897444, -6364437, -2688086, 609721, 15878753, -6970405, -9034768},
- FieldElement{-27757857, 247744, -15194774, -9002551, 23288161, -10011936, -23869595, 6503646, 20650474, 1804084},
- },
- {
- FieldElement{-27589786, 15456424, 8972517, 8469608, 15640622, 4439847, 3121995, -10329713, 27842616, -202328},
- FieldElement{-15306973, 2839644, 22530074, 10026331, 4602058, 5048462, 28248656, 5031932, -11375082, 12714369},
- FieldElement{20807691, -7270825, 29286141, 11421711, -27876523, -13868230, -21227475, 1035546, -19733229, 12796920},
- },
- {
- FieldElement{12076899, -14301286, -8785001, -11848922, -25012791, 16400684, -17591495, -12899438, 3480665, -15182815},
- FieldElement{-32361549, 5457597, 28548107, 7833186, 7303070, -11953545, -24363064, -15921875, -33374054, 2771025},
- FieldElement{-21389266, 421932, 26597266, 6860826, 22486084, -6737172, -17137485, -4210226, -24552282, 15673397},
- },
- {
- FieldElement{-20184622, 2338216, 19788685, -9620956, -4001265, -8740893, -20271184, 4733254, 3727144, -12934448},
- FieldElement{6120119, 814863, -11794402, -622716, 6812205, -15747771, 2019594, 7975683, 31123697, -10958981},
- FieldElement{30069250, -11435332, 30434654, 2958439, 18399564, -976289, 12296869, 9204260, -16432438, 9648165},
- },
- {
- FieldElement{32705432, -1550977, 30705658, 7451065, -11805606, 9631813, 3305266, 5248604, -26008332, -11377501},
- FieldElement{17219865, 2375039, -31570947, -5575615, -19459679, 9219903, 294711, 15298639, 2662509, -16297073},
- FieldElement{-1172927, -7558695, -4366770, -4287744, -21346413, -8434326, 32087529, -1222777, 32247248, -14389861},
- },
- {
- FieldElement{14312628, 1221556, 17395390, -8700143, -4945741, -8684635, -28197744, -9637817, -16027623, -13378845},
- FieldElement{-1428825, -9678990, -9235681, 6549687, -7383069, -468664, 23046502, 9803137, 17597934, 2346211},
- FieldElement{18510800, 15337574, 26171504, 981392, -22241552, 7827556, -23491134, -11323352, 3059833, -11782870},
- },
- {
- FieldElement{10141598, 6082907, 17829293, -1947643, 9830092, 13613136, -25556636, -5544586, -33502212, 3592096},
- FieldElement{33114168, -15889352, -26525686, -13343397, 33076705, 8716171, 1151462, 1521897, -982665, -6837803},
- FieldElement{-32939165, -4255815, 23947181, -324178, -33072974, -12305637, -16637686, 3891704, 26353178, 693168},
- },
- {
- FieldElement{30374239, 1595580, -16884039, 13186931, 4600344, 406904, 9585294, -400668, 31375464, 14369965},
- FieldElement{-14370654, -7772529, 1510301, 6434173, -18784789, -6262728, 32732230, -13108839, 17901441, 16011505},
- FieldElement{18171223, -11934626, -12500402, 15197122, -11038147, -15230035, -19172240, -16046376, 8764035, 12309598},
- },
- },
- {
- {
- FieldElement{5975908, -5243188, -19459362, -9681747, -11541277, 14015782, -23665757, 1228319, 17544096, -10593782},
- FieldElement{5811932, -1715293, 3442887, -2269310, -18367348, -8359541, -18044043, -15410127, -5565381, 12348900},
- FieldElement{-31399660, 11407555, 25755363, 6891399, -3256938, 14872274, -24849353, 8141295, -10632534, -585479},
- },
- {
- FieldElement{-12675304, 694026, -5076145, 13300344, 14015258, -14451394, -9698672, -11329050, 30944593, 1130208},
- FieldElement{8247766, -6710942, -26562381, -7709309, -14401939, -14648910, 4652152, 2488540, 23550156, -271232},
- FieldElement{17294316, -3788438, 7026748, 15626851, 22990044, 113481, 2267737, -5908146, -408818, -137719},
- },
- {
- FieldElement{16091085, -16253926, 18599252, 7340678, 2137637, -1221657, -3364161, 14550936, 3260525, -7166271},
- FieldElement{-4910104, -13332887, 18550887, 10864893, -16459325, -7291596, -23028869, -13204905, -12748722, 2701326},
- FieldElement{-8574695, 16099415, 4629974, -16340524, -20786213, -6005432, -10018363, 9276971, 11329923, 1862132},
- },
- {
- FieldElement{14763076, -15903608, -30918270, 3689867, 3511892, 10313526, -21951088, 12219231, -9037963, -940300},
- FieldElement{8894987, -3446094, 6150753, 3013931, 301220, 15693451, -31981216, -2909717, -15438168, 11595570},
- FieldElement{15214962, 3537601, -26238722, -14058872, 4418657, -15230761, 13947276, 10730794, -13489462, -4363670},
- },
- {
- FieldElement{-2538306, 7682793, 32759013, 263109, -29984731, -7955452, -22332124, -10188635, 977108, 699994},
- FieldElement{-12466472, 4195084, -9211532, 550904, -15565337, 12917920, 19118110, -439841, -30534533, -14337913},
- FieldElement{31788461, -14507657, 4799989, 7372237, 8808585, -14747943, 9408237, -10051775, 12493932, -5409317},
- },
- {
- FieldElement{-25680606, 5260744, -19235809, -6284470, -3695942, 16566087, 27218280, 2607121, 29375955, 6024730},
- FieldElement{842132, -2794693, -4763381, -8722815, 26332018, -12405641, 11831880, 6985184, -9940361, 2854096},
- FieldElement{-4847262, -7969331, 2516242, -5847713, 9695691, -7221186, 16512645, 960770, 12121869, 16648078},
- },
- {
- FieldElement{-15218652, 14667096, -13336229, 2013717, 30598287, -464137, -31504922, -7882064, 20237806, 2838411},
- FieldElement{-19288047, 4453152, 15298546, -16178388, 22115043, -15972604, 12544294, -13470457, 1068881, -12499905},
- FieldElement{-9558883, -16518835, 33238498, 13506958, 30505848, -1114596, -8486907, -2630053, 12521378, 4845654},
- },
- {
- FieldElement{-28198521, 10744108, -2958380, 10199664, 7759311, -13088600, 3409348, -873400, -6482306, -12885870},
- FieldElement{-23561822, 6230156, -20382013, 10655314, -24040585, -11621172, 10477734, -1240216, -3113227, 13974498},
- FieldElement{12966261, 15550616, -32038948, -1615346, 21025980, -629444, 5642325, 7188737, 18895762, 12629579},
- },
- },
- {
- {
- FieldElement{14741879, -14946887, 22177208, -11721237, 1279741, 8058600, 11758140, 789443, 32195181, 3895677},
- FieldElement{10758205, 15755439, -4509950, 9243698, -4879422, 6879879, -2204575, -3566119, -8982069, 4429647},
- FieldElement{-2453894, 15725973, -20436342, -10410672, -5803908, -11040220, -7135870, -11642895, 18047436, -15281743},
- },
- {
- FieldElement{-25173001, -11307165, 29759956, 11776784, -22262383, -15820455, 10993114, -12850837, -17620701, -9408468},
- FieldElement{21987233, 700364, -24505048, 14972008, -7774265, -5718395, 32155026, 2581431, -29958985, 8773375},
- FieldElement{-25568350, 454463, -13211935, 16126715, 25240068, 8594567, 20656846, 12017935, -7874389, -13920155},
- },
- {
- FieldElement{6028182, 6263078, -31011806, -11301710, -818919, 2461772, -31841174, -5468042, -1721788, -2776725},
- FieldElement{-12278994, 16624277, 987579, -5922598, 32908203, 1248608, 7719845, -4166698, 28408820, 6816612},
- FieldElement{-10358094, -8237829, 19549651, -12169222, 22082623, 16147817, 20613181, 13982702, -10339570, 5067943},
- },
- {
- FieldElement{-30505967, -3821767, 12074681, 13582412, -19877972, 2443951, -19719286, 12746132, 5331210, -10105944},
- FieldElement{30528811, 3601899, -1957090, 4619785, -27361822, -15436388, 24180793, -12570394, 27679908, -1648928},
- FieldElement{9402404, -13957065, 32834043, 10838634, -26580150, -13237195, 26653274, -8685565, 22611444, -12715406},
- },
- {
- FieldElement{22190590, 1118029, 22736441, 15130463, -30460692, -5991321, 19189625, -4648942, 4854859, 6622139},
- FieldElement{-8310738, -2953450, -8262579, -3388049, -10401731, -271929, 13424426, -3567227, 26404409, 13001963},
- FieldElement{-31241838, -15415700, -2994250, 8939346, 11562230, -12840670, -26064365, -11621720, -15405155, 11020693},
- },
- {
- FieldElement{1866042, -7949489, -7898649, -10301010, 12483315, 13477547, 3175636, -12424163, 28761762, 1406734},
- FieldElement{-448555, -1777666, 13018551, 3194501, -9580420, -11161737, 24760585, -4347088, 25577411, -13378680},
- FieldElement{-24290378, 4759345, -690653, -1852816, 2066747, 10693769, -29595790, 9884936, -9368926, 4745410},
- },
- {
- FieldElement{-9141284, 6049714, -19531061, -4341411, -31260798, 9944276, -15462008, -11311852, 10931924, -11931931},
- FieldElement{-16561513, 14112680, -8012645, 4817318, -8040464, -11414606, -22853429, 10856641, -20470770, 13434654},
- FieldElement{22759489, -10073434, -16766264, -1871422, 13637442, -10168091, 1765144, -12654326, 28445307, -5364710},
- },
- {
- FieldElement{29875063, 12493613, 2795536, -3786330, 1710620, 15181182, -10195717, -8788675, 9074234, 1167180},
- FieldElement{-26205683, 11014233, -9842651, -2635485, -26908120, 7532294, -18716888, -9535498, 3843903, 9367684},
- FieldElement{-10969595, -6403711, 9591134, 9582310, 11349256, 108879, 16235123, 8601684, -139197, 4242895},
- },
- },
- {
- {
- FieldElement{22092954, -13191123, -2042793, -11968512, 32186753, -11517388, -6574341, 2470660, -27417366, 16625501},
- FieldElement{-11057722, 3042016, 13770083, -9257922, 584236, -544855, -7770857, 2602725, -27351616, 14247413},
- FieldElement{6314175, -10264892, -32772502, 15957557, -10157730, 168750, -8618807, 14290061, 27108877, -1180880},
- },
- {
- FieldElement{-8586597, -7170966, 13241782, 10960156, -32991015, -13794596, 33547976, -11058889, -27148451, 981874},
- FieldElement{22833440, 9293594, -32649448, -13618667, -9136966, 14756819, -22928859, -13970780, -10479804, -16197962},
- FieldElement{-7768587, 3326786, -28111797, 10783824, 19178761, 14905060, 22680049, 13906969, -15933690, 3797899},
- },
- {
- FieldElement{21721356, -4212746, -12206123, 9310182, -3882239, -13653110, 23740224, -2709232, 20491983, -8042152},
- FieldElement{9209270, -15135055, -13256557, -6167798, -731016, 15289673, 25947805, 15286587, 30997318, -6703063},
- FieldElement{7392032, 16618386, 23946583, -8039892, -13265164, -1533858, -14197445, -2321576, 17649998, -250080},
- },
- {
- FieldElement{-9301088, -14193827, 30609526, -3049543, -25175069, -1283752, -15241566, -9525724, -2233253, 7662146},
- FieldElement{-17558673, 1763594, -33114336, 15908610, -30040870, -12174295, 7335080, -8472199, -3174674, 3440183},
- FieldElement{-19889700, -5977008, -24111293, -9688870, 10799743, -16571957, 40450, -4431835, 4862400, 1133},
- },
- {
- FieldElement{-32856209, -7873957, -5422389, 14860950, -16319031, 7956142, 7258061, 311861, -30594991, -7379421},
- FieldElement{-3773428, -1565936, 28985340, 7499440, 24445838, 9325937, 29727763, 16527196, 18278453, 15405622},
- FieldElement{-4381906, 8508652, -19898366, -3674424, -5984453, 15149970, -13313598, 843523, -21875062, 13626197},
- },
- {
- FieldElement{2281448, -13487055, -10915418, -2609910, 1879358, 16164207, -10783882, 3953792, 13340839, 15928663},
- FieldElement{31727126, -7179855, -18437503, -8283652, 2875793, -16390330, -25269894, -7014826, -23452306, 5964753},
- FieldElement{4100420, -5959452, -17179337, 6017714, -18705837, 12227141, -26684835, 11344144, 2538215, -7570755},
- },
- {
- FieldElement{-9433605, 6123113, 11159803, -2156608, 30016280, 14966241, -20474983, 1485421, -629256, -15958862},
- FieldElement{-26804558, 4260919, 11851389, 9658551, -32017107, 16367492, -20205425, -13191288, 11659922, -11115118},
- FieldElement{26180396, 10015009, -30844224, -8581293, 5418197, 9480663, 2231568, -10170080, 33100372, -1306171},
- },
- {
- FieldElement{15121113, -5201871, -10389905, 15427821, -27509937, -15992507, 21670947, 4486675, -5931810, -14466380},
- FieldElement{16166486, -9483733, -11104130, 6023908, -31926798, -1364923, 2340060, -16254968, -10735770, -10039824},
- FieldElement{28042865, -3557089, -12126526, 12259706, -3717498, -6945899, 6766453, -8689599, 18036436, 5803270},
- },
- },
- {
- {
- FieldElement{-817581, 6763912, 11803561, 1585585, 10958447, -2671165, 23855391, 4598332, -6159431, -14117438},
- FieldElement{-31031306, -14256194, 17332029, -2383520, 31312682, -5967183, 696309, 50292, -20095739, 11763584},
- FieldElement{-594563, -2514283, -32234153, 12643980, 12650761, 14811489, 665117, -12613632, -19773211, -10713562},
- },
- {
- FieldElement{30464590, -11262872, -4127476, -12734478, 19835327, -7105613, -24396175, 2075773, -17020157, 992471},
- FieldElement{18357185, -6994433, 7766382, 16342475, -29324918, 411174, 14578841, 8080033, -11574335, -10601610},
- FieldElement{19598397, 10334610, 12555054, 2555664, 18821899, -10339780, 21873263, 16014234, 26224780, 16452269},
- },
- {
- FieldElement{-30223925, 5145196, 5944548, 16385966, 3976735, 2009897, -11377804, -7618186, -20533829, 3698650},
- FieldElement{14187449, 3448569, -10636236, -10810935, -22663880, -3433596, 7268410, -10890444, 27394301, 12015369},
- FieldElement{19695761, 16087646, 28032085, 12999827, 6817792, 11427614, 20244189, -1312777, -13259127, -3402461},
- },
- {
- FieldElement{30860103, 12735208, -1888245, -4699734, -16974906, 2256940, -8166013, 12298312, -8550524, -10393462},
- FieldElement{-5719826, -11245325, -1910649, 15569035, 26642876, -7587760, -5789354, -15118654, -4976164, 12651793},
- FieldElement{-2848395, 9953421, 11531313, -5282879, 26895123, -12697089, -13118820, -16517902, 9768698, -2533218},
- },
- {
- FieldElement{-24719459, 1894651, -287698, -4704085, 15348719, -8156530, 32767513, 12765450, 4940095, 10678226},
- FieldElement{18860224, 15980149, -18987240, -1562570, -26233012, -11071856, -7843882, 13944024, -24372348, 16582019},
- FieldElement{-15504260, 4970268, -29893044, 4175593, -20993212, -2199756, -11704054, 15444560, -11003761, 7989037},
- },
- {
- FieldElement{31490452, 5568061, -2412803, 2182383, -32336847, 4531686, -32078269, 6200206, -19686113, -14800171},
- FieldElement{-17308668, -15879940, -31522777, -2831, -32887382, 16375549, 8680158, -16371713, 28550068, -6857132},
- FieldElement{-28126887, -5688091, 16837845, -1820458, -6850681, 12700016, -30039981, 4364038, 1155602, 5988841},
- },
- {
- FieldElement{21890435, -13272907, -12624011, 12154349, -7831873, 15300496, 23148983, -4470481, 24618407, 8283181},
- FieldElement{-33136107, -10512751, 9975416, 6841041, -31559793, 16356536, 3070187, -7025928, 1466169, 10740210},
- FieldElement{-1509399, -15488185, -13503385, -10655916, 32799044, 909394, -13938903, -5779719, -32164649, -15327040},
- },
- {
- FieldElement{3960823, -14267803, -28026090, -15918051, -19404858, 13146868, 15567327, 951507, -3260321, -573935},
- FieldElement{24740841, 5052253, -30094131, 8961361, 25877428, 6165135, -24368180, 14397372, -7380369, -6144105},
- FieldElement{-28888365, 3510803, -28103278, -1158478, -11238128, -10631454, -15441463, -14453128, -1625486, -6494814},
- },
- },
- {
- {
- FieldElement{793299, -9230478, 8836302, -6235707, -27360908, -2369593, 33152843, -4885251, -9906200, -621852},
- FieldElement{5666233, 525582, 20782575, -8038419, -24538499, 14657740, 16099374, 1468826, -6171428, -15186581},
- FieldElement{-4859255, -3779343, -2917758, -6748019, 7778750, 11688288, -30404353, -9871238, -1558923, -9863646},
- },
- {
- FieldElement{10896332, -7719704, 824275, 472601, -19460308, 3009587, 25248958, 14783338, -30581476, -15757844},
- FieldElement{10566929, 12612572, -31944212, 11118703, -12633376, 12362879, 21752402, 8822496, 24003793, 14264025},
- FieldElement{27713862, -7355973, -11008240, 9227530, 27050101, 2504721, 23886875, -13117525, 13958495, -5732453},
- },
- {
- FieldElement{-23481610, 4867226, -27247128, 3900521, 29838369, -8212291, -31889399, -10041781, 7340521, -15410068},
- FieldElement{4646514, -8011124, -22766023, -11532654, 23184553, 8566613, 31366726, -1381061, -15066784, -10375192},
- FieldElement{-17270517, 12723032, -16993061, 14878794, 21619651, -6197576, 27584817, 3093888, -8843694, 3849921},
- },
- {
- FieldElement{-9064912, 2103172, 25561640, -15125738, -5239824, 9582958, 32477045, -9017955, 5002294, -15550259},
- FieldElement{-12057553, -11177906, 21115585, -13365155, 8808712, -12030708, 16489530, 13378448, -25845716, 12741426},
- FieldElement{-5946367, 10645103, -30911586, 15390284, -3286982, -7118677, 24306472, 15852464, 28834118, -7646072},
- },
- {
- FieldElement{-17335748, -9107057, -24531279, 9434953, -8472084, -583362, -13090771, 455841, 20461858, 5491305},
- FieldElement{13669248, -16095482, -12481974, -10203039, -14569770, -11893198, -24995986, 11293807, -28588204, -9421832},
- FieldElement{28497928, 6272777, -33022994, 14470570, 8906179, -1225630, 18504674, -14165166, 29867745, -8795943},
- },
- {
- FieldElement{-16207023, 13517196, -27799630, -13697798, 24009064, -6373891, -6367600, -13175392, 22853429, -4012011},
- FieldElement{24191378, 16712145, -13931797, 15217831, 14542237, 1646131, 18603514, -11037887, 12876623, -2112447},
- FieldElement{17902668, 4518229, -411702, -2829247, 26878217, 5258055, -12860753, 608397, 16031844, 3723494},
- },
- {
- FieldElement{-28632773, 12763728, -20446446, 7577504, 33001348, -13017745, 17558842, -7872890, 23896954, -4314245},
- FieldElement{-20005381, -12011952, 31520464, 605201, 2543521, 5991821, -2945064, 7229064, -9919646, -8826859},
- FieldElement{28816045, 298879, -28165016, -15920938, 19000928, -1665890, -12680833, -2949325, -18051778, -2082915},
- },
- {
- FieldElement{16000882, -344896, 3493092, -11447198, -29504595, -13159789, 12577740, 16041268, -19715240, 7847707},
- FieldElement{10151868, 10572098, 27312476, 7922682, 14825339, 4723128, -32855931, -6519018, -10020567, 3852848},
- FieldElement{-11430470, 15697596, -21121557, -4420647, 5386314, 15063598, 16514493, -15932110, 29330899, -15076224},
- },
- },
- {
- {
- FieldElement{-25499735, -4378794, -15222908, -6901211, 16615731, 2051784, 3303702, 15490, -27548796, 12314391},
- FieldElement{15683520, -6003043, 18109120, -9980648, 15337968, -5997823, -16717435, 15921866, 16103996, -3731215},
- FieldElement{-23169824, -10781249, 13588192, -1628807, -3798557, -1074929, -19273607, 5402699, -29815713, -9841101},
- },
- {
- FieldElement{23190676, 2384583, -32714340, 3462154, -29903655, -1529132, -11266856, 8911517, -25205859, 2739713},
- FieldElement{21374101, -3554250, -33524649, 9874411, 15377179, 11831242, -33529904, 6134907, 4931255, 11987849},
- FieldElement{-7732, -2978858, -16223486, 7277597, 105524, -322051, -31480539, 13861388, -30076310, 10117930},
- },
- {
- FieldElement{-29501170, -10744872, -26163768, 13051539, -25625564, 5089643, -6325503, 6704079, 12890019, 15728940},
- FieldElement{-21972360, -11771379, -951059, -4418840, 14704840, 2695116, 903376, -10428139, 12885167, 8311031},
- FieldElement{-17516482, 5352194, 10384213, -13811658, 7506451, 13453191, 26423267, 4384730, 1888765, -5435404},
- },
- {
- FieldElement{-25817338, -3107312, -13494599, -3182506, 30896459, -13921729, -32251644, -12707869, -19464434, -3340243},
- FieldElement{-23607977, -2665774, -526091, 4651136, 5765089, 4618330, 6092245, 14845197, 17151279, -9854116},
- FieldElement{-24830458, -12733720, -15165978, 10367250, -29530908, -265356, 22825805, -7087279, -16866484, 16176525},
- },
- {
- FieldElement{-23583256, 6564961, 20063689, 3798228, -4740178, 7359225, 2006182, -10363426, -28746253, -10197509},
- FieldElement{-10626600, -4486402, -13320562, -5125317, 3432136, -6393229, 23632037, -1940610, 32808310, 1099883},
- FieldElement{15030977, 5768825, -27451236, -2887299, -6427378, -15361371, -15277896, -6809350, 2051441, -15225865},
- },
- {
- FieldElement{-3362323, -7239372, 7517890, 9824992, 23555850, 295369, 5148398, -14154188, -22686354, 16633660},
- FieldElement{4577086, -16752288, 13249841, -15304328, 19958763, -14537274, 18559670, -10759549, 8402478, -9864273},
- FieldElement{-28406330, -1051581, -26790155, -907698, -17212414, -11030789, 9453451, -14980072, 17983010, 9967138},
- },
- {
- FieldElement{-25762494, 6524722, 26585488, 9969270, 24709298, 1220360, -1677990, 7806337, 17507396, 3651560},
- FieldElement{-10420457, -4118111, 14584639, 15971087, -15768321, 8861010, 26556809, -5574557, -18553322, -11357135},
- FieldElement{2839101, 14284142, 4029895, 3472686, 14402957, 12689363, -26642121, 8459447, -5605463, -7621941},
- },
- {
- FieldElement{-4839289, -3535444, 9744961, 2871048, 25113978, 3187018, -25110813, -849066, 17258084, -7977739},
- FieldElement{18164541, -10595176, -17154882, -1542417, 19237078, -9745295, 23357533, -15217008, 26908270, 12150756},
- FieldElement{-30264870, -7647865, 5112249, -7036672, -1499807, -6974257, 43168, -5537701, -32302074, 16215819},
- },
- },
- {
- {
- FieldElement{-6898905, 9824394, -12304779, -4401089, -31397141, -6276835, 32574489, 12532905, -7503072, -8675347},
- FieldElement{-27343522, -16515468, -27151524, -10722951, 946346, 16291093, 254968, 7168080, 21676107, -1943028},
- FieldElement{21260961, -8424752, -16831886, -11920822, -23677961, 3968121, -3651949, -6215466, -3556191, -7913075},
- },
- {
- FieldElement{16544754, 13250366, -16804428, 15546242, -4583003, 12757258, -2462308, -8680336, -18907032, -9662799},
- FieldElement{-2415239, -15577728, 18312303, 4964443, -15272530, -12653564, 26820651, 16690659, 25459437, -4564609},
- FieldElement{-25144690, 11425020, 28423002, -11020557, -6144921, -15826224, 9142795, -2391602, -6432418, -1644817},
- },
- {
- FieldElement{-23104652, 6253476, 16964147, -3768872, -25113972, -12296437, -27457225, -16344658, 6335692, 7249989},
- FieldElement{-30333227, 13979675, 7503222, -12368314, -11956721, -4621693, -30272269, 2682242, 25993170, -12478523},
- FieldElement{4364628, 5930691, 32304656, -10044554, -8054781, 15091131, 22857016, -10598955, 31820368, 15075278},
- },
- {
- FieldElement{31879134, -8918693, 17258761, 90626, -8041836, -4917709, 24162788, -9650886, -17970238, 12833045},
- FieldElement{19073683, 14851414, -24403169, -11860168, 7625278, 11091125, -19619190, 2074449, -9413939, 14905377},
- FieldElement{24483667, -11935567, -2518866, -11547418, -1553130, 15355506, -25282080, 9253129, 27628530, -7555480},
- },
- {
- FieldElement{17597607, 8340603, 19355617, 552187, 26198470, -3176583, 4593324, -9157582, -14110875, 15297016},
- FieldElement{510886, 14337390, -31785257, 16638632, 6328095, 2713355, -20217417, -11864220, 8683221, 2921426},
- FieldElement{18606791, 11874196, 27155355, -5281482, -24031742, 6265446, -25178240, -1278924, 4674690, 13890525},
- },
- {
- FieldElement{13609624, 13069022, -27372361, -13055908, 24360586, 9592974, 14977157, 9835105, 4389687, 288396},
- FieldElement{9922506, -519394, 13613107, 5883594, -18758345, -434263, -12304062, 8317628, 23388070, 16052080},
- FieldElement{12720016, 11937594, -31970060, -5028689, 26900120, 8561328, -20155687, -11632979, -14754271, -10812892},
- },
- {
- FieldElement{15961858, 14150409, 26716931, -665832, -22794328, 13603569, 11829573, 7467844, -28822128, 929275},
- FieldElement{11038231, -11582396, -27310482, -7316562, -10498527, -16307831, -23479533, -9371869, -21393143, 2465074},
- FieldElement{20017163, -4323226, 27915242, 1529148, 12396362, 15675764, 13817261, -9658066, 2463391, -4622140},
- },
- {
- FieldElement{-16358878, -12663911, -12065183, 4996454, -1256422, 1073572, 9583558, 12851107, 4003896, 12673717},
- FieldElement{-1731589, -15155870, -3262930, 16143082, 19294135, 13385325, 14741514, -9103726, 7903886, 2348101},
- FieldElement{24536016, -16515207, 12715592, -3862155, 1511293, 10047386, -3842346, -7129159, -28377538, 10048127},
- },
- },
- {
- {
- FieldElement{-12622226, -6204820, 30718825, 2591312, -10617028, 12192840, 18873298, -7297090, -32297756, 15221632},
- FieldElement{-26478122, -11103864, 11546244, -1852483, 9180880, 7656409, -21343950, 2095755, 29769758, 6593415},
- FieldElement{-31994208, -2907461, 4176912, 3264766, 12538965, -868111, 26312345, -6118678, 30958054, 8292160},
- },
- {
- FieldElement{31429822, -13959116, 29173532, 15632448, 12174511, -2760094, 32808831, 3977186, 26143136, -3148876},
- FieldElement{22648901, 1402143, -22799984, 13746059, 7936347, 365344, -8668633, -1674433, -3758243, -2304625},
- FieldElement{-15491917, 8012313, -2514730, -12702462, -23965846, -10254029, -1612713, -1535569, -16664475, 8194478},
- },
- {
- FieldElement{27338066, -7507420, -7414224, 10140405, -19026427, -6589889, 27277191, 8855376, 28572286, 3005164},
- FieldElement{26287124, 4821776, 25476601, -4145903, -3764513, -15788984, -18008582, 1182479, -26094821, -13079595},
- FieldElement{-7171154, 3178080, 23970071, 6201893, -17195577, -4489192, -21876275, -13982627, 32208683, -1198248},
- },
- {
- FieldElement{-16657702, 2817643, -10286362, 14811298, 6024667, 13349505, -27315504, -10497842, -27672585, -11539858},
- FieldElement{15941029, -9405932, -21367050, 8062055, 31876073, -238629, -15278393, -1444429, 15397331, -4130193},
- FieldElement{8934485, -13485467, -23286397, -13423241, -32446090, 14047986, 31170398, -1441021, -27505566, 15087184},
- },
- {
- FieldElement{-18357243, -2156491, 24524913, -16677868, 15520427, -6360776, -15502406, 11461896, 16788528, -5868942},
- FieldElement{-1947386, 16013773, 21750665, 3714552, -17401782, -16055433, -3770287, -10323320, 31322514, -11615635},
- FieldElement{21426655, -5650218, -13648287, -5347537, -28812189, -4920970, -18275391, -14621414, 13040862, -12112948},
- },
- {
- FieldElement{11293895, 12478086, -27136401, 15083750, -29307421, 14748872, 14555558, -13417103, 1613711, 4896935},
- FieldElement{-25894883, 15323294, -8489791, -8057900, 25967126, -13425460, 2825960, -4897045, -23971776, -11267415},
- FieldElement{-15924766, -5229880, -17443532, 6410664, 3622847, 10243618, 20615400, 12405433, -23753030, -8436416},
- },
- {
- FieldElement{-7091295, 12556208, -20191352, 9025187, -17072479, 4333801, 4378436, 2432030, 23097949, -566018},
- FieldElement{4565804, -16025654, 20084412, -7842817, 1724999, 189254, 24767264, 10103221, -18512313, 2424778},
- FieldElement{366633, -11976806, 8173090, -6890119, 30788634, 5745705, -7168678, 1344109, -3642553, 12412659},
- },
- {
- FieldElement{-24001791, 7690286, 14929416, -168257, -32210835, -13412986, 24162697, -15326504, -3141501, 11179385},
- FieldElement{18289522, -14724954, 8056945, 16430056, -21729724, 7842514, -6001441, -1486897, -18684645, -11443503},
- FieldElement{476239, 6601091, -6152790, -9723375, 17503545, -4863900, 27672959, 13403813, 11052904, 5219329},
- },
- },
- {
- {
- FieldElement{20678546, -8375738, -32671898, 8849123, -5009758, 14574752, 31186971, -3973730, 9014762, -8579056},
- FieldElement{-13644050, -10350239, -15962508, 5075808, -1514661, -11534600, -33102500, 9160280, 8473550, -3256838},
- FieldElement{24900749, 14435722, 17209120, -15292541, -22592275, 9878983, -7689309, -16335821, -24568481, 11788948},
- },
- {
- FieldElement{-3118155, -11395194, -13802089, 14797441, 9652448, -6845904, -20037437, 10410733, -24568470, -1458691},
- FieldElement{-15659161, 16736706, -22467150, 10215878, -9097177, 7563911, 11871841, -12505194, -18513325, 8464118},
- FieldElement{-23400612, 8348507, -14585951, -861714, -3950205, -6373419, 14325289, 8628612, 33313881, -8370517},
- },
- {
- FieldElement{-20186973, -4967935, 22367356, 5271547, -1097117, -4788838, -24805667, -10236854, -8940735, -5818269},
- FieldElement{-6948785, -1795212, -32625683, -16021179, 32635414, -7374245, 15989197, -12838188, 28358192, -4253904},
- FieldElement{-23561781, -2799059, -32351682, -1661963, -9147719, 10429267, -16637684, 4072016, -5351664, 5596589},
- },
- {
- FieldElement{-28236598, -3390048, 12312896, 6213178, 3117142, 16078565, 29266239, 2557221, 1768301, 15373193},
- FieldElement{-7243358, -3246960, -4593467, -7553353, -127927, -912245, -1090902, -4504991, -24660491, 3442910},
- FieldElement{-30210571, 5124043, 14181784, 8197961, 18964734, -11939093, 22597931, 7176455, -18585478, 13365930},
- },
- {
- FieldElement{-7877390, -1499958, 8324673, 4690079, 6261860, 890446, 24538107, -8570186, -9689599, -3031667},
- FieldElement{25008904, -10771599, -4305031, -9638010, 16265036, 15721635, 683793, -11823784, 15723479, -15163481},
- FieldElement{-9660625, 12374379, -27006999, -7026148, -7724114, -12314514, 11879682, 5400171, 519526, -1235876},
- },
- {
- FieldElement{22258397, -16332233, -7869817, 14613016, -22520255, -2950923, -20353881, 7315967, 16648397, 7605640},
- FieldElement{-8081308, -8464597, -8223311, 9719710, 19259459, -15348212, 23994942, -5281555, -9468848, 4763278},
- FieldElement{-21699244, 9220969, -15730624, 1084137, -25476107, -2852390, 31088447, -7764523, -11356529, 728112},
- },
- {
- FieldElement{26047220, -11751471, -6900323, -16521798, 24092068, 9158119, -4273545, -12555558, -29365436, -5498272},
- FieldElement{17510331, -322857, 5854289, 8403524, 17133918, -3112612, -28111007, 12327945, 10750447, 10014012},
- FieldElement{-10312768, 3936952, 9156313, -8897683, 16498692, -994647, -27481051, -666732, 3424691, 7540221},
- },
- {
- FieldElement{30322361, -6964110, 11361005, -4143317, 7433304, 4989748, -7071422, -16317219, -9244265, 15258046},
- FieldElement{13054562, -2779497, 19155474, 469045, -12482797, 4566042, 5631406, 2711395, 1062915, -5136345},
- FieldElement{-19240248, -11254599, -29509029, -7499965, -5835763, 13005411, -6066489, 12194497, 32960380, 1459310},
- },
- },
- {
- {
- FieldElement{19852034, 7027924, 23669353, 10020366, 8586503, -6657907, 394197, -6101885, 18638003, -11174937},
- FieldElement{31395534, 15098109, 26581030, 8030562, -16527914, -5007134, 9012486, -7584354, -6643087, -5442636},
- FieldElement{-9192165, -2347377, -1997099, 4529534, 25766844, 607986, -13222, 9677543, -32294889, -6456008},
- },
- {
- FieldElement{-2444496, -149937, 29348902, 8186665, 1873760, 12489863, -30934579, -7839692, -7852844, -8138429},
- FieldElement{-15236356, -15433509, 7766470, 746860, 26346930, -10221762, -27333451, 10754588, -9431476, 5203576},
- FieldElement{31834314, 14135496, -770007, 5159118, 20917671, -16768096, -7467973, -7337524, 31809243, 7347066},
- },
- {
- FieldElement{-9606723, -11874240, 20414459, 13033986, 13716524, -11691881, 19797970, -12211255, 15192876, -2087490},
- FieldElement{-12663563, -2181719, 1168162, -3804809, 26747877, -14138091, 10609330, 12694420, 33473243, -13382104},
- FieldElement{33184999, 11180355, 15832085, -11385430, -1633671, 225884, 15089336, -11023903, -6135662, 14480053},
- },
- {
- FieldElement{31308717, -5619998, 31030840, -1897099, 15674547, -6582883, 5496208, 13685227, 27595050, 8737275},
- FieldElement{-20318852, -15150239, 10933843, -16178022, 8335352, -7546022, -31008351, -12610604, 26498114, 66511},
- FieldElement{22644454, -8761729, -16671776, 4884562, -3105614, -13559366, 30540766, -4286747, -13327787, -7515095},
- },
- {
- FieldElement{-28017847, 9834845, 18617207, -2681312, -3401956, -13307506, 8205540, 13585437, -17127465, 15115439},
- FieldElement{23711543, -672915, 31206561, -8362711, 6164647, -9709987, -33535882, -1426096, 8236921, 16492939},
- FieldElement{-23910559, -13515526, -26299483, -4503841, 25005590, -7687270, 19574902, 10071562, 6708380, -6222424},
- },
- {
- FieldElement{2101391, -4930054, 19702731, 2367575, -15427167, 1047675, 5301017, 9328700, 29955601, -11678310},
- FieldElement{3096359, 9271816, -21620864, -15521844, -14847996, -7592937, -25892142, -12635595, -9917575, 6216608},
- FieldElement{-32615849, 338663, -25195611, 2510422, -29213566, -13820213, 24822830, -6146567, -26767480, 7525079},
- },
- {
- FieldElement{-23066649, -13985623, 16133487, -7896178, -3389565, 778788, -910336, -2782495, -19386633, 11994101},
- FieldElement{21691500, -13624626, -641331, -14367021, 3285881, -3483596, -25064666, 9718258, -7477437, 13381418},
- FieldElement{18445390, -4202236, 14979846, 11622458, -1727110, -3582980, 23111648, -6375247, 28535282, 15779576},
- },
- {
- FieldElement{30098053, 3089662, -9234387, 16662135, -21306940, 11308411, -14068454, 12021730, 9955285, -16303356},
- FieldElement{9734894, -14576830, -7473633, -9138735, 2060392, 11313496, -18426029, 9924399, 20194861, 13380996},
- FieldElement{-26378102, -7965207, -22167821, 15789297, -18055342, -6168792, -1984914, 15707771, 26342023, 10146099},
- },
- },
- {
- {
- FieldElement{-26016874, -219943, 21339191, -41388, 19745256, -2878700, -29637280, 2227040, 21612326, -545728},
- FieldElement{-13077387, 1184228, 23562814, -5970442, -20351244, -6348714, 25764461, 12243797, -20856566, 11649658},
- FieldElement{-10031494, 11262626, 27384172, 2271902, 26947504, -15997771, 39944, 6114064, 33514190, 2333242},
- },
- {
- FieldElement{-21433588, -12421821, 8119782, 7219913, -21830522, -9016134, -6679750, -12670638, 24350578, -13450001},
- FieldElement{-4116307, -11271533, -23886186, 4843615, -30088339, 690623, -31536088, -10406836, 8317860, 12352766},
- FieldElement{18200138, -14475911, -33087759, -2696619, -23702521, -9102511, -23552096, -2287550, 20712163, 6719373},
- },
- {
- FieldElement{26656208, 6075253, -7858556, 1886072, -28344043, 4262326, 11117530, -3763210, 26224235, -3297458},
- FieldElement{-17168938, -14854097, -3395676, -16369877, -19954045, 14050420, 21728352, 9493610, 18620611, -16428628},
- FieldElement{-13323321, 13325349, 11432106, 5964811, 18609221, 6062965, -5269471, -9725556, -30701573, -16479657},
- },
- {
- FieldElement{-23860538, -11233159, 26961357, 1640861, -32413112, -16737940, 12248509, -5240639, 13735342, 1934062},
- FieldElement{25089769, 6742589, 17081145, -13406266, 21909293, -16067981, -15136294, -3765346, -21277997, 5473616},
- FieldElement{31883677, -7961101, 1083432, -11572403, 22828471, 13290673, -7125085, 12469656, 29111212, -5451014},
- },
- {
- FieldElement{24244947, -15050407, -26262976, 2791540, -14997599, 16666678, 24367466, 6388839, -10295587, 452383},
- FieldElement{-25640782, -3417841, 5217916, 16224624, 19987036, -4082269, -24236251, -5915248, 15766062, 8407814},
- FieldElement{-20406999, 13990231, 15495425, 16395525, 5377168, 15166495, -8917023, -4388953, -8067909, 2276718},
- },
- {
- FieldElement{30157918, 12924066, -17712050, 9245753, 19895028, 3368142, -23827587, 5096219, 22740376, -7303417},
- FieldElement{2041139, -14256350, 7783687, 13876377, -25946985, -13352459, 24051124, 13742383, -15637599, 13295222},
- FieldElement{33338237, -8505733, 12532113, 7977527, 9106186, -1715251, -17720195, -4612972, -4451357, -14669444},
- },
- {
- FieldElement{-20045281, 5454097, -14346548, 6447146, 28862071, 1883651, -2469266, -4141880, 7770569, 9620597},
- FieldElement{23208068, 7979712, 33071466, 8149229, 1758231, -10834995, 30945528, -1694323, -33502340, -14767970},
- FieldElement{1439958, -16270480, -1079989, -793782, 4625402, 10647766, -5043801, 1220118, 30494170, -11440799},
- },
- {
- FieldElement{-5037580, -13028295, -2970559, -3061767, 15640974, -6701666, -26739026, 926050, -1684339, -13333647},
- FieldElement{13908495, -3549272, 30919928, -6273825, -21521863, 7989039, 9021034, 9078865, 3353509, 4033511},
- FieldElement{-29663431, -15113610, 32259991, -344482, 24295849, -12912123, 23161163, 8839127, 27485041, 7356032},
- },
- },
- {
- {
- FieldElement{9661027, 705443, 11980065, -5370154, -1628543, 14661173, -6346142, 2625015, 28431036, -16771834},
- FieldElement{-23839233, -8311415, -25945511, 7480958, -17681669, -8354183, -22545972, 14150565, 15970762, 4099461},
- FieldElement{29262576, 16756590, 26350592, -8793563, 8529671, -11208050, 13617293, -9937143, 11465739, 8317062},
- },
- {
- FieldElement{-25493081, -6962928, 32500200, -9419051, -23038724, -2302222, 14898637, 3848455, 20969334, -5157516},
- FieldElement{-20384450, -14347713, -18336405, 13884722, -33039454, 2842114, -21610826, -3649888, 11177095, 14989547},
- FieldElement{-24496721, -11716016, 16959896, 2278463, 12066309, 10137771, 13515641, 2581286, -28487508, 9930240},
- },
- {
- FieldElement{-17751622, -2097826, 16544300, -13009300, -15914807, -14949081, 18345767, -13403753, 16291481, -5314038},
- FieldElement{-33229194, 2553288, 32678213, 9875984, 8534129, 6889387, -9676774, 6957617, 4368891, 9788741},
- FieldElement{16660756, 7281060, -10830758, 12911820, 20108584, -8101676, -21722536, -8613148, 16250552, -11111103},
- },
- {
- FieldElement{-19765507, 2390526, -16551031, 14161980, 1905286, 6414907, 4689584, 10604807, -30190403, 4782747},
- FieldElement{-1354539, 14736941, -7367442, -13292886, 7710542, -14155590, -9981571, 4383045, 22546403, 437323},
- FieldElement{31665577, -12180464, -16186830, 1491339, -18368625, 3294682, 27343084, 2786261, -30633590, -14097016},
- },
- {
- FieldElement{-14467279, -683715, -33374107, 7448552, 19294360, 14334329, -19690631, 2355319, -19284671, -6114373},
- FieldElement{15121312, -15796162, 6377020, -6031361, -10798111, -12957845, 18952177, 15496498, -29380133, 11754228},
- FieldElement{-2637277, -13483075, 8488727, -14303896, 12728761, -1622493, 7141596, 11724556, 22761615, -10134141},
- },
- {
- FieldElement{16918416, 11729663, -18083579, 3022987, -31015732, -13339659, -28741185, -12227393, 32851222, 11717399},
- FieldElement{11166634, 7338049, -6722523, 4531520, -29468672, -7302055, 31474879, 3483633, -1193175, -4030831},
- FieldElement{-185635, 9921305, 31456609, -13536438, -12013818, 13348923, 33142652, 6546660, -19985279, -3948376},
- },
- {
- FieldElement{-32460596, 11266712, -11197107, -7899103, 31703694, 3855903, -8537131, -12833048, -30772034, -15486313},
- FieldElement{-18006477, 12709068, 3991746, -6479188, -21491523, -10550425, -31135347, -16049879, 10928917, 3011958},
- FieldElement{-6957757, -15594337, 31696059, 334240, 29576716, 14796075, -30831056, -12805180, 18008031, 10258577},
- },
- {
- FieldElement{-22448644, 15655569, 7018479, -4410003, -30314266, -1201591, -1853465, 1367120, 25127874, 6671743},
- FieldElement{29701166, -14373934, -10878120, 9279288, -17568, 13127210, 21382910, 11042292, 25838796, 4642684},
- FieldElement{-20430234, 14955537, -24126347, 8124619, -5369288, -5990470, 30468147, -13900640, 18423289, 4177476},
- },
- },
-}
diff --git a/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go b/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go
deleted file mode 100644
index 5f8b99478..000000000
--- a/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go
+++ /dev/null
@@ -1,1771 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package edwards25519
-
-// This code is a port of the public domain, “ref10” implementation of ed25519
-// from SUPERCOP.
-
-// FieldElement represents an element of the field GF(2^255 - 19). An element
-// t, entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77
-// t[3]+2^102 t[4]+...+2^230 t[9]. Bounds on each t[i] vary depending on
-// context.
-type FieldElement [10]int32
-
-var zero FieldElement
-
-func FeZero(fe *FieldElement) {
- copy(fe[:], zero[:])
-}
-
-func FeOne(fe *FieldElement) {
- FeZero(fe)
- fe[0] = 1
-}
-
-func FeAdd(dst, a, b *FieldElement) {
- dst[0] = a[0] + b[0]
- dst[1] = a[1] + b[1]
- dst[2] = a[2] + b[2]
- dst[3] = a[3] + b[3]
- dst[4] = a[4] + b[4]
- dst[5] = a[5] + b[5]
- dst[6] = a[6] + b[6]
- dst[7] = a[7] + b[7]
- dst[8] = a[8] + b[8]
- dst[9] = a[9] + b[9]
-}
-
-func FeSub(dst, a, b *FieldElement) {
- dst[0] = a[0] - b[0]
- dst[1] = a[1] - b[1]
- dst[2] = a[2] - b[2]
- dst[3] = a[3] - b[3]
- dst[4] = a[4] - b[4]
- dst[5] = a[5] - b[5]
- dst[6] = a[6] - b[6]
- dst[7] = a[7] - b[7]
- dst[8] = a[8] - b[8]
- dst[9] = a[9] - b[9]
-}
-
-func FeCopy(dst, src *FieldElement) {
- copy(dst[:], src[:])
-}
-
-// Replace (f,g) with (g,g) if b == 1;
-// replace (f,g) with (f,g) if b == 0.
-//
-// Preconditions: b in {0,1}.
-func FeCMove(f, g *FieldElement, b int32) {
- b = -b
- f[0] ^= b & (f[0] ^ g[0])
- f[1] ^= b & (f[1] ^ g[1])
- f[2] ^= b & (f[2] ^ g[2])
- f[3] ^= b & (f[3] ^ g[3])
- f[4] ^= b & (f[4] ^ g[4])
- f[5] ^= b & (f[5] ^ g[5])
- f[6] ^= b & (f[6] ^ g[6])
- f[7] ^= b & (f[7] ^ g[7])
- f[8] ^= b & (f[8] ^ g[8])
- f[9] ^= b & (f[9] ^ g[9])
-}
-
-func load3(in []byte) int64 {
- var r int64
- r = int64(in[0])
- r |= int64(in[1]) << 8
- r |= int64(in[2]) << 16
- return r
-}
-
-func load4(in []byte) int64 {
- var r int64
- r = int64(in[0])
- r |= int64(in[1]) << 8
- r |= int64(in[2]) << 16
- r |= int64(in[3]) << 24
- return r
-}
-
-func FeFromBytes(dst *FieldElement, src *[32]byte) {
- h0 := load4(src[:])
- h1 := load3(src[4:]) << 6
- h2 := load3(src[7:]) << 5
- h3 := load3(src[10:]) << 3
- h4 := load3(src[13:]) << 2
- h5 := load4(src[16:])
- h6 := load3(src[20:]) << 7
- h7 := load3(src[23:]) << 5
- h8 := load3(src[26:]) << 4
- h9 := (load3(src[29:]) & 8388607) << 2
-
- FeCombine(dst, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
-}
-
-// FeToBytes marshals h to s.
-// Preconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-//
-// Write p=2^255-19; q=floor(h/p).
-// Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))).
-//
-// Proof:
-// Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4.
-// Also have |h-2^230 h9|<2^230 so |19 2^(-255)(h-2^230 h9)|<1/4.
-//
-// Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9).
-// Then 0<y<1.
-//
-// Write r=h-pq.
-// Have 0<=r<=p-1=2^255-20.
-// Thus 0<=r+19(2^-255)r<r+19(2^-255)2^255<=2^255-1.
-//
-// Write x=r+19(2^-255)r+y.
-// Then 0<x<2^255 so floor(2^(-255)x) = 0 so floor(q+2^(-255)x) = q.
-//
-// Have q+2^(-255)x = 2^(-255)(h + 19 2^(-25) h9 + 2^(-1))
-// so floor(2^(-255)(h + 19 2^(-25) h9 + 2^(-1))) = q.
-func FeToBytes(s *[32]byte, h *FieldElement) {
- var carry [10]int32
-
- q := (19*h[9] + (1 << 24)) >> 25
- q = (h[0] + q) >> 26
- q = (h[1] + q) >> 25
- q = (h[2] + q) >> 26
- q = (h[3] + q) >> 25
- q = (h[4] + q) >> 26
- q = (h[5] + q) >> 25
- q = (h[6] + q) >> 26
- q = (h[7] + q) >> 25
- q = (h[8] + q) >> 26
- q = (h[9] + q) >> 25
-
- // Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20.
- h[0] += 19 * q
- // Goal: Output h-2^255 q, which is between 0 and 2^255-20.
-
- carry[0] = h[0] >> 26
- h[1] += carry[0]
- h[0] -= carry[0] << 26
- carry[1] = h[1] >> 25
- h[2] += carry[1]
- h[1] -= carry[1] << 25
- carry[2] = h[2] >> 26
- h[3] += carry[2]
- h[2] -= carry[2] << 26
- carry[3] = h[3] >> 25
- h[4] += carry[3]
- h[3] -= carry[3] << 25
- carry[4] = h[4] >> 26
- h[5] += carry[4]
- h[4] -= carry[4] << 26
- carry[5] = h[5] >> 25
- h[6] += carry[5]
- h[5] -= carry[5] << 25
- carry[6] = h[6] >> 26
- h[7] += carry[6]
- h[6] -= carry[6] << 26
- carry[7] = h[7] >> 25
- h[8] += carry[7]
- h[7] -= carry[7] << 25
- carry[8] = h[8] >> 26
- h[9] += carry[8]
- h[8] -= carry[8] << 26
- carry[9] = h[9] >> 25
- h[9] -= carry[9] << 25
- // h10 = carry9
-
- // Goal: Output h[0]+...+2^255 h10-2^255 q, which is between 0 and 2^255-20.
- // Have h[0]+...+2^230 h[9] between 0 and 2^255-1;
- // evidently 2^255 h10-2^255 q = 0.
- // Goal: Output h[0]+...+2^230 h[9].
-
- s[0] = byte(h[0] >> 0)
- s[1] = byte(h[0] >> 8)
- s[2] = byte(h[0] >> 16)
- s[3] = byte((h[0] >> 24) | (h[1] << 2))
- s[4] = byte(h[1] >> 6)
- s[5] = byte(h[1] >> 14)
- s[6] = byte((h[1] >> 22) | (h[2] << 3))
- s[7] = byte(h[2] >> 5)
- s[8] = byte(h[2] >> 13)
- s[9] = byte((h[2] >> 21) | (h[3] << 5))
- s[10] = byte(h[3] >> 3)
- s[11] = byte(h[3] >> 11)
- s[12] = byte((h[3] >> 19) | (h[4] << 6))
- s[13] = byte(h[4] >> 2)
- s[14] = byte(h[4] >> 10)
- s[15] = byte(h[4] >> 18)
- s[16] = byte(h[5] >> 0)
- s[17] = byte(h[5] >> 8)
- s[18] = byte(h[5] >> 16)
- s[19] = byte((h[5] >> 24) | (h[6] << 1))
- s[20] = byte(h[6] >> 7)
- s[21] = byte(h[6] >> 15)
- s[22] = byte((h[6] >> 23) | (h[7] << 3))
- s[23] = byte(h[7] >> 5)
- s[24] = byte(h[7] >> 13)
- s[25] = byte((h[7] >> 21) | (h[8] << 4))
- s[26] = byte(h[8] >> 4)
- s[27] = byte(h[8] >> 12)
- s[28] = byte((h[8] >> 20) | (h[9] << 6))
- s[29] = byte(h[9] >> 2)
- s[30] = byte(h[9] >> 10)
- s[31] = byte(h[9] >> 18)
-}
-
-func FeIsNegative(f *FieldElement) byte {
- var s [32]byte
- FeToBytes(&s, f)
- return s[0] & 1
-}
-
-func FeIsNonZero(f *FieldElement) int32 {
- var s [32]byte
- FeToBytes(&s, f)
- var x uint8
- for _, b := range s {
- x |= b
- }
- x |= x >> 4
- x |= x >> 2
- x |= x >> 1
- return int32(x & 1)
-}
-
-// FeNeg sets h = -f
-//
-// Preconditions:
-// |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-func FeNeg(h, f *FieldElement) {
- h[0] = -f[0]
- h[1] = -f[1]
- h[2] = -f[2]
- h[3] = -f[3]
- h[4] = -f[4]
- h[5] = -f[5]
- h[6] = -f[6]
- h[7] = -f[7]
- h[8] = -f[8]
- h[9] = -f[9]
-}
-
-func FeCombine(h *FieldElement, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) {
- var c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 int64
-
- /*
- |h0| <= (1.1*1.1*2^52*(1+19+19+19+19)+1.1*1.1*2^50*(38+38+38+38+38))
- i.e. |h0| <= 1.2*2^59; narrower ranges for h2, h4, h6, h8
- |h1| <= (1.1*1.1*2^51*(1+1+19+19+19+19+19+19+19+19))
- i.e. |h1| <= 1.5*2^58; narrower ranges for h3, h5, h7, h9
- */
-
- c0 = (h0 + (1 << 25)) >> 26
- h1 += c0
- h0 -= c0 << 26
- c4 = (h4 + (1 << 25)) >> 26
- h5 += c4
- h4 -= c4 << 26
- /* |h0| <= 2^25 */
- /* |h4| <= 2^25 */
- /* |h1| <= 1.51*2^58 */
- /* |h5| <= 1.51*2^58 */
-
- c1 = (h1 + (1 << 24)) >> 25
- h2 += c1
- h1 -= c1 << 25
- c5 = (h5 + (1 << 24)) >> 25
- h6 += c5
- h5 -= c5 << 25
- /* |h1| <= 2^24; from now on fits into int32 */
- /* |h5| <= 2^24; from now on fits into int32 */
- /* |h2| <= 1.21*2^59 */
- /* |h6| <= 1.21*2^59 */
-
- c2 = (h2 + (1 << 25)) >> 26
- h3 += c2
- h2 -= c2 << 26
- c6 = (h6 + (1 << 25)) >> 26
- h7 += c6
- h6 -= c6 << 26
- /* |h2| <= 2^25; from now on fits into int32 unchanged */
- /* |h6| <= 2^25; from now on fits into int32 unchanged */
- /* |h3| <= 1.51*2^58 */
- /* |h7| <= 1.51*2^58 */
-
- c3 = (h3 + (1 << 24)) >> 25
- h4 += c3
- h3 -= c3 << 25
- c7 = (h7 + (1 << 24)) >> 25
- h8 += c7
- h7 -= c7 << 25
- /* |h3| <= 2^24; from now on fits into int32 unchanged */
- /* |h7| <= 2^24; from now on fits into int32 unchanged */
- /* |h4| <= 1.52*2^33 */
- /* |h8| <= 1.52*2^33 */
-
- c4 = (h4 + (1 << 25)) >> 26
- h5 += c4
- h4 -= c4 << 26
- c8 = (h8 + (1 << 25)) >> 26
- h9 += c8
- h8 -= c8 << 26
- /* |h4| <= 2^25; from now on fits into int32 unchanged */
- /* |h8| <= 2^25; from now on fits into int32 unchanged */
- /* |h5| <= 1.01*2^24 */
- /* |h9| <= 1.51*2^58 */
-
- c9 = (h9 + (1 << 24)) >> 25
- h0 += c9 * 19
- h9 -= c9 << 25
- /* |h9| <= 2^24; from now on fits into int32 unchanged */
- /* |h0| <= 1.8*2^37 */
-
- c0 = (h0 + (1 << 25)) >> 26
- h1 += c0
- h0 -= c0 << 26
- /* |h0| <= 2^25; from now on fits into int32 unchanged */
- /* |h1| <= 1.01*2^24 */
-
- h[0] = int32(h0)
- h[1] = int32(h1)
- h[2] = int32(h2)
- h[3] = int32(h3)
- h[4] = int32(h4)
- h[5] = int32(h5)
- h[6] = int32(h6)
- h[7] = int32(h7)
- h[8] = int32(h8)
- h[9] = int32(h9)
-}
-
-// FeMul calculates h = f * g
-// Can overlap h with f or g.
-//
-// Preconditions:
-// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-// |g| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-//
-// Notes on implementation strategy:
-//
-// Using schoolbook multiplication.
-// Karatsuba would save a little in some cost models.
-//
-// Most multiplications by 2 and 19 are 32-bit precomputations;
-// cheaper than 64-bit postcomputations.
-//
-// There is one remaining multiplication by 19 in the carry chain;
-// one *19 precomputation can be merged into this,
-// but the resulting data flow is considerably less clean.
-//
-// There are 12 carries below.
-// 10 of them are 2-way parallelizable and vectorizable.
-// Can get away with 11 carries, but then data flow is much deeper.
-//
-// With tighter constraints on inputs, can squeeze carries into int32.
-func FeMul(h, f, g *FieldElement) {
- f0 := int64(f[0])
- f1 := int64(f[1])
- f2 := int64(f[2])
- f3 := int64(f[3])
- f4 := int64(f[4])
- f5 := int64(f[5])
- f6 := int64(f[6])
- f7 := int64(f[7])
- f8 := int64(f[8])
- f9 := int64(f[9])
-
- f1_2 := int64(2 * f[1])
- f3_2 := int64(2 * f[3])
- f5_2 := int64(2 * f[5])
- f7_2 := int64(2 * f[7])
- f9_2 := int64(2 * f[9])
-
- g0 := int64(g[0])
- g1 := int64(g[1])
- g2 := int64(g[2])
- g3 := int64(g[3])
- g4 := int64(g[4])
- g5 := int64(g[5])
- g6 := int64(g[6])
- g7 := int64(g[7])
- g8 := int64(g[8])
- g9 := int64(g[9])
-
- g1_19 := int64(19 * g[1]) /* 1.4*2^29 */
- g2_19 := int64(19 * g[2]) /* 1.4*2^30; still ok */
- g3_19 := int64(19 * g[3])
- g4_19 := int64(19 * g[4])
- g5_19 := int64(19 * g[5])
- g6_19 := int64(19 * g[6])
- g7_19 := int64(19 * g[7])
- g8_19 := int64(19 * g[8])
- g9_19 := int64(19 * g[9])
-
- h0 := f0*g0 + f1_2*g9_19 + f2*g8_19 + f3_2*g7_19 + f4*g6_19 + f5_2*g5_19 + f6*g4_19 + f7_2*g3_19 + f8*g2_19 + f9_2*g1_19
- h1 := f0*g1 + f1*g0 + f2*g9_19 + f3*g8_19 + f4*g7_19 + f5*g6_19 + f6*g5_19 + f7*g4_19 + f8*g3_19 + f9*g2_19
- h2 := f0*g2 + f1_2*g1 + f2*g0 + f3_2*g9_19 + f4*g8_19 + f5_2*g7_19 + f6*g6_19 + f7_2*g5_19 + f8*g4_19 + f9_2*g3_19
- h3 := f0*g3 + f1*g2 + f2*g1 + f3*g0 + f4*g9_19 + f5*g8_19 + f6*g7_19 + f7*g6_19 + f8*g5_19 + f9*g4_19
- h4 := f0*g4 + f1_2*g3 + f2*g2 + f3_2*g1 + f4*g0 + f5_2*g9_19 + f6*g8_19 + f7_2*g7_19 + f8*g6_19 + f9_2*g5_19
- h5 := f0*g5 + f1*g4 + f2*g3 + f3*g2 + f4*g1 + f5*g0 + f6*g9_19 + f7*g8_19 + f8*g7_19 + f9*g6_19
- h6 := f0*g6 + f1_2*g5 + f2*g4 + f3_2*g3 + f4*g2 + f5_2*g1 + f6*g0 + f7_2*g9_19 + f8*g8_19 + f9_2*g7_19
- h7 := f0*g7 + f1*g6 + f2*g5 + f3*g4 + f4*g3 + f5*g2 + f6*g1 + f7*g0 + f8*g9_19 + f9*g8_19
- h8 := f0*g8 + f1_2*g7 + f2*g6 + f3_2*g5 + f4*g4 + f5_2*g3 + f6*g2 + f7_2*g1 + f8*g0 + f9_2*g9_19
- h9 := f0*g9 + f1*g8 + f2*g7 + f3*g6 + f4*g5 + f5*g4 + f6*g3 + f7*g2 + f8*g1 + f9*g0
-
- FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
-}
-
-func feSquare(f *FieldElement) (h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) {
- f0 := int64(f[0])
- f1 := int64(f[1])
- f2 := int64(f[2])
- f3 := int64(f[3])
- f4 := int64(f[4])
- f5 := int64(f[5])
- f6 := int64(f[6])
- f7 := int64(f[7])
- f8 := int64(f[8])
- f9 := int64(f[9])
- f0_2 := int64(2 * f[0])
- f1_2 := int64(2 * f[1])
- f2_2 := int64(2 * f[2])
- f3_2 := int64(2 * f[3])
- f4_2 := int64(2 * f[4])
- f5_2 := int64(2 * f[5])
- f6_2 := int64(2 * f[6])
- f7_2 := int64(2 * f[7])
- f5_38 := 38 * f5 // 1.31*2^30
- f6_19 := 19 * f6 // 1.31*2^30
- f7_38 := 38 * f7 // 1.31*2^30
- f8_19 := 19 * f8 // 1.31*2^30
- f9_38 := 38 * f9 // 1.31*2^30
-
- h0 = f0*f0 + f1_2*f9_38 + f2_2*f8_19 + f3_2*f7_38 + f4_2*f6_19 + f5*f5_38
- h1 = f0_2*f1 + f2*f9_38 + f3_2*f8_19 + f4*f7_38 + f5_2*f6_19
- h2 = f0_2*f2 + f1_2*f1 + f3_2*f9_38 + f4_2*f8_19 + f5_2*f7_38 + f6*f6_19
- h3 = f0_2*f3 + f1_2*f2 + f4*f9_38 + f5_2*f8_19 + f6*f7_38
- h4 = f0_2*f4 + f1_2*f3_2 + f2*f2 + f5_2*f9_38 + f6_2*f8_19 + f7*f7_38
- h5 = f0_2*f5 + f1_2*f4 + f2_2*f3 + f6*f9_38 + f7_2*f8_19
- h6 = f0_2*f6 + f1_2*f5_2 + f2_2*f4 + f3_2*f3 + f7_2*f9_38 + f8*f8_19
- h7 = f0_2*f7 + f1_2*f6 + f2_2*f5 + f3_2*f4 + f8*f9_38
- h8 = f0_2*f8 + f1_2*f7_2 + f2_2*f6 + f3_2*f5_2 + f4*f4 + f9*f9_38
- h9 = f0_2*f9 + f1_2*f8 + f2_2*f7 + f3_2*f6 + f4_2*f5
-
- return
-}
-
-// FeSquare calculates h = f*f. Can overlap h with f.
-//
-// Preconditions:
-// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-func FeSquare(h, f *FieldElement) {
- h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f)
- FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
-}
-
-// FeSquare2 sets h = 2 * f * f
-//
-// Can overlap h with f.
-//
-// Preconditions:
-// |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc.
-// See fe_mul.c for discussion of implementation strategy.
-func FeSquare2(h, f *FieldElement) {
- h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f)
-
- h0 += h0
- h1 += h1
- h2 += h2
- h3 += h3
- h4 += h4
- h5 += h5
- h6 += h6
- h7 += h7
- h8 += h8
- h9 += h9
-
- FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
-}
-
-func FeInvert(out, z *FieldElement) {
- var t0, t1, t2, t3 FieldElement
- var i int
-
- FeSquare(&t0, z) // 2^1
- FeSquare(&t1, &t0) // 2^2
- for i = 1; i < 2; i++ { // 2^3
- FeSquare(&t1, &t1)
- }
- FeMul(&t1, z, &t1) // 2^3 + 2^0
- FeMul(&t0, &t0, &t1) // 2^3 + 2^1 + 2^0
- FeSquare(&t2, &t0) // 2^4 + 2^2 + 2^1
- FeMul(&t1, &t1, &t2) // 2^4 + 2^3 + 2^2 + 2^1 + 2^0
- FeSquare(&t2, &t1) // 5,4,3,2,1
- for i = 1; i < 5; i++ { // 9,8,7,6,5
- FeSquare(&t2, &t2)
- }
- FeMul(&t1, &t2, &t1) // 9,8,7,6,5,4,3,2,1,0
- FeSquare(&t2, &t1) // 10..1
- for i = 1; i < 10; i++ { // 19..10
- FeSquare(&t2, &t2)
- }
- FeMul(&t2, &t2, &t1) // 19..0
- FeSquare(&t3, &t2) // 20..1
- for i = 1; i < 20; i++ { // 39..20
- FeSquare(&t3, &t3)
- }
- FeMul(&t2, &t3, &t2) // 39..0
- FeSquare(&t2, &t2) // 40..1
- for i = 1; i < 10; i++ { // 49..10
- FeSquare(&t2, &t2)
- }
- FeMul(&t1, &t2, &t1) // 49..0
- FeSquare(&t2, &t1) // 50..1
- for i = 1; i < 50; i++ { // 99..50
- FeSquare(&t2, &t2)
- }
- FeMul(&t2, &t2, &t1) // 99..0
- FeSquare(&t3, &t2) // 100..1
- for i = 1; i < 100; i++ { // 199..100
- FeSquare(&t3, &t3)
- }
- FeMul(&t2, &t3, &t2) // 199..0
- FeSquare(&t2, &t2) // 200..1
- for i = 1; i < 50; i++ { // 249..50
- FeSquare(&t2, &t2)
- }
- FeMul(&t1, &t2, &t1) // 249..0
- FeSquare(&t1, &t1) // 250..1
- for i = 1; i < 5; i++ { // 254..5
- FeSquare(&t1, &t1)
- }
- FeMul(out, &t1, &t0) // 254..5,3,1,0
-}
-
-func fePow22523(out, z *FieldElement) {
- var t0, t1, t2 FieldElement
- var i int
-
- FeSquare(&t0, z)
- for i = 1; i < 1; i++ {
- FeSquare(&t0, &t0)
- }
- FeSquare(&t1, &t0)
- for i = 1; i < 2; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t1, z, &t1)
- FeMul(&t0, &t0, &t1)
- FeSquare(&t0, &t0)
- for i = 1; i < 1; i++ {
- FeSquare(&t0, &t0)
- }
- FeMul(&t0, &t1, &t0)
- FeSquare(&t1, &t0)
- for i = 1; i < 5; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t0, &t1, &t0)
- FeSquare(&t1, &t0)
- for i = 1; i < 10; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t1, &t1, &t0)
- FeSquare(&t2, &t1)
- for i = 1; i < 20; i++ {
- FeSquare(&t2, &t2)
- }
- FeMul(&t1, &t2, &t1)
- FeSquare(&t1, &t1)
- for i = 1; i < 10; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t0, &t1, &t0)
- FeSquare(&t1, &t0)
- for i = 1; i < 50; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t1, &t1, &t0)
- FeSquare(&t2, &t1)
- for i = 1; i < 100; i++ {
- FeSquare(&t2, &t2)
- }
- FeMul(&t1, &t2, &t1)
- FeSquare(&t1, &t1)
- for i = 1; i < 50; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t0, &t1, &t0)
- FeSquare(&t0, &t0)
- for i = 1; i < 2; i++ {
- FeSquare(&t0, &t0)
- }
- FeMul(out, &t0, z)
-}
-
-// Group elements are members of the elliptic curve -x^2 + y^2 = 1 + d * x^2 *
-// y^2 where d = -121665/121666.
-//
-// Several representations are used:
-// ProjectiveGroupElement: (X:Y:Z) satisfying x=X/Z, y=Y/Z
-// ExtendedGroupElement: (X:Y:Z:T) satisfying x=X/Z, y=Y/Z, XY=ZT
-// CompletedGroupElement: ((X:Z),(Y:T)) satisfying x=X/Z, y=Y/T
-// PreComputedGroupElement: (y+x,y-x,2dxy)
-
-type ProjectiveGroupElement struct {
- X, Y, Z FieldElement
-}
-
-type ExtendedGroupElement struct {
- X, Y, Z, T FieldElement
-}
-
-type CompletedGroupElement struct {
- X, Y, Z, T FieldElement
-}
-
-type PreComputedGroupElement struct {
- yPlusX, yMinusX, xy2d FieldElement
-}
-
-type CachedGroupElement struct {
- yPlusX, yMinusX, Z, T2d FieldElement
-}
-
-func (p *ProjectiveGroupElement) Zero() {
- FeZero(&p.X)
- FeOne(&p.Y)
- FeOne(&p.Z)
-}
-
-func (p *ProjectiveGroupElement) Double(r *CompletedGroupElement) {
- var t0 FieldElement
-
- FeSquare(&r.X, &p.X)
- FeSquare(&r.Z, &p.Y)
- FeSquare2(&r.T, &p.Z)
- FeAdd(&r.Y, &p.X, &p.Y)
- FeSquare(&t0, &r.Y)
- FeAdd(&r.Y, &r.Z, &r.X)
- FeSub(&r.Z, &r.Z, &r.X)
- FeSub(&r.X, &t0, &r.Y)
- FeSub(&r.T, &r.T, &r.Z)
-}
-
-func (p *ProjectiveGroupElement) ToBytes(s *[32]byte) {
- var recip, x, y FieldElement
-
- FeInvert(&recip, &p.Z)
- FeMul(&x, &p.X, &recip)
- FeMul(&y, &p.Y, &recip)
- FeToBytes(s, &y)
- s[31] ^= FeIsNegative(&x) << 7
-}
-
-func (p *ExtendedGroupElement) Zero() {
- FeZero(&p.X)
- FeOne(&p.Y)
- FeOne(&p.Z)
- FeZero(&p.T)
-}
-
-func (p *ExtendedGroupElement) Double(r *CompletedGroupElement) {
- var q ProjectiveGroupElement
- p.ToProjective(&q)
- q.Double(r)
-}
-
-func (p *ExtendedGroupElement) ToCached(r *CachedGroupElement) {
- FeAdd(&r.yPlusX, &p.Y, &p.X)
- FeSub(&r.yMinusX, &p.Y, &p.X)
- FeCopy(&r.Z, &p.Z)
- FeMul(&r.T2d, &p.T, &d2)
-}
-
-func (p *ExtendedGroupElement) ToProjective(r *ProjectiveGroupElement) {
- FeCopy(&r.X, &p.X)
- FeCopy(&r.Y, &p.Y)
- FeCopy(&r.Z, &p.Z)
-}
-
-func (p *ExtendedGroupElement) ToBytes(s *[32]byte) {
- var recip, x, y FieldElement
-
- FeInvert(&recip, &p.Z)
- FeMul(&x, &p.X, &recip)
- FeMul(&y, &p.Y, &recip)
- FeToBytes(s, &y)
- s[31] ^= FeIsNegative(&x) << 7
-}
-
-func (p *ExtendedGroupElement) FromBytes(s *[32]byte) bool {
- var u, v, v3, vxx, check FieldElement
-
- FeFromBytes(&p.Y, s)
- FeOne(&p.Z)
- FeSquare(&u, &p.Y)
- FeMul(&v, &u, &d)
- FeSub(&u, &u, &p.Z) // y = y^2-1
- FeAdd(&v, &v, &p.Z) // v = dy^2+1
-
- FeSquare(&v3, &v)
- FeMul(&v3, &v3, &v) // v3 = v^3
- FeSquare(&p.X, &v3)
- FeMul(&p.X, &p.X, &v)
- FeMul(&p.X, &p.X, &u) // x = uv^7
-
- fePow22523(&p.X, &p.X) // x = (uv^7)^((q-5)/8)
- FeMul(&p.X, &p.X, &v3)
- FeMul(&p.X, &p.X, &u) // x = uv^3(uv^7)^((q-5)/8)
-
- var tmpX, tmp2 [32]byte
-
- FeSquare(&vxx, &p.X)
- FeMul(&vxx, &vxx, &v)
- FeSub(&check, &vxx, &u) // vx^2-u
- if FeIsNonZero(&check) == 1 {
- FeAdd(&check, &vxx, &u) // vx^2+u
- if FeIsNonZero(&check) == 1 {
- return false
- }
- FeMul(&p.X, &p.X, &SqrtM1)
-
- FeToBytes(&tmpX, &p.X)
- for i, v := range tmpX {
- tmp2[31-i] = v
- }
- }
-
- if FeIsNegative(&p.X) != (s[31] >> 7) {
- FeNeg(&p.X, &p.X)
- }
-
- FeMul(&p.T, &p.X, &p.Y)
- return true
-}
-
-func (p *CompletedGroupElement) ToProjective(r *ProjectiveGroupElement) {
- FeMul(&r.X, &p.X, &p.T)
- FeMul(&r.Y, &p.Y, &p.Z)
- FeMul(&r.Z, &p.Z, &p.T)
-}
-
-func (p *CompletedGroupElement) ToExtended(r *ExtendedGroupElement) {
- FeMul(&r.X, &p.X, &p.T)
- FeMul(&r.Y, &p.Y, &p.Z)
- FeMul(&r.Z, &p.Z, &p.T)
- FeMul(&r.T, &p.X, &p.Y)
-}
-
-func (p *PreComputedGroupElement) Zero() {
- FeOne(&p.yPlusX)
- FeOne(&p.yMinusX)
- FeZero(&p.xy2d)
-}
-
-func geAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) {
- var t0 FieldElement
-
- FeAdd(&r.X, &p.Y, &p.X)
- FeSub(&r.Y, &p.Y, &p.X)
- FeMul(&r.Z, &r.X, &q.yPlusX)
- FeMul(&r.Y, &r.Y, &q.yMinusX)
- FeMul(&r.T, &q.T2d, &p.T)
- FeMul(&r.X, &p.Z, &q.Z)
- FeAdd(&t0, &r.X, &r.X)
- FeSub(&r.X, &r.Z, &r.Y)
- FeAdd(&r.Y, &r.Z, &r.Y)
- FeAdd(&r.Z, &t0, &r.T)
- FeSub(&r.T, &t0, &r.T)
-}
-
-func geSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) {
- var t0 FieldElement
-
- FeAdd(&r.X, &p.Y, &p.X)
- FeSub(&r.Y, &p.Y, &p.X)
- FeMul(&r.Z, &r.X, &q.yMinusX)
- FeMul(&r.Y, &r.Y, &q.yPlusX)
- FeMul(&r.T, &q.T2d, &p.T)
- FeMul(&r.X, &p.Z, &q.Z)
- FeAdd(&t0, &r.X, &r.X)
- FeSub(&r.X, &r.Z, &r.Y)
- FeAdd(&r.Y, &r.Z, &r.Y)
- FeSub(&r.Z, &t0, &r.T)
- FeAdd(&r.T, &t0, &r.T)
-}
-
-func geMixedAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) {
- var t0 FieldElement
-
- FeAdd(&r.X, &p.Y, &p.X)
- FeSub(&r.Y, &p.Y, &p.X)
- FeMul(&r.Z, &r.X, &q.yPlusX)
- FeMul(&r.Y, &r.Y, &q.yMinusX)
- FeMul(&r.T, &q.xy2d, &p.T)
- FeAdd(&t0, &p.Z, &p.Z)
- FeSub(&r.X, &r.Z, &r.Y)
- FeAdd(&r.Y, &r.Z, &r.Y)
- FeAdd(&r.Z, &t0, &r.T)
- FeSub(&r.T, &t0, &r.T)
-}
-
-func geMixedSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) {
- var t0 FieldElement
-
- FeAdd(&r.X, &p.Y, &p.X)
- FeSub(&r.Y, &p.Y, &p.X)
- FeMul(&r.Z, &r.X, &q.yMinusX)
- FeMul(&r.Y, &r.Y, &q.yPlusX)
- FeMul(&r.T, &q.xy2d, &p.T)
- FeAdd(&t0, &p.Z, &p.Z)
- FeSub(&r.X, &r.Z, &r.Y)
- FeAdd(&r.Y, &r.Z, &r.Y)
- FeSub(&r.Z, &t0, &r.T)
- FeAdd(&r.T, &t0, &r.T)
-}
-
-func slide(r *[256]int8, a *[32]byte) {
- for i := range r {
- r[i] = int8(1 & (a[i>>3] >> uint(i&7)))
- }
-
- for i := range r {
- if r[i] != 0 {
- for b := 1; b <= 6 && i+b < 256; b++ {
- if r[i+b] != 0 {
- if r[i]+(r[i+b]<<uint(b)) <= 15 {
- r[i] += r[i+b] << uint(b)
- r[i+b] = 0
- } else if r[i]-(r[i+b]<<uint(b)) >= -15 {
- r[i] -= r[i+b] << uint(b)
- for k := i + b; k < 256; k++ {
- if r[k] == 0 {
- r[k] = 1
- break
- }
- r[k] = 0
- }
- } else {
- break
- }
- }
- }
- }
- }
-}
-
-// GeDoubleScalarMultVartime sets r = a*A + b*B
-// where a = a[0]+256*a[1]+...+256^31 a[31].
-// and b = b[0]+256*b[1]+...+256^31 b[31].
-// B is the Ed25519 base point (x,4/5) with x positive.
-func GeDoubleScalarMultVartime(r *ProjectiveGroupElement, a *[32]byte, A *ExtendedGroupElement, b *[32]byte) {
- var aSlide, bSlide [256]int8
- var Ai [8]CachedGroupElement // A,3A,5A,7A,9A,11A,13A,15A
- var t CompletedGroupElement
- var u, A2 ExtendedGroupElement
- var i int
-
- slide(&aSlide, a)
- slide(&bSlide, b)
-
- A.ToCached(&Ai[0])
- A.Double(&t)
- t.ToExtended(&A2)
-
- for i := 0; i < 7; i++ {
- geAdd(&t, &A2, &Ai[i])
- t.ToExtended(&u)
- u.ToCached(&Ai[i+1])
- }
-
- r.Zero()
-
- for i = 255; i >= 0; i-- {
- if aSlide[i] != 0 || bSlide[i] != 0 {
- break
- }
- }
-
- for ; i >= 0; i-- {
- r.Double(&t)
-
- if aSlide[i] > 0 {
- t.ToExtended(&u)
- geAdd(&t, &u, &Ai[aSlide[i]/2])
- } else if aSlide[i] < 0 {
- t.ToExtended(&u)
- geSub(&t, &u, &Ai[(-aSlide[i])/2])
- }
-
- if bSlide[i] > 0 {
- t.ToExtended(&u)
- geMixedAdd(&t, &u, &bi[bSlide[i]/2])
- } else if bSlide[i] < 0 {
- t.ToExtended(&u)
- geMixedSub(&t, &u, &bi[(-bSlide[i])/2])
- }
-
- t.ToProjective(r)
- }
-}
-
-// equal returns 1 if b == c and 0 otherwise, assuming that b and c are
-// non-negative.
-func equal(b, c int32) int32 {
- x := uint32(b ^ c)
- x--
- return int32(x >> 31)
-}
-
-// negative returns 1 if b < 0 and 0 otherwise.
-func negative(b int32) int32 {
- return (b >> 31) & 1
-}
-
-func PreComputedGroupElementCMove(t, u *PreComputedGroupElement, b int32) {
- FeCMove(&t.yPlusX, &u.yPlusX, b)
- FeCMove(&t.yMinusX, &u.yMinusX, b)
- FeCMove(&t.xy2d, &u.xy2d, b)
-}
-
-func selectPoint(t *PreComputedGroupElement, pos int32, b int32) {
- var minusT PreComputedGroupElement
- bNegative := negative(b)
- bAbs := b - (((-bNegative) & b) << 1)
-
- t.Zero()
- for i := int32(0); i < 8; i++ {
- PreComputedGroupElementCMove(t, &base[pos][i], equal(bAbs, i+1))
- }
- FeCopy(&minusT.yPlusX, &t.yMinusX)
- FeCopy(&minusT.yMinusX, &t.yPlusX)
- FeNeg(&minusT.xy2d, &t.xy2d)
- PreComputedGroupElementCMove(t, &minusT, bNegative)
-}
-
-// GeScalarMultBase computes h = a*B, where
-// a = a[0]+256*a[1]+...+256^31 a[31]
-// B is the Ed25519 base point (x,4/5) with x positive.
-//
-// Preconditions:
-// a[31] <= 127
-func GeScalarMultBase(h *ExtendedGroupElement, a *[32]byte) {
- var e [64]int8
-
- for i, v := range a {
- e[2*i] = int8(v & 15)
- e[2*i+1] = int8((v >> 4) & 15)
- }
-
- // each e[i] is between 0 and 15 and e[63] is between 0 and 7.
-
- carry := int8(0)
- for i := 0; i < 63; i++ {
- e[i] += carry
- carry = (e[i] + 8) >> 4
- e[i] -= carry << 4
- }
- e[63] += carry
- // each e[i] is between -8 and 8.
-
- h.Zero()
- var t PreComputedGroupElement
- var r CompletedGroupElement
- for i := int32(1); i < 64; i += 2 {
- selectPoint(&t, i/2, int32(e[i]))
- geMixedAdd(&r, h, &t)
- r.ToExtended(h)
- }
-
- var s ProjectiveGroupElement
-
- h.Double(&r)
- r.ToProjective(&s)
- s.Double(&r)
- r.ToProjective(&s)
- s.Double(&r)
- r.ToProjective(&s)
- s.Double(&r)
- r.ToExtended(h)
-
- for i := int32(0); i < 64; i += 2 {
- selectPoint(&t, i/2, int32(e[i]))
- geMixedAdd(&r, h, &t)
- r.ToExtended(h)
- }
-}
-
-// The scalars are GF(2^252 + 27742317777372353535851937790883648493).
-
-// Input:
-// a[0]+256*a[1]+...+256^31*a[31] = a
-// b[0]+256*b[1]+...+256^31*b[31] = b
-// c[0]+256*c[1]+...+256^31*c[31] = c
-//
-// Output:
-// s[0]+256*s[1]+...+256^31*s[31] = (ab+c) mod l
-// where l = 2^252 + 27742317777372353535851937790883648493.
-func ScMulAdd(s, a, b, c *[32]byte) {
- a0 := 2097151 & load3(a[:])
- a1 := 2097151 & (load4(a[2:]) >> 5)
- a2 := 2097151 & (load3(a[5:]) >> 2)
- a3 := 2097151 & (load4(a[7:]) >> 7)
- a4 := 2097151 & (load4(a[10:]) >> 4)
- a5 := 2097151 & (load3(a[13:]) >> 1)
- a6 := 2097151 & (load4(a[15:]) >> 6)
- a7 := 2097151 & (load3(a[18:]) >> 3)
- a8 := 2097151 & load3(a[21:])
- a9 := 2097151 & (load4(a[23:]) >> 5)
- a10 := 2097151 & (load3(a[26:]) >> 2)
- a11 := (load4(a[28:]) >> 7)
- b0 := 2097151 & load3(b[:])
- b1 := 2097151 & (load4(b[2:]) >> 5)
- b2 := 2097151 & (load3(b[5:]) >> 2)
- b3 := 2097151 & (load4(b[7:]) >> 7)
- b4 := 2097151 & (load4(b[10:]) >> 4)
- b5 := 2097151 & (load3(b[13:]) >> 1)
- b6 := 2097151 & (load4(b[15:]) >> 6)
- b7 := 2097151 & (load3(b[18:]) >> 3)
- b8 := 2097151 & load3(b[21:])
- b9 := 2097151 & (load4(b[23:]) >> 5)
- b10 := 2097151 & (load3(b[26:]) >> 2)
- b11 := (load4(b[28:]) >> 7)
- c0 := 2097151 & load3(c[:])
- c1 := 2097151 & (load4(c[2:]) >> 5)
- c2 := 2097151 & (load3(c[5:]) >> 2)
- c3 := 2097151 & (load4(c[7:]) >> 7)
- c4 := 2097151 & (load4(c[10:]) >> 4)
- c5 := 2097151 & (load3(c[13:]) >> 1)
- c6 := 2097151 & (load4(c[15:]) >> 6)
- c7 := 2097151 & (load3(c[18:]) >> 3)
- c8 := 2097151 & load3(c[21:])
- c9 := 2097151 & (load4(c[23:]) >> 5)
- c10 := 2097151 & (load3(c[26:]) >> 2)
- c11 := (load4(c[28:]) >> 7)
- var carry [23]int64
-
- s0 := c0 + a0*b0
- s1 := c1 + a0*b1 + a1*b0
- s2 := c2 + a0*b2 + a1*b1 + a2*b0
- s3 := c3 + a0*b3 + a1*b2 + a2*b1 + a3*b0
- s4 := c4 + a0*b4 + a1*b3 + a2*b2 + a3*b1 + a4*b0
- s5 := c5 + a0*b5 + a1*b4 + a2*b3 + a3*b2 + a4*b1 + a5*b0
- s6 := c6 + a0*b6 + a1*b5 + a2*b4 + a3*b3 + a4*b2 + a5*b1 + a6*b0
- s7 := c7 + a0*b7 + a1*b6 + a2*b5 + a3*b4 + a4*b3 + a5*b2 + a6*b1 + a7*b0
- s8 := c8 + a0*b8 + a1*b7 + a2*b6 + a3*b5 + a4*b4 + a5*b3 + a6*b2 + a7*b1 + a8*b0
- s9 := c9 + a0*b9 + a1*b8 + a2*b7 + a3*b6 + a4*b5 + a5*b4 + a6*b3 + a7*b2 + a8*b1 + a9*b0
- s10 := c10 + a0*b10 + a1*b9 + a2*b8 + a3*b7 + a4*b6 + a5*b5 + a6*b4 + a7*b3 + a8*b2 + a9*b1 + a10*b0
- s11 := c11 + a0*b11 + a1*b10 + a2*b9 + a3*b8 + a4*b7 + a5*b6 + a6*b5 + a7*b4 + a8*b3 + a9*b2 + a10*b1 + a11*b0
- s12 := a1*b11 + a2*b10 + a3*b9 + a4*b8 + a5*b7 + a6*b6 + a7*b5 + a8*b4 + a9*b3 + a10*b2 + a11*b1
- s13 := a2*b11 + a3*b10 + a4*b9 + a5*b8 + a6*b7 + a7*b6 + a8*b5 + a9*b4 + a10*b3 + a11*b2
- s14 := a3*b11 + a4*b10 + a5*b9 + a6*b8 + a7*b7 + a8*b6 + a9*b5 + a10*b4 + a11*b3
- s15 := a4*b11 + a5*b10 + a6*b9 + a7*b8 + a8*b7 + a9*b6 + a10*b5 + a11*b4
- s16 := a5*b11 + a6*b10 + a7*b9 + a8*b8 + a9*b7 + a10*b6 + a11*b5
- s17 := a6*b11 + a7*b10 + a8*b9 + a9*b8 + a10*b7 + a11*b6
- s18 := a7*b11 + a8*b10 + a9*b9 + a10*b8 + a11*b7
- s19 := a8*b11 + a9*b10 + a10*b9 + a11*b8
- s20 := a9*b11 + a10*b10 + a11*b9
- s21 := a10*b11 + a11*b10
- s22 := a11 * b11
- s23 := int64(0)
-
- carry[0] = (s0 + (1 << 20)) >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[2] = (s2 + (1 << 20)) >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[4] = (s4 + (1 << 20)) >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[6] = (s6 + (1 << 20)) >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[8] = (s8 + (1 << 20)) >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[10] = (s10 + (1 << 20)) >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
- carry[12] = (s12 + (1 << 20)) >> 21
- s13 += carry[12]
- s12 -= carry[12] << 21
- carry[14] = (s14 + (1 << 20)) >> 21
- s15 += carry[14]
- s14 -= carry[14] << 21
- carry[16] = (s16 + (1 << 20)) >> 21
- s17 += carry[16]
- s16 -= carry[16] << 21
- carry[18] = (s18 + (1 << 20)) >> 21
- s19 += carry[18]
- s18 -= carry[18] << 21
- carry[20] = (s20 + (1 << 20)) >> 21
- s21 += carry[20]
- s20 -= carry[20] << 21
- carry[22] = (s22 + (1 << 20)) >> 21
- s23 += carry[22]
- s22 -= carry[22] << 21
-
- carry[1] = (s1 + (1 << 20)) >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[3] = (s3 + (1 << 20)) >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[5] = (s5 + (1 << 20)) >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[7] = (s7 + (1 << 20)) >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[9] = (s9 + (1 << 20)) >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[11] = (s11 + (1 << 20)) >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
- carry[13] = (s13 + (1 << 20)) >> 21
- s14 += carry[13]
- s13 -= carry[13] << 21
- carry[15] = (s15 + (1 << 20)) >> 21
- s16 += carry[15]
- s15 -= carry[15] << 21
- carry[17] = (s17 + (1 << 20)) >> 21
- s18 += carry[17]
- s17 -= carry[17] << 21
- carry[19] = (s19 + (1 << 20)) >> 21
- s20 += carry[19]
- s19 -= carry[19] << 21
- carry[21] = (s21 + (1 << 20)) >> 21
- s22 += carry[21]
- s21 -= carry[21] << 21
-
- s11 += s23 * 666643
- s12 += s23 * 470296
- s13 += s23 * 654183
- s14 -= s23 * 997805
- s15 += s23 * 136657
- s16 -= s23 * 683901
- s23 = 0
-
- s10 += s22 * 666643
- s11 += s22 * 470296
- s12 += s22 * 654183
- s13 -= s22 * 997805
- s14 += s22 * 136657
- s15 -= s22 * 683901
- s22 = 0
-
- s9 += s21 * 666643
- s10 += s21 * 470296
- s11 += s21 * 654183
- s12 -= s21 * 997805
- s13 += s21 * 136657
- s14 -= s21 * 683901
- s21 = 0
-
- s8 += s20 * 666643
- s9 += s20 * 470296
- s10 += s20 * 654183
- s11 -= s20 * 997805
- s12 += s20 * 136657
- s13 -= s20 * 683901
- s20 = 0
-
- s7 += s19 * 666643
- s8 += s19 * 470296
- s9 += s19 * 654183
- s10 -= s19 * 997805
- s11 += s19 * 136657
- s12 -= s19 * 683901
- s19 = 0
-
- s6 += s18 * 666643
- s7 += s18 * 470296
- s8 += s18 * 654183
- s9 -= s18 * 997805
- s10 += s18 * 136657
- s11 -= s18 * 683901
- s18 = 0
-
- carry[6] = (s6 + (1 << 20)) >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[8] = (s8 + (1 << 20)) >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[10] = (s10 + (1 << 20)) >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
- carry[12] = (s12 + (1 << 20)) >> 21
- s13 += carry[12]
- s12 -= carry[12] << 21
- carry[14] = (s14 + (1 << 20)) >> 21
- s15 += carry[14]
- s14 -= carry[14] << 21
- carry[16] = (s16 + (1 << 20)) >> 21
- s17 += carry[16]
- s16 -= carry[16] << 21
-
- carry[7] = (s7 + (1 << 20)) >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[9] = (s9 + (1 << 20)) >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[11] = (s11 + (1 << 20)) >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
- carry[13] = (s13 + (1 << 20)) >> 21
- s14 += carry[13]
- s13 -= carry[13] << 21
- carry[15] = (s15 + (1 << 20)) >> 21
- s16 += carry[15]
- s15 -= carry[15] << 21
-
- s5 += s17 * 666643
- s6 += s17 * 470296
- s7 += s17 * 654183
- s8 -= s17 * 997805
- s9 += s17 * 136657
- s10 -= s17 * 683901
- s17 = 0
-
- s4 += s16 * 666643
- s5 += s16 * 470296
- s6 += s16 * 654183
- s7 -= s16 * 997805
- s8 += s16 * 136657
- s9 -= s16 * 683901
- s16 = 0
-
- s3 += s15 * 666643
- s4 += s15 * 470296
- s5 += s15 * 654183
- s6 -= s15 * 997805
- s7 += s15 * 136657
- s8 -= s15 * 683901
- s15 = 0
-
- s2 += s14 * 666643
- s3 += s14 * 470296
- s4 += s14 * 654183
- s5 -= s14 * 997805
- s6 += s14 * 136657
- s7 -= s14 * 683901
- s14 = 0
-
- s1 += s13 * 666643
- s2 += s13 * 470296
- s3 += s13 * 654183
- s4 -= s13 * 997805
- s5 += s13 * 136657
- s6 -= s13 * 683901
- s13 = 0
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = (s0 + (1 << 20)) >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[2] = (s2 + (1 << 20)) >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[4] = (s4 + (1 << 20)) >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[6] = (s6 + (1 << 20)) >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[8] = (s8 + (1 << 20)) >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[10] = (s10 + (1 << 20)) >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
-
- carry[1] = (s1 + (1 << 20)) >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[3] = (s3 + (1 << 20)) >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[5] = (s5 + (1 << 20)) >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[7] = (s7 + (1 << 20)) >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[9] = (s9 + (1 << 20)) >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[11] = (s11 + (1 << 20)) >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = s0 >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[1] = s1 >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[2] = s2 >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[3] = s3 >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[4] = s4 >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[5] = s5 >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[6] = s6 >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[7] = s7 >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[8] = s8 >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[9] = s9 >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[10] = s10 >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
- carry[11] = s11 >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = s0 >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[1] = s1 >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[2] = s2 >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[3] = s3 >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[4] = s4 >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[5] = s5 >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[6] = s6 >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[7] = s7 >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[8] = s8 >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[9] = s9 >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[10] = s10 >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
-
- s[0] = byte(s0 >> 0)
- s[1] = byte(s0 >> 8)
- s[2] = byte((s0 >> 16) | (s1 << 5))
- s[3] = byte(s1 >> 3)
- s[4] = byte(s1 >> 11)
- s[5] = byte((s1 >> 19) | (s2 << 2))
- s[6] = byte(s2 >> 6)
- s[7] = byte((s2 >> 14) | (s3 << 7))
- s[8] = byte(s3 >> 1)
- s[9] = byte(s3 >> 9)
- s[10] = byte((s3 >> 17) | (s4 << 4))
- s[11] = byte(s4 >> 4)
- s[12] = byte(s4 >> 12)
- s[13] = byte((s4 >> 20) | (s5 << 1))
- s[14] = byte(s5 >> 7)
- s[15] = byte((s5 >> 15) | (s6 << 6))
- s[16] = byte(s6 >> 2)
- s[17] = byte(s6 >> 10)
- s[18] = byte((s6 >> 18) | (s7 << 3))
- s[19] = byte(s7 >> 5)
- s[20] = byte(s7 >> 13)
- s[21] = byte(s8 >> 0)
- s[22] = byte(s8 >> 8)
- s[23] = byte((s8 >> 16) | (s9 << 5))
- s[24] = byte(s9 >> 3)
- s[25] = byte(s9 >> 11)
- s[26] = byte((s9 >> 19) | (s10 << 2))
- s[27] = byte(s10 >> 6)
- s[28] = byte((s10 >> 14) | (s11 << 7))
- s[29] = byte(s11 >> 1)
- s[30] = byte(s11 >> 9)
- s[31] = byte(s11 >> 17)
-}
-
-// Input:
-// s[0]+256*s[1]+...+256^63*s[63] = s
-//
-// Output:
-// s[0]+256*s[1]+...+256^31*s[31] = s mod l
-// where l = 2^252 + 27742317777372353535851937790883648493.
-func ScReduce(out *[32]byte, s *[64]byte) {
- s0 := 2097151 & load3(s[:])
- s1 := 2097151 & (load4(s[2:]) >> 5)
- s2 := 2097151 & (load3(s[5:]) >> 2)
- s3 := 2097151 & (load4(s[7:]) >> 7)
- s4 := 2097151 & (load4(s[10:]) >> 4)
- s5 := 2097151 & (load3(s[13:]) >> 1)
- s6 := 2097151 & (load4(s[15:]) >> 6)
- s7 := 2097151 & (load3(s[18:]) >> 3)
- s8 := 2097151 & load3(s[21:])
- s9 := 2097151 & (load4(s[23:]) >> 5)
- s10 := 2097151 & (load3(s[26:]) >> 2)
- s11 := 2097151 & (load4(s[28:]) >> 7)
- s12 := 2097151 & (load4(s[31:]) >> 4)
- s13 := 2097151 & (load3(s[34:]) >> 1)
- s14 := 2097151 & (load4(s[36:]) >> 6)
- s15 := 2097151 & (load3(s[39:]) >> 3)
- s16 := 2097151 & load3(s[42:])
- s17 := 2097151 & (load4(s[44:]) >> 5)
- s18 := 2097151 & (load3(s[47:]) >> 2)
- s19 := 2097151 & (load4(s[49:]) >> 7)
- s20 := 2097151 & (load4(s[52:]) >> 4)
- s21 := 2097151 & (load3(s[55:]) >> 1)
- s22 := 2097151 & (load4(s[57:]) >> 6)
- s23 := (load4(s[60:]) >> 3)
-
- s11 += s23 * 666643
- s12 += s23 * 470296
- s13 += s23 * 654183
- s14 -= s23 * 997805
- s15 += s23 * 136657
- s16 -= s23 * 683901
- s23 = 0
-
- s10 += s22 * 666643
- s11 += s22 * 470296
- s12 += s22 * 654183
- s13 -= s22 * 997805
- s14 += s22 * 136657
- s15 -= s22 * 683901
- s22 = 0
-
- s9 += s21 * 666643
- s10 += s21 * 470296
- s11 += s21 * 654183
- s12 -= s21 * 997805
- s13 += s21 * 136657
- s14 -= s21 * 683901
- s21 = 0
-
- s8 += s20 * 666643
- s9 += s20 * 470296
- s10 += s20 * 654183
- s11 -= s20 * 997805
- s12 += s20 * 136657
- s13 -= s20 * 683901
- s20 = 0
-
- s7 += s19 * 666643
- s8 += s19 * 470296
- s9 += s19 * 654183
- s10 -= s19 * 997805
- s11 += s19 * 136657
- s12 -= s19 * 683901
- s19 = 0
-
- s6 += s18 * 666643
- s7 += s18 * 470296
- s8 += s18 * 654183
- s9 -= s18 * 997805
- s10 += s18 * 136657
- s11 -= s18 * 683901
- s18 = 0
-
- var carry [17]int64
-
- carry[6] = (s6 + (1 << 20)) >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[8] = (s8 + (1 << 20)) >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[10] = (s10 + (1 << 20)) >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
- carry[12] = (s12 + (1 << 20)) >> 21
- s13 += carry[12]
- s12 -= carry[12] << 21
- carry[14] = (s14 + (1 << 20)) >> 21
- s15 += carry[14]
- s14 -= carry[14] << 21
- carry[16] = (s16 + (1 << 20)) >> 21
- s17 += carry[16]
- s16 -= carry[16] << 21
-
- carry[7] = (s7 + (1 << 20)) >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[9] = (s9 + (1 << 20)) >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[11] = (s11 + (1 << 20)) >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
- carry[13] = (s13 + (1 << 20)) >> 21
- s14 += carry[13]
- s13 -= carry[13] << 21
- carry[15] = (s15 + (1 << 20)) >> 21
- s16 += carry[15]
- s15 -= carry[15] << 21
-
- s5 += s17 * 666643
- s6 += s17 * 470296
- s7 += s17 * 654183
- s8 -= s17 * 997805
- s9 += s17 * 136657
- s10 -= s17 * 683901
- s17 = 0
-
- s4 += s16 * 666643
- s5 += s16 * 470296
- s6 += s16 * 654183
- s7 -= s16 * 997805
- s8 += s16 * 136657
- s9 -= s16 * 683901
- s16 = 0
-
- s3 += s15 * 666643
- s4 += s15 * 470296
- s5 += s15 * 654183
- s6 -= s15 * 997805
- s7 += s15 * 136657
- s8 -= s15 * 683901
- s15 = 0
-
- s2 += s14 * 666643
- s3 += s14 * 470296
- s4 += s14 * 654183
- s5 -= s14 * 997805
- s6 += s14 * 136657
- s7 -= s14 * 683901
- s14 = 0
-
- s1 += s13 * 666643
- s2 += s13 * 470296
- s3 += s13 * 654183
- s4 -= s13 * 997805
- s5 += s13 * 136657
- s6 -= s13 * 683901
- s13 = 0
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = (s0 + (1 << 20)) >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[2] = (s2 + (1 << 20)) >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[4] = (s4 + (1 << 20)) >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[6] = (s6 + (1 << 20)) >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[8] = (s8 + (1 << 20)) >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[10] = (s10 + (1 << 20)) >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
-
- carry[1] = (s1 + (1 << 20)) >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[3] = (s3 + (1 << 20)) >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[5] = (s5 + (1 << 20)) >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[7] = (s7 + (1 << 20)) >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[9] = (s9 + (1 << 20)) >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[11] = (s11 + (1 << 20)) >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = s0 >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[1] = s1 >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[2] = s2 >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[3] = s3 >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[4] = s4 >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[5] = s5 >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[6] = s6 >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[7] = s7 >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[8] = s8 >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[9] = s9 >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[10] = s10 >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
- carry[11] = s11 >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = s0 >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[1] = s1 >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[2] = s2 >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[3] = s3 >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[4] = s4 >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[5] = s5 >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[6] = s6 >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[7] = s7 >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[8] = s8 >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[9] = s9 >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[10] = s10 >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
-
- out[0] = byte(s0 >> 0)
- out[1] = byte(s0 >> 8)
- out[2] = byte((s0 >> 16) | (s1 << 5))
- out[3] = byte(s1 >> 3)
- out[4] = byte(s1 >> 11)
- out[5] = byte((s1 >> 19) | (s2 << 2))
- out[6] = byte(s2 >> 6)
- out[7] = byte((s2 >> 14) | (s3 << 7))
- out[8] = byte(s3 >> 1)
- out[9] = byte(s3 >> 9)
- out[10] = byte((s3 >> 17) | (s4 << 4))
- out[11] = byte(s4 >> 4)
- out[12] = byte(s4 >> 12)
- out[13] = byte((s4 >> 20) | (s5 << 1))
- out[14] = byte(s5 >> 7)
- out[15] = byte((s5 >> 15) | (s6 << 6))
- out[16] = byte(s6 >> 2)
- out[17] = byte(s6 >> 10)
- out[18] = byte((s6 >> 18) | (s7 << 3))
- out[19] = byte(s7 >> 5)
- out[20] = byte(s7 >> 13)
- out[21] = byte(s8 >> 0)
- out[22] = byte(s8 >> 8)
- out[23] = byte((s8 >> 16) | (s9 << 5))
- out[24] = byte(s9 >> 3)
- out[25] = byte(s9 >> 11)
- out[26] = byte((s9 >> 19) | (s10 << 2))
- out[27] = byte(s10 >> 6)
- out[28] = byte((s10 >> 14) | (s11 << 7))
- out[29] = byte(s11 >> 1)
- out[30] = byte(s11 >> 9)
- out[31] = byte(s11 >> 17)
-}
diff --git a/vendor/golang.org/x/net/internal/timeseries/timeseries.go b/vendor/golang.org/x/net/internal/timeseries/timeseries.go
deleted file mode 100644
index 1119f3448..000000000
--- a/vendor/golang.org/x/net/internal/timeseries/timeseries.go
+++ /dev/null
@@ -1,525 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package timeseries implements a time series structure for stats collection.
-package timeseries // import "golang.org/x/net/internal/timeseries"
-
-import (
- "fmt"
- "log"
- "time"
-)
-
-const (
- timeSeriesNumBuckets = 64
- minuteHourSeriesNumBuckets = 60
-)
-
-var timeSeriesResolutions = []time.Duration{
- 1 * time.Second,
- 10 * time.Second,
- 1 * time.Minute,
- 10 * time.Minute,
- 1 * time.Hour,
- 6 * time.Hour,
- 24 * time.Hour, // 1 day
- 7 * 24 * time.Hour, // 1 week
- 4 * 7 * 24 * time.Hour, // 4 weeks
- 16 * 7 * 24 * time.Hour, // 16 weeks
-}
-
-var minuteHourSeriesResolutions = []time.Duration{
- 1 * time.Second,
- 1 * time.Minute,
-}
-
-// An Observable is a kind of data that can be aggregated in a time series.
-type Observable interface {
- Multiply(ratio float64) // Multiplies the data in self by a given ratio
- Add(other Observable) // Adds the data from a different observation to self
- Clear() // Clears the observation so it can be reused.
- CopyFrom(other Observable) // Copies the contents of a given observation to self
-}
-
-// Float attaches the methods of Observable to a float64.
-type Float float64
-
-// NewFloat returns a Float.
-func NewFloat() Observable {
- f := Float(0)
- return &f
-}
-
-// String returns the float as a string.
-func (f *Float) String() string { return fmt.Sprintf("%g", f.Value()) }
-
-// Value returns the float's value.
-func (f *Float) Value() float64 { return float64(*f) }
-
-func (f *Float) Multiply(ratio float64) { *f *= Float(ratio) }
-
-func (f *Float) Add(other Observable) {
- o := other.(*Float)
- *f += *o
-}
-
-func (f *Float) Clear() { *f = 0 }
-
-func (f *Float) CopyFrom(other Observable) {
- o := other.(*Float)
- *f = *o
-}
-
-// A Clock tells the current time.
-type Clock interface {
- Time() time.Time
-}
-
-type defaultClock int
-
-var defaultClockInstance defaultClock
-
-func (defaultClock) Time() time.Time { return time.Now() }
-
-// Information kept per level. Each level consists of a circular list of
-// observations. The start of the level may be derived from end and the
-// len(buckets) * sizeInMillis.
-type tsLevel struct {
- oldest int // index to oldest bucketed Observable
- newest int // index to newest bucketed Observable
- end time.Time // end timestamp for this level
- size time.Duration // duration of the bucketed Observable
- buckets []Observable // collections of observations
- provider func() Observable // used for creating new Observable
-}
-
-func (l *tsLevel) Clear() {
- l.oldest = 0
- l.newest = len(l.buckets) - 1
- l.end = time.Time{}
- for i := range l.buckets {
- if l.buckets[i] != nil {
- l.buckets[i].Clear()
- l.buckets[i] = nil
- }
- }
-}
-
-func (l *tsLevel) InitLevel(size time.Duration, numBuckets int, f func() Observable) {
- l.size = size
- l.provider = f
- l.buckets = make([]Observable, numBuckets)
-}
-
-// Keeps a sequence of levels. Each level is responsible for storing data at
-// a given resolution. For example, the first level stores data at a one
-// minute resolution while the second level stores data at a one hour
-// resolution.
-
-// Each level is represented by a sequence of buckets. Each bucket spans an
-// interval equal to the resolution of the level. New observations are added
-// to the last bucket.
-type timeSeries struct {
- provider func() Observable // make more Observable
- numBuckets int // number of buckets in each level
- levels []*tsLevel // levels of bucketed Observable
- lastAdd time.Time // time of last Observable tracked
- total Observable // convenient aggregation of all Observable
- clock Clock // Clock for getting current time
- pending Observable // observations not yet bucketed
- pendingTime time.Time // what time are we keeping in pending
- dirty bool // if there are pending observations
-}
-
-// init initializes a level according to the supplied criteria.
-func (ts *timeSeries) init(resolutions []time.Duration, f func() Observable, numBuckets int, clock Clock) {
- ts.provider = f
- ts.numBuckets = numBuckets
- ts.clock = clock
- ts.levels = make([]*tsLevel, len(resolutions))
-
- for i := range resolutions {
- if i > 0 && resolutions[i-1] >= resolutions[i] {
- log.Print("timeseries: resolutions must be monotonically increasing")
- break
- }
- newLevel := new(tsLevel)
- newLevel.InitLevel(resolutions[i], ts.numBuckets, ts.provider)
- ts.levels[i] = newLevel
- }
-
- ts.Clear()
-}
-
-// Clear removes all observations from the time series.
-func (ts *timeSeries) Clear() {
- ts.lastAdd = time.Time{}
- ts.total = ts.resetObservation(ts.total)
- ts.pending = ts.resetObservation(ts.pending)
- ts.pendingTime = time.Time{}
- ts.dirty = false
-
- for i := range ts.levels {
- ts.levels[i].Clear()
- }
-}
-
-// Add records an observation at the current time.
-func (ts *timeSeries) Add(observation Observable) {
- ts.AddWithTime(observation, ts.clock.Time())
-}
-
-// AddWithTime records an observation at the specified time.
-func (ts *timeSeries) AddWithTime(observation Observable, t time.Time) {
-
- smallBucketDuration := ts.levels[0].size
-
- if t.After(ts.lastAdd) {
- ts.lastAdd = t
- }
-
- if t.After(ts.pendingTime) {
- ts.advance(t)
- ts.mergePendingUpdates()
- ts.pendingTime = ts.levels[0].end
- ts.pending.CopyFrom(observation)
- ts.dirty = true
- } else if t.After(ts.pendingTime.Add(-1 * smallBucketDuration)) {
- // The observation is close enough to go into the pending bucket.
- // This compensates for clock skewing and small scheduling delays
- // by letting the update stay in the fast path.
- ts.pending.Add(observation)
- ts.dirty = true
- } else {
- ts.mergeValue(observation, t)
- }
-}
-
-// mergeValue inserts the observation at the specified time in the past into all levels.
-func (ts *timeSeries) mergeValue(observation Observable, t time.Time) {
- for _, level := range ts.levels {
- index := (ts.numBuckets - 1) - int(level.end.Sub(t)/level.size)
- if 0 <= index && index < ts.numBuckets {
- bucketNumber := (level.oldest + index) % ts.numBuckets
- if level.buckets[bucketNumber] == nil {
- level.buckets[bucketNumber] = level.provider()
- }
- level.buckets[bucketNumber].Add(observation)
- }
- }
- ts.total.Add(observation)
-}
-
-// mergePendingUpdates applies the pending updates into all levels.
-func (ts *timeSeries) mergePendingUpdates() {
- if ts.dirty {
- ts.mergeValue(ts.pending, ts.pendingTime)
- ts.pending = ts.resetObservation(ts.pending)
- ts.dirty = false
- }
-}
-
-// advance cycles the buckets at each level until the latest bucket in
-// each level can hold the time specified.
-func (ts *timeSeries) advance(t time.Time) {
- if !t.After(ts.levels[0].end) {
- return
- }
- for i := 0; i < len(ts.levels); i++ {
- level := ts.levels[i]
- if !level.end.Before(t) {
- break
- }
-
- // If the time is sufficiently far, just clear the level and advance
- // directly.
- if !t.Before(level.end.Add(level.size * time.Duration(ts.numBuckets))) {
- for _, b := range level.buckets {
- ts.resetObservation(b)
- }
- level.end = time.Unix(0, (t.UnixNano()/level.size.Nanoseconds())*level.size.Nanoseconds())
- }
-
- for t.After(level.end) {
- level.end = level.end.Add(level.size)
- level.newest = level.oldest
- level.oldest = (level.oldest + 1) % ts.numBuckets
- ts.resetObservation(level.buckets[level.newest])
- }
-
- t = level.end
- }
-}
-
-// Latest returns the sum of the num latest buckets from the level.
-func (ts *timeSeries) Latest(level, num int) Observable {
- now := ts.clock.Time()
- if ts.levels[0].end.Before(now) {
- ts.advance(now)
- }
-
- ts.mergePendingUpdates()
-
- result := ts.provider()
- l := ts.levels[level]
- index := l.newest
-
- for i := 0; i < num; i++ {
- if l.buckets[index] != nil {
- result.Add(l.buckets[index])
- }
- if index == 0 {
- index = ts.numBuckets
- }
- index--
- }
-
- return result
-}
-
-// LatestBuckets returns a copy of the num latest buckets from level.
-func (ts *timeSeries) LatestBuckets(level, num int) []Observable {
- if level < 0 || level > len(ts.levels) {
- log.Print("timeseries: bad level argument: ", level)
- return nil
- }
- if num < 0 || num >= ts.numBuckets {
- log.Print("timeseries: bad num argument: ", num)
- return nil
- }
-
- results := make([]Observable, num)
- now := ts.clock.Time()
- if ts.levels[0].end.Before(now) {
- ts.advance(now)
- }
-
- ts.mergePendingUpdates()
-
- l := ts.levels[level]
- index := l.newest
-
- for i := 0; i < num; i++ {
- result := ts.provider()
- results[i] = result
- if l.buckets[index] != nil {
- result.CopyFrom(l.buckets[index])
- }
-
- if index == 0 {
- index = ts.numBuckets
- }
- index -= 1
- }
- return results
-}
-
-// ScaleBy updates observations by scaling by factor.
-func (ts *timeSeries) ScaleBy(factor float64) {
- for _, l := range ts.levels {
- for i := 0; i < ts.numBuckets; i++ {
- l.buckets[i].Multiply(factor)
- }
- }
-
- ts.total.Multiply(factor)
- ts.pending.Multiply(factor)
-}
-
-// Range returns the sum of observations added over the specified time range.
-// If start or finish times don't fall on bucket boundaries of the same
-// level, then return values are approximate answers.
-func (ts *timeSeries) Range(start, finish time.Time) Observable {
- return ts.ComputeRange(start, finish, 1)[0]
-}
-
-// Recent returns the sum of observations from the last delta.
-func (ts *timeSeries) Recent(delta time.Duration) Observable {
- now := ts.clock.Time()
- return ts.Range(now.Add(-delta), now)
-}
-
-// Total returns the total of all observations.
-func (ts *timeSeries) Total() Observable {
- ts.mergePendingUpdates()
- return ts.total
-}
-
-// ComputeRange computes a specified number of values into a slice using
-// the observations recorded over the specified time period. The return
-// values are approximate if the start or finish times don't fall on the
-// bucket boundaries at the same level or if the number of buckets spanning
-// the range is not an integral multiple of num.
-func (ts *timeSeries) ComputeRange(start, finish time.Time, num int) []Observable {
- if start.After(finish) {
- log.Printf("timeseries: start > finish, %v>%v", start, finish)
- return nil
- }
-
- if num < 0 {
- log.Printf("timeseries: num < 0, %v", num)
- return nil
- }
-
- results := make([]Observable, num)
-
- for _, l := range ts.levels {
- if !start.Before(l.end.Add(-l.size * time.Duration(ts.numBuckets))) {
- ts.extract(l, start, finish, num, results)
- return results
- }
- }
-
- // Failed to find a level that covers the desired range. So just
- // extract from the last level, even if it doesn't cover the entire
- // desired range.
- ts.extract(ts.levels[len(ts.levels)-1], start, finish, num, results)
-
- return results
-}
-
-// RecentList returns the specified number of values in slice over the most
-// recent time period of the specified range.
-func (ts *timeSeries) RecentList(delta time.Duration, num int) []Observable {
- if delta < 0 {
- return nil
- }
- now := ts.clock.Time()
- return ts.ComputeRange(now.Add(-delta), now, num)
-}
-
-// extract returns a slice of specified number of observations from a given
-// level over a given range.
-func (ts *timeSeries) extract(l *tsLevel, start, finish time.Time, num int, results []Observable) {
- ts.mergePendingUpdates()
-
- srcInterval := l.size
- dstInterval := finish.Sub(start) / time.Duration(num)
- dstStart := start
- srcStart := l.end.Add(-srcInterval * time.Duration(ts.numBuckets))
-
- srcIndex := 0
-
- // Where should scanning start?
- if dstStart.After(srcStart) {
- advance := dstStart.Sub(srcStart) / srcInterval
- srcIndex += int(advance)
- srcStart = srcStart.Add(advance * srcInterval)
- }
-
- // The i'th value is computed as show below.
- // interval = (finish/start)/num
- // i'th value = sum of observation in range
- // [ start + i * interval,
- // start + (i + 1) * interval )
- for i := 0; i < num; i++ {
- results[i] = ts.resetObservation(results[i])
- dstEnd := dstStart.Add(dstInterval)
- for srcIndex < ts.numBuckets && srcStart.Before(dstEnd) {
- srcEnd := srcStart.Add(srcInterval)
- if srcEnd.After(ts.lastAdd) {
- srcEnd = ts.lastAdd
- }
-
- if !srcEnd.Before(dstStart) {
- srcValue := l.buckets[(srcIndex+l.oldest)%ts.numBuckets]
- if !srcStart.Before(dstStart) && !srcEnd.After(dstEnd) {
- // dst completely contains src.
- if srcValue != nil {
- results[i].Add(srcValue)
- }
- } else {
- // dst partially overlaps src.
- overlapStart := maxTime(srcStart, dstStart)
- overlapEnd := minTime(srcEnd, dstEnd)
- base := srcEnd.Sub(srcStart)
- fraction := overlapEnd.Sub(overlapStart).Seconds() / base.Seconds()
-
- used := ts.provider()
- if srcValue != nil {
- used.CopyFrom(srcValue)
- }
- used.Multiply(fraction)
- results[i].Add(used)
- }
-
- if srcEnd.After(dstEnd) {
- break
- }
- }
- srcIndex++
- srcStart = srcStart.Add(srcInterval)
- }
- dstStart = dstStart.Add(dstInterval)
- }
-}
-
-// resetObservation clears the content so the struct may be reused.
-func (ts *timeSeries) resetObservation(observation Observable) Observable {
- if observation == nil {
- observation = ts.provider()
- } else {
- observation.Clear()
- }
- return observation
-}
-
-// TimeSeries tracks data at granularities from 1 second to 16 weeks.
-type TimeSeries struct {
- timeSeries
-}
-
-// NewTimeSeries creates a new TimeSeries using the function provided for creating new Observable.
-func NewTimeSeries(f func() Observable) *TimeSeries {
- return NewTimeSeriesWithClock(f, defaultClockInstance)
-}
-
-// NewTimeSeriesWithClock creates a new TimeSeries using the function provided for creating new Observable and the clock for
-// assigning timestamps.
-func NewTimeSeriesWithClock(f func() Observable, clock Clock) *TimeSeries {
- ts := new(TimeSeries)
- ts.timeSeries.init(timeSeriesResolutions, f, timeSeriesNumBuckets, clock)
- return ts
-}
-
-// MinuteHourSeries tracks data at granularities of 1 minute and 1 hour.
-type MinuteHourSeries struct {
- timeSeries
-}
-
-// NewMinuteHourSeries creates a new MinuteHourSeries using the function provided for creating new Observable.
-func NewMinuteHourSeries(f func() Observable) *MinuteHourSeries {
- return NewMinuteHourSeriesWithClock(f, defaultClockInstance)
-}
-
-// NewMinuteHourSeriesWithClock creates a new MinuteHourSeries using the function provided for creating new Observable and the clock for
-// assigning timestamps.
-func NewMinuteHourSeriesWithClock(f func() Observable, clock Clock) *MinuteHourSeries {
- ts := new(MinuteHourSeries)
- ts.timeSeries.init(minuteHourSeriesResolutions, f,
- minuteHourSeriesNumBuckets, clock)
- return ts
-}
-
-func (ts *MinuteHourSeries) Minute() Observable {
- return ts.timeSeries.Latest(0, 60)
-}
-
-func (ts *MinuteHourSeries) Hour() Observable {
- return ts.timeSeries.Latest(1, 60)
-}
-
-func minTime(a, b time.Time) time.Time {
- if a.Before(b) {
- return a
- }
- return b
-}
-
-func maxTime(a, b time.Time) time.Time {
- if a.After(b) {
- return a
- }
- return b
-}
diff --git a/vendor/golang.org/x/net/trace/events.go b/vendor/golang.org/x/net/trace/events.go
deleted file mode 100644
index d8daec1a7..000000000
--- a/vendor/golang.org/x/net/trace/events.go
+++ /dev/null
@@ -1,532 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package trace
-
-import (
- "bytes"
- "fmt"
- "html/template"
- "io"
- "log"
- "net/http"
- "runtime"
- "sort"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "text/tabwriter"
- "time"
-)
-
-const maxEventsPerLog = 100
-
-type bucket struct {
- MaxErrAge time.Duration
- String string
-}
-
-var buckets = []bucket{
- {0, "total"},
- {10 * time.Second, "errs<10s"},
- {1 * time.Minute, "errs<1m"},
- {10 * time.Minute, "errs<10m"},
- {1 * time.Hour, "errs<1h"},
- {10 * time.Hour, "errs<10h"},
- {24000 * time.Hour, "errors"},
-}
-
-// RenderEvents renders the HTML page typically served at /debug/events.
-// It does not do any auth checking; see AuthRequest for the default auth check
-// used by the handler registered on http.DefaultServeMux.
-// req may be nil.
-func RenderEvents(w http.ResponseWriter, req *http.Request, sensitive bool) {
- now := time.Now()
- data := &struct {
- Families []string // family names
- Buckets []bucket
- Counts [][]int // eventLog count per family/bucket
-
- // Set when a bucket has been selected.
- Family string
- Bucket int
- EventLogs eventLogs
- Expanded bool
- }{
- Buckets: buckets,
- }
-
- data.Families = make([]string, 0, len(families))
- famMu.RLock()
- for name := range families {
- data.Families = append(data.Families, name)
- }
- famMu.RUnlock()
- sort.Strings(data.Families)
-
- // Count the number of eventLogs in each family for each error age.
- data.Counts = make([][]int, len(data.Families))
- for i, name := range data.Families {
- // TODO(sameer): move this loop under the family lock.
- f := getEventFamily(name)
- data.Counts[i] = make([]int, len(data.Buckets))
- for j, b := range data.Buckets {
- data.Counts[i][j] = f.Count(now, b.MaxErrAge)
- }
- }
-
- if req != nil {
- var ok bool
- data.Family, data.Bucket, ok = parseEventsArgs(req)
- if !ok {
- // No-op
- } else {
- data.EventLogs = getEventFamily(data.Family).Copy(now, buckets[data.Bucket].MaxErrAge)
- }
- if data.EventLogs != nil {
- defer data.EventLogs.Free()
- sort.Sort(data.EventLogs)
- }
- if exp, err := strconv.ParseBool(req.FormValue("exp")); err == nil {
- data.Expanded = exp
- }
- }
-
- famMu.RLock()
- defer famMu.RUnlock()
- if err := eventsTmpl().Execute(w, data); err != nil {
- log.Printf("net/trace: Failed executing template: %v", err)
- }
-}
-
-func parseEventsArgs(req *http.Request) (fam string, b int, ok bool) {
- fam, bStr := req.FormValue("fam"), req.FormValue("b")
- if fam == "" || bStr == "" {
- return "", 0, false
- }
- b, err := strconv.Atoi(bStr)
- if err != nil || b < 0 || b >= len(buckets) {
- return "", 0, false
- }
- return fam, b, true
-}
-
-// An EventLog provides a log of events associated with a specific object.
-type EventLog interface {
- // Printf formats its arguments with fmt.Sprintf and adds the
- // result to the event log.
- Printf(format string, a ...interface{})
-
- // Errorf is like Printf, but it marks this event as an error.
- Errorf(format string, a ...interface{})
-
- // Finish declares that this event log is complete.
- // The event log should not be used after calling this method.
- Finish()
-}
-
-// NewEventLog returns a new EventLog with the specified family name
-// and title.
-func NewEventLog(family, title string) EventLog {
- el := newEventLog()
- el.ref()
- el.Family, el.Title = family, title
- el.Start = time.Now()
- el.events = make([]logEntry, 0, maxEventsPerLog)
- el.stack = make([]uintptr, 32)
- n := runtime.Callers(2, el.stack)
- el.stack = el.stack[:n]
-
- getEventFamily(family).add(el)
- return el
-}
-
-func (el *eventLog) Finish() {
- getEventFamily(el.Family).remove(el)
- el.unref() // matches ref in New
-}
-
-var (
- famMu sync.RWMutex
- families = make(map[string]*eventFamily) // family name => family
-)
-
-func getEventFamily(fam string) *eventFamily {
- famMu.Lock()
- defer famMu.Unlock()
- f := families[fam]
- if f == nil {
- f = &eventFamily{}
- families[fam] = f
- }
- return f
-}
-
-type eventFamily struct {
- mu sync.RWMutex
- eventLogs eventLogs
-}
-
-func (f *eventFamily) add(el *eventLog) {
- f.mu.Lock()
- f.eventLogs = append(f.eventLogs, el)
- f.mu.Unlock()
-}
-
-func (f *eventFamily) remove(el *eventLog) {
- f.mu.Lock()
- defer f.mu.Unlock()
- for i, el0 := range f.eventLogs {
- if el == el0 {
- copy(f.eventLogs[i:], f.eventLogs[i+1:])
- f.eventLogs = f.eventLogs[:len(f.eventLogs)-1]
- return
- }
- }
-}
-
-func (f *eventFamily) Count(now time.Time, maxErrAge time.Duration) (n int) {
- f.mu.RLock()
- defer f.mu.RUnlock()
- for _, el := range f.eventLogs {
- if el.hasRecentError(now, maxErrAge) {
- n++
- }
- }
- return
-}
-
-func (f *eventFamily) Copy(now time.Time, maxErrAge time.Duration) (els eventLogs) {
- f.mu.RLock()
- defer f.mu.RUnlock()
- els = make(eventLogs, 0, len(f.eventLogs))
- for _, el := range f.eventLogs {
- if el.hasRecentError(now, maxErrAge) {
- el.ref()
- els = append(els, el)
- }
- }
- return
-}
-
-type eventLogs []*eventLog
-
-// Free calls unref on each element of the list.
-func (els eventLogs) Free() {
- for _, el := range els {
- el.unref()
- }
-}
-
-// eventLogs may be sorted in reverse chronological order.
-func (els eventLogs) Len() int { return len(els) }
-func (els eventLogs) Less(i, j int) bool { return els[i].Start.After(els[j].Start) }
-func (els eventLogs) Swap(i, j int) { els[i], els[j] = els[j], els[i] }
-
-// A logEntry is a timestamped log entry in an event log.
-type logEntry struct {
- When time.Time
- Elapsed time.Duration // since previous event in log
- NewDay bool // whether this event is on a different day to the previous event
- What string
- IsErr bool
-}
-
-// WhenString returns a string representation of the elapsed time of the event.
-// It will include the date if midnight was crossed.
-func (e logEntry) WhenString() string {
- if e.NewDay {
- return e.When.Format("2006/01/02 15:04:05.000000")
- }
- return e.When.Format("15:04:05.000000")
-}
-
-// An eventLog represents an active event log.
-type eventLog struct {
- // Family is the top-level grouping of event logs to which this belongs.
- Family string
-
- // Title is the title of this event log.
- Title string
-
- // Timing information.
- Start time.Time
-
- // Call stack where this event log was created.
- stack []uintptr
-
- // Append-only sequence of events.
- //
- // TODO(sameer): change this to a ring buffer to avoid the array copy
- // when we hit maxEventsPerLog.
- mu sync.RWMutex
- events []logEntry
- LastErrorTime time.Time
- discarded int
-
- refs int32 // how many buckets this is in
-}
-
-func (el *eventLog) reset() {
- // Clear all but the mutex. Mutexes may not be copied, even when unlocked.
- el.Family = ""
- el.Title = ""
- el.Start = time.Time{}
- el.stack = nil
- el.events = nil
- el.LastErrorTime = time.Time{}
- el.discarded = 0
- el.refs = 0
-}
-
-func (el *eventLog) hasRecentError(now time.Time, maxErrAge time.Duration) bool {
- if maxErrAge == 0 {
- return true
- }
- el.mu.RLock()
- defer el.mu.RUnlock()
- return now.Sub(el.LastErrorTime) < maxErrAge
-}
-
-// delta returns the elapsed time since the last event or the log start,
-// and whether it spans midnight.
-// L >= el.mu
-func (el *eventLog) delta(t time.Time) (time.Duration, bool) {
- if len(el.events) == 0 {
- return t.Sub(el.Start), false
- }
- prev := el.events[len(el.events)-1].When
- return t.Sub(prev), prev.Day() != t.Day()
-
-}
-
-func (el *eventLog) Printf(format string, a ...interface{}) {
- el.printf(false, format, a...)
-}
-
-func (el *eventLog) Errorf(format string, a ...interface{}) {
- el.printf(true, format, a...)
-}
-
-func (el *eventLog) printf(isErr bool, format string, a ...interface{}) {
- e := logEntry{When: time.Now(), IsErr: isErr, What: fmt.Sprintf(format, a...)}
- el.mu.Lock()
- e.Elapsed, e.NewDay = el.delta(e.When)
- if len(el.events) < maxEventsPerLog {
- el.events = append(el.events, e)
- } else {
- // Discard the oldest event.
- if el.discarded == 0 {
- // el.discarded starts at two to count for the event it
- // is replacing, plus the next one that we are about to
- // drop.
- el.discarded = 2
- } else {
- el.discarded++
- }
- // TODO(sameer): if this causes allocations on a critical path,
- // change eventLog.What to be a fmt.Stringer, as in trace.go.
- el.events[0].What = fmt.Sprintf("(%d events discarded)", el.discarded)
- // The timestamp of the discarded meta-event should be
- // the time of the last event it is representing.
- el.events[0].When = el.events[1].When
- copy(el.events[1:], el.events[2:])
- el.events[maxEventsPerLog-1] = e
- }
- if e.IsErr {
- el.LastErrorTime = e.When
- }
- el.mu.Unlock()
-}
-
-func (el *eventLog) ref() {
- atomic.AddInt32(&el.refs, 1)
-}
-
-func (el *eventLog) unref() {
- if atomic.AddInt32(&el.refs, -1) == 0 {
- freeEventLog(el)
- }
-}
-
-func (el *eventLog) When() string {
- return el.Start.Format("2006/01/02 15:04:05.000000")
-}
-
-func (el *eventLog) ElapsedTime() string {
- elapsed := time.Since(el.Start)
- return fmt.Sprintf("%.6f", elapsed.Seconds())
-}
-
-func (el *eventLog) Stack() string {
- buf := new(bytes.Buffer)
- tw := tabwriter.NewWriter(buf, 1, 8, 1, '\t', 0)
- printStackRecord(tw, el.stack)
- tw.Flush()
- return buf.String()
-}
-
-// printStackRecord prints the function + source line information
-// for a single stack trace.
-// Adapted from runtime/pprof/pprof.go.
-func printStackRecord(w io.Writer, stk []uintptr) {
- for _, pc := range stk {
- f := runtime.FuncForPC(pc)
- if f == nil {
- continue
- }
- file, line := f.FileLine(pc)
- name := f.Name()
- // Hide runtime.goexit and any runtime functions at the beginning.
- if strings.HasPrefix(name, "runtime.") {
- continue
- }
- fmt.Fprintf(w, "# %s\t%s:%d\n", name, file, line)
- }
-}
-
-func (el *eventLog) Events() []logEntry {
- el.mu.RLock()
- defer el.mu.RUnlock()
- return el.events
-}
-
-// freeEventLogs is a freelist of *eventLog
-var freeEventLogs = make(chan *eventLog, 1000)
-
-// newEventLog returns a event log ready to use.
-func newEventLog() *eventLog {
- select {
- case el := <-freeEventLogs:
- return el
- default:
- return new(eventLog)
- }
-}
-
-// freeEventLog adds el to freeEventLogs if there's room.
-// This is non-blocking.
-func freeEventLog(el *eventLog) {
- el.reset()
- select {
- case freeEventLogs <- el:
- default:
- }
-}
-
-var eventsTmplCache *template.Template
-var eventsTmplOnce sync.Once
-
-func eventsTmpl() *template.Template {
- eventsTmplOnce.Do(func() {
- eventsTmplCache = template.Must(template.New("events").Funcs(template.FuncMap{
- "elapsed": elapsed,
- "trimSpace": strings.TrimSpace,
- }).Parse(eventsHTML))
- })
- return eventsTmplCache
-}
-
-const eventsHTML = `
-<html>
- <head>
- <title>events</title>
- </head>
- <style type="text/css">
- body {
- font-family: sans-serif;
- }
- table#req-status td.family {
- padding-right: 2em;
- }
- table#req-status td.active {
- padding-right: 1em;
- }
- table#req-status td.empty {
- color: #aaa;
- }
- table#reqs {
- margin-top: 1em;
- }
- table#reqs tr.first {
- {{if $.Expanded}}font-weight: bold;{{end}}
- }
- table#reqs td {
- font-family: monospace;
- }
- table#reqs td.when {
- text-align: right;
- white-space: nowrap;
- }
- table#reqs td.elapsed {
- padding: 0 0.5em;
- text-align: right;
- white-space: pre;
- width: 10em;
- }
- address {
- font-size: smaller;
- margin-top: 5em;
- }
- </style>
- <body>
-
-<h1>/debug/events</h1>
-
-<table id="req-status">
- {{range $i, $fam := .Families}}
- <tr>
- <td class="family">{{$fam}}</td>
-
- {{range $j, $bucket := $.Buckets}}
- {{$n := index $.Counts $i $j}}
- <td class="{{if not $bucket.MaxErrAge}}active{{end}}{{if not $n}}empty{{end}}">
- {{if $n}}<a href="?fam={{$fam}}&b={{$j}}{{if $.Expanded}}&exp=1{{end}}">{{end}}
- [{{$n}} {{$bucket.String}}]
- {{if $n}}</a>{{end}}
- </td>
- {{end}}
-
- </tr>{{end}}
-</table>
-
-{{if $.EventLogs}}
-<hr />
-<h3>Family: {{$.Family}}</h3>
-
-{{if $.Expanded}}<a href="?fam={{$.Family}}&b={{$.Bucket}}">{{end}}
-[Summary]{{if $.Expanded}}</a>{{end}}
-
-{{if not $.Expanded}}<a href="?fam={{$.Family}}&b={{$.Bucket}}&exp=1">{{end}}
-[Expanded]{{if not $.Expanded}}</a>{{end}}
-
-<table id="reqs">
- <tr><th>When</th><th>Elapsed</th></tr>
- {{range $el := $.EventLogs}}
- <tr class="first">
- <td class="when">{{$el.When}}</td>
- <td class="elapsed">{{$el.ElapsedTime}}</td>
- <td>{{$el.Title}}
- </tr>
- {{if $.Expanded}}
- <tr>
- <td class="when"></td>
- <td class="elapsed"></td>
- <td><pre>{{$el.Stack|trimSpace}}</pre></td>
- </tr>
- {{range $el.Events}}
- <tr>
- <td class="when">{{.WhenString}}</td>
- <td class="elapsed">{{elapsed .Elapsed}}</td>
- <td>.{{if .IsErr}}E{{else}}.{{end}}. {{.What}}</td>
- </tr>
- {{end}}
- {{end}}
- {{end}}
-</table>
-{{end}}
- </body>
-</html>
-`
diff --git a/vendor/golang.org/x/net/trace/histogram.go b/vendor/golang.org/x/net/trace/histogram.go
deleted file mode 100644
index 9bf4286c7..000000000
--- a/vendor/golang.org/x/net/trace/histogram.go
+++ /dev/null
@@ -1,365 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package trace
-
-// This file implements histogramming for RPC statistics collection.
-
-import (
- "bytes"
- "fmt"
- "html/template"
- "log"
- "math"
- "sync"
-
- "golang.org/x/net/internal/timeseries"
-)
-
-const (
- bucketCount = 38
-)
-
-// histogram keeps counts of values in buckets that are spaced
-// out in powers of 2: 0-1, 2-3, 4-7...
-// histogram implements timeseries.Observable
-type histogram struct {
- sum int64 // running total of measurements
- sumOfSquares float64 // square of running total
- buckets []int64 // bucketed values for histogram
- value int // holds a single value as an optimization
- valueCount int64 // number of values recorded for single value
-}
-
-// AddMeasurement records a value measurement observation to the histogram.
-func (h *histogram) addMeasurement(value int64) {
- // TODO: assert invariant
- h.sum += value
- h.sumOfSquares += float64(value) * float64(value)
-
- bucketIndex := getBucket(value)
-
- if h.valueCount == 0 || (h.valueCount > 0 && h.value == bucketIndex) {
- h.value = bucketIndex
- h.valueCount++
- } else {
- h.allocateBuckets()
- h.buckets[bucketIndex]++
- }
-}
-
-func (h *histogram) allocateBuckets() {
- if h.buckets == nil {
- h.buckets = make([]int64, bucketCount)
- h.buckets[h.value] = h.valueCount
- h.value = 0
- h.valueCount = -1
- }
-}
-
-func log2(i int64) int {
- n := 0
- for ; i >= 0x100; i >>= 8 {
- n += 8
- }
- for ; i > 0; i >>= 1 {
- n += 1
- }
- return n
-}
-
-func getBucket(i int64) (index int) {
- index = log2(i) - 1
- if index < 0 {
- index = 0
- }
- if index >= bucketCount {
- index = bucketCount - 1
- }
- return
-}
-
-// Total returns the number of recorded observations.
-func (h *histogram) total() (total int64) {
- if h.valueCount >= 0 {
- total = h.valueCount
- }
- for _, val := range h.buckets {
- total += int64(val)
- }
- return
-}
-
-// Average returns the average value of recorded observations.
-func (h *histogram) average() float64 {
- t := h.total()
- if t == 0 {
- return 0
- }
- return float64(h.sum) / float64(t)
-}
-
-// Variance returns the variance of recorded observations.
-func (h *histogram) variance() float64 {
- t := float64(h.total())
- if t == 0 {
- return 0
- }
- s := float64(h.sum) / t
- return h.sumOfSquares/t - s*s
-}
-
-// StandardDeviation returns the standard deviation of recorded observations.
-func (h *histogram) standardDeviation() float64 {
- return math.Sqrt(h.variance())
-}
-
-// PercentileBoundary estimates the value that the given fraction of recorded
-// observations are less than.
-func (h *histogram) percentileBoundary(percentile float64) int64 {
- total := h.total()
-
- // Corner cases (make sure result is strictly less than Total())
- if total == 0 {
- return 0
- } else if total == 1 {
- return int64(h.average())
- }
-
- percentOfTotal := round(float64(total) * percentile)
- var runningTotal int64
-
- for i := range h.buckets {
- value := h.buckets[i]
- runningTotal += value
- if runningTotal == percentOfTotal {
- // We hit an exact bucket boundary. If the next bucket has data, it is a
- // good estimate of the value. If the bucket is empty, we interpolate the
- // midpoint between the next bucket's boundary and the next non-zero
- // bucket. If the remaining buckets are all empty, then we use the
- // boundary for the next bucket as the estimate.
- j := uint8(i + 1)
- min := bucketBoundary(j)
- if runningTotal < total {
- for h.buckets[j] == 0 {
- j++
- }
- }
- max := bucketBoundary(j)
- return min + round(float64(max-min)/2)
- } else if runningTotal > percentOfTotal {
- // The value is in this bucket. Interpolate the value.
- delta := runningTotal - percentOfTotal
- percentBucket := float64(value-delta) / float64(value)
- bucketMin := bucketBoundary(uint8(i))
- nextBucketMin := bucketBoundary(uint8(i + 1))
- bucketSize := nextBucketMin - bucketMin
- return bucketMin + round(percentBucket*float64(bucketSize))
- }
- }
- return bucketBoundary(bucketCount - 1)
-}
-
-// Median returns the estimated median of the observed values.
-func (h *histogram) median() int64 {
- return h.percentileBoundary(0.5)
-}
-
-// Add adds other to h.
-func (h *histogram) Add(other timeseries.Observable) {
- o := other.(*histogram)
- if o.valueCount == 0 {
- // Other histogram is empty
- } else if h.valueCount >= 0 && o.valueCount > 0 && h.value == o.value {
- // Both have a single bucketed value, aggregate them
- h.valueCount += o.valueCount
- } else {
- // Two different values necessitate buckets in this histogram
- h.allocateBuckets()
- if o.valueCount >= 0 {
- h.buckets[o.value] += o.valueCount
- } else {
- for i := range h.buckets {
- h.buckets[i] += o.buckets[i]
- }
- }
- }
- h.sumOfSquares += o.sumOfSquares
- h.sum += o.sum
-}
-
-// Clear resets the histogram to an empty state, removing all observed values.
-func (h *histogram) Clear() {
- h.buckets = nil
- h.value = 0
- h.valueCount = 0
- h.sum = 0
- h.sumOfSquares = 0
-}
-
-// CopyFrom copies from other, which must be a *histogram, into h.
-func (h *histogram) CopyFrom(other timeseries.Observable) {
- o := other.(*histogram)
- if o.valueCount == -1 {
- h.allocateBuckets()
- copy(h.buckets, o.buckets)
- }
- h.sum = o.sum
- h.sumOfSquares = o.sumOfSquares
- h.value = o.value
- h.valueCount = o.valueCount
-}
-
-// Multiply scales the histogram by the specified ratio.
-func (h *histogram) Multiply(ratio float64) {
- if h.valueCount == -1 {
- for i := range h.buckets {
- h.buckets[i] = int64(float64(h.buckets[i]) * ratio)
- }
- } else {
- h.valueCount = int64(float64(h.valueCount) * ratio)
- }
- h.sum = int64(float64(h.sum) * ratio)
- h.sumOfSquares = h.sumOfSquares * ratio
-}
-
-// New creates a new histogram.
-func (h *histogram) New() timeseries.Observable {
- r := new(histogram)
- r.Clear()
- return r
-}
-
-func (h *histogram) String() string {
- return fmt.Sprintf("%d, %f, %d, %d, %v",
- h.sum, h.sumOfSquares, h.value, h.valueCount, h.buckets)
-}
-
-// round returns the closest int64 to the argument
-func round(in float64) int64 {
- return int64(math.Floor(in + 0.5))
-}
-
-// bucketBoundary returns the first value in the bucket.
-func bucketBoundary(bucket uint8) int64 {
- if bucket == 0 {
- return 0
- }
- return 1 << bucket
-}
-
-// bucketData holds data about a specific bucket for use in distTmpl.
-type bucketData struct {
- Lower, Upper int64
- N int64
- Pct, CumulativePct float64
- GraphWidth int
-}
-
-// data holds data about a Distribution for use in distTmpl.
-type data struct {
- Buckets []*bucketData
- Count, Median int64
- Mean, StandardDeviation float64
-}
-
-// maxHTMLBarWidth is the maximum width of the HTML bar for visualizing buckets.
-const maxHTMLBarWidth = 350.0
-
-// newData returns data representing h for use in distTmpl.
-func (h *histogram) newData() *data {
- // Force the allocation of buckets to simplify the rendering implementation
- h.allocateBuckets()
- // We scale the bars on the right so that the largest bar is
- // maxHTMLBarWidth pixels in width.
- maxBucket := int64(0)
- for _, n := range h.buckets {
- if n > maxBucket {
- maxBucket = n
- }
- }
- total := h.total()
- barsizeMult := maxHTMLBarWidth / float64(maxBucket)
- var pctMult float64
- if total == 0 {
- pctMult = 1.0
- } else {
- pctMult = 100.0 / float64(total)
- }
-
- buckets := make([]*bucketData, len(h.buckets))
- runningTotal := int64(0)
- for i, n := range h.buckets {
- if n == 0 {
- continue
- }
- runningTotal += n
- var upperBound int64
- if i < bucketCount-1 {
- upperBound = bucketBoundary(uint8(i + 1))
- } else {
- upperBound = math.MaxInt64
- }
- buckets[i] = &bucketData{
- Lower: bucketBoundary(uint8(i)),
- Upper: upperBound,
- N: n,
- Pct: float64(n) * pctMult,
- CumulativePct: float64(runningTotal) * pctMult,
- GraphWidth: int(float64(n) * barsizeMult),
- }
- }
- return &data{
- Buckets: buckets,
- Count: total,
- Median: h.median(),
- Mean: h.average(),
- StandardDeviation: h.standardDeviation(),
- }
-}
-
-func (h *histogram) html() template.HTML {
- buf := new(bytes.Buffer)
- if err := distTmpl().Execute(buf, h.newData()); err != nil {
- buf.Reset()
- log.Printf("net/trace: couldn't execute template: %v", err)
- }
- return template.HTML(buf.String())
-}
-
-var distTmplCache *template.Template
-var distTmplOnce sync.Once
-
-func distTmpl() *template.Template {
- distTmplOnce.Do(func() {
- // Input: data
- distTmplCache = template.Must(template.New("distTmpl").Parse(`
-<table>
-<tr>
- <td style="padding:0.25em">Count: {{.Count}}</td>
- <td style="padding:0.25em">Mean: {{printf "%.0f" .Mean}}</td>
- <td style="padding:0.25em">StdDev: {{printf "%.0f" .StandardDeviation}}</td>
- <td style="padding:0.25em">Median: {{.Median}}</td>
-</tr>
-</table>
-<hr>
-<table>
-{{range $b := .Buckets}}
-{{if $b}}
- <tr>
- <td style="padding:0 0 0 0.25em">[</td>
- <td style="text-align:right;padding:0 0.25em">{{.Lower}},</td>
- <td style="text-align:right;padding:0 0.25em">{{.Upper}})</td>
- <td style="text-align:right;padding:0 0.25em">{{.N}}</td>
- <td style="text-align:right;padding:0 0.25em">{{printf "%#.3f" .Pct}}%</td>
- <td style="text-align:right;padding:0 0.25em">{{printf "%#.3f" .CumulativePct}}%</td>
- <td><div style="background-color: blue; height: 1em; width: {{.GraphWidth}};"></div></td>
- </tr>
-{{end}}
-{{end}}
-</table>
-`))
- })
- return distTmplCache
-}
diff --git a/vendor/golang.org/x/net/trace/trace.go b/vendor/golang.org/x/net/trace/trace.go
deleted file mode 100644
index 64f56a373..000000000
--- a/vendor/golang.org/x/net/trace/trace.go
+++ /dev/null
@@ -1,1079 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-Package trace implements tracing of requests and long-lived objects.
-It exports HTTP interfaces on /debug/requests and /debug/events.
-
-A trace.Trace provides tracing for short-lived objects, usually requests.
-A request handler might be implemented like this:
-
- func fooHandler(w http.ResponseWriter, req *http.Request) {
- tr := trace.New("mypkg.Foo", req.URL.Path)
- defer tr.Finish()
- ...
- tr.LazyPrintf("some event %q happened", str)
- ...
- if err := somethingImportant(); err != nil {
- tr.LazyPrintf("somethingImportant failed: %v", err)
- tr.SetError()
- }
- }
-
-The /debug/requests HTTP endpoint organizes the traces by family,
-errors, and duration. It also provides histogram of request duration
-for each family.
-
-A trace.EventLog provides tracing for long-lived objects, such as RPC
-connections.
-
- // A Fetcher fetches URL paths for a single domain.
- type Fetcher struct {
- domain string
- events trace.EventLog
- }
-
- func NewFetcher(domain string) *Fetcher {
- return &Fetcher{
- domain,
- trace.NewEventLog("mypkg.Fetcher", domain),
- }
- }
-
- func (f *Fetcher) Fetch(path string) (string, error) {
- resp, err := http.Get("http://" + f.domain + "/" + path)
- if err != nil {
- f.events.Errorf("Get(%q) = %v", path, err)
- return "", err
- }
- f.events.Printf("Get(%q) = %s", path, resp.Status)
- ...
- }
-
- func (f *Fetcher) Close() error {
- f.events.Finish()
- return nil
- }
-
-The /debug/events HTTP endpoint organizes the event logs by family and
-by time since the last error. The expanded view displays recent log
-entries and the log's call stack.
-*/
-package trace // import "golang.org/x/net/trace"
-
-import (
- "bytes"
- "fmt"
- "html/template"
- "io"
- "log"
- "net"
- "net/http"
- "runtime"
- "sort"
- "strconv"
- "sync"
- "sync/atomic"
- "time"
-
- "golang.org/x/net/context"
- "golang.org/x/net/internal/timeseries"
-)
-
-// DebugUseAfterFinish controls whether to debug uses of Trace values after finishing.
-// FOR DEBUGGING ONLY. This will slow down the program.
-var DebugUseAfterFinish = false
-
-// AuthRequest determines whether a specific request is permitted to load the
-// /debug/requests or /debug/events pages.
-//
-// It returns two bools; the first indicates whether the page may be viewed at all,
-// and the second indicates whether sensitive events will be shown.
-//
-// AuthRequest may be replaced by a program to customize its authorization requirements.
-//
-// The default AuthRequest function returns (true, true) if and only if the request
-// comes from localhost/127.0.0.1/[::1].
-var AuthRequest = func(req *http.Request) (any, sensitive bool) {
- // RemoteAddr is commonly in the form "IP" or "IP:port".
- // If it is in the form "IP:port", split off the port.
- host, _, err := net.SplitHostPort(req.RemoteAddr)
- if err != nil {
- host = req.RemoteAddr
- }
- switch host {
- case "localhost", "127.0.0.1", "::1":
- return true, true
- default:
- return false, false
- }
-}
-
-func init() {
- http.HandleFunc("/debug/requests", func(w http.ResponseWriter, req *http.Request) {
- any, sensitive := AuthRequest(req)
- if !any {
- http.Error(w, "not allowed", http.StatusUnauthorized)
- return
- }
- w.Header().Set("Content-Type", "text/html; charset=utf-8")
- Render(w, req, sensitive)
- })
- http.HandleFunc("/debug/events", func(w http.ResponseWriter, req *http.Request) {
- any, sensitive := AuthRequest(req)
- if !any {
- http.Error(w, "not allowed", http.StatusUnauthorized)
- return
- }
- w.Header().Set("Content-Type", "text/html; charset=utf-8")
- RenderEvents(w, req, sensitive)
- })
-}
-
-// Render renders the HTML page typically served at /debug/requests.
-// It does not do any auth checking; see AuthRequest for the default auth check
-// used by the handler registered on http.DefaultServeMux.
-// req may be nil.
-func Render(w io.Writer, req *http.Request, sensitive bool) {
- data := &struct {
- Families []string
- ActiveTraceCount map[string]int
- CompletedTraces map[string]*family
-
- // Set when a bucket has been selected.
- Traces traceList
- Family string
- Bucket int
- Expanded bool
- Traced bool
- Active bool
- ShowSensitive bool // whether to show sensitive events
-
- Histogram template.HTML
- HistogramWindow string // e.g. "last minute", "last hour", "all time"
-
- // If non-zero, the set of traces is a partial set,
- // and this is the total number.
- Total int
- }{
- CompletedTraces: completedTraces,
- }
-
- data.ShowSensitive = sensitive
- if req != nil {
- // Allow show_sensitive=0 to force hiding of sensitive data for testing.
- // This only goes one way; you can't use show_sensitive=1 to see things.
- if req.FormValue("show_sensitive") == "0" {
- data.ShowSensitive = false
- }
-
- if exp, err := strconv.ParseBool(req.FormValue("exp")); err == nil {
- data.Expanded = exp
- }
- if exp, err := strconv.ParseBool(req.FormValue("rtraced")); err == nil {
- data.Traced = exp
- }
- }
-
- completedMu.RLock()
- data.Families = make([]string, 0, len(completedTraces))
- for fam := range completedTraces {
- data.Families = append(data.Families, fam)
- }
- completedMu.RUnlock()
- sort.Strings(data.Families)
-
- // We are careful here to minimize the time spent locking activeMu,
- // since that lock is required every time an RPC starts and finishes.
- data.ActiveTraceCount = make(map[string]int, len(data.Families))
- activeMu.RLock()
- for fam, s := range activeTraces {
- data.ActiveTraceCount[fam] = s.Len()
- }
- activeMu.RUnlock()
-
- var ok bool
- data.Family, data.Bucket, ok = parseArgs(req)
- switch {
- case !ok:
- // No-op
- case data.Bucket == -1:
- data.Active = true
- n := data.ActiveTraceCount[data.Family]
- data.Traces = getActiveTraces(data.Family)
- if len(data.Traces) < n {
- data.Total = n
- }
- case data.Bucket < bucketsPerFamily:
- if b := lookupBucket(data.Family, data.Bucket); b != nil {
- data.Traces = b.Copy(data.Traced)
- }
- default:
- if f := getFamily(data.Family, false); f != nil {
- var obs timeseries.Observable
- f.LatencyMu.RLock()
- switch o := data.Bucket - bucketsPerFamily; o {
- case 0:
- obs = f.Latency.Minute()
- data.HistogramWindow = "last minute"
- case 1:
- obs = f.Latency.Hour()
- data.HistogramWindow = "last hour"
- case 2:
- obs = f.Latency.Total()
- data.HistogramWindow = "all time"
- }
- f.LatencyMu.RUnlock()
- if obs != nil {
- data.Histogram = obs.(*histogram).html()
- }
- }
- }
-
- if data.Traces != nil {
- defer data.Traces.Free()
- sort.Sort(data.Traces)
- }
-
- completedMu.RLock()
- defer completedMu.RUnlock()
- if err := pageTmpl().ExecuteTemplate(w, "Page", data); err != nil {
- log.Printf("net/trace: Failed executing template: %v", err)
- }
-}
-
-func parseArgs(req *http.Request) (fam string, b int, ok bool) {
- if req == nil {
- return "", 0, false
- }
- fam, bStr := req.FormValue("fam"), req.FormValue("b")
- if fam == "" || bStr == "" {
- return "", 0, false
- }
- b, err := strconv.Atoi(bStr)
- if err != nil || b < -1 {
- return "", 0, false
- }
-
- return fam, b, true
-}
-
-func lookupBucket(fam string, b int) *traceBucket {
- f := getFamily(fam, false)
- if f == nil || b < 0 || b >= len(f.Buckets) {
- return nil
- }
- return f.Buckets[b]
-}
-
-type contextKeyT string
-
-var contextKey = contextKeyT("golang.org/x/net/trace.Trace")
-
-// NewContext returns a copy of the parent context
-// and associates it with a Trace.
-func NewContext(ctx context.Context, tr Trace) context.Context {
- return context.WithValue(ctx, contextKey, tr)
-}
-
-// FromContext returns the Trace bound to the context, if any.
-func FromContext(ctx context.Context) (tr Trace, ok bool) {
- tr, ok = ctx.Value(contextKey).(Trace)
- return
-}
-
-// Trace represents an active request.
-type Trace interface {
- // LazyLog adds x to the event log. It will be evaluated each time the
- // /debug/requests page is rendered. Any memory referenced by x will be
- // pinned until the trace is finished and later discarded.
- LazyLog(x fmt.Stringer, sensitive bool)
-
- // LazyPrintf evaluates its arguments with fmt.Sprintf each time the
- // /debug/requests page is rendered. Any memory referenced by a will be
- // pinned until the trace is finished and later discarded.
- LazyPrintf(format string, a ...interface{})
-
- // SetError declares that this trace resulted in an error.
- SetError()
-
- // SetRecycler sets a recycler for the trace.
- // f will be called for each event passed to LazyLog at a time when
- // it is no longer required, whether while the trace is still active
- // and the event is discarded, or when a completed trace is discarded.
- SetRecycler(f func(interface{}))
-
- // SetTraceInfo sets the trace info for the trace.
- // This is currently unused.
- SetTraceInfo(traceID, spanID uint64)
-
- // SetMaxEvents sets the maximum number of events that will be stored
- // in the trace. This has no effect if any events have already been
- // added to the trace.
- SetMaxEvents(m int)
-
- // Finish declares that this trace is complete.
- // The trace should not be used after calling this method.
- Finish()
-}
-
-type lazySprintf struct {
- format string
- a []interface{}
-}
-
-func (l *lazySprintf) String() string {
- return fmt.Sprintf(l.format, l.a...)
-}
-
-// New returns a new Trace with the specified family and title.
-func New(family, title string) Trace {
- tr := newTrace()
- tr.ref()
- tr.Family, tr.Title = family, title
- tr.Start = time.Now()
- tr.maxEvents = maxEventsPerTrace
- tr.events = tr.eventsBuf[:0]
-
- activeMu.RLock()
- s := activeTraces[tr.Family]
- activeMu.RUnlock()
- if s == nil {
- activeMu.Lock()
- s = activeTraces[tr.Family] // check again
- if s == nil {
- s = new(traceSet)
- activeTraces[tr.Family] = s
- }
- activeMu.Unlock()
- }
- s.Add(tr)
-
- // Trigger allocation of the completed trace structure for this family.
- // This will cause the family to be present in the request page during
- // the first trace of this family. We don't care about the return value,
- // nor is there any need for this to run inline, so we execute it in its
- // own goroutine, but only if the family isn't allocated yet.
- completedMu.RLock()
- if _, ok := completedTraces[tr.Family]; !ok {
- go allocFamily(tr.Family)
- }
- completedMu.RUnlock()
-
- return tr
-}
-
-func (tr *trace) Finish() {
- tr.Elapsed = time.Now().Sub(tr.Start)
- if DebugUseAfterFinish {
- buf := make([]byte, 4<<10) // 4 KB should be enough
- n := runtime.Stack(buf, false)
- tr.finishStack = buf[:n]
- }
-
- activeMu.RLock()
- m := activeTraces[tr.Family]
- activeMu.RUnlock()
- m.Remove(tr)
-
- f := getFamily(tr.Family, true)
- for _, b := range f.Buckets {
- if b.Cond.match(tr) {
- b.Add(tr)
- }
- }
- // Add a sample of elapsed time as microseconds to the family's timeseries
- h := new(histogram)
- h.addMeasurement(tr.Elapsed.Nanoseconds() / 1e3)
- f.LatencyMu.Lock()
- f.Latency.Add(h)
- f.LatencyMu.Unlock()
-
- tr.unref() // matches ref in New
-}
-
-const (
- bucketsPerFamily = 9
- tracesPerBucket = 10
- maxActiveTraces = 20 // Maximum number of active traces to show.
- maxEventsPerTrace = 10
- numHistogramBuckets = 38
-)
-
-var (
- // The active traces.
- activeMu sync.RWMutex
- activeTraces = make(map[string]*traceSet) // family -> traces
-
- // Families of completed traces.
- completedMu sync.RWMutex
- completedTraces = make(map[string]*family) // family -> traces
-)
-
-type traceSet struct {
- mu sync.RWMutex
- m map[*trace]bool
-
- // We could avoid the entire map scan in FirstN by having a slice of all the traces
- // ordered by start time, and an index into that from the trace struct, with a periodic
- // repack of the slice after enough traces finish; we could also use a skip list or similar.
- // However, that would shift some of the expense from /debug/requests time to RPC time,
- // which is probably the wrong trade-off.
-}
-
-func (ts *traceSet) Len() int {
- ts.mu.RLock()
- defer ts.mu.RUnlock()
- return len(ts.m)
-}
-
-func (ts *traceSet) Add(tr *trace) {
- ts.mu.Lock()
- if ts.m == nil {
- ts.m = make(map[*trace]bool)
- }
- ts.m[tr] = true
- ts.mu.Unlock()
-}
-
-func (ts *traceSet) Remove(tr *trace) {
- ts.mu.Lock()
- delete(ts.m, tr)
- ts.mu.Unlock()
-}
-
-// FirstN returns the first n traces ordered by time.
-func (ts *traceSet) FirstN(n int) traceList {
- ts.mu.RLock()
- defer ts.mu.RUnlock()
-
- if n > len(ts.m) {
- n = len(ts.m)
- }
- trl := make(traceList, 0, n)
-
- // Fast path for when no selectivity is needed.
- if n == len(ts.m) {
- for tr := range ts.m {
- tr.ref()
- trl = append(trl, tr)
- }
- sort.Sort(trl)
- return trl
- }
-
- // Pick the oldest n traces.
- // This is inefficient. See the comment in the traceSet struct.
- for tr := range ts.m {
- // Put the first n traces into trl in the order they occur.
- // When we have n, sort trl, and thereafter maintain its order.
- if len(trl) < n {
- tr.ref()
- trl = append(trl, tr)
- if len(trl) == n {
- // This is guaranteed to happen exactly once during this loop.
- sort.Sort(trl)
- }
- continue
- }
- if tr.Start.After(trl[n-1].Start) {
- continue
- }
-
- // Find where to insert this one.
- tr.ref()
- i := sort.Search(n, func(i int) bool { return trl[i].Start.After(tr.Start) })
- trl[n-1].unref()
- copy(trl[i+1:], trl[i:])
- trl[i] = tr
- }
-
- return trl
-}
-
-func getActiveTraces(fam string) traceList {
- activeMu.RLock()
- s := activeTraces[fam]
- activeMu.RUnlock()
- if s == nil {
- return nil
- }
- return s.FirstN(maxActiveTraces)
-}
-
-func getFamily(fam string, allocNew bool) *family {
- completedMu.RLock()
- f := completedTraces[fam]
- completedMu.RUnlock()
- if f == nil && allocNew {
- f = allocFamily(fam)
- }
- return f
-}
-
-func allocFamily(fam string) *family {
- completedMu.Lock()
- defer completedMu.Unlock()
- f := completedTraces[fam]
- if f == nil {
- f = newFamily()
- completedTraces[fam] = f
- }
- return f
-}
-
-// family represents a set of trace buckets and associated latency information.
-type family struct {
- // traces may occur in multiple buckets.
- Buckets [bucketsPerFamily]*traceBucket
-
- // latency time series
- LatencyMu sync.RWMutex
- Latency *timeseries.MinuteHourSeries
-}
-
-func newFamily() *family {
- return &family{
- Buckets: [bucketsPerFamily]*traceBucket{
- {Cond: minCond(0)},
- {Cond: minCond(50 * time.Millisecond)},
- {Cond: minCond(100 * time.Millisecond)},
- {Cond: minCond(200 * time.Millisecond)},
- {Cond: minCond(500 * time.Millisecond)},
- {Cond: minCond(1 * time.Second)},
- {Cond: minCond(10 * time.Second)},
- {Cond: minCond(100 * time.Second)},
- {Cond: errorCond{}},
- },
- Latency: timeseries.NewMinuteHourSeries(func() timeseries.Observable { return new(histogram) }),
- }
-}
-
-// traceBucket represents a size-capped bucket of historic traces,
-// along with a condition for a trace to belong to the bucket.
-type traceBucket struct {
- Cond cond
-
- // Ring buffer implementation of a fixed-size FIFO queue.
- mu sync.RWMutex
- buf [tracesPerBucket]*trace
- start int // < tracesPerBucket
- length int // <= tracesPerBucket
-}
-
-func (b *traceBucket) Add(tr *trace) {
- b.mu.Lock()
- defer b.mu.Unlock()
-
- i := b.start + b.length
- if i >= tracesPerBucket {
- i -= tracesPerBucket
- }
- if b.length == tracesPerBucket {
- // "Remove" an element from the bucket.
- b.buf[i].unref()
- b.start++
- if b.start == tracesPerBucket {
- b.start = 0
- }
- }
- b.buf[i] = tr
- if b.length < tracesPerBucket {
- b.length++
- }
- tr.ref()
-}
-
-// Copy returns a copy of the traces in the bucket.
-// If tracedOnly is true, only the traces with trace information will be returned.
-// The logs will be ref'd before returning; the caller should call
-// the Free method when it is done with them.
-// TODO(dsymonds): keep track of traced requests in separate buckets.
-func (b *traceBucket) Copy(tracedOnly bool) traceList {
- b.mu.RLock()
- defer b.mu.RUnlock()
-
- trl := make(traceList, 0, b.length)
- for i, x := 0, b.start; i < b.length; i++ {
- tr := b.buf[x]
- if !tracedOnly || tr.spanID != 0 {
- tr.ref()
- trl = append(trl, tr)
- }
- x++
- if x == b.length {
- x = 0
- }
- }
- return trl
-}
-
-func (b *traceBucket) Empty() bool {
- b.mu.RLock()
- defer b.mu.RUnlock()
- return b.length == 0
-}
-
-// cond represents a condition on a trace.
-type cond interface {
- match(t *trace) bool
- String() string
-}
-
-type minCond time.Duration
-
-func (m minCond) match(t *trace) bool { return t.Elapsed >= time.Duration(m) }
-func (m minCond) String() string { return fmt.Sprintf("≥%gs", time.Duration(m).Seconds()) }
-
-type errorCond struct{}
-
-func (e errorCond) match(t *trace) bool { return t.IsError }
-func (e errorCond) String() string { return "errors" }
-
-type traceList []*trace
-
-// Free calls unref on each element of the list.
-func (trl traceList) Free() {
- for _, t := range trl {
- t.unref()
- }
-}
-
-// traceList may be sorted in reverse chronological order.
-func (trl traceList) Len() int { return len(trl) }
-func (trl traceList) Less(i, j int) bool { return trl[i].Start.After(trl[j].Start) }
-func (trl traceList) Swap(i, j int) { trl[i], trl[j] = trl[j], trl[i] }
-
-// An event is a timestamped log entry in a trace.
-type event struct {
- When time.Time
- Elapsed time.Duration // since previous event in trace
- NewDay bool // whether this event is on a different day to the previous event
- Recyclable bool // whether this event was passed via LazyLog
- Sensitive bool // whether this event contains sensitive information
- What interface{} // string or fmt.Stringer
-}
-
-// WhenString returns a string representation of the elapsed time of the event.
-// It will include the date if midnight was crossed.
-func (e event) WhenString() string {
- if e.NewDay {
- return e.When.Format("2006/01/02 15:04:05.000000")
- }
- return e.When.Format("15:04:05.000000")
-}
-
-// discarded represents a number of discarded events.
-// It is stored as *discarded to make it easier to update in-place.
-type discarded int
-
-func (d *discarded) String() string {
- return fmt.Sprintf("(%d events discarded)", int(*d))
-}
-
-// trace represents an active or complete request,
-// either sent or received by this program.
-type trace struct {
- // Family is the top-level grouping of traces to which this belongs.
- Family string
-
- // Title is the title of this trace.
- Title string
-
- // Timing information.
- Start time.Time
- Elapsed time.Duration // zero while active
-
- // Trace information if non-zero.
- traceID uint64
- spanID uint64
-
- // Whether this trace resulted in an error.
- IsError bool
-
- // Append-only sequence of events (modulo discards).
- mu sync.RWMutex
- events []event
- maxEvents int
-
- refs int32 // how many buckets this is in
- recycler func(interface{})
- disc discarded // scratch space to avoid allocation
-
- finishStack []byte // where finish was called, if DebugUseAfterFinish is set
-
- eventsBuf [4]event // preallocated buffer in case we only log a few events
-}
-
-func (tr *trace) reset() {
- // Clear all but the mutex. Mutexes may not be copied, even when unlocked.
- tr.Family = ""
- tr.Title = ""
- tr.Start = time.Time{}
- tr.Elapsed = 0
- tr.traceID = 0
- tr.spanID = 0
- tr.IsError = false
- tr.maxEvents = 0
- tr.events = nil
- tr.refs = 0
- tr.recycler = nil
- tr.disc = 0
- tr.finishStack = nil
- for i := range tr.eventsBuf {
- tr.eventsBuf[i] = event{}
- }
-}
-
-// delta returns the elapsed time since the last event or the trace start,
-// and whether it spans midnight.
-// L >= tr.mu
-func (tr *trace) delta(t time.Time) (time.Duration, bool) {
- if len(tr.events) == 0 {
- return t.Sub(tr.Start), false
- }
- prev := tr.events[len(tr.events)-1].When
- return t.Sub(prev), prev.Day() != t.Day()
-}
-
-func (tr *trace) addEvent(x interface{}, recyclable, sensitive bool) {
- if DebugUseAfterFinish && tr.finishStack != nil {
- buf := make([]byte, 4<<10) // 4 KB should be enough
- n := runtime.Stack(buf, false)
- log.Printf("net/trace: trace used after finish:\nFinished at:\n%s\nUsed at:\n%s", tr.finishStack, buf[:n])
- }
-
- /*
- NOTE TO DEBUGGERS
-
- If you are here because your program panicked in this code,
- it is almost definitely the fault of code using this package,
- and very unlikely to be the fault of this code.
-
- The most likely scenario is that some code elsewhere is using
- a trace.Trace after its Finish method is called.
- You can temporarily set the DebugUseAfterFinish var
- to help discover where that is; do not leave that var set,
- since it makes this package much less efficient.
- */
-
- e := event{When: time.Now(), What: x, Recyclable: recyclable, Sensitive: sensitive}
- tr.mu.Lock()
- e.Elapsed, e.NewDay = tr.delta(e.When)
- if len(tr.events) < tr.maxEvents {
- tr.events = append(tr.events, e)
- } else {
- // Discard the middle events.
- di := int((tr.maxEvents - 1) / 2)
- if d, ok := tr.events[di].What.(*discarded); ok {
- (*d)++
- } else {
- // disc starts at two to count for the event it is replacing,
- // plus the next one that we are about to drop.
- tr.disc = 2
- if tr.recycler != nil && tr.events[di].Recyclable {
- go tr.recycler(tr.events[di].What)
- }
- tr.events[di].What = &tr.disc
- }
- // The timestamp of the discarded meta-event should be
- // the time of the last event it is representing.
- tr.events[di].When = tr.events[di+1].When
-
- if tr.recycler != nil && tr.events[di+1].Recyclable {
- go tr.recycler(tr.events[di+1].What)
- }
- copy(tr.events[di+1:], tr.events[di+2:])
- tr.events[tr.maxEvents-1] = e
- }
- tr.mu.Unlock()
-}
-
-func (tr *trace) LazyLog(x fmt.Stringer, sensitive bool) {
- tr.addEvent(x, true, sensitive)
-}
-
-func (tr *trace) LazyPrintf(format string, a ...interface{}) {
- tr.addEvent(&lazySprintf{format, a}, false, false)
-}
-
-func (tr *trace) SetError() { tr.IsError = true }
-
-func (tr *trace) SetRecycler(f func(interface{})) {
- tr.recycler = f
-}
-
-func (tr *trace) SetTraceInfo(traceID, spanID uint64) {
- tr.traceID, tr.spanID = traceID, spanID
-}
-
-func (tr *trace) SetMaxEvents(m int) {
- // Always keep at least three events: first, discarded count, last.
- if len(tr.events) == 0 && m > 3 {
- tr.maxEvents = m
- }
-}
-
-func (tr *trace) ref() {
- atomic.AddInt32(&tr.refs, 1)
-}
-
-func (tr *trace) unref() {
- if atomic.AddInt32(&tr.refs, -1) == 0 {
- if tr.recycler != nil {
- // freeTrace clears tr, so we hold tr.recycler and tr.events here.
- go func(f func(interface{}), es []event) {
- for _, e := range es {
- if e.Recyclable {
- f(e.What)
- }
- }
- }(tr.recycler, tr.events)
- }
-
- freeTrace(tr)
- }
-}
-
-func (tr *trace) When() string {
- return tr.Start.Format("2006/01/02 15:04:05.000000")
-}
-
-func (tr *trace) ElapsedTime() string {
- t := tr.Elapsed
- if t == 0 {
- // Active trace.
- t = time.Since(tr.Start)
- }
- return fmt.Sprintf("%.6f", t.Seconds())
-}
-
-func (tr *trace) Events() []event {
- tr.mu.RLock()
- defer tr.mu.RUnlock()
- return tr.events
-}
-
-var traceFreeList = make(chan *trace, 1000) // TODO(dsymonds): Use sync.Pool?
-
-// newTrace returns a trace ready to use.
-func newTrace() *trace {
- select {
- case tr := <-traceFreeList:
- return tr
- default:
- return new(trace)
- }
-}
-
-// freeTrace adds tr to traceFreeList if there's room.
-// This is non-blocking.
-func freeTrace(tr *trace) {
- if DebugUseAfterFinish {
- return // never reuse
- }
- tr.reset()
- select {
- case traceFreeList <- tr:
- default:
- }
-}
-
-func elapsed(d time.Duration) string {
- b := []byte(fmt.Sprintf("%.6f", d.Seconds()))
-
- // For subsecond durations, blank all zeros before decimal point,
- // and all zeros between the decimal point and the first non-zero digit.
- if d < time.Second {
- dot := bytes.IndexByte(b, '.')
- for i := 0; i < dot; i++ {
- b[i] = ' '
- }
- for i := dot + 1; i < len(b); i++ {
- if b[i] == '0' {
- b[i] = ' '
- } else {
- break
- }
- }
- }
-
- return string(b)
-}
-
-var pageTmplCache *template.Template
-var pageTmplOnce sync.Once
-
-func pageTmpl() *template.Template {
- pageTmplOnce.Do(func() {
- pageTmplCache = template.Must(template.New("Page").Funcs(template.FuncMap{
- "elapsed": elapsed,
- "add": func(a, b int) int { return a + b },
- }).Parse(pageHTML))
- })
- return pageTmplCache
-}
-
-const pageHTML = `
-{{template "Prolog" .}}
-{{template "StatusTable" .}}
-{{template "Epilog" .}}
-
-{{define "Prolog"}}
-<html>
- <head>
- <title>/debug/requests</title>
- <style type="text/css">
- body {
- font-family: sans-serif;
- }
- table#tr-status td.family {
- padding-right: 2em;
- }
- table#tr-status td.active {
- padding-right: 1em;
- }
- table#tr-status td.latency-first {
- padding-left: 1em;
- }
- table#tr-status td.empty {
- color: #aaa;
- }
- table#reqs {
- margin-top: 1em;
- }
- table#reqs tr.first {
- {{if $.Expanded}}font-weight: bold;{{end}}
- }
- table#reqs td {
- font-family: monospace;
- }
- table#reqs td.when {
- text-align: right;
- white-space: nowrap;
- }
- table#reqs td.elapsed {
- padding: 0 0.5em;
- text-align: right;
- white-space: pre;
- width: 10em;
- }
- address {
- font-size: smaller;
- margin-top: 5em;
- }
- </style>
- </head>
- <body>
-
-<h1>/debug/requests</h1>
-{{end}} {{/* end of Prolog */}}
-
-{{define "StatusTable"}}
-<table id="tr-status">
- {{range $fam := .Families}}
- <tr>
- <td class="family">{{$fam}}</td>
-
- {{$n := index $.ActiveTraceCount $fam}}
- <td class="active {{if not $n}}empty{{end}}">
- {{if $n}}<a href="?fam={{$fam}}&b=-1{{if $.Expanded}}&exp=1{{end}}">{{end}}
- [{{$n}} active]
- {{if $n}}</a>{{end}}
- </td>
-
- {{$f := index $.CompletedTraces $fam}}
- {{range $i, $b := $f.Buckets}}
- {{$empty := $b.Empty}}
- <td {{if $empty}}class="empty"{{end}}>
- {{if not $empty}}<a href="?fam={{$fam}}&b={{$i}}{{if $.Expanded}}&exp=1{{end}}">{{end}}
- [{{.Cond}}]
- {{if not $empty}}</a>{{end}}
- </td>
- {{end}}
-
- {{$nb := len $f.Buckets}}
- <td class="latency-first">
- <a href="?fam={{$fam}}&b={{$nb}}">[minute]</a>
- </td>
- <td>
- <a href="?fam={{$fam}}&b={{add $nb 1}}">[hour]</a>
- </td>
- <td>
- <a href="?fam={{$fam}}&b={{add $nb 2}}">[total]</a>
- </td>
-
- </tr>
- {{end}}
-</table>
-{{end}} {{/* end of StatusTable */}}
-
-{{define "Epilog"}}
-{{if $.Traces}}
-<hr />
-<h3>Family: {{$.Family}}</h3>
-
-{{if or $.Expanded $.Traced}}
- <a href="?fam={{$.Family}}&b={{$.Bucket}}">[Normal/Summary]</a>
-{{else}}
- [Normal/Summary]
-{{end}}
-
-{{if or (not $.Expanded) $.Traced}}
- <a href="?fam={{$.Family}}&b={{$.Bucket}}&exp=1">[Normal/Expanded]</a>
-{{else}}
- [Normal/Expanded]
-{{end}}
-
-{{if not $.Active}}
- {{if or $.Expanded (not $.Traced)}}
- <a href="?fam={{$.Family}}&b={{$.Bucket}}&rtraced=1">[Traced/Summary]</a>
- {{else}}
- [Traced/Summary]
- {{end}}
- {{if or (not $.Expanded) (not $.Traced)}}
- <a href="?fam={{$.Family}}&b={{$.Bucket}}&exp=1&rtraced=1">[Traced/Expanded]</a>
- {{else}}
- [Traced/Expanded]
- {{end}}
-{{end}}
-
-{{if $.Total}}
-<p><em>Showing <b>{{len $.Traces}}</b> of <b>{{$.Total}}</b> traces.</em></p>
-{{end}}
-
-<table id="reqs">
- <caption>
- {{if $.Active}}Active{{else}}Completed{{end}} Requests
- </caption>
- <tr><th>When</th><th>Elapsed&nbsp;(s)</th></tr>
- {{range $tr := $.Traces}}
- <tr class="first">
- <td class="when">{{$tr.When}}</td>
- <td class="elapsed">{{$tr.ElapsedTime}}</td>
- <td>{{$tr.Title}}</td>
- {{/* TODO: include traceID/spanID */}}
- </tr>
- {{if $.Expanded}}
- {{range $tr.Events}}
- <tr>
- <td class="when">{{.WhenString}}</td>
- <td class="elapsed">{{elapsed .Elapsed}}</td>
- <td>{{if or $.ShowSensitive (not .Sensitive)}}... {{.What}}{{else}}<em>[redacted]</em>{{end}}</td>
- </tr>
- {{end}}
- {{end}}
- {{end}}
-</table>
-{{end}} {{/* if $.Traces */}}
-
-{{if $.Histogram}}
-<h4>Latency (&micro;s) of {{$.Family}} over {{$.HistogramWindow}}</h4>
-{{$.Histogram}}
-{{end}} {{/* if $.Histogram */}}
-
- </body>
-</html>
-{{end}} {{/* end of Epilog */}}
-`
diff --git a/vendor/google.golang.org/grpc/LICENSE b/vendor/google.golang.org/grpc/LICENSE
deleted file mode 100644
index f4988b450..000000000
--- a/vendor/google.golang.org/grpc/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright 2014, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/google.golang.org/grpc/PATENTS b/vendor/google.golang.org/grpc/PATENTS
deleted file mode 100644
index 69b47959f..000000000
--- a/vendor/google.golang.org/grpc/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the gRPC project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of gRPC, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of gRPC. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of gRPC or any code incorporated within this
-implementation of gRPC constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of gRPC
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/google.golang.org/grpc/README.md b/vendor/google.golang.org/grpc/README.md
deleted file mode 100644
index 110a8cf42..000000000
--- a/vendor/google.golang.org/grpc/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-#gRPC-Go
-
-[![Build Status](https://travis-ci.org/grpc/grpc-go.svg)](https://travis-ci.org/grpc/grpc-go) [![GoDoc](https://godoc.org/google.golang.org/grpc?status.svg)](https://godoc.org/google.golang.org/grpc)
-
-The Go implementation of [gRPC](http://www.grpc.io/): A high performance, open source, general RPC framework that puts mobile and HTTP/2 first. For more information see the [gRPC Quick Start](http://www.grpc.io/docs/) guide.
-
-Installation
-------------
-
-To install this package, you need to install Go and setup your Go workspace on your computer. The simplest way to install the library is to run:
-
-```
-$ go get google.golang.org/grpc
-```
-
-Prerequisites
--------------
-
-This requires Go 1.5 or later.
-
-Constraints
------------
-The grpc package should only depend on standard Go packages and a small number of exceptions. If your contribution introduces new dependencies which are NOT in the [list](http://godoc.org/google.golang.org/grpc?imports), you need a discussion with gRPC-Go authors and consultants.
-
-Documentation
--------------
-See [API documentation](https://godoc.org/google.golang.org/grpc) for package and API descriptions and find examples in the [examples directory](examples/).
-
-Status
-------
-GA
-
diff --git a/vendor/google.golang.org/grpc/backoff.go b/vendor/google.golang.org/grpc/backoff.go
deleted file mode 100644
index c99024ee3..000000000
--- a/vendor/google.golang.org/grpc/backoff.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package grpc
-
-import (
- "math/rand"
- "time"
-)
-
-// DefaultBackoffConfig uses values specified for backoff in
-// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.
-var (
- DefaultBackoffConfig = BackoffConfig{
- MaxDelay: 120 * time.Second,
- baseDelay: 1.0 * time.Second,
- factor: 1.6,
- jitter: 0.2,
- }
-)
-
-// backoffStrategy defines the methodology for backing off after a grpc
-// connection failure.
-//
-// This is unexported until the gRPC project decides whether or not to allow
-// alternative backoff strategies. Once a decision is made, this type and its
-// method may be exported.
-type backoffStrategy interface {
- // backoff returns the amount of time to wait before the next retry given
- // the number of consecutive failures.
- backoff(retries int) time.Duration
-}
-
-// BackoffConfig defines the parameters for the default gRPC backoff strategy.
-type BackoffConfig struct {
- // MaxDelay is the upper bound of backoff delay.
- MaxDelay time.Duration
-
- // TODO(stevvooe): The following fields are not exported, as allowing
- // changes would violate the current gRPC specification for backoff. If
- // gRPC decides to allow more interesting backoff strategies, these fields
- // may be opened up in the future.
-
- // baseDelay is the amount of time to wait before retrying after the first
- // failure.
- baseDelay time.Duration
-
- // factor is applied to the backoff after each retry.
- factor float64
-
- // jitter provides a range to randomize backoff delays.
- jitter float64
-}
-
-func setDefaults(bc *BackoffConfig) {
- md := bc.MaxDelay
- *bc = DefaultBackoffConfig
-
- if md > 0 {
- bc.MaxDelay = md
- }
-}
-
-func (bc BackoffConfig) backoff(retries int) time.Duration {
- if retries == 0 {
- return bc.baseDelay
- }
- backoff, max := float64(bc.baseDelay), float64(bc.MaxDelay)
- for backoff < max && retries > 0 {
- backoff *= bc.factor
- retries--
- }
- if backoff > max {
- backoff = max
- }
- // Randomize backoff delays so that if a cluster of requests start at
- // the same time, they won't operate in lockstep.
- backoff *= 1 + bc.jitter*(rand.Float64()*2-1)
- if backoff < 0 {
- return 0
- }
- return time.Duration(backoff)
-}
diff --git a/vendor/google.golang.org/grpc/balancer.go b/vendor/google.golang.org/grpc/balancer.go
deleted file mode 100644
index 9d943fbad..000000000
--- a/vendor/google.golang.org/grpc/balancer.go
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
- *
- * Copyright 2016, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package grpc
-
-import (
- "fmt"
- "sync"
-
- "golang.org/x/net/context"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/credentials"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/naming"
-)
-
-// Address represents a server the client connects to.
-// This is the EXPERIMENTAL API and may be changed or extended in the future.
-type Address struct {
- // Addr is the server address on which a connection will be established.
- Addr string
- // Metadata is the information associated with Addr, which may be used
- // to make load balancing decision.
- Metadata interface{}
-}
-
-// BalancerConfig specifies the configurations for Balancer.
-type BalancerConfig struct {
- // DialCreds is the transport credential the Balancer implementation can
- // use to dial to a remote load balancer server. The Balancer implementations
- // can ignore this if it does not need to talk to another party securely.
- DialCreds credentials.TransportCredentials
-}
-
-// BalancerGetOptions configures a Get call.
-// This is the EXPERIMENTAL API and may be changed or extended in the future.
-type BalancerGetOptions struct {
- // BlockingWait specifies whether Get should block when there is no
- // connected address.
- BlockingWait bool
-}
-
-// Balancer chooses network addresses for RPCs.
-// This is the EXPERIMENTAL API and may be changed or extended in the future.
-type Balancer interface {
- // Start does the initialization work to bootstrap a Balancer. For example,
- // this function may start the name resolution and watch the updates. It will
- // be called when dialing.
- Start(target string, config BalancerConfig) error
- // Up informs the Balancer that gRPC has a connection to the server at
- // addr. It returns down which is called once the connection to addr gets
- // lost or closed.
- // TODO: It is not clear how to construct and take advantage of the meaningful error
- // parameter for down. Need realistic demands to guide.
- Up(addr Address) (down func(error))
- // Get gets the address of a server for the RPC corresponding to ctx.
- // i) If it returns a connected address, gRPC internals issues the RPC on the
- // connection to this address;
- // ii) If it returns an address on which the connection is under construction
- // (initiated by Notify(...)) but not connected, gRPC internals
- // * fails RPC if the RPC is fail-fast and connection is in the TransientFailure or
- // Shutdown state;
- // or
- // * issues RPC on the connection otherwise.
- // iii) If it returns an address on which the connection does not exist, gRPC
- // internals treats it as an error and will fail the corresponding RPC.
- //
- // Therefore, the following is the recommended rule when writing a custom Balancer.
- // If opts.BlockingWait is true, it should return a connected address or
- // block if there is no connected address. It should respect the timeout or
- // cancellation of ctx when blocking. If opts.BlockingWait is false (for fail-fast
- // RPCs), it should return an address it has notified via Notify(...) immediately
- // instead of blocking.
- //
- // The function returns put which is called once the rpc has completed or failed.
- // put can collect and report RPC stats to a remote load balancer.
- //
- // This function should only return the errors Balancer cannot recover by itself.
- // gRPC internals will fail the RPC if an error is returned.
- Get(ctx context.Context, opts BalancerGetOptions) (addr Address, put func(), err error)
- // Notify returns a channel that is used by gRPC internals to watch the addresses
- // gRPC needs to connect. The addresses might be from a name resolver or remote
- // load balancer. gRPC internals will compare it with the existing connected
- // addresses. If the address Balancer notified is not in the existing connected
- // addresses, gRPC starts to connect the address. If an address in the existing
- // connected addresses is not in the notification list, the corresponding connection
- // is shutdown gracefully. Otherwise, there are no operations to take. Note that
- // the Address slice must be the full list of the Addresses which should be connected.
- // It is NOT delta.
- Notify() <-chan []Address
- // Close shuts down the balancer.
- Close() error
-}
-
-// downErr implements net.Error. It is constructed by gRPC internals and passed to the down
-// call of Balancer.
-type downErr struct {
- timeout bool
- temporary bool
- desc string
-}
-
-func (e downErr) Error() string { return e.desc }
-func (e downErr) Timeout() bool { return e.timeout }
-func (e downErr) Temporary() bool { return e.temporary }
-
-func downErrorf(timeout, temporary bool, format string, a ...interface{}) downErr {
- return downErr{
- timeout: timeout,
- temporary: temporary,
- desc: fmt.Sprintf(format, a...),
- }
-}
-
-// RoundRobin returns a Balancer that selects addresses round-robin. It uses r to watch
-// the name resolution updates and updates the addresses available correspondingly.
-func RoundRobin(r naming.Resolver) Balancer {
- return &roundRobin{r: r}
-}
-
-type addrInfo struct {
- addr Address
- connected bool
-}
-
-type roundRobin struct {
- r naming.Resolver
- w naming.Watcher
- addrs []*addrInfo // all the addresses the client should potentially connect
- mu sync.Mutex
- addrCh chan []Address // the channel to notify gRPC internals the list of addresses the client should connect to.
- next int // index of the next address to return for Get()
- waitCh chan struct{} // the channel to block when there is no connected address available
- done bool // The Balancer is closed.
-}
-
-func (rr *roundRobin) watchAddrUpdates() error {
- updates, err := rr.w.Next()
- if err != nil {
- grpclog.Printf("grpc: the naming watcher stops working due to %v.\n", err)
- return err
- }
- rr.mu.Lock()
- defer rr.mu.Unlock()
- for _, update := range updates {
- addr := Address{
- Addr: update.Addr,
- Metadata: update.Metadata,
- }
- switch update.Op {
- case naming.Add:
- var exist bool
- for _, v := range rr.addrs {
- if addr == v.addr {
- exist = true
- grpclog.Println("grpc: The name resolver wanted to add an existing address: ", addr)
- break
- }
- }
- if exist {
- continue
- }
- rr.addrs = append(rr.addrs, &addrInfo{addr: addr})
- case naming.Delete:
- for i, v := range rr.addrs {
- if addr == v.addr {
- copy(rr.addrs[i:], rr.addrs[i+1:])
- rr.addrs = rr.addrs[:len(rr.addrs)-1]
- break
- }
- }
- default:
- grpclog.Println("Unknown update.Op ", update.Op)
- }
- }
- // Make a copy of rr.addrs and write it onto rr.addrCh so that gRPC internals gets notified.
- open := make([]Address, len(rr.addrs))
- for i, v := range rr.addrs {
- open[i] = v.addr
- }
- if rr.done {
- return ErrClientConnClosing
- }
- rr.addrCh <- open
- return nil
-}
-
-func (rr *roundRobin) Start(target string, config BalancerConfig) error {
- rr.mu.Lock()
- defer rr.mu.Unlock()
- if rr.done {
- return ErrClientConnClosing
- }
- if rr.r == nil {
- // If there is no name resolver installed, it is not needed to
- // do name resolution. In this case, target is added into rr.addrs
- // as the only address available and rr.addrCh stays nil.
- rr.addrs = append(rr.addrs, &addrInfo{addr: Address{Addr: target}})
- return nil
- }
- w, err := rr.r.Resolve(target)
- if err != nil {
- return err
- }
- rr.w = w
- rr.addrCh = make(chan []Address)
- go func() {
- for {
- if err := rr.watchAddrUpdates(); err != nil {
- return
- }
- }
- }()
- return nil
-}
-
-// Up sets the connected state of addr and sends notification if there are pending
-// Get() calls.
-func (rr *roundRobin) Up(addr Address) func(error) {
- rr.mu.Lock()
- defer rr.mu.Unlock()
- var cnt int
- for _, a := range rr.addrs {
- if a.addr == addr {
- if a.connected {
- return nil
- }
- a.connected = true
- }
- if a.connected {
- cnt++
- }
- }
- // addr is only one which is connected. Notify the Get() callers who are blocking.
- if cnt == 1 && rr.waitCh != nil {
- close(rr.waitCh)
- rr.waitCh = nil
- }
- return func(err error) {
- rr.down(addr, err)
- }
-}
-
-// down unsets the connected state of addr.
-func (rr *roundRobin) down(addr Address, err error) {
- rr.mu.Lock()
- defer rr.mu.Unlock()
- for _, a := range rr.addrs {
- if addr == a.addr {
- a.connected = false
- break
- }
- }
-}
-
-// Get returns the next addr in the rotation.
-func (rr *roundRobin) Get(ctx context.Context, opts BalancerGetOptions) (addr Address, put func(), err error) {
- var ch chan struct{}
- rr.mu.Lock()
- if rr.done {
- rr.mu.Unlock()
- err = ErrClientConnClosing
- return
- }
-
- if len(rr.addrs) > 0 {
- if rr.next >= len(rr.addrs) {
- rr.next = 0
- }
- next := rr.next
- for {
- a := rr.addrs[next]
- next = (next + 1) % len(rr.addrs)
- if a.connected {
- addr = a.addr
- rr.next = next
- rr.mu.Unlock()
- return
- }
- if next == rr.next {
- // Has iterated all the possible address but none is connected.
- break
- }
- }
- }
- if !opts.BlockingWait {
- if len(rr.addrs) == 0 {
- rr.mu.Unlock()
- err = Errorf(codes.Unavailable, "there is no address available")
- return
- }
- // Returns the next addr on rr.addrs for failfast RPCs.
- addr = rr.addrs[rr.next].addr
- rr.next++
- rr.mu.Unlock()
- return
- }
- // Wait on rr.waitCh for non-failfast RPCs.
- if rr.waitCh == nil {
- ch = make(chan struct{})
- rr.waitCh = ch
- } else {
- ch = rr.waitCh
- }
- rr.mu.Unlock()
- for {
- select {
- case <-ctx.Done():
- err = ctx.Err()
- return
- case <-ch:
- rr.mu.Lock()
- if rr.done {
- rr.mu.Unlock()
- err = ErrClientConnClosing
- return
- }
-
- if len(rr.addrs) > 0 {
- if rr.next >= len(rr.addrs) {
- rr.next = 0
- }
- next := rr.next
- for {
- a := rr.addrs[next]
- next = (next + 1) % len(rr.addrs)
- if a.connected {
- addr = a.addr
- rr.next = next
- rr.mu.Unlock()
- return
- }
- if next == rr.next {
- // Has iterated all the possible address but none is connected.
- break
- }
- }
- }
- // The newly added addr got removed by Down() again.
- if rr.waitCh == nil {
- ch = make(chan struct{})
- rr.waitCh = ch
- } else {
- ch = rr.waitCh
- }
- rr.mu.Unlock()
- }
- }
-}
-
-func (rr *roundRobin) Notify() <-chan []Address {
- return rr.addrCh
-}
-
-func (rr *roundRobin) Close() error {
- rr.mu.Lock()
- defer rr.mu.Unlock()
- rr.done = true
- if rr.w != nil {
- rr.w.Close()
- }
- if rr.waitCh != nil {
- close(rr.waitCh)
- rr.waitCh = nil
- }
- if rr.addrCh != nil {
- close(rr.addrCh)
- }
- return nil
-}
diff --git a/vendor/google.golang.org/grpc/call.go b/vendor/google.golang.org/grpc/call.go
deleted file mode 100644
index 772c817ed..000000000
--- a/vendor/google.golang.org/grpc/call.go
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package grpc
-
-import (
- "bytes"
- "io"
- "math"
- "time"
-
- "golang.org/x/net/context"
- "golang.org/x/net/trace"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/transport"
-)
-
-// recvResponse receives and parses an RPC response.
-// On error, it returns the error and indicates whether the call should be retried.
-//
-// TODO(zhaoq): Check whether the received message sequence is valid.
-func recvResponse(dopts dialOptions, t transport.ClientTransport, c *callInfo, stream *transport.Stream, reply interface{}) (err error) {
- // Try to acquire header metadata from the server if there is any.
- defer func() {
- if err != nil {
- if _, ok := err.(transport.ConnectionError); !ok {
- t.CloseStream(stream, err)
- }
- }
- }()
- c.headerMD, err = stream.Header()
- if err != nil {
- return
- }
- p := &parser{r: stream}
- for {
- if err = recv(p, dopts.codec, stream, dopts.dc, reply, math.MaxInt32); err != nil {
- if err == io.EOF {
- break
- }
- return
- }
- }
- c.trailerMD = stream.Trailer()
- return nil
-}
-
-// sendRequest writes out various information of an RPC such as Context and Message.
-func sendRequest(ctx context.Context, codec Codec, compressor Compressor, callHdr *transport.CallHdr, t transport.ClientTransport, args interface{}, opts *transport.Options) (_ *transport.Stream, err error) {
- stream, err := t.NewStream(ctx, callHdr)
- if err != nil {
- return nil, err
- }
- defer func() {
- if err != nil {
- // If err is connection error, t will be closed, no need to close stream here.
- if _, ok := err.(transport.ConnectionError); !ok {
- t.CloseStream(stream, err)
- }
- }
- }()
- var cbuf *bytes.Buffer
- if compressor != nil {
- cbuf = new(bytes.Buffer)
- }
- outBuf, err := encode(codec, args, compressor, cbuf)
- if err != nil {
- return nil, Errorf(codes.Internal, "grpc: %v", err)
- }
- err = t.Write(stream, outBuf, opts)
- // t.NewStream(...) could lead to an early rejection of the RPC (e.g., the service/method
- // does not exist.) so that t.Write could get io.EOF from wait(...). Leave the following
- // recvResponse to get the final status.
- if err != nil && err != io.EOF {
- return nil, err
- }
- // Sent successfully.
- return stream, nil
-}
-
-// Invoke sends the RPC request on the wire and returns after response is received.
-// Invoke is called by generated code. Also users can call Invoke directly when it
-// is really needed in their use cases.
-func Invoke(ctx context.Context, method string, args, reply interface{}, cc *ClientConn, opts ...CallOption) error {
- if cc.dopts.unaryInt != nil {
- return cc.dopts.unaryInt(ctx, method, args, reply, cc, invoke, opts...)
- }
- return invoke(ctx, method, args, reply, cc, opts...)
-}
-
-func invoke(ctx context.Context, method string, args, reply interface{}, cc *ClientConn, opts ...CallOption) (err error) {
- c := defaultCallInfo
- for _, o := range opts {
- if err := o.before(&c); err != nil {
- return toRPCErr(err)
- }
- }
- defer func() {
- for _, o := range opts {
- o.after(&c)
- }
- }()
- if EnableTracing {
- c.traceInfo.tr = trace.New("grpc.Sent."+methodFamily(method), method)
- defer c.traceInfo.tr.Finish()
- c.traceInfo.firstLine.client = true
- if deadline, ok := ctx.Deadline(); ok {
- c.traceInfo.firstLine.deadline = deadline.Sub(time.Now())
- }
- c.traceInfo.tr.LazyLog(&c.traceInfo.firstLine, false)
- // TODO(dsymonds): Arrange for c.traceInfo.firstLine.remoteAddr to be set.
- defer func() {
- if err != nil {
- c.traceInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true)
- c.traceInfo.tr.SetError()
- }
- }()
- }
- topts := &transport.Options{
- Last: true,
- Delay: false,
- }
- for {
- var (
- err error
- t transport.ClientTransport
- stream *transport.Stream
- // Record the put handler from Balancer.Get(...). It is called once the
- // RPC has completed or failed.
- put func()
- )
- // TODO(zhaoq): Need a formal spec of fail-fast.
- callHdr := &transport.CallHdr{
- Host: cc.authority,
- Method: method,
- }
- if cc.dopts.cp != nil {
- callHdr.SendCompress = cc.dopts.cp.Type()
- }
- gopts := BalancerGetOptions{
- BlockingWait: !c.failFast,
- }
- t, put, err = cc.getTransport(ctx, gopts)
- if err != nil {
- // TODO(zhaoq): Probably revisit the error handling.
- if _, ok := err.(*rpcError); ok {
- return err
- }
- if err == errConnClosing || err == errConnUnavailable {
- if c.failFast {
- return Errorf(codes.Unavailable, "%v", err)
- }
- continue
- }
- // All the other errors are treated as Internal errors.
- return Errorf(codes.Internal, "%v", err)
- }
- if c.traceInfo.tr != nil {
- c.traceInfo.tr.LazyLog(&payload{sent: true, msg: args}, true)
- }
- stream, err = sendRequest(ctx, cc.dopts.codec, cc.dopts.cp, callHdr, t, args, topts)
- if err != nil {
- if put != nil {
- put()
- put = nil
- }
- // Retry a non-failfast RPC when
- // i) there is a connection error; or
- // ii) the server started to drain before this RPC was initiated.
- if _, ok := err.(transport.ConnectionError); ok || err == transport.ErrStreamDrain {
- if c.failFast {
- return toRPCErr(err)
- }
- continue
- }
- return toRPCErr(err)
- }
- err = recvResponse(cc.dopts, t, &c, stream, reply)
- if err != nil {
- if put != nil {
- put()
- put = nil
- }
- if _, ok := err.(transport.ConnectionError); ok || err == transport.ErrStreamDrain {
- if c.failFast {
- return toRPCErr(err)
- }
- continue
- }
- return toRPCErr(err)
- }
- if c.traceInfo.tr != nil {
- c.traceInfo.tr.LazyLog(&payload{sent: false, msg: reply}, true)
- }
- t.CloseStream(stream, nil)
- if put != nil {
- put()
- put = nil
- }
- return Errorf(stream.StatusCode(), "%s", stream.StatusDesc())
- }
-}
diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go
deleted file mode 100644
index 61674729a..000000000
--- a/vendor/google.golang.org/grpc/clientconn.go
+++ /dev/null
@@ -1,888 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package grpc
-
-import (
- "errors"
- "fmt"
- "net"
- "strings"
- "sync"
- "time"
-
- "golang.org/x/net/context"
- "golang.org/x/net/trace"
- "google.golang.org/grpc/credentials"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/transport"
-)
-
-var (
- // ErrClientConnClosing indicates that the operation is illegal because
- // the ClientConn is closing.
- ErrClientConnClosing = errors.New("grpc: the client connection is closing")
- // ErrClientConnTimeout indicates that the ClientConn cannot establish the
- // underlying connections within the specified timeout.
- ErrClientConnTimeout = errors.New("grpc: timed out when dialing")
-
- // errNoTransportSecurity indicates that there is no transport security
- // being set for ClientConn. Users should either set one or explicitly
- // call WithInsecure DialOption to disable security.
- errNoTransportSecurity = errors.New("grpc: no transport security set (use grpc.WithInsecure() explicitly or set credentials)")
- // errTransportCredentialsMissing indicates that users want to transmit security
- // information (e.g., oauth2 token) which requires secure connection on an insecure
- // connection.
- errTransportCredentialsMissing = errors.New("grpc: the credentials require transport level security (use grpc.WithTransportCredentials() to set)")
- // errCredentialsConflict indicates that grpc.WithTransportCredentials()
- // and grpc.WithInsecure() are both called for a connection.
- errCredentialsConflict = errors.New("grpc: transport credentials are set for an insecure connection (grpc.WithTransportCredentials() and grpc.WithInsecure() are both called)")
- // errNetworkIO indicates that the connection is down due to some network I/O error.
- errNetworkIO = errors.New("grpc: failed with network I/O error")
- // errConnDrain indicates that the connection starts to be drained and does not accept any new RPCs.
- errConnDrain = errors.New("grpc: the connection is drained")
- // errConnClosing indicates that the connection is closing.
- errConnClosing = errors.New("grpc: the connection is closing")
- // errConnUnavailable indicates that the connection is unavailable.
- errConnUnavailable = errors.New("grpc: the connection is unavailable")
- errNoAddr = errors.New("grpc: there is no address available to dial")
- // minimum time to give a connection to complete
- minConnectTimeout = 20 * time.Second
-)
-
-// dialOptions configure a Dial call. dialOptions are set by the DialOption
-// values passed to Dial.
-type dialOptions struct {
- unaryInt UnaryClientInterceptor
- streamInt StreamClientInterceptor
- codec Codec
- cp Compressor
- dc Decompressor
- bs backoffStrategy
- balancer Balancer
- block bool
- insecure bool
- timeout time.Duration
- copts transport.ConnectOptions
-}
-
-// DialOption configures how we set up the connection.
-type DialOption func(*dialOptions)
-
-// WithCodec returns a DialOption which sets a codec for message marshaling and unmarshaling.
-func WithCodec(c Codec) DialOption {
- return func(o *dialOptions) {
- o.codec = c
- }
-}
-
-// WithCompressor returns a DialOption which sets a CompressorGenerator for generating message
-// compressor.
-func WithCompressor(cp Compressor) DialOption {
- return func(o *dialOptions) {
- o.cp = cp
- }
-}
-
-// WithDecompressor returns a DialOption which sets a DecompressorGenerator for generating
-// message decompressor.
-func WithDecompressor(dc Decompressor) DialOption {
- return func(o *dialOptions) {
- o.dc = dc
- }
-}
-
-// WithBalancer returns a DialOption which sets a load balancer.
-func WithBalancer(b Balancer) DialOption {
- return func(o *dialOptions) {
- o.balancer = b
- }
-}
-
-// WithBackoffMaxDelay configures the dialer to use the provided maximum delay
-// when backing off after failed connection attempts.
-func WithBackoffMaxDelay(md time.Duration) DialOption {
- return WithBackoffConfig(BackoffConfig{MaxDelay: md})
-}
-
-// WithBackoffConfig configures the dialer to use the provided backoff
-// parameters after connection failures.
-//
-// Use WithBackoffMaxDelay until more parameters on BackoffConfig are opened up
-// for use.
-func WithBackoffConfig(b BackoffConfig) DialOption {
- // Set defaults to ensure that provided BackoffConfig is valid and
- // unexported fields get default values.
- setDefaults(&b)
- return withBackoff(b)
-}
-
-// withBackoff sets the backoff strategy used for retries after a
-// failed connection attempt.
-//
-// This can be exported if arbitrary backoff strategies are allowed by gRPC.
-func withBackoff(bs backoffStrategy) DialOption {
- return func(o *dialOptions) {
- o.bs = bs
- }
-}
-
-// WithBlock returns a DialOption which makes caller of Dial blocks until the underlying
-// connection is up. Without this, Dial returns immediately and connecting the server
-// happens in background.
-func WithBlock() DialOption {
- return func(o *dialOptions) {
- o.block = true
- }
-}
-
-// WithInsecure returns a DialOption which disables transport security for this ClientConn.
-// Note that transport security is required unless WithInsecure is set.
-func WithInsecure() DialOption {
- return func(o *dialOptions) {
- o.insecure = true
- }
-}
-
-// WithTransportCredentials returns a DialOption which configures a
-// connection level security credentials (e.g., TLS/SSL).
-func WithTransportCredentials(creds credentials.TransportCredentials) DialOption {
- return func(o *dialOptions) {
- o.copts.TransportCredentials = creds
- }
-}
-
-// WithPerRPCCredentials returns a DialOption which sets
-// credentials which will place auth state on each outbound RPC.
-func WithPerRPCCredentials(creds credentials.PerRPCCredentials) DialOption {
- return func(o *dialOptions) {
- o.copts.PerRPCCredentials = append(o.copts.PerRPCCredentials, creds)
- }
-}
-
-// WithTimeout returns a DialOption that configures a timeout for dialing a ClientConn
-// initially. This is valid if and only if WithBlock() is present.
-func WithTimeout(d time.Duration) DialOption {
- return func(o *dialOptions) {
- o.timeout = d
- }
-}
-
-// WithDialer returns a DialOption that specifies a function to use for dialing network addresses.
-func WithDialer(f func(string, time.Duration) (net.Conn, error)) DialOption {
- return func(o *dialOptions) {
- o.copts.Dialer = func(ctx context.Context, addr string) (net.Conn, error) {
- if deadline, ok := ctx.Deadline(); ok {
- return f(addr, deadline.Sub(time.Now()))
- }
- return f(addr, 0)
- }
- }
-}
-
-// WithUserAgent returns a DialOption that specifies a user agent string for all the RPCs.
-func WithUserAgent(s string) DialOption {
- return func(o *dialOptions) {
- o.copts.UserAgent = s
- }
-}
-
-// WithUnaryInterceptor returns a DialOption that specifies the interceptor for unary RPCs.
-func WithUnaryInterceptor(f UnaryClientInterceptor) DialOption {
- return func(o *dialOptions) {
- o.unaryInt = f
- }
-}
-
-// WithStreamInterceptor returns a DialOption that specifies the interceptor for streaming RPCs.
-func WithStreamInterceptor(f StreamClientInterceptor) DialOption {
- return func(o *dialOptions) {
- o.streamInt = f
- }
-}
-
-// Dial creates a client connection to the given target.
-func Dial(target string, opts ...DialOption) (*ClientConn, error) {
- return DialContext(context.Background(), target, opts...)
-}
-
-// DialContext creates a client connection to the given target. ctx can be used to
-// cancel or expire the pending connecting. Once this function returns, the
-// cancellation and expiration of ctx will be noop. Users should call ClientConn.Close
-// to terminate all the pending operations after this function returns.
-// This is the EXPERIMENTAL API.
-func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *ClientConn, err error) {
- cc := &ClientConn{
- target: target,
- conns: make(map[Address]*addrConn),
- }
- cc.ctx, cc.cancel = context.WithCancel(context.Background())
- defer func() {
- select {
- case <-ctx.Done():
- conn, err = nil, ctx.Err()
- default:
- }
-
- if err != nil {
- cc.Close()
- }
- }()
-
- for _, opt := range opts {
- opt(&cc.dopts)
- }
-
- // Set defaults.
- if cc.dopts.codec == nil {
- cc.dopts.codec = protoCodec{}
- }
- if cc.dopts.bs == nil {
- cc.dopts.bs = DefaultBackoffConfig
- }
- creds := cc.dopts.copts.TransportCredentials
- if creds != nil && creds.Info().ServerName != "" {
- cc.authority = creds.Info().ServerName
- } else {
- colonPos := strings.LastIndex(target, ":")
- if colonPos == -1 {
- colonPos = len(target)
- }
- cc.authority = target[:colonPos]
- }
- var ok bool
- waitC := make(chan error, 1)
- go func() {
- var addrs []Address
- if cc.dopts.balancer == nil {
- // Connect to target directly if balancer is nil.
- addrs = append(addrs, Address{Addr: target})
- } else {
- var credsClone credentials.TransportCredentials
- if creds != nil {
- credsClone = creds.Clone()
- }
- config := BalancerConfig{
- DialCreds: credsClone,
- }
- if err := cc.dopts.balancer.Start(target, config); err != nil {
- waitC <- err
- return
- }
- ch := cc.dopts.balancer.Notify()
- if ch == nil {
- // There is no name resolver installed.
- addrs = append(addrs, Address{Addr: target})
- } else {
- addrs, ok = <-ch
- if !ok || len(addrs) == 0 {
- waitC <- errNoAddr
- return
- }
- }
- }
- for _, a := range addrs {
- if err := cc.resetAddrConn(a, false, nil); err != nil {
- waitC <- err
- return
- }
- }
- close(waitC)
- }()
- var timeoutCh <-chan time.Time
- if cc.dopts.timeout > 0 {
- timeoutCh = time.After(cc.dopts.timeout)
- }
- select {
- case <-ctx.Done():
- return nil, ctx.Err()
- case err := <-waitC:
- if err != nil {
- return nil, err
- }
- case <-timeoutCh:
- return nil, ErrClientConnTimeout
- }
- // If balancer is nil or balancer.Notify() is nil, ok will be false here.
- // The lbWatcher goroutine will not be created.
- if ok {
- go cc.lbWatcher()
- }
- return cc, nil
-}
-
-// ConnectivityState indicates the state of a client connection.
-type ConnectivityState int
-
-const (
- // Idle indicates the ClientConn is idle.
- Idle ConnectivityState = iota
- // Connecting indicates the ClienConn is connecting.
- Connecting
- // Ready indicates the ClientConn is ready for work.
- Ready
- // TransientFailure indicates the ClientConn has seen a failure but expects to recover.
- TransientFailure
- // Shutdown indicates the ClientConn has started shutting down.
- Shutdown
-)
-
-func (s ConnectivityState) String() string {
- switch s {
- case Idle:
- return "IDLE"
- case Connecting:
- return "CONNECTING"
- case Ready:
- return "READY"
- case TransientFailure:
- return "TRANSIENT_FAILURE"
- case Shutdown:
- return "SHUTDOWN"
- default:
- panic(fmt.Sprintf("unknown connectivity state: %d", s))
- }
-}
-
-// ClientConn represents a client connection to an RPC server.
-type ClientConn struct {
- ctx context.Context
- cancel context.CancelFunc
-
- target string
- authority string
- dopts dialOptions
-
- mu sync.RWMutex
- conns map[Address]*addrConn
-}
-
-func (cc *ClientConn) lbWatcher() {
- for addrs := range cc.dopts.balancer.Notify() {
- var (
- add []Address // Addresses need to setup connections.
- del []*addrConn // Connections need to tear down.
- )
- cc.mu.Lock()
- for _, a := range addrs {
- if _, ok := cc.conns[a]; !ok {
- add = append(add, a)
- }
- }
- for k, c := range cc.conns {
- var keep bool
- for _, a := range addrs {
- if k == a {
- keep = true
- break
- }
- }
- if !keep {
- del = append(del, c)
- delete(cc.conns, c.addr)
- }
- }
- cc.mu.Unlock()
- for _, a := range add {
- cc.resetAddrConn(a, true, nil)
- }
- for _, c := range del {
- c.tearDown(errConnDrain)
- }
- }
-}
-
-// resetAddrConn creates an addrConn for addr and adds it to cc.conns.
-// If there is an old addrConn for addr, it will be torn down, using tearDownErr as the reason.
-// If tearDownErr is nil, errConnDrain will be used instead.
-func (cc *ClientConn) resetAddrConn(addr Address, skipWait bool, tearDownErr error) error {
- ac := &addrConn{
- cc: cc,
- addr: addr,
- dopts: cc.dopts,
- }
- ac.ctx, ac.cancel = context.WithCancel(cc.ctx)
- ac.stateCV = sync.NewCond(&ac.mu)
- if EnableTracing {
- ac.events = trace.NewEventLog("grpc.ClientConn", ac.addr.Addr)
- }
- if !ac.dopts.insecure {
- if ac.dopts.copts.TransportCredentials == nil {
- return errNoTransportSecurity
- }
- } else {
- if ac.dopts.copts.TransportCredentials != nil {
- return errCredentialsConflict
- }
- for _, cd := range ac.dopts.copts.PerRPCCredentials {
- if cd.RequireTransportSecurity() {
- return errTransportCredentialsMissing
- }
- }
- }
- // Track ac in cc. This needs to be done before any getTransport(...) is called.
- cc.mu.Lock()
- if cc.conns == nil {
- cc.mu.Unlock()
- return ErrClientConnClosing
- }
- stale := cc.conns[ac.addr]
- cc.conns[ac.addr] = ac
- cc.mu.Unlock()
- if stale != nil {
- // There is an addrConn alive on ac.addr already. This could be due to
- // 1) a buggy Balancer notifies duplicated Addresses;
- // 2) goaway was received, a new ac will replace the old ac.
- // The old ac should be deleted from cc.conns, but the
- // underlying transport should drain rather than close.
- if tearDownErr == nil {
- // tearDownErr is nil if resetAddrConn is called by
- // 1) Dial
- // 2) lbWatcher
- // In both cases, the stale ac should drain, not close.
- stale.tearDown(errConnDrain)
- } else {
- stale.tearDown(tearDownErr)
- }
- }
- // skipWait may overwrite the decision in ac.dopts.block.
- if ac.dopts.block && !skipWait {
- if err := ac.resetTransport(false); err != nil {
- if err != errConnClosing {
- // Tear down ac and delete it from cc.conns.
- cc.mu.Lock()
- delete(cc.conns, ac.addr)
- cc.mu.Unlock()
- ac.tearDown(err)
- }
- if e, ok := err.(transport.ConnectionError); ok && !e.Temporary() {
- return e.Origin()
- }
- return err
- }
- // Start to monitor the error status of transport.
- go ac.transportMonitor()
- } else {
- // Start a goroutine connecting to the server asynchronously.
- go func() {
- if err := ac.resetTransport(false); err != nil {
- grpclog.Printf("Failed to dial %s: %v; please retry.", ac.addr.Addr, err)
- if err != errConnClosing {
- // Keep this ac in cc.conns, to get the reason it's torn down.
- ac.tearDown(err)
- }
- return
- }
- ac.transportMonitor()
- }()
- }
- return nil
-}
-
-func (cc *ClientConn) getTransport(ctx context.Context, opts BalancerGetOptions) (transport.ClientTransport, func(), error) {
- var (
- ac *addrConn
- ok bool
- put func()
- )
- if cc.dopts.balancer == nil {
- // If balancer is nil, there should be only one addrConn available.
- cc.mu.RLock()
- if cc.conns == nil {
- cc.mu.RUnlock()
- return nil, nil, toRPCErr(ErrClientConnClosing)
- }
- for _, ac = range cc.conns {
- // Break after the first iteration to get the first addrConn.
- ok = true
- break
- }
- cc.mu.RUnlock()
- } else {
- var (
- addr Address
- err error
- )
- addr, put, err = cc.dopts.balancer.Get(ctx, opts)
- if err != nil {
- return nil, nil, toRPCErr(err)
- }
- cc.mu.RLock()
- if cc.conns == nil {
- cc.mu.RUnlock()
- return nil, nil, toRPCErr(ErrClientConnClosing)
- }
- ac, ok = cc.conns[addr]
- cc.mu.RUnlock()
- }
- if !ok {
- if put != nil {
- put()
- }
- return nil, nil, errConnClosing
- }
- t, err := ac.wait(ctx, cc.dopts.balancer != nil, !opts.BlockingWait)
- if err != nil {
- if put != nil {
- put()
- }
- return nil, nil, err
- }
- return t, put, nil
-}
-
-// Close tears down the ClientConn and all underlying connections.
-func (cc *ClientConn) Close() error {
- cc.cancel()
-
- cc.mu.Lock()
- if cc.conns == nil {
- cc.mu.Unlock()
- return ErrClientConnClosing
- }
- conns := cc.conns
- cc.conns = nil
- cc.mu.Unlock()
- if cc.dopts.balancer != nil {
- cc.dopts.balancer.Close()
- }
- for _, ac := range conns {
- ac.tearDown(ErrClientConnClosing)
- }
- return nil
-}
-
-// addrConn is a network connection to a given address.
-type addrConn struct {
- ctx context.Context
- cancel context.CancelFunc
-
- cc *ClientConn
- addr Address
- dopts dialOptions
- events trace.EventLog
-
- mu sync.Mutex
- state ConnectivityState
- stateCV *sync.Cond
- down func(error) // the handler called when a connection is down.
- // ready is closed and becomes nil when a new transport is up or failed
- // due to timeout.
- ready chan struct{}
- transport transport.ClientTransport
-
- // The reason this addrConn is torn down.
- tearDownErr error
-}
-
-// printf records an event in ac's event log, unless ac has been closed.
-// REQUIRES ac.mu is held.
-func (ac *addrConn) printf(format string, a ...interface{}) {
- if ac.events != nil {
- ac.events.Printf(format, a...)
- }
-}
-
-// errorf records an error in ac's event log, unless ac has been closed.
-// REQUIRES ac.mu is held.
-func (ac *addrConn) errorf(format string, a ...interface{}) {
- if ac.events != nil {
- ac.events.Errorf(format, a...)
- }
-}
-
-// getState returns the connectivity state of the Conn
-func (ac *addrConn) getState() ConnectivityState {
- ac.mu.Lock()
- defer ac.mu.Unlock()
- return ac.state
-}
-
-// waitForStateChange blocks until the state changes to something other than the sourceState.
-func (ac *addrConn) waitForStateChange(ctx context.Context, sourceState ConnectivityState) (ConnectivityState, error) {
- ac.mu.Lock()
- defer ac.mu.Unlock()
- if sourceState != ac.state {
- return ac.state, nil
- }
- done := make(chan struct{})
- var err error
- go func() {
- select {
- case <-ctx.Done():
- ac.mu.Lock()
- err = ctx.Err()
- ac.stateCV.Broadcast()
- ac.mu.Unlock()
- case <-done:
- }
- }()
- defer close(done)
- for sourceState == ac.state {
- ac.stateCV.Wait()
- if err != nil {
- return ac.state, err
- }
- }
- return ac.state, nil
-}
-
-func (ac *addrConn) resetTransport(closeTransport bool) error {
- for retries := 0; ; retries++ {
- ac.mu.Lock()
- ac.printf("connecting")
- if ac.state == Shutdown {
- // ac.tearDown(...) has been invoked.
- ac.mu.Unlock()
- return errConnClosing
- }
- if ac.down != nil {
- ac.down(downErrorf(false, true, "%v", errNetworkIO))
- ac.down = nil
- }
- ac.state = Connecting
- ac.stateCV.Broadcast()
- t := ac.transport
- ac.mu.Unlock()
- if closeTransport && t != nil {
- t.Close()
- }
- sleepTime := ac.dopts.bs.backoff(retries)
- timeout := minConnectTimeout
- if timeout < sleepTime {
- timeout = sleepTime
- }
- ctx, cancel := context.WithTimeout(ac.ctx, timeout)
- connectTime := time.Now()
- sinfo := transport.TargetInfo{
- Addr: ac.addr.Addr,
- Metadata: ac.addr.Metadata,
- }
- newTransport, err := transport.NewClientTransport(ctx, sinfo, ac.dopts.copts)
- if err != nil {
- cancel()
-
- if e, ok := err.(transport.ConnectionError); ok && !e.Temporary() {
- return err
- }
- grpclog.Printf("grpc: addrConn.resetTransport failed to create client transport: %v; Reconnecting to %v", err, ac.addr)
- ac.mu.Lock()
- if ac.state == Shutdown {
- // ac.tearDown(...) has been invoked.
- ac.mu.Unlock()
- return errConnClosing
- }
- ac.errorf("transient failure: %v", err)
- ac.state = TransientFailure
- ac.stateCV.Broadcast()
- if ac.ready != nil {
- close(ac.ready)
- ac.ready = nil
- }
- ac.mu.Unlock()
- closeTransport = false
- select {
- case <-time.After(sleepTime - time.Since(connectTime)):
- case <-ac.ctx.Done():
- return ac.ctx.Err()
- }
- continue
- }
- ac.mu.Lock()
- ac.printf("ready")
- if ac.state == Shutdown {
- // ac.tearDown(...) has been invoked.
- ac.mu.Unlock()
- newTransport.Close()
- return errConnClosing
- }
- ac.state = Ready
- ac.stateCV.Broadcast()
- ac.transport = newTransport
- if ac.ready != nil {
- close(ac.ready)
- ac.ready = nil
- }
- if ac.cc.dopts.balancer != nil {
- ac.down = ac.cc.dopts.balancer.Up(ac.addr)
- }
- ac.mu.Unlock()
- return nil
- }
-}
-
-// Run in a goroutine to track the error in transport and create the
-// new transport if an error happens. It returns when the channel is closing.
-func (ac *addrConn) transportMonitor() {
- for {
- ac.mu.Lock()
- t := ac.transport
- ac.mu.Unlock()
- select {
- // This is needed to detect the teardown when
- // the addrConn is idle (i.e., no RPC in flight).
- case <-ac.ctx.Done():
- select {
- case <-t.Error():
- t.Close()
- default:
- }
- return
- case <-t.GoAway():
- // If GoAway happens without any network I/O error, ac is closed without shutting down the
- // underlying transport (the transport will be closed when all the pending RPCs finished or
- // failed.).
- // If GoAway and some network I/O error happen concurrently, ac and its underlying transport
- // are closed.
- // In both cases, a new ac is created.
- select {
- case <-t.Error():
- ac.cc.resetAddrConn(ac.addr, true, errNetworkIO)
- default:
- ac.cc.resetAddrConn(ac.addr, true, errConnDrain)
- }
- return
- case <-t.Error():
- select {
- case <-ac.ctx.Done():
- t.Close()
- return
- case <-t.GoAway():
- ac.cc.resetAddrConn(ac.addr, true, errNetworkIO)
- return
- default:
- }
- ac.mu.Lock()
- if ac.state == Shutdown {
- // ac has been shutdown.
- ac.mu.Unlock()
- return
- }
- ac.state = TransientFailure
- ac.stateCV.Broadcast()
- ac.mu.Unlock()
- if err := ac.resetTransport(true); err != nil {
- ac.mu.Lock()
- ac.printf("transport exiting: %v", err)
- ac.mu.Unlock()
- grpclog.Printf("grpc: addrConn.transportMonitor exits due to: %v", err)
- if err != errConnClosing {
- // Keep this ac in cc.conns, to get the reason it's torn down.
- ac.tearDown(err)
- }
- return
- }
- }
- }
-}
-
-// wait blocks until i) the new transport is up or ii) ctx is done or iii) ac is closed or
-// iv) transport is in TransientFailure and there is a balancer/failfast is true.
-func (ac *addrConn) wait(ctx context.Context, hasBalancer, failfast bool) (transport.ClientTransport, error) {
- for {
- ac.mu.Lock()
- switch {
- case ac.state == Shutdown:
- if failfast || !hasBalancer {
- // RPC is failfast or balancer is nil. This RPC should fail with ac.tearDownErr.
- err := ac.tearDownErr
- ac.mu.Unlock()
- return nil, err
- }
- ac.mu.Unlock()
- return nil, errConnClosing
- case ac.state == Ready:
- ct := ac.transport
- ac.mu.Unlock()
- return ct, nil
- case ac.state == TransientFailure:
- if failfast || hasBalancer {
- ac.mu.Unlock()
- return nil, errConnUnavailable
- }
- }
- ready := ac.ready
- if ready == nil {
- ready = make(chan struct{})
- ac.ready = ready
- }
- ac.mu.Unlock()
- select {
- case <-ctx.Done():
- return nil, toRPCErr(ctx.Err())
- // Wait until the new transport is ready or failed.
- case <-ready:
- }
- }
-}
-
-// tearDown starts to tear down the addrConn.
-// TODO(zhaoq): Make this synchronous to avoid unbounded memory consumption in
-// some edge cases (e.g., the caller opens and closes many addrConn's in a
-// tight loop.
-// tearDown doesn't remove ac from ac.cc.conns.
-func (ac *addrConn) tearDown(err error) {
- ac.cancel()
-
- ac.mu.Lock()
- defer ac.mu.Unlock()
- if ac.down != nil {
- ac.down(downErrorf(false, false, "%v", err))
- ac.down = nil
- }
- if err == errConnDrain && ac.transport != nil {
- // GracefulClose(...) may be executed multiple times when
- // i) receiving multiple GoAway frames from the server; or
- // ii) there are concurrent name resolver/Balancer triggered
- // address removal and GoAway.
- ac.transport.GracefulClose()
- }
- if ac.state == Shutdown {
- return
- }
- ac.state = Shutdown
- ac.tearDownErr = err
- ac.stateCV.Broadcast()
- if ac.events != nil {
- ac.events.Finish()
- ac.events = nil
- }
- if ac.ready != nil {
- close(ac.ready)
- ac.ready = nil
- }
- if ac.transport != nil && err != errConnDrain {
- ac.transport.Close()
- }
- return
-}
diff --git a/vendor/google.golang.org/grpc/codes/code_string.go b/vendor/google.golang.org/grpc/codes/code_string.go
deleted file mode 100644
index e6762d084..000000000
--- a/vendor/google.golang.org/grpc/codes/code_string.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// generated by stringer -type=Code; DO NOT EDIT
-
-package codes
-
-import "fmt"
-
-const _Code_name = "OKCanceledUnknownInvalidArgumentDeadlineExceededNotFoundAlreadyExistsPermissionDeniedResourceExhaustedFailedPreconditionAbortedOutOfRangeUnimplementedInternalUnavailableDataLossUnauthenticated"
-
-var _Code_index = [...]uint8{0, 2, 10, 17, 32, 48, 56, 69, 85, 102, 120, 127, 137, 150, 158, 169, 177, 192}
-
-func (i Code) String() string {
- if i+1 >= Code(len(_Code_index)) {
- return fmt.Sprintf("Code(%d)", i)
- }
- return _Code_name[_Code_index[i]:_Code_index[i+1]]
-}
diff --git a/vendor/google.golang.org/grpc/codes/codes.go b/vendor/google.golang.org/grpc/codes/codes.go
deleted file mode 100644
index e14b464ac..000000000
--- a/vendor/google.golang.org/grpc/codes/codes.go
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-// Package codes defines the canonical error codes used by gRPC. It is
-// consistent across various languages.
-package codes // import "google.golang.org/grpc/codes"
-
-// A Code is an unsigned 32-bit error code as defined in the gRPC spec.
-type Code uint32
-
-//go:generate stringer -type=Code
-
-const (
- // OK is returned on success.
- OK Code = 0
-
- // Canceled indicates the operation was cancelled (typically by the caller).
- Canceled Code = 1
-
- // Unknown error. An example of where this error may be returned is
- // if a Status value received from another address space belongs to
- // an error-space that is not known in this address space. Also
- // errors raised by APIs that do not return enough error information
- // may be converted to this error.
- Unknown Code = 2
-
- // InvalidArgument indicates client specified an invalid argument.
- // Note that this differs from FailedPrecondition. It indicates arguments
- // that are problematic regardless of the state of the system
- // (e.g., a malformed file name).
- InvalidArgument Code = 3
-
- // DeadlineExceeded means operation expired before completion.
- // For operations that change the state of the system, this error may be
- // returned even if the operation has completed successfully. For
- // example, a successful response from a server could have been delayed
- // long enough for the deadline to expire.
- DeadlineExceeded Code = 4
-
- // NotFound means some requested entity (e.g., file or directory) was
- // not found.
- NotFound Code = 5
-
- // AlreadyExists means an attempt to create an entity failed because one
- // already exists.
- AlreadyExists Code = 6
-
- // PermissionDenied indicates the caller does not have permission to
- // execute the specified operation. It must not be used for rejections
- // caused by exhausting some resource (use ResourceExhausted
- // instead for those errors). It must not be
- // used if the caller cannot be identified (use Unauthenticated
- // instead for those errors).
- PermissionDenied Code = 7
-
- // Unauthenticated indicates the request does not have valid
- // authentication credentials for the operation.
- Unauthenticated Code = 16
-
- // ResourceExhausted indicates some resource has been exhausted, perhaps
- // a per-user quota, or perhaps the entire file system is out of space.
- ResourceExhausted Code = 8
-
- // FailedPrecondition indicates operation was rejected because the
- // system is not in a state required for the operation's execution.
- // For example, directory to be deleted may be non-empty, an rmdir
- // operation is applied to a non-directory, etc.
- //
- // A litmus test that may help a service implementor in deciding
- // between FailedPrecondition, Aborted, and Unavailable:
- // (a) Use Unavailable if the client can retry just the failing call.
- // (b) Use Aborted if the client should retry at a higher-level
- // (e.g., restarting a read-modify-write sequence).
- // (c) Use FailedPrecondition if the client should not retry until
- // the system state has been explicitly fixed. E.g., if an "rmdir"
- // fails because the directory is non-empty, FailedPrecondition
- // should be returned since the client should not retry unless
- // they have first fixed up the directory by deleting files from it.
- // (d) Use FailedPrecondition if the client performs conditional
- // REST Get/Update/Delete on a resource and the resource on the
- // server does not match the condition. E.g., conflicting
- // read-modify-write on the same resource.
- FailedPrecondition Code = 9
-
- // Aborted indicates the operation was aborted, typically due to a
- // concurrency issue like sequencer check failures, transaction aborts,
- // etc.
- //
- // See litmus test above for deciding between FailedPrecondition,
- // Aborted, and Unavailable.
- Aborted Code = 10
-
- // OutOfRange means operation was attempted past the valid range.
- // E.g., seeking or reading past end of file.
- //
- // Unlike InvalidArgument, this error indicates a problem that may
- // be fixed if the system state changes. For example, a 32-bit file
- // system will generate InvalidArgument if asked to read at an
- // offset that is not in the range [0,2^32-1], but it will generate
- // OutOfRange if asked to read from an offset past the current
- // file size.
- //
- // There is a fair bit of overlap between FailedPrecondition and
- // OutOfRange. We recommend using OutOfRange (the more specific
- // error) when it applies so that callers who are iterating through
- // a space can easily look for an OutOfRange error to detect when
- // they are done.
- OutOfRange Code = 11
-
- // Unimplemented indicates operation is not implemented or not
- // supported/enabled in this service.
- Unimplemented Code = 12
-
- // Internal errors. Means some invariants expected by underlying
- // system has been broken. If you see one of these errors,
- // something is very broken.
- Internal Code = 13
-
- // Unavailable indicates the service is currently unavailable.
- // This is a most likely a transient condition and may be corrected
- // by retrying with a backoff.
- //
- // See litmus test above for deciding between FailedPrecondition,
- // Aborted, and Unavailable.
- Unavailable Code = 14
-
- // DataLoss indicates unrecoverable data loss or corruption.
- DataLoss Code = 15
-)
diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go
deleted file mode 100644
index 5555ef024..000000000
--- a/vendor/google.golang.org/grpc/credentials/credentials.go
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-// Package credentials implements various credentials supported by gRPC library,
-// which encapsulate all the state needed by a client to authenticate with a
-// server and make various assertions, e.g., about the client's identity, role,
-// or whether it is authorized to make a particular call.
-package credentials // import "google.golang.org/grpc/credentials"
-
-import (
- "crypto/tls"
- "crypto/x509"
- "errors"
- "fmt"
- "io/ioutil"
- "net"
- "strings"
-
- "golang.org/x/net/context"
-)
-
-var (
- // alpnProtoStr are the specified application level protocols for gRPC.
- alpnProtoStr = []string{"h2"}
-)
-
-// PerRPCCredentials defines the common interface for the credentials which need to
-// attach security information to every RPC (e.g., oauth2).
-type PerRPCCredentials interface {
- // GetRequestMetadata gets the current request metadata, refreshing
- // tokens if required. This should be called by the transport layer on
- // each request, and the data should be populated in headers or other
- // context. uri is the URI of the entry point for the request. When
- // supported by the underlying implementation, ctx can be used for
- // timeout and cancellation.
- // TODO(zhaoq): Define the set of the qualified keys instead of leaving
- // it as an arbitrary string.
- GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
- // RequireTransportSecurity indicates whether the credentials requires
- // transport security.
- RequireTransportSecurity() bool
-}
-
-// ProtocolInfo provides information regarding the gRPC wire protocol version,
-// security protocol, security protocol version in use, server name, etc.
-type ProtocolInfo struct {
- // ProtocolVersion is the gRPC wire protocol version.
- ProtocolVersion string
- // SecurityProtocol is the security protocol in use.
- SecurityProtocol string
- // SecurityVersion is the security protocol version.
- SecurityVersion string
- // ServerName is the user-configured server name.
- ServerName string
-}
-
-// AuthInfo defines the common interface for the auth information the users are interested in.
-type AuthInfo interface {
- AuthType() string
-}
-
-var (
- // ErrConnDispatched indicates that rawConn has been dispatched out of gRPC
- // and the caller should not close rawConn.
- ErrConnDispatched = errors.New("credentials: rawConn is dispatched out of gRPC")
-)
-
-// TransportCredentials defines the common interface for all the live gRPC wire
-// protocols and supported transport security protocols (e.g., TLS, SSL).
-type TransportCredentials interface {
- // ClientHandshake does the authentication handshake specified by the corresponding
- // authentication protocol on rawConn for clients. It returns the authenticated
- // connection and the corresponding auth information about the connection.
- // Implementations must use the provided context to implement timely cancellation.
- ClientHandshake(context.Context, string, net.Conn) (net.Conn, AuthInfo, error)
- // ServerHandshake does the authentication handshake for servers. It returns
- // the authenticated connection and the corresponding auth information about
- // the connection.
- ServerHandshake(net.Conn) (net.Conn, AuthInfo, error)
- // Info provides the ProtocolInfo of this TransportCredentials.
- Info() ProtocolInfo
- // Clone makes a copy of this TransportCredentials.
- Clone() TransportCredentials
- // OverrideServerName overrides the server name used to verify the hostname on the returned certificates from the server.
- // gRPC internals also use it to override the virtual hosting name if it is set.
- // It must be called before dialing. Currently, this is only used by grpclb.
- OverrideServerName(string) error
-}
-
-// TLSInfo contains the auth information for a TLS authenticated connection.
-// It implements the AuthInfo interface.
-type TLSInfo struct {
- State tls.ConnectionState
-}
-
-// AuthType returns the type of TLSInfo as a string.
-func (t TLSInfo) AuthType() string {
- return "tls"
-}
-
-// tlsCreds is the credentials required for authenticating a connection using TLS.
-type tlsCreds struct {
- // TLS configuration
- config *tls.Config
-}
-
-func (c tlsCreds) Info() ProtocolInfo {
- return ProtocolInfo{
- SecurityProtocol: "tls",
- SecurityVersion: "1.2",
- ServerName: c.config.ServerName,
- }
-}
-
-func (c *tlsCreds) ClientHandshake(ctx context.Context, addr string, rawConn net.Conn) (_ net.Conn, _ AuthInfo, err error) {
- // use local cfg to avoid clobbering ServerName if using multiple endpoints
- cfg := cloneTLSConfig(c.config)
- if cfg.ServerName == "" {
- colonPos := strings.LastIndex(addr, ":")
- if colonPos == -1 {
- colonPos = len(addr)
- }
- cfg.ServerName = addr[:colonPos]
- }
- conn := tls.Client(rawConn, cfg)
- errChannel := make(chan error, 1)
- go func() {
- errChannel <- conn.Handshake()
- }()
- select {
- case err := <-errChannel:
- if err != nil {
- return nil, nil, err
- }
- case <-ctx.Done():
- return nil, nil, ctx.Err()
- }
- // TODO(zhaoq): Omit the auth info for client now. It is more for
- // information than anything else.
- return conn, nil, nil
-}
-
-func (c *tlsCreds) ServerHandshake(rawConn net.Conn) (net.Conn, AuthInfo, error) {
- conn := tls.Server(rawConn, c.config)
- if err := conn.Handshake(); err != nil {
- return nil, nil, err
- }
- return conn, TLSInfo{conn.ConnectionState()}, nil
-}
-
-func (c *tlsCreds) Clone() TransportCredentials {
- return NewTLS(c.config)
-}
-
-func (c *tlsCreds) OverrideServerName(serverNameOverride string) error {
- c.config.ServerName = serverNameOverride
- return nil
-}
-
-// NewTLS uses c to construct a TransportCredentials based on TLS.
-func NewTLS(c *tls.Config) TransportCredentials {
- tc := &tlsCreds{cloneTLSConfig(c)}
- tc.config.NextProtos = alpnProtoStr
- return tc
-}
-
-// NewClientTLSFromCert constructs a TLS from the input certificate for client.
-// serverNameOverride is for testing only. If set to a non empty string,
-// it will override the virtual host name of authority (e.g. :authority header field) in requests.
-func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) TransportCredentials {
- return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp})
-}
-
-// NewClientTLSFromFile constructs a TLS from the input certificate file for client.
-// serverNameOverride is for testing only. If set to a non empty string,
-// it will override the virtual host name of authority (e.g. :authority header field) in requests.
-func NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) {
- b, err := ioutil.ReadFile(certFile)
- if err != nil {
- return nil, err
- }
- cp := x509.NewCertPool()
- if !cp.AppendCertsFromPEM(b) {
- return nil, fmt.Errorf("credentials: failed to append certificates")
- }
- return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}), nil
-}
-
-// NewServerTLSFromCert constructs a TLS from the input certificate for server.
-func NewServerTLSFromCert(cert *tls.Certificate) TransportCredentials {
- return NewTLS(&tls.Config{Certificates: []tls.Certificate{*cert}})
-}
-
-// NewServerTLSFromFile constructs a TLS from the input certificate file and key
-// file for server.
-func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error) {
- cert, err := tls.LoadX509KeyPair(certFile, keyFile)
- if err != nil {
- return nil, err
- }
- return NewTLS(&tls.Config{Certificates: []tls.Certificate{cert}}), nil
-}
diff --git a/vendor/google.golang.org/grpc/credentials/credentials_util_go17.go b/vendor/google.golang.org/grpc/credentials/credentials_util_go17.go
deleted file mode 100644
index 9647b9ec8..000000000
--- a/vendor/google.golang.org/grpc/credentials/credentials_util_go17.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// +build go1.7
-
-/*
- *
- * Copyright 2016, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package credentials
-
-import (
- "crypto/tls"
-)
-
-// cloneTLSConfig returns a shallow clone of the exported
-// fields of cfg, ignoring the unexported sync.Once, which
-// contains a mutex and must not be copied.
-//
-// If cfg is nil, a new zero tls.Config is returned.
-//
-// TODO replace this function with official clone function.
-func cloneTLSConfig(cfg *tls.Config) *tls.Config {
- if cfg == nil {
- return &tls.Config{}
- }
- return &tls.Config{
- Rand: cfg.Rand,
- Time: cfg.Time,
- Certificates: cfg.Certificates,
- NameToCertificate: cfg.NameToCertificate,
- GetCertificate: cfg.GetCertificate,
- RootCAs: cfg.RootCAs,
- NextProtos: cfg.NextProtos,
- ServerName: cfg.ServerName,
- ClientAuth: cfg.ClientAuth,
- ClientCAs: cfg.ClientCAs,
- InsecureSkipVerify: cfg.InsecureSkipVerify,
- CipherSuites: cfg.CipherSuites,
- PreferServerCipherSuites: cfg.PreferServerCipherSuites,
- SessionTicketsDisabled: cfg.SessionTicketsDisabled,
- SessionTicketKey: cfg.SessionTicketKey,
- ClientSessionCache: cfg.ClientSessionCache,
- MinVersion: cfg.MinVersion,
- MaxVersion: cfg.MaxVersion,
- CurvePreferences: cfg.CurvePreferences,
- DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled,
- Renegotiation: cfg.Renegotiation,
- }
-}
diff --git a/vendor/google.golang.org/grpc/credentials/credentials_util_pre_go17.go b/vendor/google.golang.org/grpc/credentials/credentials_util_pre_go17.go
deleted file mode 100644
index 09b8d12c7..000000000
--- a/vendor/google.golang.org/grpc/credentials/credentials_util_pre_go17.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// +build !go1.7
-
-/*
- *
- * Copyright 2016, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package credentials
-
-import (
- "crypto/tls"
-)
-
-// cloneTLSConfig returns a shallow clone of the exported
-// fields of cfg, ignoring the unexported sync.Once, which
-// contains a mutex and must not be copied.
-//
-// If cfg is nil, a new zero tls.Config is returned.
-//
-// TODO replace this function with official clone function.
-func cloneTLSConfig(cfg *tls.Config) *tls.Config {
- if cfg == nil {
- return &tls.Config{}
- }
- return &tls.Config{
- Rand: cfg.Rand,
- Time: cfg.Time,
- Certificates: cfg.Certificates,
- NameToCertificate: cfg.NameToCertificate,
- GetCertificate: cfg.GetCertificate,
- RootCAs: cfg.RootCAs,
- NextProtos: cfg.NextProtos,
- ServerName: cfg.ServerName,
- ClientAuth: cfg.ClientAuth,
- ClientCAs: cfg.ClientCAs,
- InsecureSkipVerify: cfg.InsecureSkipVerify,
- CipherSuites: cfg.CipherSuites,
- PreferServerCipherSuites: cfg.PreferServerCipherSuites,
- SessionTicketsDisabled: cfg.SessionTicketsDisabled,
- SessionTicketKey: cfg.SessionTicketKey,
- ClientSessionCache: cfg.ClientSessionCache,
- MinVersion: cfg.MinVersion,
- MaxVersion: cfg.MaxVersion,
- CurvePreferences: cfg.CurvePreferences,
- }
-}
diff --git a/vendor/google.golang.org/grpc/doc.go b/vendor/google.golang.org/grpc/doc.go
deleted file mode 100644
index a35f21885..000000000
--- a/vendor/google.golang.org/grpc/doc.go
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
-Package grpc implements an RPC system called gRPC.
-
-See www.grpc.io for more information about gRPC.
-*/
-package grpc // import "google.golang.org/grpc"
diff --git a/vendor/google.golang.org/grpc/grpclog/logger.go b/vendor/google.golang.org/grpc/grpclog/logger.go
deleted file mode 100644
index 3b2933079..000000000
--- a/vendor/google.golang.org/grpc/grpclog/logger.go
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*
-Package grpclog defines logging for grpc.
-*/
-package grpclog // import "google.golang.org/grpc/grpclog"
-
-import (
- "log"
- "os"
-)
-
-// Use golang's standard logger by default.
-// Access is not mutex-protected: do not modify except in init()
-// functions.
-var logger Logger = log.New(os.Stderr, "", log.LstdFlags)
-
-// Logger mimics golang's standard Logger as an interface.
-type Logger interface {
- Fatal(args ...interface{})
- Fatalf(format string, args ...interface{})
- Fatalln(args ...interface{})
- Print(args ...interface{})
- Printf(format string, args ...interface{})
- Println(args ...interface{})
-}
-
-// SetLogger sets the logger that is used in grpc. Call only from
-// init() functions.
-func SetLogger(l Logger) {
- logger = l
-}
-
-// Fatal is equivalent to Print() followed by a call to os.Exit() with a non-zero exit code.
-func Fatal(args ...interface{}) {
- logger.Fatal(args...)
-}
-
-// Fatalf is equivalent to Printf() followed by a call to os.Exit() with a non-zero exit code.
-func Fatalf(format string, args ...interface{}) {
- logger.Fatalf(format, args...)
-}
-
-// Fatalln is equivalent to Println() followed by a call to os.Exit()) with a non-zero exit code.
-func Fatalln(args ...interface{}) {
- logger.Fatalln(args...)
-}
-
-// Print prints to the logger. Arguments are handled in the manner of fmt.Print.
-func Print(args ...interface{}) {
- logger.Print(args...)
-}
-
-// Printf prints to the logger. Arguments are handled in the manner of fmt.Printf.
-func Printf(format string, args ...interface{}) {
- logger.Printf(format, args...)
-}
-
-// Println prints to the logger. Arguments are handled in the manner of fmt.Println.
-func Println(args ...interface{}) {
- logger.Println(args...)
-}
diff --git a/vendor/google.golang.org/grpc/interceptor.go b/vendor/google.golang.org/grpc/interceptor.go
deleted file mode 100644
index 8d932efed..000000000
--- a/vendor/google.golang.org/grpc/interceptor.go
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *
- * Copyright 2016, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package grpc
-
-import (
- "golang.org/x/net/context"
-)
-
-// UnaryInvoker is called by UnaryClientInterceptor to complete RPCs.
-type UnaryInvoker func(ctx context.Context, method string, req, reply interface{}, cc *ClientConn, opts ...CallOption) error
-
-// UnaryClientInterceptor intercepts the execution of a unary RPC on the client. inovker is the handler to complete the RPC
-// and it is the responsibility of the interceptor to call it.
-// This is the EXPERIMENTAL API.
-type UnaryClientInterceptor func(ctx context.Context, method string, req, reply interface{}, cc *ClientConn, invoker UnaryInvoker, opts ...CallOption) error
-
-// Streamer is called by StreamClientInterceptor to create a ClientStream.
-type Streamer func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (ClientStream, error)
-
-// StreamClientInterceptor intercepts the creation of ClientStream. It may return a custom ClientStream to intercept all I/O
-// operations. streamer is the handlder to create a ClientStream and it is the responsibility of the interceptor to call it.
-// This is the EXPERIMENTAL API.
-type StreamClientInterceptor func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, streamer Streamer, opts ...CallOption) (ClientStream, error)
-
-// UnaryServerInfo consists of various information about a unary RPC on
-// server side. All per-rpc information may be mutated by the interceptor.
-type UnaryServerInfo struct {
- // Server is the service implementation the user provides. This is read-only.
- Server interface{}
- // FullMethod is the full RPC method string, i.e., /package.service/method.
- FullMethod string
-}
-
-// UnaryHandler defines the handler invoked by UnaryServerInterceptor to complete the normal
-// execution of a unary RPC.
-type UnaryHandler func(ctx context.Context, req interface{}) (interface{}, error)
-
-// UnaryServerInterceptor provides a hook to intercept the execution of a unary RPC on the server. info
-// contains all the information of this RPC the interceptor can operate on. And handler is the wrapper
-// of the service method implementation. It is the responsibility of the interceptor to invoke handler
-// to complete the RPC.
-type UnaryServerInterceptor func(ctx context.Context, req interface{}, info *UnaryServerInfo, handler UnaryHandler) (resp interface{}, err error)
-
-// StreamServerInfo consists of various information about a streaming RPC on
-// server side. All per-rpc information may be mutated by the interceptor.
-type StreamServerInfo struct {
- // FullMethod is the full RPC method string, i.e., /package.service/method.
- FullMethod string
- // IsClientStream indicates whether the RPC is a client streaming RPC.
- IsClientStream bool
- // IsServerStream indicates whether the RPC is a server streaming RPC.
- IsServerStream bool
-}
-
-// StreamServerInterceptor provides a hook to intercept the execution of a streaming RPC on the server.
-// info contains all the information of this RPC the interceptor can operate on. And handler is the
-// service method implementation. It is the responsibility of the interceptor to invoke handler to
-// complete the RPC.
-type StreamServerInterceptor func(srv interface{}, ss ServerStream, info *StreamServerInfo, handler StreamHandler) error
diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go
deleted file mode 100644
index 5489143a8..000000000
--- a/vendor/google.golang.org/grpc/internal/internal.go
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2016, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-// Package internal contains gRPC-internal code for testing, to avoid polluting
-// the godoc of the top-level grpc package.
-package internal
-
-// TestingCloseConns closes all existing transports but keeps
-// grpcServer.lis accepting new connections.
-//
-// The provided grpcServer must be of type *grpc.Server. It is untyped
-// for circular dependency reasons.
-var TestingCloseConns func(grpcServer interface{})
-
-// TestingUseHandlerImpl enables the http.Handler-based server implementation.
-// It must be called before Serve and requires TLS credentials.
-//
-// The provided grpcServer must be of type *grpc.Server. It is untyped
-// for circular dependency reasons.
-var TestingUseHandlerImpl func(grpcServer interface{})
diff --git a/vendor/google.golang.org/grpc/metadata/metadata.go b/vendor/google.golang.org/grpc/metadata/metadata.go
deleted file mode 100644
index 3c0ca7a36..000000000
--- a/vendor/google.golang.org/grpc/metadata/metadata.go
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-// Package metadata define the structure of the metadata supported by gRPC library.
-package metadata // import "google.golang.org/grpc/metadata"
-
-import (
- "encoding/base64"
- "fmt"
- "strings"
-
- "golang.org/x/net/context"
-)
-
-const (
- binHdrSuffix = "-bin"
-)
-
-// encodeKeyValue encodes key and value qualified for transmission via gRPC.
-// Transmitting binary headers violates HTTP/2 spec.
-// TODO(zhaoq): Maybe check if k is ASCII also.
-func encodeKeyValue(k, v string) (string, string) {
- k = strings.ToLower(k)
- if strings.HasSuffix(k, binHdrSuffix) {
- val := base64.StdEncoding.EncodeToString([]byte(v))
- v = string(val)
- }
- return k, v
-}
-
-// DecodeKeyValue returns the original key and value corresponding to the
-// encoded data in k, v.
-// If k is a binary header and v contains comma, v is split on comma before decoded,
-// and the decoded v will be joined with comma before returned.
-func DecodeKeyValue(k, v string) (string, string, error) {
- if !strings.HasSuffix(k, binHdrSuffix) {
- return k, v, nil
- }
- vvs := strings.Split(v, ",")
- for i, vv := range vvs {
- val, err := base64.StdEncoding.DecodeString(vv)
- if err != nil {
- return "", "", err
- }
- vvs[i] = string(val)
- }
- return k, strings.Join(vvs, ","), nil
-}
-
-// MD is a mapping from metadata keys to values. Users should use the following
-// two convenience functions New and Pairs to generate MD.
-type MD map[string][]string
-
-// New creates a MD from given key-value map.
-func New(m map[string]string) MD {
- md := MD{}
- for k, v := range m {
- key, val := encodeKeyValue(k, v)
- md[key] = append(md[key], val)
- }
- return md
-}
-
-// Pairs returns an MD formed by the mapping of key, value ...
-// Pairs panics if len(kv) is odd.
-func Pairs(kv ...string) MD {
- if len(kv)%2 == 1 {
- panic(fmt.Sprintf("metadata: Pairs got the odd number of input pairs for metadata: %d", len(kv)))
- }
- md := MD{}
- var k string
- for i, s := range kv {
- if i%2 == 0 {
- k = s
- continue
- }
- key, val := encodeKeyValue(k, s)
- md[key] = append(md[key], val)
- }
- return md
-}
-
-// Len returns the number of items in md.
-func (md MD) Len() int {
- return len(md)
-}
-
-// Copy returns a copy of md.
-func (md MD) Copy() MD {
- return Join(md)
-}
-
-// Join joins any number of MDs into a single MD.
-// The order of values for each key is determined by the order in which
-// the MDs containing those values are presented to Join.
-func Join(mds ...MD) MD {
- out := MD{}
- for _, md := range mds {
- for k, v := range md {
- out[k] = append(out[k], v...)
- }
- }
- return out
-}
-
-type mdKey struct{}
-
-// NewContext creates a new context with md attached.
-func NewContext(ctx context.Context, md MD) context.Context {
- return context.WithValue(ctx, mdKey{}, md)
-}
-
-// FromContext returns the MD in ctx if it exists.
-func FromContext(ctx context.Context) (md MD, ok bool) {
- md, ok = ctx.Value(mdKey{}).(MD)
- return
-}
diff --git a/vendor/google.golang.org/grpc/naming/naming.go b/vendor/google.golang.org/grpc/naming/naming.go
deleted file mode 100644
index c2e0871e6..000000000
--- a/vendor/google.golang.org/grpc/naming/naming.go
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-// Package naming defines the naming API and related data structures for gRPC.
-// The interface is EXPERIMENTAL and may be suject to change.
-package naming
-
-// Operation defines the corresponding operations for a name resolution change.
-type Operation uint8
-
-const (
- // Add indicates a new address is added.
- Add Operation = iota
- // Delete indicates an exisiting address is deleted.
- Delete
-)
-
-// Update defines a name resolution update. Notice that it is not valid having both
-// empty string Addr and nil Metadata in an Update.
-type Update struct {
- // Op indicates the operation of the update.
- Op Operation
- // Addr is the updated address. It is empty string if there is no address update.
- Addr string
- // Metadata is the updated metadata. It is nil if there is no metadata update.
- // Metadata is not required for a custom naming implementation.
- Metadata interface{}
-}
-
-// Resolver creates a Watcher for a target to track its resolution changes.
-type Resolver interface {
- // Resolve creates a Watcher for target.
- Resolve(target string) (Watcher, error)
-}
-
-// Watcher watches for the updates on the specified target.
-type Watcher interface {
- // Next blocks until an update or error happens. It may return one or more
- // updates. The first call should get the full set of the results. It should
- // return an error if and only if Watcher cannot recover.
- Next() ([]*Update, error)
- // Close closes the Watcher.
- Close()
-}
diff --git a/vendor/google.golang.org/grpc/peer/peer.go b/vendor/google.golang.org/grpc/peer/peer.go
deleted file mode 100644
index bfa6205ba..000000000
--- a/vendor/google.golang.org/grpc/peer/peer.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-// Package peer defines various peer information associated with RPCs and
-// corresponding utils.
-package peer
-
-import (
- "net"
-
- "golang.org/x/net/context"
- "google.golang.org/grpc/credentials"
-)
-
-// Peer contains the information of the peer for an RPC.
-type Peer struct {
- // Addr is the peer address.
- Addr net.Addr
- // AuthInfo is the authentication information of the transport.
- // It is nil if there is no transport security being used.
- AuthInfo credentials.AuthInfo
-}
-
-type peerKey struct{}
-
-// NewContext creates a new context with peer information attached.
-func NewContext(ctx context.Context, p *Peer) context.Context {
- return context.WithValue(ctx, peerKey{}, p)
-}
-
-// FromContext returns the peer information in ctx if it exists.
-func FromContext(ctx context.Context) (p *Peer, ok bool) {
- p, ok = ctx.Value(peerKey{}).(*Peer)
- return
-}
diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go
deleted file mode 100644
index a25eaa8a2..000000000
--- a/vendor/google.golang.org/grpc/rpc_util.go
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package grpc
-
-import (
- "bytes"
- "compress/gzip"
- "encoding/binary"
- "fmt"
- "io"
- "io/ioutil"
- "math"
- "os"
-
- "github.com/golang/protobuf/proto"
- "golang.org/x/net/context"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/metadata"
- "google.golang.org/grpc/transport"
-)
-
-// Codec defines the interface gRPC uses to encode and decode messages.
-type Codec interface {
- // Marshal returns the wire format of v.
- Marshal(v interface{}) ([]byte, error)
- // Unmarshal parses the wire format into v.
- Unmarshal(data []byte, v interface{}) error
- // String returns the name of the Codec implementation. The returned
- // string will be used as part of content type in transmission.
- String() string
-}
-
-// protoCodec is a Codec implementation with protobuf. It is the default codec for gRPC.
-type protoCodec struct{}
-
-func (protoCodec) Marshal(v interface{}) ([]byte, error) {
- return proto.Marshal(v.(proto.Message))
-}
-
-func (protoCodec) Unmarshal(data []byte, v interface{}) error {
- return proto.Unmarshal(data, v.(proto.Message))
-}
-
-func (protoCodec) String() string {
- return "proto"
-}
-
-// Compressor defines the interface gRPC uses to compress a message.
-type Compressor interface {
- // Do compresses p into w.
- Do(w io.Writer, p []byte) error
- // Type returns the compression algorithm the Compressor uses.
- Type() string
-}
-
-// NewGZIPCompressor creates a Compressor based on GZIP.
-func NewGZIPCompressor() Compressor {
- return &gzipCompressor{}
-}
-
-type gzipCompressor struct {
-}
-
-func (c *gzipCompressor) Do(w io.Writer, p []byte) error {
- z := gzip.NewWriter(w)
- if _, err := z.Write(p); err != nil {
- return err
- }
- return z.Close()
-}
-
-func (c *gzipCompressor) Type() string {
- return "gzip"
-}
-
-// Decompressor defines the interface gRPC uses to decompress a message.
-type Decompressor interface {
- // Do reads the data from r and uncompress them.
- Do(r io.Reader) ([]byte, error)
- // Type returns the compression algorithm the Decompressor uses.
- Type() string
-}
-
-type gzipDecompressor struct {
-}
-
-// NewGZIPDecompressor creates a Decompressor based on GZIP.
-func NewGZIPDecompressor() Decompressor {
- return &gzipDecompressor{}
-}
-
-func (d *gzipDecompressor) Do(r io.Reader) ([]byte, error) {
- z, err := gzip.NewReader(r)
- if err != nil {
- return nil, err
- }
- defer z.Close()
- return ioutil.ReadAll(z)
-}
-
-func (d *gzipDecompressor) Type() string {
- return "gzip"
-}
-
-// callInfo contains all related configuration and information about an RPC.
-type callInfo struct {
- failFast bool
- headerMD metadata.MD
- trailerMD metadata.MD
- traceInfo traceInfo // in trace.go
-}
-
-var defaultCallInfo = callInfo{failFast: true}
-
-// CallOption configures a Call before it starts or extracts information from
-// a Call after it completes.
-type CallOption interface {
- // before is called before the call is sent to any server. If before
- // returns a non-nil error, the RPC fails with that error.
- before(*callInfo) error
-
- // after is called after the call has completed. after cannot return an
- // error, so any failures should be reported via output parameters.
- after(*callInfo)
-}
-
-type beforeCall func(c *callInfo) error
-
-func (o beforeCall) before(c *callInfo) error { return o(c) }
-func (o beforeCall) after(c *callInfo) {}
-
-type afterCall func(c *callInfo)
-
-func (o afterCall) before(c *callInfo) error { return nil }
-func (o afterCall) after(c *callInfo) { o(c) }
-
-// Header returns a CallOptions that retrieves the header metadata
-// for a unary RPC.
-func Header(md *metadata.MD) CallOption {
- return afterCall(func(c *callInfo) {
- *md = c.headerMD
- })
-}
-
-// Trailer returns a CallOptions that retrieves the trailer metadata
-// for a unary RPC.
-func Trailer(md *metadata.MD) CallOption {
- return afterCall(func(c *callInfo) {
- *md = c.trailerMD
- })
-}
-
-// FailFast configures the action to take when an RPC is attempted on broken
-// connections or unreachable servers. If failfast is true, the RPC will fail
-// immediately. Otherwise, the RPC client will block the call until a
-// connection is available (or the call is canceled or times out) and will retry
-// the call if it fails due to a transient error. Please refer to
-// https://github.com/grpc/grpc/blob/master/doc/fail_fast.md
-func FailFast(failFast bool) CallOption {
- return beforeCall(func(c *callInfo) error {
- c.failFast = failFast
- return nil
- })
-}
-
-// The format of the payload: compressed or not?
-type payloadFormat uint8
-
-const (
- compressionNone payloadFormat = iota // no compression
- compressionMade
-)
-
-// parser reads complete gRPC messages from the underlying reader.
-type parser struct {
- // r is the underlying reader.
- // See the comment on recvMsg for the permissible
- // error types.
- r io.Reader
-
- // The header of a gRPC message. Find more detail
- // at http://www.grpc.io/docs/guides/wire.html.
- header [5]byte
-}
-
-// recvMsg reads a complete gRPC message from the stream.
-//
-// It returns the message and its payload (compression/encoding)
-// format. The caller owns the returned msg memory.
-//
-// If there is an error, possible values are:
-// * io.EOF, when no messages remain
-// * io.ErrUnexpectedEOF
-// * of type transport.ConnectionError
-// * of type transport.StreamError
-// No other error values or types must be returned, which also means
-// that the underlying io.Reader must not return an incompatible
-// error.
-func (p *parser) recvMsg(maxMsgSize int) (pf payloadFormat, msg []byte, err error) {
- if _, err := io.ReadFull(p.r, p.header[:]); err != nil {
- return 0, nil, err
- }
-
- pf = payloadFormat(p.header[0])
- length := binary.BigEndian.Uint32(p.header[1:])
-
- if length == 0 {
- return pf, nil, nil
- }
- if length > uint32(maxMsgSize) {
- return 0, nil, Errorf(codes.Internal, "grpc: received message length %d exceeding the max size %d", length, maxMsgSize)
- }
- // TODO(bradfitz,zhaoq): garbage. reuse buffer after proto decoding instead
- // of making it for each message:
- msg = make([]byte, int(length))
- if _, err := io.ReadFull(p.r, msg); err != nil {
- if err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- return 0, nil, err
- }
- return pf, msg, nil
-}
-
-// encode serializes msg and prepends the message header. If msg is nil, it
-// generates the message header of 0 message length.
-func encode(c Codec, msg interface{}, cp Compressor, cbuf *bytes.Buffer) ([]byte, error) {
- var b []byte
- var length uint
- if msg != nil {
- var err error
- // TODO(zhaoq): optimize to reduce memory alloc and copying.
- b, err = c.Marshal(msg)
- if err != nil {
- return nil, err
- }
- if cp != nil {
- if err := cp.Do(cbuf, b); err != nil {
- return nil, err
- }
- b = cbuf.Bytes()
- }
- length = uint(len(b))
- }
- if length > math.MaxUint32 {
- return nil, Errorf(codes.InvalidArgument, "grpc: message too large (%d bytes)", length)
- }
-
- const (
- payloadLen = 1
- sizeLen = 4
- )
-
- var buf = make([]byte, payloadLen+sizeLen+len(b))
-
- // Write payload format
- if cp == nil {
- buf[0] = byte(compressionNone)
- } else {
- buf[0] = byte(compressionMade)
- }
- // Write length of b into buf
- binary.BigEndian.PutUint32(buf[1:], uint32(length))
- // Copy encoded msg to buf
- copy(buf[5:], b)
-
- return buf, nil
-}
-
-func checkRecvPayload(pf payloadFormat, recvCompress string, dc Decompressor) error {
- switch pf {
- case compressionNone:
- case compressionMade:
- if dc == nil || recvCompress != dc.Type() {
- return Errorf(codes.Unimplemented, "grpc: Decompressor is not installed for grpc-encoding %q", recvCompress)
- }
- default:
- return Errorf(codes.Internal, "grpc: received unexpected payload format %d", pf)
- }
- return nil
-}
-
-func recv(p *parser, c Codec, s *transport.Stream, dc Decompressor, m interface{}, maxMsgSize int) error {
- pf, d, err := p.recvMsg(maxMsgSize)
- if err != nil {
- return err
- }
- if err := checkRecvPayload(pf, s.RecvCompress(), dc); err != nil {
- return err
- }
- if pf == compressionMade {
- d, err = dc.Do(bytes.NewReader(d))
- if err != nil {
- return Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err)
- }
- }
- if len(d) > maxMsgSize {
- // TODO: Revisit the error code. Currently keep it consistent with java
- // implementation.
- return Errorf(codes.Internal, "grpc: received a message of %d bytes exceeding %d limit", len(d), maxMsgSize)
- }
- if err := c.Unmarshal(d, m); err != nil {
- return Errorf(codes.Internal, "grpc: failed to unmarshal the received message %v", err)
- }
- return nil
-}
-
-// rpcError defines the status from an RPC.
-type rpcError struct {
- code codes.Code
- desc string
-}
-
-func (e *rpcError) Error() string {
- return fmt.Sprintf("rpc error: code = %d desc = %s", e.code, e.desc)
-}
-
-// Code returns the error code for err if it was produced by the rpc system.
-// Otherwise, it returns codes.Unknown.
-func Code(err error) codes.Code {
- if err == nil {
- return codes.OK
- }
- if e, ok := err.(*rpcError); ok {
- return e.code
- }
- return codes.Unknown
-}
-
-// ErrorDesc returns the error description of err if it was produced by the rpc system.
-// Otherwise, it returns err.Error() or empty string when err is nil.
-func ErrorDesc(err error) string {
- if err == nil {
- return ""
- }
- if e, ok := err.(*rpcError); ok {
- return e.desc
- }
- return err.Error()
-}
-
-// Errorf returns an error containing an error code and a description;
-// Errorf returns nil if c is OK.
-func Errorf(c codes.Code, format string, a ...interface{}) error {
- if c == codes.OK {
- return nil
- }
- return &rpcError{
- code: c,
- desc: fmt.Sprintf(format, a...),
- }
-}
-
-// toRPCErr converts an error into a rpcError.
-func toRPCErr(err error) error {
- switch e := err.(type) {
- case *rpcError:
- return err
- case transport.StreamError:
- return &rpcError{
- code: e.Code,
- desc: e.Desc,
- }
- case transport.ConnectionError:
- return &rpcError{
- code: codes.Internal,
- desc: e.Desc,
- }
- default:
- switch err {
- case context.DeadlineExceeded:
- return &rpcError{
- code: codes.DeadlineExceeded,
- desc: err.Error(),
- }
- case context.Canceled:
- return &rpcError{
- code: codes.Canceled,
- desc: err.Error(),
- }
- case ErrClientConnClosing:
- return &rpcError{
- code: codes.FailedPrecondition,
- desc: err.Error(),
- }
- }
-
- }
- return Errorf(codes.Unknown, "%v", err)
-}
-
-// convertCode converts a standard Go error into its canonical code. Note that
-// this is only used to translate the error returned by the server applications.
-func convertCode(err error) codes.Code {
- switch err {
- case nil:
- return codes.OK
- case io.EOF:
- return codes.OutOfRange
- case io.ErrClosedPipe, io.ErrNoProgress, io.ErrShortBuffer, io.ErrShortWrite, io.ErrUnexpectedEOF:
- return codes.FailedPrecondition
- case os.ErrInvalid:
- return codes.InvalidArgument
- case context.Canceled:
- return codes.Canceled
- case context.DeadlineExceeded:
- return codes.DeadlineExceeded
- }
- switch {
- case os.IsExist(err):
- return codes.AlreadyExists
- case os.IsNotExist(err):
- return codes.NotFound
- case os.IsPermission(err):
- return codes.PermissionDenied
- }
- return codes.Unknown
-}
-
-// SupportPackageIsVersion4 is referenced from generated protocol buffer files
-// to assert that that code is compatible with this version of the grpc package.
-//
-// This constant may be renamed in the future if a change in the generated code
-// requires a synchronised update of grpc-go and protoc-gen-go. This constant
-// should not be referenced from any other code.
-const SupportPackageIsVersion4 = true
diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go
deleted file mode 100644
index e0bb187ef..000000000
--- a/vendor/google.golang.org/grpc/server.go
+++ /dev/null
@@ -1,944 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package grpc
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
- "net"
- "net/http"
- "reflect"
- "runtime"
- "strings"
- "sync"
- "time"
-
- "golang.org/x/net/context"
- "golang.org/x/net/http2"
- "golang.org/x/net/trace"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/credentials"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/internal"
- "google.golang.org/grpc/metadata"
- "google.golang.org/grpc/transport"
-)
-
-type methodHandler func(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor UnaryServerInterceptor) (interface{}, error)
-
-// MethodDesc represents an RPC service's method specification.
-type MethodDesc struct {
- MethodName string
- Handler methodHandler
-}
-
-// ServiceDesc represents an RPC service's specification.
-type ServiceDesc struct {
- ServiceName string
- // The pointer to the service interface. Used to check whether the user
- // provided implementation satisfies the interface requirements.
- HandlerType interface{}
- Methods []MethodDesc
- Streams []StreamDesc
- Metadata interface{}
-}
-
-// service consists of the information of the server serving this service and
-// the methods in this service.
-type service struct {
- server interface{} // the server for service methods
- md map[string]*MethodDesc
- sd map[string]*StreamDesc
- mdata interface{}
-}
-
-// Server is a gRPC server to serve RPC requests.
-type Server struct {
- opts options
-
- mu sync.Mutex // guards following
- lis map[net.Listener]bool
- conns map[io.Closer]bool
- drain bool
- ctx context.Context
- cancel context.CancelFunc
- // A CondVar to let GracefulStop() blocks until all the pending RPCs are finished
- // and all the transport goes away.
- cv *sync.Cond
- m map[string]*service // service name -> service info
- events trace.EventLog
-}
-
-type options struct {
- creds credentials.TransportCredentials
- codec Codec
- cp Compressor
- dc Decompressor
- maxMsgSize int
- unaryInt UnaryServerInterceptor
- streamInt StreamServerInterceptor
- maxConcurrentStreams uint32
- useHandlerImpl bool // use http.Handler-based server
-}
-
-var defaultMaxMsgSize = 1024 * 1024 * 4 // use 4MB as the default message size limit
-
-// A ServerOption sets options.
-type ServerOption func(*options)
-
-// CustomCodec returns a ServerOption that sets a codec for message marshaling and unmarshaling.
-func CustomCodec(codec Codec) ServerOption {
- return func(o *options) {
- o.codec = codec
- }
-}
-
-// RPCCompressor returns a ServerOption that sets a compressor for outbound messages.
-func RPCCompressor(cp Compressor) ServerOption {
- return func(o *options) {
- o.cp = cp
- }
-}
-
-// RPCDecompressor returns a ServerOption that sets a decompressor for inbound messages.
-func RPCDecompressor(dc Decompressor) ServerOption {
- return func(o *options) {
- o.dc = dc
- }
-}
-
-// MaxMsgSize returns a ServerOption to set the max message size in bytes for inbound mesages.
-// If this is not set, gRPC uses the default 4MB.
-func MaxMsgSize(m int) ServerOption {
- return func(o *options) {
- o.maxMsgSize = m
- }
-}
-
-// MaxConcurrentStreams returns a ServerOption that will apply a limit on the number
-// of concurrent streams to each ServerTransport.
-func MaxConcurrentStreams(n uint32) ServerOption {
- return func(o *options) {
- o.maxConcurrentStreams = n
- }
-}
-
-// Creds returns a ServerOption that sets credentials for server connections.
-func Creds(c credentials.TransportCredentials) ServerOption {
- return func(o *options) {
- o.creds = c
- }
-}
-
-// UnaryInterceptor returns a ServerOption that sets the UnaryServerInterceptor for the
-// server. Only one unary interceptor can be installed. The construction of multiple
-// interceptors (e.g., chaining) can be implemented at the caller.
-func UnaryInterceptor(i UnaryServerInterceptor) ServerOption {
- return func(o *options) {
- if o.unaryInt != nil {
- panic("The unary server interceptor has been set.")
- }
- o.unaryInt = i
- }
-}
-
-// StreamInterceptor returns a ServerOption that sets the StreamServerInterceptor for the
-// server. Only one stream interceptor can be installed.
-func StreamInterceptor(i StreamServerInterceptor) ServerOption {
- return func(o *options) {
- if o.streamInt != nil {
- panic("The stream server interceptor has been set.")
- }
- o.streamInt = i
- }
-}
-
-// NewServer creates a gRPC server which has no service registered and has not
-// started to accept requests yet.
-func NewServer(opt ...ServerOption) *Server {
- var opts options
- opts.maxMsgSize = defaultMaxMsgSize
- for _, o := range opt {
- o(&opts)
- }
- if opts.codec == nil {
- // Set the default codec.
- opts.codec = protoCodec{}
- }
- s := &Server{
- lis: make(map[net.Listener]bool),
- opts: opts,
- conns: make(map[io.Closer]bool),
- m: make(map[string]*service),
- }
- s.cv = sync.NewCond(&s.mu)
- s.ctx, s.cancel = context.WithCancel(context.Background())
- if EnableTracing {
- _, file, line, _ := runtime.Caller(1)
- s.events = trace.NewEventLog("grpc.Server", fmt.Sprintf("%s:%d", file, line))
- }
- return s
-}
-
-// printf records an event in s's event log, unless s has been stopped.
-// REQUIRES s.mu is held.
-func (s *Server) printf(format string, a ...interface{}) {
- if s.events != nil {
- s.events.Printf(format, a...)
- }
-}
-
-// errorf records an error in s's event log, unless s has been stopped.
-// REQUIRES s.mu is held.
-func (s *Server) errorf(format string, a ...interface{}) {
- if s.events != nil {
- s.events.Errorf(format, a...)
- }
-}
-
-// RegisterService register a service and its implementation to the gRPC
-// server. Called from the IDL generated code. This must be called before
-// invoking Serve.
-func (s *Server) RegisterService(sd *ServiceDesc, ss interface{}) {
- ht := reflect.TypeOf(sd.HandlerType).Elem()
- st := reflect.TypeOf(ss)
- if !st.Implements(ht) {
- grpclog.Fatalf("grpc: Server.RegisterService found the handler of type %v that does not satisfy %v", st, ht)
- }
- s.register(sd, ss)
-}
-
-func (s *Server) register(sd *ServiceDesc, ss interface{}) {
- s.mu.Lock()
- defer s.mu.Unlock()
- s.printf("RegisterService(%q)", sd.ServiceName)
- if _, ok := s.m[sd.ServiceName]; ok {
- grpclog.Fatalf("grpc: Server.RegisterService found duplicate service registration for %q", sd.ServiceName)
- }
- srv := &service{
- server: ss,
- md: make(map[string]*MethodDesc),
- sd: make(map[string]*StreamDesc),
- mdata: sd.Metadata,
- }
- for i := range sd.Methods {
- d := &sd.Methods[i]
- srv.md[d.MethodName] = d
- }
- for i := range sd.Streams {
- d := &sd.Streams[i]
- srv.sd[d.StreamName] = d
- }
- s.m[sd.ServiceName] = srv
-}
-
-// MethodInfo contains the information of an RPC including its method name and type.
-type MethodInfo struct {
- // Name is the method name only, without the service name or package name.
- Name string
- // IsClientStream indicates whether the RPC is a client streaming RPC.
- IsClientStream bool
- // IsServerStream indicates whether the RPC is a server streaming RPC.
- IsServerStream bool
-}
-
-// ServiceInfo contains unary RPC method info, streaming RPC methid info and metadata for a service.
-type ServiceInfo struct {
- Methods []MethodInfo
- // Metadata is the metadata specified in ServiceDesc when registering service.
- Metadata interface{}
-}
-
-// GetServiceInfo returns a map from service names to ServiceInfo.
-// Service names include the package names, in the form of <package>.<service>.
-func (s *Server) GetServiceInfo() map[string]ServiceInfo {
- ret := make(map[string]ServiceInfo)
- for n, srv := range s.m {
- methods := make([]MethodInfo, 0, len(srv.md)+len(srv.sd))
- for m := range srv.md {
- methods = append(methods, MethodInfo{
- Name: m,
- IsClientStream: false,
- IsServerStream: false,
- })
- }
- for m, d := range srv.sd {
- methods = append(methods, MethodInfo{
- Name: m,
- IsClientStream: d.ClientStreams,
- IsServerStream: d.ServerStreams,
- })
- }
-
- ret[n] = ServiceInfo{
- Methods: methods,
- Metadata: srv.mdata,
- }
- }
- return ret
-}
-
-var (
- // ErrServerStopped indicates that the operation is now illegal because of
- // the server being stopped.
- ErrServerStopped = errors.New("grpc: the server has been stopped")
-)
-
-func (s *Server) useTransportAuthenticator(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) {
- if s.opts.creds == nil {
- return rawConn, nil, nil
- }
- return s.opts.creds.ServerHandshake(rawConn)
-}
-
-// Serve accepts incoming connections on the listener lis, creating a new
-// ServerTransport and service goroutine for each. The service goroutines
-// read gRPC requests and then call the registered handlers to reply to them.
-// Serve returns when lis.Accept fails with fatal errors. lis will be closed when
-// this method returns.
-func (s *Server) Serve(lis net.Listener) error {
- s.mu.Lock()
- s.printf("serving")
- if s.lis == nil {
- s.mu.Unlock()
- lis.Close()
- return ErrServerStopped
- }
- s.lis[lis] = true
- s.mu.Unlock()
- defer func() {
- s.mu.Lock()
- if s.lis != nil && s.lis[lis] {
- lis.Close()
- delete(s.lis, lis)
- }
- s.mu.Unlock()
- }()
-
- var tempDelay time.Duration // how long to sleep on accept failure
-
- for {
- rawConn, err := lis.Accept()
- if err != nil {
- if ne, ok := err.(interface {
- Temporary() bool
- }); ok && ne.Temporary() {
- if tempDelay == 0 {
- tempDelay = 5 * time.Millisecond
- } else {
- tempDelay *= 2
- }
- if max := 1 * time.Second; tempDelay > max {
- tempDelay = max
- }
- s.mu.Lock()
- s.printf("Accept error: %v; retrying in %v", err, tempDelay)
- s.mu.Unlock()
- select {
- case <-time.After(tempDelay):
- case <-s.ctx.Done():
- }
- continue
- }
- s.mu.Lock()
- s.printf("done serving; Accept = %v", err)
- s.mu.Unlock()
- return err
- }
- tempDelay = 0
- // Start a new goroutine to deal with rawConn
- // so we don't stall this Accept loop goroutine.
- go s.handleRawConn(rawConn)
- }
-}
-
-// handleRawConn is run in its own goroutine and handles a just-accepted
-// connection that has not had any I/O performed on it yet.
-func (s *Server) handleRawConn(rawConn net.Conn) {
- conn, authInfo, err := s.useTransportAuthenticator(rawConn)
- if err != nil {
- s.mu.Lock()
- s.errorf("ServerHandshake(%q) failed: %v", rawConn.RemoteAddr(), err)
- s.mu.Unlock()
- grpclog.Printf("grpc: Server.Serve failed to complete security handshake from %q: %v", rawConn.RemoteAddr(), err)
- // If serverHandShake returns ErrConnDispatched, keep rawConn open.
- if err != credentials.ErrConnDispatched {
- rawConn.Close()
- }
- return
- }
-
- s.mu.Lock()
- if s.conns == nil {
- s.mu.Unlock()
- conn.Close()
- return
- }
- s.mu.Unlock()
-
- if s.opts.useHandlerImpl {
- s.serveUsingHandler(conn)
- } else {
- s.serveNewHTTP2Transport(conn, authInfo)
- }
-}
-
-// serveNewHTTP2Transport sets up a new http/2 transport (using the
-// gRPC http2 server transport in transport/http2_server.go) and
-// serves streams on it.
-// This is run in its own goroutine (it does network I/O in
-// transport.NewServerTransport).
-func (s *Server) serveNewHTTP2Transport(c net.Conn, authInfo credentials.AuthInfo) {
- st, err := transport.NewServerTransport("http2", c, s.opts.maxConcurrentStreams, authInfo)
- if err != nil {
- s.mu.Lock()
- s.errorf("NewServerTransport(%q) failed: %v", c.RemoteAddr(), err)
- s.mu.Unlock()
- c.Close()
- grpclog.Println("grpc: Server.Serve failed to create ServerTransport: ", err)
- return
- }
- if !s.addConn(st) {
- st.Close()
- return
- }
- s.serveStreams(st)
-}
-
-func (s *Server) serveStreams(st transport.ServerTransport) {
- defer s.removeConn(st)
- defer st.Close()
- var wg sync.WaitGroup
- st.HandleStreams(func(stream *transport.Stream) {
- wg.Add(1)
- go func() {
- defer wg.Done()
- s.handleStream(st, stream, s.traceInfo(st, stream))
- }()
- })
- wg.Wait()
-}
-
-var _ http.Handler = (*Server)(nil)
-
-// serveUsingHandler is called from handleRawConn when s is configured
-// to handle requests via the http.Handler interface. It sets up a
-// net/http.Server to handle the just-accepted conn. The http.Server
-// is configured to route all incoming requests (all HTTP/2 streams)
-// to ServeHTTP, which creates a new ServerTransport for each stream.
-// serveUsingHandler blocks until conn closes.
-//
-// This codepath is only used when Server.TestingUseHandlerImpl has
-// been configured. This lets the end2end tests exercise the ServeHTTP
-// method as one of the environment types.
-//
-// conn is the *tls.Conn that's already been authenticated.
-func (s *Server) serveUsingHandler(conn net.Conn) {
- if !s.addConn(conn) {
- conn.Close()
- return
- }
- defer s.removeConn(conn)
- h2s := &http2.Server{
- MaxConcurrentStreams: s.opts.maxConcurrentStreams,
- }
- h2s.ServeConn(conn, &http2.ServeConnOpts{
- Handler: s,
- })
-}
-
-func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- st, err := transport.NewServerHandlerTransport(w, r)
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
- if !s.addConn(st) {
- st.Close()
- return
- }
- defer s.removeConn(st)
- s.serveStreams(st)
-}
-
-// traceInfo returns a traceInfo and associates it with stream, if tracing is enabled.
-// If tracing is not enabled, it returns nil.
-func (s *Server) traceInfo(st transport.ServerTransport, stream *transport.Stream) (trInfo *traceInfo) {
- if !EnableTracing {
- return nil
- }
- trInfo = &traceInfo{
- tr: trace.New("grpc.Recv."+methodFamily(stream.Method()), stream.Method()),
- }
- trInfo.firstLine.client = false
- trInfo.firstLine.remoteAddr = st.RemoteAddr()
- stream.TraceContext(trInfo.tr)
- if dl, ok := stream.Context().Deadline(); ok {
- trInfo.firstLine.deadline = dl.Sub(time.Now())
- }
- return trInfo
-}
-
-func (s *Server) addConn(c io.Closer) bool {
- s.mu.Lock()
- defer s.mu.Unlock()
- if s.conns == nil || s.drain {
- return false
- }
- s.conns[c] = true
- return true
-}
-
-func (s *Server) removeConn(c io.Closer) {
- s.mu.Lock()
- defer s.mu.Unlock()
- if s.conns != nil {
- delete(s.conns, c)
- s.cv.Broadcast()
- }
-}
-
-func (s *Server) sendResponse(t transport.ServerTransport, stream *transport.Stream, msg interface{}, cp Compressor, opts *transport.Options) error {
- var cbuf *bytes.Buffer
- if cp != nil {
- cbuf = new(bytes.Buffer)
- }
- p, err := encode(s.opts.codec, msg, cp, cbuf)
- if err != nil {
- // This typically indicates a fatal issue (e.g., memory
- // corruption or hardware faults) the application program
- // cannot handle.
- //
- // TODO(zhaoq): There exist other options also such as only closing the
- // faulty stream locally and remotely (Other streams can keep going). Find
- // the optimal option.
- grpclog.Fatalf("grpc: Server failed to encode response %v", err)
- }
- return t.Write(stream, p, opts)
-}
-
-func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.Stream, srv *service, md *MethodDesc, trInfo *traceInfo) (err error) {
- if trInfo != nil {
- defer trInfo.tr.Finish()
- trInfo.firstLine.client = false
- trInfo.tr.LazyLog(&trInfo.firstLine, false)
- defer func() {
- if err != nil && err != io.EOF {
- trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true)
- trInfo.tr.SetError()
- }
- }()
- }
- if s.opts.cp != nil {
- // NOTE: this needs to be ahead of all handling, https://github.com/grpc/grpc-go/issues/686.
- stream.SetSendCompress(s.opts.cp.Type())
- }
- p := &parser{r: stream}
- for {
- pf, req, err := p.recvMsg(s.opts.maxMsgSize)
- if err == io.EOF {
- // The entire stream is done (for unary RPC only).
- return err
- }
- if err == io.ErrUnexpectedEOF {
- err = Errorf(codes.Internal, io.ErrUnexpectedEOF.Error())
- }
- if err != nil {
- switch err := err.(type) {
- case *rpcError:
- if err := t.WriteStatus(stream, err.code, err.desc); err != nil {
- grpclog.Printf("grpc: Server.processUnaryRPC failed to write status %v", err)
- }
- case transport.ConnectionError:
- // Nothing to do here.
- case transport.StreamError:
- if err := t.WriteStatus(stream, err.Code, err.Desc); err != nil {
- grpclog.Printf("grpc: Server.processUnaryRPC failed to write status %v", err)
- }
- default:
- panic(fmt.Sprintf("grpc: Unexpected error (%T) from recvMsg: %v", err, err))
- }
- return err
- }
-
- if err := checkRecvPayload(pf, stream.RecvCompress(), s.opts.dc); err != nil {
- switch err := err.(type) {
- case *rpcError:
- if err := t.WriteStatus(stream, err.code, err.desc); err != nil {
- grpclog.Printf("grpc: Server.processUnaryRPC failed to write status %v", err)
- }
- default:
- if err := t.WriteStatus(stream, codes.Internal, err.Error()); err != nil {
- grpclog.Printf("grpc: Server.processUnaryRPC failed to write status %v", err)
- }
-
- }
- return err
- }
- statusCode := codes.OK
- statusDesc := ""
- df := func(v interface{}) error {
- if pf == compressionMade {
- var err error
- req, err = s.opts.dc.Do(bytes.NewReader(req))
- if err != nil {
- if err := t.WriteStatus(stream, codes.Internal, err.Error()); err != nil {
- grpclog.Printf("grpc: Server.processUnaryRPC failed to write status %v", err)
- }
- return err
- }
- }
- if len(req) > s.opts.maxMsgSize {
- // TODO: Revisit the error code. Currently keep it consistent with
- // java implementation.
- statusCode = codes.Internal
- statusDesc = fmt.Sprintf("grpc: server received a message of %d bytes exceeding %d limit", len(req), s.opts.maxMsgSize)
- }
- if err := s.opts.codec.Unmarshal(req, v); err != nil {
- return err
- }
- if trInfo != nil {
- trInfo.tr.LazyLog(&payload{sent: false, msg: v}, true)
- }
- return nil
- }
- reply, appErr := md.Handler(srv.server, stream.Context(), df, s.opts.unaryInt)
- if appErr != nil {
- if err, ok := appErr.(*rpcError); ok {
- statusCode = err.code
- statusDesc = err.desc
- } else {
- statusCode = convertCode(appErr)
- statusDesc = appErr.Error()
- }
- if trInfo != nil && statusCode != codes.OK {
- trInfo.tr.LazyLog(stringer(statusDesc), true)
- trInfo.tr.SetError()
- }
- if err := t.WriteStatus(stream, statusCode, statusDesc); err != nil {
- grpclog.Printf("grpc: Server.processUnaryRPC failed to write status: %v", err)
- return err
- }
- return nil
- }
- if trInfo != nil {
- trInfo.tr.LazyLog(stringer("OK"), false)
- }
- opts := &transport.Options{
- Last: true,
- Delay: false,
- }
- if err := s.sendResponse(t, stream, reply, s.opts.cp, opts); err != nil {
- switch err := err.(type) {
- case transport.ConnectionError:
- // Nothing to do here.
- case transport.StreamError:
- statusCode = err.Code
- statusDesc = err.Desc
- default:
- statusCode = codes.Unknown
- statusDesc = err.Error()
- }
- return err
- }
- if trInfo != nil {
- trInfo.tr.LazyLog(&payload{sent: true, msg: reply}, true)
- }
- return t.WriteStatus(stream, statusCode, statusDesc)
- }
-}
-
-func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transport.Stream, srv *service, sd *StreamDesc, trInfo *traceInfo) (err error) {
- if s.opts.cp != nil {
- stream.SetSendCompress(s.opts.cp.Type())
- }
- ss := &serverStream{
- t: t,
- s: stream,
- p: &parser{r: stream},
- codec: s.opts.codec,
- cp: s.opts.cp,
- dc: s.opts.dc,
- maxMsgSize: s.opts.maxMsgSize,
- trInfo: trInfo,
- }
- if ss.cp != nil {
- ss.cbuf = new(bytes.Buffer)
- }
- if trInfo != nil {
- trInfo.tr.LazyLog(&trInfo.firstLine, false)
- defer func() {
- ss.mu.Lock()
- if err != nil && err != io.EOF {
- ss.trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true)
- ss.trInfo.tr.SetError()
- }
- ss.trInfo.tr.Finish()
- ss.trInfo.tr = nil
- ss.mu.Unlock()
- }()
- }
- var appErr error
- if s.opts.streamInt == nil {
- appErr = sd.Handler(srv.server, ss)
- } else {
- info := &StreamServerInfo{
- FullMethod: stream.Method(),
- IsClientStream: sd.ClientStreams,
- IsServerStream: sd.ServerStreams,
- }
- appErr = s.opts.streamInt(srv.server, ss, info, sd.Handler)
- }
- if appErr != nil {
- if err, ok := appErr.(*rpcError); ok {
- ss.statusCode = err.code
- ss.statusDesc = err.desc
- } else if err, ok := appErr.(transport.StreamError); ok {
- ss.statusCode = err.Code
- ss.statusDesc = err.Desc
- } else {
- ss.statusCode = convertCode(appErr)
- ss.statusDesc = appErr.Error()
- }
- }
- if trInfo != nil {
- ss.mu.Lock()
- if ss.statusCode != codes.OK {
- ss.trInfo.tr.LazyLog(stringer(ss.statusDesc), true)
- ss.trInfo.tr.SetError()
- } else {
- ss.trInfo.tr.LazyLog(stringer("OK"), false)
- }
- ss.mu.Unlock()
- }
- return t.WriteStatus(ss.s, ss.statusCode, ss.statusDesc)
-
-}
-
-func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Stream, trInfo *traceInfo) {
- sm := stream.Method()
- if sm != "" && sm[0] == '/' {
- sm = sm[1:]
- }
- pos := strings.LastIndex(sm, "/")
- if pos == -1 {
- if trInfo != nil {
- trInfo.tr.LazyLog(&fmtStringer{"Malformed method name %q", []interface{}{sm}}, true)
- trInfo.tr.SetError()
- }
- if err := t.WriteStatus(stream, codes.InvalidArgument, fmt.Sprintf("malformed method name: %q", stream.Method())); err != nil {
- if trInfo != nil {
- trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true)
- trInfo.tr.SetError()
- }
- grpclog.Printf("grpc: Server.handleStream failed to write status: %v", err)
- }
- if trInfo != nil {
- trInfo.tr.Finish()
- }
- return
- }
- service := sm[:pos]
- method := sm[pos+1:]
- srv, ok := s.m[service]
- if !ok {
- if trInfo != nil {
- trInfo.tr.LazyLog(&fmtStringer{"Unknown service %v", []interface{}{service}}, true)
- trInfo.tr.SetError()
- }
- if err := t.WriteStatus(stream, codes.Unimplemented, fmt.Sprintf("unknown service %v", service)); err != nil {
- if trInfo != nil {
- trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true)
- trInfo.tr.SetError()
- }
- grpclog.Printf("grpc: Server.handleStream failed to write status: %v", err)
- }
- if trInfo != nil {
- trInfo.tr.Finish()
- }
- return
- }
- // Unary RPC or Streaming RPC?
- if md, ok := srv.md[method]; ok {
- s.processUnaryRPC(t, stream, srv, md, trInfo)
- return
- }
- if sd, ok := srv.sd[method]; ok {
- s.processStreamingRPC(t, stream, srv, sd, trInfo)
- return
- }
- if trInfo != nil {
- trInfo.tr.LazyLog(&fmtStringer{"Unknown method %v", []interface{}{method}}, true)
- trInfo.tr.SetError()
- }
- if err := t.WriteStatus(stream, codes.Unimplemented, fmt.Sprintf("unknown method %v", method)); err != nil {
- if trInfo != nil {
- trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true)
- trInfo.tr.SetError()
- }
- grpclog.Printf("grpc: Server.handleStream failed to write status: %v", err)
- }
- if trInfo != nil {
- trInfo.tr.Finish()
- }
-}
-
-// Stop stops the gRPC server. It immediately closes all open
-// connections and listeners.
-// It cancels all active RPCs on the server side and the corresponding
-// pending RPCs on the client side will get notified by connection
-// errors.
-func (s *Server) Stop() {
- s.mu.Lock()
- listeners := s.lis
- s.lis = nil
- st := s.conns
- s.conns = nil
- // interrupt GracefulStop if Stop and GracefulStop are called concurrently.
- s.cv.Broadcast()
- s.mu.Unlock()
-
- for lis := range listeners {
- lis.Close()
- }
- for c := range st {
- c.Close()
- }
-
- s.mu.Lock()
- s.cancel()
- if s.events != nil {
- s.events.Finish()
- s.events = nil
- }
- s.mu.Unlock()
-}
-
-// GracefulStop stops the gRPC server gracefully. It stops the server to accept new
-// connections and RPCs and blocks until all the pending RPCs are finished.
-func (s *Server) GracefulStop() {
- s.mu.Lock()
- defer s.mu.Unlock()
- if s.conns == nil {
- return
- }
- for lis := range s.lis {
- lis.Close()
- }
- s.lis = nil
- s.cancel()
- if !s.drain {
- for c := range s.conns {
- c.(transport.ServerTransport).Drain()
- }
- s.drain = true
- }
- for len(s.conns) != 0 {
- s.cv.Wait()
- }
- s.conns = nil
- if s.events != nil {
- s.events.Finish()
- s.events = nil
- }
-}
-
-func init() {
- internal.TestingCloseConns = func(arg interface{}) {
- arg.(*Server).testingCloseConns()
- }
- internal.TestingUseHandlerImpl = func(arg interface{}) {
- arg.(*Server).opts.useHandlerImpl = true
- }
-}
-
-// testingCloseConns closes all existing transports but keeps s.lis
-// accepting new connections.
-func (s *Server) testingCloseConns() {
- s.mu.Lock()
- for c := range s.conns {
- c.Close()
- delete(s.conns, c)
- }
- s.mu.Unlock()
-}
-
-// SetHeader sets the header metadata.
-// When called multiple times, all the provided metadata will be merged.
-// All the metadata will be sent out when one of the following happens:
-// - grpc.SendHeader() is called;
-// - The first response is sent out;
-// - An RPC status is sent out (error or success).
-func SetHeader(ctx context.Context, md metadata.MD) error {
- if md.Len() == 0 {
- return nil
- }
- stream, ok := transport.StreamFromContext(ctx)
- if !ok {
- return Errorf(codes.Internal, "grpc: failed to fetch the stream from the context %v", ctx)
- }
- return stream.SetHeader(md)
-}
-
-// SendHeader sends header metadata. It may be called at most once.
-// The provided md and headers set by SetHeader() will be sent.
-func SendHeader(ctx context.Context, md metadata.MD) error {
- stream, ok := transport.StreamFromContext(ctx)
- if !ok {
- return Errorf(codes.Internal, "grpc: failed to fetch the stream from the context %v", ctx)
- }
- t := stream.ServerTransport()
- if t == nil {
- grpclog.Fatalf("grpc: SendHeader: %v has no ServerTransport to send header metadata.", stream)
- }
- if err := t.WriteHeader(stream, md); err != nil {
- return toRPCErr(err)
- }
- return nil
-}
-
-// SetTrailer sets the trailer metadata that will be sent when an RPC returns.
-// When called more than once, all the provided metadata will be merged.
-func SetTrailer(ctx context.Context, md metadata.MD) error {
- if md.Len() == 0 {
- return nil
- }
- stream, ok := transport.StreamFromContext(ctx)
- if !ok {
- return Errorf(codes.Internal, "grpc: failed to fetch the stream from the context %v", ctx)
- }
- return stream.SetTrailer(md)
-}
diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go
deleted file mode 100644
index 46810544f..000000000
--- a/vendor/google.golang.org/grpc/stream.go
+++ /dev/null
@@ -1,526 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package grpc
-
-import (
- "bytes"
- "errors"
- "io"
- "math"
- "sync"
- "time"
-
- "golang.org/x/net/context"
- "golang.org/x/net/trace"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/metadata"
- "google.golang.org/grpc/transport"
-)
-
-// StreamHandler defines the handler called by gRPC server to complete the
-// execution of a streaming RPC.
-type StreamHandler func(srv interface{}, stream ServerStream) error
-
-// StreamDesc represents a streaming RPC service's method specification.
-type StreamDesc struct {
- StreamName string
- Handler StreamHandler
-
- // At least one of these is true.
- ServerStreams bool
- ClientStreams bool
-}
-
-// Stream defines the common interface a client or server stream has to satisfy.
-type Stream interface {
- // Context returns the context for this stream.
- Context() context.Context
- // SendMsg blocks until it sends m, the stream is done or the stream
- // breaks.
- // On error, it aborts the stream and returns an RPC status on client
- // side. On server side, it simply returns the error to the caller.
- // SendMsg is called by generated code. Also Users can call SendMsg
- // directly when it is really needed in their use cases.
- SendMsg(m interface{}) error
- // RecvMsg blocks until it receives a message or the stream is
- // done. On client side, it returns io.EOF when the stream is done. On
- // any other error, it aborts the stream and returns an RPC status. On
- // server side, it simply returns the error to the caller.
- RecvMsg(m interface{}) error
-}
-
-// ClientStream defines the interface a client stream has to satisfy.
-type ClientStream interface {
- // Header returns the header metadata received from the server if there
- // is any. It blocks if the metadata is not ready to read.
- Header() (metadata.MD, error)
- // Trailer returns the trailer metadata from the server, if there is any.
- // It must only be called after stream.CloseAndRecv has returned, or
- // stream.Recv has returned a non-nil error (including io.EOF).
- Trailer() metadata.MD
- // CloseSend closes the send direction of the stream. It closes the stream
- // when non-nil error is met.
- CloseSend() error
- Stream
-}
-
-// NewClientStream creates a new Stream for the client side. This is called
-// by generated code.
-func NewClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (ClientStream, error) {
- if cc.dopts.streamInt != nil {
- return cc.dopts.streamInt(ctx, desc, cc, method, newClientStream, opts...)
- }
- return newClientStream(ctx, desc, cc, method, opts...)
-}
-
-func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (_ ClientStream, err error) {
- var (
- t transport.ClientTransport
- s *transport.Stream
- put func()
- )
- c := defaultCallInfo
- for _, o := range opts {
- if err := o.before(&c); err != nil {
- return nil, toRPCErr(err)
- }
- }
- callHdr := &transport.CallHdr{
- Host: cc.authority,
- Method: method,
- Flush: desc.ServerStreams && desc.ClientStreams,
- }
- if cc.dopts.cp != nil {
- callHdr.SendCompress = cc.dopts.cp.Type()
- }
- var trInfo traceInfo
- if EnableTracing {
- trInfo.tr = trace.New("grpc.Sent."+methodFamily(method), method)
- trInfo.firstLine.client = true
- if deadline, ok := ctx.Deadline(); ok {
- trInfo.firstLine.deadline = deadline.Sub(time.Now())
- }
- trInfo.tr.LazyLog(&trInfo.firstLine, false)
- ctx = trace.NewContext(ctx, trInfo.tr)
- defer func() {
- if err != nil {
- // Need to call tr.finish() if error is returned.
- // Because tr will not be returned to caller.
- trInfo.tr.LazyPrintf("RPC: [%v]", err)
- trInfo.tr.SetError()
- trInfo.tr.Finish()
- }
- }()
- }
- gopts := BalancerGetOptions{
- BlockingWait: !c.failFast,
- }
- for {
- t, put, err = cc.getTransport(ctx, gopts)
- if err != nil {
- // TODO(zhaoq): Probably revisit the error handling.
- if _, ok := err.(*rpcError); ok {
- return nil, err
- }
- if err == errConnClosing || err == errConnUnavailable {
- if c.failFast {
- return nil, Errorf(codes.Unavailable, "%v", err)
- }
- continue
- }
- // All the other errors are treated as Internal errors.
- return nil, Errorf(codes.Internal, "%v", err)
- }
-
- s, err = t.NewStream(ctx, callHdr)
- if err != nil {
- if put != nil {
- put()
- put = nil
- }
- if _, ok := err.(transport.ConnectionError); ok || err == transport.ErrStreamDrain {
- if c.failFast {
- return nil, toRPCErr(err)
- }
- continue
- }
- return nil, toRPCErr(err)
- }
- break
- }
- cs := &clientStream{
- opts: opts,
- c: c,
- desc: desc,
- codec: cc.dopts.codec,
- cp: cc.dopts.cp,
- dc: cc.dopts.dc,
-
- put: put,
- t: t,
- s: s,
- p: &parser{r: s},
-
- tracing: EnableTracing,
- trInfo: trInfo,
- }
- if cc.dopts.cp != nil {
- cs.cbuf = new(bytes.Buffer)
- }
- // Listen on ctx.Done() to detect cancellation and s.Done() to detect normal termination
- // when there is no pending I/O operations on this stream.
- go func() {
- select {
- case <-t.Error():
- // Incur transport error, simply exit.
- case <-s.Done():
- // TODO: The trace of the RPC is terminated here when there is no pending
- // I/O, which is probably not the optimal solution.
- if s.StatusCode() == codes.OK {
- cs.finish(nil)
- } else {
- cs.finish(Errorf(s.StatusCode(), "%s", s.StatusDesc()))
- }
- cs.closeTransportStream(nil)
- case <-s.GoAway():
- cs.finish(errConnDrain)
- cs.closeTransportStream(errConnDrain)
- case <-s.Context().Done():
- err := s.Context().Err()
- cs.finish(err)
- cs.closeTransportStream(transport.ContextErr(err))
- }
- }()
- return cs, nil
-}
-
-// clientStream implements a client side Stream.
-type clientStream struct {
- opts []CallOption
- c callInfo
- t transport.ClientTransport
- s *transport.Stream
- p *parser
- desc *StreamDesc
- codec Codec
- cp Compressor
- cbuf *bytes.Buffer
- dc Decompressor
-
- tracing bool // set to EnableTracing when the clientStream is created.
-
- mu sync.Mutex
- put func()
- closed bool
- // trInfo.tr is set when the clientStream is created (if EnableTracing is true),
- // and is set to nil when the clientStream's finish method is called.
- trInfo traceInfo
-}
-
-func (cs *clientStream) Context() context.Context {
- return cs.s.Context()
-}
-
-func (cs *clientStream) Header() (metadata.MD, error) {
- m, err := cs.s.Header()
- if err != nil {
- if _, ok := err.(transport.ConnectionError); !ok {
- cs.closeTransportStream(err)
- }
- }
- return m, err
-}
-
-func (cs *clientStream) Trailer() metadata.MD {
- return cs.s.Trailer()
-}
-
-func (cs *clientStream) SendMsg(m interface{}) (err error) {
- if cs.tracing {
- cs.mu.Lock()
- if cs.trInfo.tr != nil {
- cs.trInfo.tr.LazyLog(&payload{sent: true, msg: m}, true)
- }
- cs.mu.Unlock()
- }
- defer func() {
- if err != nil {
- cs.finish(err)
- }
- if err == nil {
- return
- }
- if err == io.EOF {
- // Specialize the process for server streaming. SendMesg is only called
- // once when creating the stream object. io.EOF needs to be skipped when
- // the rpc is early finished (before the stream object is created.).
- // TODO: It is probably better to move this into the generated code.
- if !cs.desc.ClientStreams && cs.desc.ServerStreams {
- err = nil
- }
- return
- }
- if _, ok := err.(transport.ConnectionError); !ok {
- cs.closeTransportStream(err)
- }
- err = toRPCErr(err)
- }()
- out, err := encode(cs.codec, m, cs.cp, cs.cbuf)
- defer func() {
- if cs.cbuf != nil {
- cs.cbuf.Reset()
- }
- }()
- if err != nil {
- return Errorf(codes.Internal, "grpc: %v", err)
- }
- return cs.t.Write(cs.s, out, &transport.Options{Last: false})
-}
-
-func (cs *clientStream) RecvMsg(m interface{}) (err error) {
- err = recv(cs.p, cs.codec, cs.s, cs.dc, m, math.MaxInt32)
- defer func() {
- // err != nil indicates the termination of the stream.
- if err != nil {
- cs.finish(err)
- }
- }()
- if err == nil {
- if cs.tracing {
- cs.mu.Lock()
- if cs.trInfo.tr != nil {
- cs.trInfo.tr.LazyLog(&payload{sent: false, msg: m}, true)
- }
- cs.mu.Unlock()
- }
- if !cs.desc.ClientStreams || cs.desc.ServerStreams {
- return
- }
- // Special handling for client streaming rpc.
- err = recv(cs.p, cs.codec, cs.s, cs.dc, m, math.MaxInt32)
- cs.closeTransportStream(err)
- if err == nil {
- return toRPCErr(errors.New("grpc: client streaming protocol violation: get <nil>, want <EOF>"))
- }
- if err == io.EOF {
- if cs.s.StatusCode() == codes.OK {
- cs.finish(err)
- return nil
- }
- return Errorf(cs.s.StatusCode(), "%s", cs.s.StatusDesc())
- }
- return toRPCErr(err)
- }
- if _, ok := err.(transport.ConnectionError); !ok {
- cs.closeTransportStream(err)
- }
- if err == io.EOF {
- if cs.s.StatusCode() == codes.OK {
- // Returns io.EOF to indicate the end of the stream.
- return
- }
- return Errorf(cs.s.StatusCode(), "%s", cs.s.StatusDesc())
- }
- return toRPCErr(err)
-}
-
-func (cs *clientStream) CloseSend() (err error) {
- err = cs.t.Write(cs.s, nil, &transport.Options{Last: true})
- defer func() {
- if err != nil {
- cs.finish(err)
- }
- }()
- if err == nil || err == io.EOF {
- return nil
- }
- if _, ok := err.(transport.ConnectionError); !ok {
- cs.closeTransportStream(err)
- }
- err = toRPCErr(err)
- return
-}
-
-func (cs *clientStream) closeTransportStream(err error) {
- cs.mu.Lock()
- if cs.closed {
- cs.mu.Unlock()
- return
- }
- cs.closed = true
- cs.mu.Unlock()
- cs.t.CloseStream(cs.s, err)
-}
-
-func (cs *clientStream) finish(err error) {
- cs.mu.Lock()
- defer cs.mu.Unlock()
- for _, o := range cs.opts {
- o.after(&cs.c)
- }
- if cs.put != nil {
- cs.put()
- cs.put = nil
- }
- if !cs.tracing {
- return
- }
- if cs.trInfo.tr != nil {
- if err == nil || err == io.EOF {
- cs.trInfo.tr.LazyPrintf("RPC: [OK]")
- } else {
- cs.trInfo.tr.LazyPrintf("RPC: [%v]", err)
- cs.trInfo.tr.SetError()
- }
- cs.trInfo.tr.Finish()
- cs.trInfo.tr = nil
- }
-}
-
-// ServerStream defines the interface a server stream has to satisfy.
-type ServerStream interface {
- // SetHeader sets the header metadata. It may be called multiple times.
- // When call multiple times, all the provided metadata will be merged.
- // All the metadata will be sent out when one of the following happens:
- // - ServerStream.SendHeader() is called;
- // - The first response is sent out;
- // - An RPC status is sent out (error or success).
- SetHeader(metadata.MD) error
- // SendHeader sends the header metadata.
- // The provided md and headers set by SetHeader() will be sent.
- // It fails if called multiple times.
- SendHeader(metadata.MD) error
- // SetTrailer sets the trailer metadata which will be sent with the RPC status.
- // When called more than once, all the provided metadata will be merged.
- SetTrailer(metadata.MD)
- Stream
-}
-
-// serverStream implements a server side Stream.
-type serverStream struct {
- t transport.ServerTransport
- s *transport.Stream
- p *parser
- codec Codec
- cp Compressor
- dc Decompressor
- cbuf *bytes.Buffer
- maxMsgSize int
- statusCode codes.Code
- statusDesc string
- trInfo *traceInfo
-
- mu sync.Mutex // protects trInfo.tr after the service handler runs.
-}
-
-func (ss *serverStream) Context() context.Context {
- return ss.s.Context()
-}
-
-func (ss *serverStream) SetHeader(md metadata.MD) error {
- if md.Len() == 0 {
- return nil
- }
- return ss.s.SetHeader(md)
-}
-
-func (ss *serverStream) SendHeader(md metadata.MD) error {
- return ss.t.WriteHeader(ss.s, md)
-}
-
-func (ss *serverStream) SetTrailer(md metadata.MD) {
- if md.Len() == 0 {
- return
- }
- ss.s.SetTrailer(md)
- return
-}
-
-func (ss *serverStream) SendMsg(m interface{}) (err error) {
- defer func() {
- if ss.trInfo != nil {
- ss.mu.Lock()
- if ss.trInfo.tr != nil {
- if err == nil {
- ss.trInfo.tr.LazyLog(&payload{sent: true, msg: m}, true)
- } else {
- ss.trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true)
- ss.trInfo.tr.SetError()
- }
- }
- ss.mu.Unlock()
- }
- }()
- out, err := encode(ss.codec, m, ss.cp, ss.cbuf)
- defer func() {
- if ss.cbuf != nil {
- ss.cbuf.Reset()
- }
- }()
- if err != nil {
- err = Errorf(codes.Internal, "grpc: %v", err)
- return err
- }
- if err := ss.t.Write(ss.s, out, &transport.Options{Last: false}); err != nil {
- return toRPCErr(err)
- }
- return nil
-}
-
-func (ss *serverStream) RecvMsg(m interface{}) (err error) {
- defer func() {
- if ss.trInfo != nil {
- ss.mu.Lock()
- if ss.trInfo.tr != nil {
- if err == nil {
- ss.trInfo.tr.LazyLog(&payload{sent: false, msg: m}, true)
- } else if err != io.EOF {
- ss.trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true)
- ss.trInfo.tr.SetError()
- }
- }
- ss.mu.Unlock()
- }
- }()
- if err := recv(ss.p, ss.codec, ss.s, ss.dc, m, ss.maxMsgSize); err != nil {
- if err == io.EOF {
- return err
- }
- if err == io.ErrUnexpectedEOF {
- err = Errorf(codes.Internal, io.ErrUnexpectedEOF.Error())
- }
- return toRPCErr(err)
- }
- return nil
-}
diff --git a/vendor/google.golang.org/grpc/trace.go b/vendor/google.golang.org/grpc/trace.go
deleted file mode 100644
index f6747e1df..000000000
--- a/vendor/google.golang.org/grpc/trace.go
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package grpc
-
-import (
- "bytes"
- "fmt"
- "io"
- "net"
- "strings"
- "time"
-
- "golang.org/x/net/trace"
-)
-
-// EnableTracing controls whether to trace RPCs using the golang.org/x/net/trace package.
-// This should only be set before any RPCs are sent or received by this program.
-var EnableTracing = true
-
-// methodFamily returns the trace family for the given method.
-// It turns "/pkg.Service/GetFoo" into "pkg.Service".
-func methodFamily(m string) string {
- m = strings.TrimPrefix(m, "/") // remove leading slash
- if i := strings.Index(m, "/"); i >= 0 {
- m = m[:i] // remove everything from second slash
- }
- if i := strings.LastIndex(m, "."); i >= 0 {
- m = m[i+1:] // cut down to last dotted component
- }
- return m
-}
-
-// traceInfo contains tracing information for an RPC.
-type traceInfo struct {
- tr trace.Trace
- firstLine firstLine
-}
-
-// firstLine is the first line of an RPC trace.
-type firstLine struct {
- client bool // whether this is a client (outgoing) RPC
- remoteAddr net.Addr
- deadline time.Duration // may be zero
-}
-
-func (f *firstLine) String() string {
- var line bytes.Buffer
- io.WriteString(&line, "RPC: ")
- if f.client {
- io.WriteString(&line, "to")
- } else {
- io.WriteString(&line, "from")
- }
- fmt.Fprintf(&line, " %v deadline:", f.remoteAddr)
- if f.deadline != 0 {
- fmt.Fprint(&line, f.deadline)
- } else {
- io.WriteString(&line, "none")
- }
- return line.String()
-}
-
-// payload represents an RPC request or response payload.
-type payload struct {
- sent bool // whether this is an outgoing payload
- msg interface{} // e.g. a proto.Message
- // TODO(dsymonds): add stringifying info to codec, and limit how much we hold here?
-}
-
-func (p payload) String() string {
- if p.sent {
- return fmt.Sprintf("sent: %v", p.msg)
- }
- return fmt.Sprintf("recv: %v", p.msg)
-}
-
-type fmtStringer struct {
- format string
- a []interface{}
-}
-
-func (f *fmtStringer) String() string {
- return fmt.Sprintf(f.format, f.a...)
-}
-
-type stringer string
-
-func (s stringer) String() string { return string(s) }
diff --git a/vendor/google.golang.org/grpc/transport/control.go b/vendor/google.golang.org/grpc/transport/control.go
deleted file mode 100644
index 4ef0830b5..000000000
--- a/vendor/google.golang.org/grpc/transport/control.go
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package transport
-
-import (
- "fmt"
- "sync"
-
- "golang.org/x/net/http2"
-)
-
-const (
- // The default value of flow control window size in HTTP2 spec.
- defaultWindowSize = 65535
- // The initial window size for flow control.
- initialWindowSize = defaultWindowSize // for an RPC
- initialConnWindowSize = defaultWindowSize * 16 // for a connection
-)
-
-// The following defines various control items which could flow through
-// the control buffer of transport. They represent different aspects of
-// control tasks, e.g., flow control, settings, streaming resetting, etc.
-type windowUpdate struct {
- streamID uint32
- increment uint32
-}
-
-func (*windowUpdate) item() {}
-
-type settings struct {
- ack bool
- ss []http2.Setting
-}
-
-func (*settings) item() {}
-
-type resetStream struct {
- streamID uint32
- code http2.ErrCode
-}
-
-func (*resetStream) item() {}
-
-type goAway struct {
-}
-
-func (*goAway) item() {}
-
-type flushIO struct {
-}
-
-func (*flushIO) item() {}
-
-type ping struct {
- ack bool
- data [8]byte
-}
-
-func (*ping) item() {}
-
-// quotaPool is a pool which accumulates the quota and sends it to acquire()
-// when it is available.
-type quotaPool struct {
- c chan int
-
- mu sync.Mutex
- quota int
-}
-
-// newQuotaPool creates a quotaPool which has quota q available to consume.
-func newQuotaPool(q int) *quotaPool {
- qb := &quotaPool{
- c: make(chan int, 1),
- }
- if q > 0 {
- qb.c <- q
- } else {
- qb.quota = q
- }
- return qb
-}
-
-// add adds n to the available quota and tries to send it on acquire.
-func (qb *quotaPool) add(n int) {
- qb.mu.Lock()
- defer qb.mu.Unlock()
- qb.quota += n
- if qb.quota <= 0 {
- return
- }
- select {
- case qb.c <- qb.quota:
- qb.quota = 0
- default:
- }
-}
-
-// cancel cancels the pending quota sent on acquire, if any.
-func (qb *quotaPool) cancel() {
- qb.mu.Lock()
- defer qb.mu.Unlock()
- select {
- case n := <-qb.c:
- qb.quota += n
- default:
- }
-}
-
-// reset cancels the pending quota sent on acquired, incremented by v and sends
-// it back on acquire.
-func (qb *quotaPool) reset(v int) {
- qb.mu.Lock()
- defer qb.mu.Unlock()
- select {
- case n := <-qb.c:
- qb.quota += n
- default:
- }
- qb.quota += v
- if qb.quota <= 0 {
- return
- }
- select {
- case qb.c <- qb.quota:
- qb.quota = 0
- default:
- }
-}
-
-// acquire returns the channel on which available quota amounts are sent.
-func (qb *quotaPool) acquire() <-chan int {
- return qb.c
-}
-
-// inFlow deals with inbound flow control
-type inFlow struct {
- // The inbound flow control limit for pending data.
- limit uint32
-
- mu sync.Mutex
- // pendingData is the overall data which have been received but not been
- // consumed by applications.
- pendingData uint32
- // The amount of data the application has consumed but grpc has not sent
- // window update for them. Used to reduce window update frequency.
- pendingUpdate uint32
-}
-
-// onData is invoked when some data frame is received. It updates pendingData.
-func (f *inFlow) onData(n uint32) error {
- f.mu.Lock()
- defer f.mu.Unlock()
- f.pendingData += n
- if f.pendingData+f.pendingUpdate > f.limit {
- return fmt.Errorf("received %d-bytes data exceeding the limit %d bytes", f.pendingData+f.pendingUpdate, f.limit)
- }
- return nil
-}
-
-// onRead is invoked when the application reads the data. It returns the window size
-// to be sent to the peer.
-func (f *inFlow) onRead(n uint32) uint32 {
- f.mu.Lock()
- defer f.mu.Unlock()
- if f.pendingData == 0 {
- return 0
- }
- f.pendingData -= n
- f.pendingUpdate += n
- if f.pendingUpdate >= f.limit/4 {
- wu := f.pendingUpdate
- f.pendingUpdate = 0
- return wu
- }
- return 0
-}
-
-func (f *inFlow) resetPendingData() uint32 {
- f.mu.Lock()
- defer f.mu.Unlock()
- n := f.pendingData
- f.pendingData = 0
- return n
-}
diff --git a/vendor/google.golang.org/grpc/transport/go16.go b/vendor/google.golang.org/grpc/transport/go16.go
deleted file mode 100644
index ee1c46bad..000000000
--- a/vendor/google.golang.org/grpc/transport/go16.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// +build go1.6,!go1.7
-
-/*
- * Copyright 2016, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package transport
-
-import (
- "net"
-
- "golang.org/x/net/context"
-)
-
-// dialContext connects to the address on the named network.
-func dialContext(ctx context.Context, network, address string) (net.Conn, error) {
- return (&net.Dialer{Cancel: ctx.Done()}).Dial(network, address)
-}
diff --git a/vendor/google.golang.org/grpc/transport/go17.go b/vendor/google.golang.org/grpc/transport/go17.go
deleted file mode 100644
index 356f13ff1..000000000
--- a/vendor/google.golang.org/grpc/transport/go17.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// +build go1.7
-
-/*
- * Copyright 2016, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package transport
-
-import (
- "net"
-
- "golang.org/x/net/context"
-)
-
-// dialContext connects to the address on the named network.
-func dialContext(ctx context.Context, network, address string) (net.Conn, error) {
- return (&net.Dialer{}).DialContext(ctx, network, address)
-}
diff --git a/vendor/google.golang.org/grpc/transport/handler_server.go b/vendor/google.golang.org/grpc/transport/handler_server.go
deleted file mode 100644
index 114e34906..000000000
--- a/vendor/google.golang.org/grpc/transport/handler_server.go
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * Copyright 2016, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-// This file is the implementation of a gRPC server using HTTP/2 which
-// uses the standard Go http2 Server implementation (via the
-// http.Handler interface), rather than speaking low-level HTTP/2
-// frames itself. It is the implementation of *grpc.Server.ServeHTTP.
-
-package transport
-
-import (
- "errors"
- "fmt"
- "io"
- "net"
- "net/http"
- "strings"
- "sync"
- "time"
-
- "golang.org/x/net/context"
- "golang.org/x/net/http2"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/credentials"
- "google.golang.org/grpc/metadata"
- "google.golang.org/grpc/peer"
-)
-
-// NewServerHandlerTransport returns a ServerTransport handling gRPC
-// from inside an http.Handler. It requires that the http Server
-// supports HTTP/2.
-func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request) (ServerTransport, error) {
- if r.ProtoMajor != 2 {
- return nil, errors.New("gRPC requires HTTP/2")
- }
- if r.Method != "POST" {
- return nil, errors.New("invalid gRPC request method")
- }
- if !validContentType(r.Header.Get("Content-Type")) {
- return nil, errors.New("invalid gRPC request content-type")
- }
- if _, ok := w.(http.Flusher); !ok {
- return nil, errors.New("gRPC requires a ResponseWriter supporting http.Flusher")
- }
- if _, ok := w.(http.CloseNotifier); !ok {
- return nil, errors.New("gRPC requires a ResponseWriter supporting http.CloseNotifier")
- }
-
- st := &serverHandlerTransport{
- rw: w,
- req: r,
- closedCh: make(chan struct{}),
- writes: make(chan func()),
- }
-
- if v := r.Header.Get("grpc-timeout"); v != "" {
- to, err := decodeTimeout(v)
- if err != nil {
- return nil, streamErrorf(codes.Internal, "malformed time-out: %v", err)
- }
- st.timeoutSet = true
- st.timeout = to
- }
-
- var metakv []string
- if r.Host != "" {
- metakv = append(metakv, ":authority", r.Host)
- }
- for k, vv := range r.Header {
- k = strings.ToLower(k)
- if isReservedHeader(k) && !isWhitelistedPseudoHeader(k) {
- continue
- }
- for _, v := range vv {
- if k == "user-agent" {
- // user-agent is special. Copying logic of http_util.go.
- if i := strings.LastIndex(v, " "); i == -1 {
- // There is no application user agent string being set
- continue
- } else {
- v = v[:i]
- }
- }
- metakv = append(metakv, k, v)
- }
- }
- st.headerMD = metadata.Pairs(metakv...)
-
- return st, nil
-}
-
-// serverHandlerTransport is an implementation of ServerTransport
-// which replies to exactly one gRPC request (exactly one HTTP request),
-// using the net/http.Handler interface. This http.Handler is guaranteed
-// at this point to be speaking over HTTP/2, so it's able to speak valid
-// gRPC.
-type serverHandlerTransport struct {
- rw http.ResponseWriter
- req *http.Request
- timeoutSet bool
- timeout time.Duration
- didCommonHeaders bool
-
- headerMD metadata.MD
-
- closeOnce sync.Once
- closedCh chan struct{} // closed on Close
-
- // writes is a channel of code to run serialized in the
- // ServeHTTP (HandleStreams) goroutine. The channel is closed
- // when WriteStatus is called.
- writes chan func()
-}
-
-func (ht *serverHandlerTransport) Close() error {
- ht.closeOnce.Do(ht.closeCloseChanOnce)
- return nil
-}
-
-func (ht *serverHandlerTransport) closeCloseChanOnce() { close(ht.closedCh) }
-
-func (ht *serverHandlerTransport) RemoteAddr() net.Addr { return strAddr(ht.req.RemoteAddr) }
-
-// strAddr is a net.Addr backed by either a TCP "ip:port" string, or
-// the empty string if unknown.
-type strAddr string
-
-func (a strAddr) Network() string {
- if a != "" {
- // Per the documentation on net/http.Request.RemoteAddr, if this is
- // set, it's set to the IP:port of the peer (hence, TCP):
- // https://golang.org/pkg/net/http/#Request
- //
- // If we want to support Unix sockets later, we can
- // add our own grpc-specific convention within the
- // grpc codebase to set RemoteAddr to a different
- // format, or probably better: we can attach it to the
- // context and use that from serverHandlerTransport.RemoteAddr.
- return "tcp"
- }
- return ""
-}
-
-func (a strAddr) String() string { return string(a) }
-
-// do runs fn in the ServeHTTP goroutine.
-func (ht *serverHandlerTransport) do(fn func()) error {
- select {
- case ht.writes <- fn:
- return nil
- case <-ht.closedCh:
- return ErrConnClosing
- }
-}
-
-func (ht *serverHandlerTransport) WriteStatus(s *Stream, statusCode codes.Code, statusDesc string) error {
- err := ht.do(func() {
- ht.writeCommonHeaders(s)
-
- // And flush, in case no header or body has been sent yet.
- // This forces a separation of headers and trailers if this is the
- // first call (for example, in end2end tests's TestNoService).
- ht.rw.(http.Flusher).Flush()
-
- h := ht.rw.Header()
- h.Set("Grpc-Status", fmt.Sprintf("%d", statusCode))
- if statusDesc != "" {
- h.Set("Grpc-Message", encodeGrpcMessage(statusDesc))
- }
- if md := s.Trailer(); len(md) > 0 {
- for k, vv := range md {
- // Clients don't tolerate reading restricted headers after some non restricted ones were sent.
- if isReservedHeader(k) {
- continue
- }
- for _, v := range vv {
- // http2 ResponseWriter mechanism to
- // send undeclared Trailers after the
- // headers have possibly been written.
- h.Add(http2.TrailerPrefix+k, v)
- }
- }
- }
- })
- close(ht.writes)
- return err
-}
-
-// writeCommonHeaders sets common headers on the first write
-// call (Write, WriteHeader, or WriteStatus).
-func (ht *serverHandlerTransport) writeCommonHeaders(s *Stream) {
- if ht.didCommonHeaders {
- return
- }
- ht.didCommonHeaders = true
-
- h := ht.rw.Header()
- h["Date"] = nil // suppress Date to make tests happy; TODO: restore
- h.Set("Content-Type", "application/grpc")
-
- // Predeclare trailers we'll set later in WriteStatus (after the body).
- // This is a SHOULD in the HTTP RFC, and the way you add (known)
- // Trailers per the net/http.ResponseWriter contract.
- // See https://golang.org/pkg/net/http/#ResponseWriter
- // and https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
- h.Add("Trailer", "Grpc-Status")
- h.Add("Trailer", "Grpc-Message")
-
- if s.sendCompress != "" {
- h.Set("Grpc-Encoding", s.sendCompress)
- }
-}
-
-func (ht *serverHandlerTransport) Write(s *Stream, data []byte, opts *Options) error {
- return ht.do(func() {
- ht.writeCommonHeaders(s)
- ht.rw.Write(data)
- if !opts.Delay {
- ht.rw.(http.Flusher).Flush()
- }
- })
-}
-
-func (ht *serverHandlerTransport) WriteHeader(s *Stream, md metadata.MD) error {
- return ht.do(func() {
- ht.writeCommonHeaders(s)
- h := ht.rw.Header()
- for k, vv := range md {
- // Clients don't tolerate reading restricted headers after some non restricted ones were sent.
- if isReservedHeader(k) {
- continue
- }
- for _, v := range vv {
- h.Add(k, v)
- }
- }
- ht.rw.WriteHeader(200)
- ht.rw.(http.Flusher).Flush()
- })
-}
-
-func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream)) {
- // With this transport type there will be exactly 1 stream: this HTTP request.
-
- var ctx context.Context
- var cancel context.CancelFunc
- if ht.timeoutSet {
- ctx, cancel = context.WithTimeout(context.Background(), ht.timeout)
- } else {
- ctx, cancel = context.WithCancel(context.Background())
- }
-
- // requestOver is closed when either the request's context is done
- // or the status has been written via WriteStatus.
- requestOver := make(chan struct{})
-
- // clientGone receives a single value if peer is gone, either
- // because the underlying connection is dead or because the
- // peer sends an http2 RST_STREAM.
- clientGone := ht.rw.(http.CloseNotifier).CloseNotify()
- go func() {
- select {
- case <-requestOver:
- return
- case <-ht.closedCh:
- case <-clientGone:
- }
- cancel()
- }()
-
- req := ht.req
-
- s := &Stream{
- id: 0, // irrelevant
- windowHandler: func(int) {}, // nothing
- cancel: cancel,
- buf: newRecvBuffer(),
- st: ht,
- method: req.URL.Path,
- recvCompress: req.Header.Get("grpc-encoding"),
- }
- pr := &peer.Peer{
- Addr: ht.RemoteAddr(),
- }
- if req.TLS != nil {
- pr.AuthInfo = credentials.TLSInfo{State: *req.TLS}
- }
- ctx = metadata.NewContext(ctx, ht.headerMD)
- ctx = peer.NewContext(ctx, pr)
- s.ctx = newContextWithStream(ctx, s)
- s.dec = &recvBufferReader{ctx: s.ctx, recv: s.buf}
-
- // readerDone is closed when the Body.Read-ing goroutine exits.
- readerDone := make(chan struct{})
- go func() {
- defer close(readerDone)
-
- // TODO: minimize garbage, optimize recvBuffer code/ownership
- const readSize = 8196
- for buf := make([]byte, readSize); ; {
- n, err := req.Body.Read(buf)
- if n > 0 {
- s.buf.put(&recvMsg{data: buf[:n:n]})
- buf = buf[n:]
- }
- if err != nil {
- s.buf.put(&recvMsg{err: mapRecvMsgError(err)})
- return
- }
- if len(buf) == 0 {
- buf = make([]byte, readSize)
- }
- }
- }()
-
- // startStream is provided by the *grpc.Server's serveStreams.
- // It starts a goroutine serving s and exits immediately.
- // The goroutine that is started is the one that then calls
- // into ht, calling WriteHeader, Write, WriteStatus, Close, etc.
- startStream(s)
-
- ht.runStream()
- close(requestOver)
-
- // Wait for reading goroutine to finish.
- req.Body.Close()
- <-readerDone
-}
-
-func (ht *serverHandlerTransport) runStream() {
- for {
- select {
- case fn, ok := <-ht.writes:
- if !ok {
- return
- }
- fn()
- case <-ht.closedCh:
- return
- }
- }
-}
-
-func (ht *serverHandlerTransport) Drain() {
- panic("Drain() is not implemented")
-}
-
-// mapRecvMsgError returns the non-nil err into the appropriate
-// error value as expected by callers of *grpc.parser.recvMsg.
-// In particular, in can only be:
-// * io.EOF
-// * io.ErrUnexpectedEOF
-// * of type transport.ConnectionError
-// * of type transport.StreamError
-func mapRecvMsgError(err error) error {
- if err == io.EOF || err == io.ErrUnexpectedEOF {
- return err
- }
- if se, ok := err.(http2.StreamError); ok {
- if code, ok := http2ErrConvTab[se.Code]; ok {
- return StreamError{
- Code: code,
- Desc: se.Error(),
- }
- }
- }
- return connectionErrorf(true, err, err.Error())
-}
diff --git a/vendor/google.golang.org/grpc/transport/http2_client.go b/vendor/google.golang.org/grpc/transport/http2_client.go
deleted file mode 100644
index 2b0f68016..000000000
--- a/vendor/google.golang.org/grpc/transport/http2_client.go
+++ /dev/null
@@ -1,1072 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package transport
-
-import (
- "bytes"
- "fmt"
- "io"
- "math"
- "net"
- "strings"
- "sync"
- "time"
-
- "golang.org/x/net/context"
- "golang.org/x/net/http2"
- "golang.org/x/net/http2/hpack"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/credentials"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/metadata"
- "google.golang.org/grpc/peer"
-)
-
-// http2Client implements the ClientTransport interface with HTTP2.
-type http2Client struct {
- target string // server name/addr
- userAgent string
- md interface{}
- conn net.Conn // underlying communication channel
- authInfo credentials.AuthInfo // auth info about the connection
- nextID uint32 // the next stream ID to be used
-
- // writableChan synchronizes write access to the transport.
- // A writer acquires the write lock by sending a value on writableChan
- // and releases it by receiving from writableChan.
- writableChan chan int
- // shutdownChan is closed when Close is called.
- // Blocking operations should select on shutdownChan to avoid
- // blocking forever after Close.
- // TODO(zhaoq): Maybe have a channel context?
- shutdownChan chan struct{}
- // errorChan is closed to notify the I/O error to the caller.
- errorChan chan struct{}
- // goAway is closed to notify the upper layer (i.e., addrConn.transportMonitor)
- // that the server sent GoAway on this transport.
- goAway chan struct{}
-
- framer *framer
- hBuf *bytes.Buffer // the buffer for HPACK encoding
- hEnc *hpack.Encoder // HPACK encoder
-
- // controlBuf delivers all the control related tasks (e.g., window
- // updates, reset streams, and various settings) to the controller.
- controlBuf *recvBuffer
- fc *inFlow
- // sendQuotaPool provides flow control to outbound message.
- sendQuotaPool *quotaPool
- // streamsQuota limits the max number of concurrent streams.
- streamsQuota *quotaPool
-
- // The scheme used: https if TLS is on, http otherwise.
- scheme string
-
- creds []credentials.PerRPCCredentials
-
- mu sync.Mutex // guard the following variables
- state transportState // the state of underlying connection
- activeStreams map[uint32]*Stream
- // The max number of concurrent streams
- maxStreams int
- // the per-stream outbound flow control window size set by the peer.
- streamSendQuota uint32
- // goAwayID records the Last-Stream-ID in the GoAway frame from the server.
- goAwayID uint32
- // prevGoAway ID records the Last-Stream-ID in the previous GOAway frame.
- prevGoAwayID uint32
-}
-
-func dial(ctx context.Context, fn func(context.Context, string) (net.Conn, error), addr string) (net.Conn, error) {
- if fn != nil {
- return fn(ctx, addr)
- }
- return dialContext(ctx, "tcp", addr)
-}
-
-func isTemporary(err error) bool {
- switch err {
- case io.EOF:
- // Connection closures may be resolved upon retry, and are thus
- // treated as temporary.
- return true
- case context.DeadlineExceeded:
- // In Go 1.7, context.DeadlineExceeded implements Timeout(), and this
- // special case is not needed. Until then, we need to keep this
- // clause.
- return true
- }
-
- switch err := err.(type) {
- case interface {
- Temporary() bool
- }:
- return err.Temporary()
- case interface {
- Timeout() bool
- }:
- // Timeouts may be resolved upon retry, and are thus treated as
- // temporary.
- return err.Timeout()
- }
- return false
-}
-
-// newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2
-// and starts to receive messages on it. Non-nil error returns if construction
-// fails.
-func newHTTP2Client(ctx context.Context, addr TargetInfo, opts ConnectOptions) (_ ClientTransport, err error) {
- scheme := "http"
- conn, err := dial(ctx, opts.Dialer, addr.Addr)
- if err != nil {
- return nil, connectionErrorf(true, err, "transport: %v", err)
- }
- // Any further errors will close the underlying connection
- defer func(conn net.Conn) {
- if err != nil {
- conn.Close()
- }
- }(conn)
- var authInfo credentials.AuthInfo
- if creds := opts.TransportCredentials; creds != nil {
- scheme = "https"
- conn, authInfo, err = creds.ClientHandshake(ctx, addr.Addr, conn)
- if err != nil {
- // Credentials handshake errors are typically considered permanent
- // to avoid retrying on e.g. bad certificates.
- temp := isTemporary(err)
- return nil, connectionErrorf(temp, err, "transport: %v", err)
- }
- }
- ua := primaryUA
- if opts.UserAgent != "" {
- ua = opts.UserAgent + " " + ua
- }
- var buf bytes.Buffer
- t := &http2Client{
- target: addr.Addr,
- userAgent: ua,
- md: addr.Metadata,
- conn: conn,
- authInfo: authInfo,
- // The client initiated stream id is odd starting from 1.
- nextID: 1,
- writableChan: make(chan int, 1),
- shutdownChan: make(chan struct{}),
- errorChan: make(chan struct{}),
- goAway: make(chan struct{}),
- framer: newFramer(conn),
- hBuf: &buf,
- hEnc: hpack.NewEncoder(&buf),
- controlBuf: newRecvBuffer(),
- fc: &inFlow{limit: initialConnWindowSize},
- sendQuotaPool: newQuotaPool(defaultWindowSize),
- scheme: scheme,
- state: reachable,
- activeStreams: make(map[uint32]*Stream),
- creds: opts.PerRPCCredentials,
- maxStreams: math.MaxInt32,
- streamSendQuota: defaultWindowSize,
- }
- // Start the reader goroutine for incoming message. Each transport has
- // a dedicated goroutine which reads HTTP2 frame from network. Then it
- // dispatches the frame to the corresponding stream entity.
- go t.reader()
- // Send connection preface to server.
- n, err := t.conn.Write(clientPreface)
- if err != nil {
- t.Close()
- return nil, connectionErrorf(true, err, "transport: %v", err)
- }
- if n != len(clientPreface) {
- t.Close()
- return nil, connectionErrorf(true, err, "transport: preface mismatch, wrote %d bytes; want %d", n, len(clientPreface))
- }
- if initialWindowSize != defaultWindowSize {
- err = t.framer.writeSettings(true, http2.Setting{
- ID: http2.SettingInitialWindowSize,
- Val: uint32(initialWindowSize),
- })
- } else {
- err = t.framer.writeSettings(true)
- }
- if err != nil {
- t.Close()
- return nil, connectionErrorf(true, err, "transport: %v", err)
- }
- // Adjust the connection flow control window if needed.
- if delta := uint32(initialConnWindowSize - defaultWindowSize); delta > 0 {
- if err := t.framer.writeWindowUpdate(true, 0, delta); err != nil {
- t.Close()
- return nil, connectionErrorf(true, err, "transport: %v", err)
- }
- }
- go t.controller()
- t.writableChan <- 0
- return t, nil
-}
-
-func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream {
- // TODO(zhaoq): Handle uint32 overflow of Stream.id.
- s := &Stream{
- id: t.nextID,
- done: make(chan struct{}),
- goAway: make(chan struct{}),
- method: callHdr.Method,
- sendCompress: callHdr.SendCompress,
- buf: newRecvBuffer(),
- fc: &inFlow{limit: initialWindowSize},
- sendQuotaPool: newQuotaPool(int(t.streamSendQuota)),
- headerChan: make(chan struct{}),
- }
- t.nextID += 2
- s.windowHandler = func(n int) {
- t.updateWindow(s, uint32(n))
- }
- // The client side stream context should have exactly the same life cycle with the user provided context.
- // That means, s.ctx should be read-only. And s.ctx is done iff ctx is done.
- // So we use the original context here instead of creating a copy.
- s.ctx = ctx
- s.dec = &recvBufferReader{
- ctx: s.ctx,
- goAway: s.goAway,
- recv: s.buf,
- }
- return s
-}
-
-// NewStream creates a stream and register it into the transport as "active"
-// streams.
-func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Stream, err error) {
- pr := &peer.Peer{
- Addr: t.conn.RemoteAddr(),
- }
- // Attach Auth info if there is any.
- if t.authInfo != nil {
- pr.AuthInfo = t.authInfo
- }
- ctx = peer.NewContext(ctx, pr)
- authData := make(map[string]string)
- for _, c := range t.creds {
- // Construct URI required to get auth request metadata.
- var port string
- if pos := strings.LastIndex(t.target, ":"); pos != -1 {
- // Omit port if it is the default one.
- if t.target[pos+1:] != "443" {
- port = ":" + t.target[pos+1:]
- }
- }
- pos := strings.LastIndex(callHdr.Method, "/")
- if pos == -1 {
- return nil, streamErrorf(codes.InvalidArgument, "transport: malformed method name: %q", callHdr.Method)
- }
- audience := "https://" + callHdr.Host + port + callHdr.Method[:pos]
- data, err := c.GetRequestMetadata(ctx, audience)
- if err != nil {
- return nil, streamErrorf(codes.InvalidArgument, "transport: %v", err)
- }
- for k, v := range data {
- authData[k] = v
- }
- }
- t.mu.Lock()
- if t.activeStreams == nil {
- t.mu.Unlock()
- return nil, ErrConnClosing
- }
- if t.state == draining {
- t.mu.Unlock()
- return nil, ErrStreamDrain
- }
- if t.state != reachable {
- t.mu.Unlock()
- return nil, ErrConnClosing
- }
- checkStreamsQuota := t.streamsQuota != nil
- t.mu.Unlock()
- if checkStreamsQuota {
- sq, err := wait(ctx, nil, nil, t.shutdownChan, t.streamsQuota.acquire())
- if err != nil {
- return nil, err
- }
- // Returns the quota balance back.
- if sq > 1 {
- t.streamsQuota.add(sq - 1)
- }
- }
- if _, err := wait(ctx, nil, nil, t.shutdownChan, t.writableChan); err != nil {
- // Return the quota back now because there is no stream returned to the caller.
- if _, ok := err.(StreamError); ok && checkStreamsQuota {
- t.streamsQuota.add(1)
- }
- return nil, err
- }
- t.mu.Lock()
- if t.state == draining {
- t.mu.Unlock()
- if checkStreamsQuota {
- t.streamsQuota.add(1)
- }
- // Need to make t writable again so that the rpc in flight can still proceed.
- t.writableChan <- 0
- return nil, ErrStreamDrain
- }
- if t.state != reachable {
- t.mu.Unlock()
- return nil, ErrConnClosing
- }
- s := t.newStream(ctx, callHdr)
- t.activeStreams[s.id] = s
-
- // This stream is not counted when applySetings(...) initialize t.streamsQuota.
- // Reset t.streamsQuota to the right value.
- var reset bool
- if !checkStreamsQuota && t.streamsQuota != nil {
- reset = true
- }
- t.mu.Unlock()
- if reset {
- t.streamsQuota.reset(-1)
- }
-
- // HPACK encodes various headers. Note that once WriteField(...) is
- // called, the corresponding headers/continuation frame has to be sent
- // because hpack.Encoder is stateful.
- t.hBuf.Reset()
- t.hEnc.WriteField(hpack.HeaderField{Name: ":method", Value: "POST"})
- t.hEnc.WriteField(hpack.HeaderField{Name: ":scheme", Value: t.scheme})
- t.hEnc.WriteField(hpack.HeaderField{Name: ":path", Value: callHdr.Method})
- t.hEnc.WriteField(hpack.HeaderField{Name: ":authority", Value: callHdr.Host})
- t.hEnc.WriteField(hpack.HeaderField{Name: "content-type", Value: "application/grpc"})
- t.hEnc.WriteField(hpack.HeaderField{Name: "user-agent", Value: t.userAgent})
- t.hEnc.WriteField(hpack.HeaderField{Name: "te", Value: "trailers"})
-
- if callHdr.SendCompress != "" {
- t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-encoding", Value: callHdr.SendCompress})
- }
- if dl, ok := ctx.Deadline(); ok {
- // Send out timeout regardless its value. The server can detect timeout context by itself.
- timeout := dl.Sub(time.Now())
- t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-timeout", Value: encodeTimeout(timeout)})
- }
-
- for k, v := range authData {
- // Capital header names are illegal in HTTP/2.
- k = strings.ToLower(k)
- t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: v})
- }
- var (
- hasMD bool
- endHeaders bool
- )
- if md, ok := metadata.FromContext(ctx); ok {
- hasMD = true
- for k, v := range md {
- // HTTP doesn't allow you to set pseudoheaders after non pseudoheaders were set.
- if isReservedHeader(k) {
- continue
- }
- for _, entry := range v {
- t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: entry})
- }
- }
- }
- if md, ok := t.md.(*metadata.MD); ok {
- for k, v := range *md {
- if isReservedHeader(k) {
- continue
- }
- for _, entry := range v {
- t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: entry})
- }
- }
- }
- first := true
- // Sends the headers in a single batch even when they span multiple frames.
- for !endHeaders {
- size := t.hBuf.Len()
- if size > http2MaxFrameLen {
- size = http2MaxFrameLen
- } else {
- endHeaders = true
- }
- var flush bool
- if endHeaders && (hasMD || callHdr.Flush) {
- flush = true
- }
- if first {
- // Sends a HeadersFrame to server to start a new stream.
- p := http2.HeadersFrameParam{
- StreamID: s.id,
- BlockFragment: t.hBuf.Next(size),
- EndStream: false,
- EndHeaders: endHeaders,
- }
- // Do a force flush for the buffered frames iff it is the last headers frame
- // and there is header metadata to be sent. Otherwise, there is flushing until
- // the corresponding data frame is written.
- err = t.framer.writeHeaders(flush, p)
- first = false
- } else {
- // Sends Continuation frames for the leftover headers.
- err = t.framer.writeContinuation(flush, s.id, endHeaders, t.hBuf.Next(size))
- }
- if err != nil {
- t.notifyError(err)
- return nil, connectionErrorf(true, err, "transport: %v", err)
- }
- }
- t.writableChan <- 0
- return s, nil
-}
-
-// CloseStream clears the footprint of a stream when the stream is not needed any more.
-// This must not be executed in reader's goroutine.
-func (t *http2Client) CloseStream(s *Stream, err error) {
- var updateStreams bool
- t.mu.Lock()
- if t.activeStreams == nil {
- t.mu.Unlock()
- return
- }
- if t.streamsQuota != nil {
- updateStreams = true
- }
- delete(t.activeStreams, s.id)
- if t.state == draining && len(t.activeStreams) == 0 {
- // The transport is draining and s is the last live stream on t.
- t.mu.Unlock()
- t.Close()
- return
- }
- t.mu.Unlock()
- if updateStreams {
- t.streamsQuota.add(1)
- }
- s.mu.Lock()
- if q := s.fc.resetPendingData(); q > 0 {
- if n := t.fc.onRead(q); n > 0 {
- t.controlBuf.put(&windowUpdate{0, n})
- }
- }
- if s.state == streamDone {
- s.mu.Unlock()
- return
- }
- if !s.headerDone {
- close(s.headerChan)
- s.headerDone = true
- }
- s.state = streamDone
- s.mu.Unlock()
- if se, ok := err.(StreamError); ok && se.Code != codes.DeadlineExceeded {
- t.controlBuf.put(&resetStream{s.id, http2.ErrCodeCancel})
- }
-}
-
-// Close kicks off the shutdown process of the transport. This should be called
-// only once on a transport. Once it is called, the transport should not be
-// accessed any more.
-func (t *http2Client) Close() (err error) {
- t.mu.Lock()
- if t.state == closing {
- t.mu.Unlock()
- return
- }
- if t.state == reachable || t.state == draining {
- close(t.errorChan)
- }
- t.state = closing
- t.mu.Unlock()
- close(t.shutdownChan)
- err = t.conn.Close()
- t.mu.Lock()
- streams := t.activeStreams
- t.activeStreams = nil
- t.mu.Unlock()
- // Notify all active streams.
- for _, s := range streams {
- s.mu.Lock()
- if !s.headerDone {
- close(s.headerChan)
- s.headerDone = true
- }
- s.mu.Unlock()
- s.write(recvMsg{err: ErrConnClosing})
- }
- return
-}
-
-func (t *http2Client) GracefulClose() error {
- t.mu.Lock()
- switch t.state {
- case unreachable:
- // The server may close the connection concurrently. t is not available for
- // any streams. Close it now.
- t.mu.Unlock()
- t.Close()
- return nil
- case closing:
- t.mu.Unlock()
- return nil
- }
- // Notify the streams which were initiated after the server sent GOAWAY.
- select {
- case <-t.goAway:
- n := t.prevGoAwayID
- if n == 0 && t.nextID > 1 {
- n = t.nextID - 2
- }
- m := t.goAwayID + 2
- if m == 2 {
- m = 1
- }
- for i := m; i <= n; i += 2 {
- if s, ok := t.activeStreams[i]; ok {
- close(s.goAway)
- }
- }
- default:
- }
- if t.state == draining {
- t.mu.Unlock()
- return nil
- }
- t.state = draining
- active := len(t.activeStreams)
- t.mu.Unlock()
- if active == 0 {
- return t.Close()
- }
- return nil
-}
-
-// Write formats the data into HTTP2 data frame(s) and sends it out. The caller
-// should proceed only if Write returns nil.
-// TODO(zhaoq): opts.Delay is ignored in this implementation. Support it later
-// if it improves the performance.
-func (t *http2Client) Write(s *Stream, data []byte, opts *Options) error {
- r := bytes.NewBuffer(data)
- for {
- var p []byte
- if r.Len() > 0 {
- size := http2MaxFrameLen
- s.sendQuotaPool.add(0)
- // Wait until the stream has some quota to send the data.
- sq, err := wait(s.ctx, s.done, s.goAway, t.shutdownChan, s.sendQuotaPool.acquire())
- if err != nil {
- return err
- }
- t.sendQuotaPool.add(0)
- // Wait until the transport has some quota to send the data.
- tq, err := wait(s.ctx, s.done, s.goAway, t.shutdownChan, t.sendQuotaPool.acquire())
- if err != nil {
- if _, ok := err.(StreamError); ok || err == io.EOF {
- t.sendQuotaPool.cancel()
- }
- return err
- }
- if sq < size {
- size = sq
- }
- if tq < size {
- size = tq
- }
- p = r.Next(size)
- ps := len(p)
- if ps < sq {
- // Overbooked stream quota. Return it back.
- s.sendQuotaPool.add(sq - ps)
- }
- if ps < tq {
- // Overbooked transport quota. Return it back.
- t.sendQuotaPool.add(tq - ps)
- }
- }
- var (
- endStream bool
- forceFlush bool
- )
- if opts.Last && r.Len() == 0 {
- endStream = true
- }
- // Indicate there is a writer who is about to write a data frame.
- t.framer.adjustNumWriters(1)
- // Got some quota. Try to acquire writing privilege on the transport.
- if _, err := wait(s.ctx, s.done, s.goAway, t.shutdownChan, t.writableChan); err != nil {
- if _, ok := err.(StreamError); ok || err == io.EOF {
- // Return the connection quota back.
- t.sendQuotaPool.add(len(p))
- }
- if t.framer.adjustNumWriters(-1) == 0 {
- // This writer is the last one in this batch and has the
- // responsibility to flush the buffered frames. It queues
- // a flush request to controlBuf instead of flushing directly
- // in order to avoid the race with other writing or flushing.
- t.controlBuf.put(&flushIO{})
- }
- return err
- }
- select {
- case <-s.ctx.Done():
- t.sendQuotaPool.add(len(p))
- if t.framer.adjustNumWriters(-1) == 0 {
- t.controlBuf.put(&flushIO{})
- }
- t.writableChan <- 0
- return ContextErr(s.ctx.Err())
- default:
- }
- if r.Len() == 0 && t.framer.adjustNumWriters(0) == 1 {
- // Do a force flush iff this is last frame for the entire gRPC message
- // and the caller is the only writer at this moment.
- forceFlush = true
- }
- // If WriteData fails, all the pending streams will be handled
- // by http2Client.Close(). No explicit CloseStream() needs to be
- // invoked.
- if err := t.framer.writeData(forceFlush, s.id, endStream, p); err != nil {
- t.notifyError(err)
- return connectionErrorf(true, err, "transport: %v", err)
- }
- if t.framer.adjustNumWriters(-1) == 0 {
- t.framer.flushWrite()
- }
- t.writableChan <- 0
- if r.Len() == 0 {
- break
- }
- }
- if !opts.Last {
- return nil
- }
- s.mu.Lock()
- if s.state != streamDone {
- s.state = streamWriteDone
- }
- s.mu.Unlock()
- return nil
-}
-
-func (t *http2Client) getStream(f http2.Frame) (*Stream, bool) {
- t.mu.Lock()
- defer t.mu.Unlock()
- s, ok := t.activeStreams[f.Header().StreamID]
- return s, ok
-}
-
-// updateWindow adjusts the inbound quota for the stream and the transport.
-// Window updates will deliver to the controller for sending when
-// the cumulative quota exceeds the corresponding threshold.
-func (t *http2Client) updateWindow(s *Stream, n uint32) {
- s.mu.Lock()
- defer s.mu.Unlock()
- if s.state == streamDone {
- return
- }
- if w := t.fc.onRead(n); w > 0 {
- t.controlBuf.put(&windowUpdate{0, w})
- }
- if w := s.fc.onRead(n); w > 0 {
- t.controlBuf.put(&windowUpdate{s.id, w})
- }
-}
-
-func (t *http2Client) handleData(f *http2.DataFrame) {
- size := len(f.Data())
- if err := t.fc.onData(uint32(size)); err != nil {
- t.notifyError(connectionErrorf(true, err, "%v", err))
- return
- }
- // Select the right stream to dispatch.
- s, ok := t.getStream(f)
- if !ok {
- if w := t.fc.onRead(uint32(size)); w > 0 {
- t.controlBuf.put(&windowUpdate{0, w})
- }
- return
- }
- if size > 0 {
- s.mu.Lock()
- if s.state == streamDone {
- s.mu.Unlock()
- // The stream has been closed. Release the corresponding quota.
- if w := t.fc.onRead(uint32(size)); w > 0 {
- t.controlBuf.put(&windowUpdate{0, w})
- }
- return
- }
- if err := s.fc.onData(uint32(size)); err != nil {
- s.state = streamDone
- s.statusCode = codes.Internal
- s.statusDesc = err.Error()
- close(s.done)
- s.mu.Unlock()
- s.write(recvMsg{err: io.EOF})
- t.controlBuf.put(&resetStream{s.id, http2.ErrCodeFlowControl})
- return
- }
- s.mu.Unlock()
- // TODO(bradfitz, zhaoq): A copy is required here because there is no
- // guarantee f.Data() is consumed before the arrival of next frame.
- // Can this copy be eliminated?
- data := make([]byte, size)
- copy(data, f.Data())
- s.write(recvMsg{data: data})
- }
- // The server has closed the stream without sending trailers. Record that
- // the read direction is closed, and set the status appropriately.
- if f.FrameHeader.Flags.Has(http2.FlagDataEndStream) {
- s.mu.Lock()
- if s.state == streamDone {
- s.mu.Unlock()
- return
- }
- s.state = streamDone
- s.statusCode = codes.Internal
- s.statusDesc = "server closed the stream without sending trailers"
- close(s.done)
- s.mu.Unlock()
- s.write(recvMsg{err: io.EOF})
- }
-}
-
-func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) {
- s, ok := t.getStream(f)
- if !ok {
- return
- }
- s.mu.Lock()
- if s.state == streamDone {
- s.mu.Unlock()
- return
- }
- s.state = streamDone
- if !s.headerDone {
- close(s.headerChan)
- s.headerDone = true
- }
- s.statusCode, ok = http2ErrConvTab[http2.ErrCode(f.ErrCode)]
- if !ok {
- grpclog.Println("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error ", f.ErrCode)
- s.statusCode = codes.Unknown
- }
- s.statusDesc = fmt.Sprintf("stream terminated by RST_STREAM with error code: %d", f.ErrCode)
- close(s.done)
- s.mu.Unlock()
- s.write(recvMsg{err: io.EOF})
-}
-
-func (t *http2Client) handleSettings(f *http2.SettingsFrame) {
- if f.IsAck() {
- return
- }
- var ss []http2.Setting
- f.ForeachSetting(func(s http2.Setting) error {
- ss = append(ss, s)
- return nil
- })
- // The settings will be applied once the ack is sent.
- t.controlBuf.put(&settings{ack: true, ss: ss})
-}
-
-func (t *http2Client) handlePing(f *http2.PingFrame) {
- if f.IsAck() { // Do nothing.
- return
- }
- pingAck := &ping{ack: true}
- copy(pingAck.data[:], f.Data[:])
- t.controlBuf.put(pingAck)
-}
-
-func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) {
- t.mu.Lock()
- if t.state == reachable || t.state == draining {
- if f.LastStreamID > 0 && f.LastStreamID%2 != 1 {
- t.mu.Unlock()
- t.notifyError(connectionErrorf(true, nil, "received illegal http2 GOAWAY frame: stream ID %d is even", f.LastStreamID))
- return
- }
- select {
- case <-t.goAway:
- id := t.goAwayID
- // t.goAway has been closed (i.e.,multiple GoAways).
- if id < f.LastStreamID {
- t.mu.Unlock()
- t.notifyError(connectionErrorf(true, nil, "received illegal http2 GOAWAY frame: previously recv GOAWAY frame with LastStramID %d, currently recv %d", id, f.LastStreamID))
- return
- }
- t.prevGoAwayID = id
- t.goAwayID = f.LastStreamID
- t.mu.Unlock()
- return
- default:
- }
- t.goAwayID = f.LastStreamID
- close(t.goAway)
- }
- t.mu.Unlock()
-}
-
-func (t *http2Client) handleWindowUpdate(f *http2.WindowUpdateFrame) {
- id := f.Header().StreamID
- incr := f.Increment
- if id == 0 {
- t.sendQuotaPool.add(int(incr))
- return
- }
- if s, ok := t.getStream(f); ok {
- s.sendQuotaPool.add(int(incr))
- }
-}
-
-// operateHeaders takes action on the decoded headers.
-func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
- s, ok := t.getStream(frame)
- if !ok {
- return
- }
- var state decodeState
- for _, hf := range frame.Fields {
- state.processHeaderField(hf)
- }
- if state.err != nil {
- s.mu.Lock()
- if !s.headerDone {
- close(s.headerChan)
- s.headerDone = true
- }
- s.mu.Unlock()
- s.write(recvMsg{err: state.err})
- // Something wrong. Stops reading even when there is remaining.
- return
- }
-
- endStream := frame.StreamEnded()
-
- s.mu.Lock()
- if !endStream {
- s.recvCompress = state.encoding
- }
- if !s.headerDone {
- if !endStream && len(state.mdata) > 0 {
- s.header = state.mdata
- }
- close(s.headerChan)
- s.headerDone = true
- }
- if !endStream || s.state == streamDone {
- s.mu.Unlock()
- return
- }
-
- if len(state.mdata) > 0 {
- s.trailer = state.mdata
- }
- s.statusCode = state.statusCode
- s.statusDesc = state.statusDesc
- close(s.done)
- s.state = streamDone
- s.mu.Unlock()
- s.write(recvMsg{err: io.EOF})
-}
-
-func handleMalformedHTTP2(s *Stream, err error) {
- s.mu.Lock()
- if !s.headerDone {
- close(s.headerChan)
- s.headerDone = true
- }
- s.mu.Unlock()
- s.write(recvMsg{err: err})
-}
-
-// reader runs as a separate goroutine in charge of reading data from network
-// connection.
-//
-// TODO(zhaoq): currently one reader per transport. Investigate whether this is
-// optimal.
-// TODO(zhaoq): Check the validity of the incoming frame sequence.
-func (t *http2Client) reader() {
- // Check the validity of server preface.
- frame, err := t.framer.readFrame()
- if err != nil {
- t.notifyError(err)
- return
- }
- sf, ok := frame.(*http2.SettingsFrame)
- if !ok {
- t.notifyError(err)
- return
- }
- t.handleSettings(sf)
-
- // loop to keep reading incoming messages on this transport.
- for {
- frame, err := t.framer.readFrame()
- if err != nil {
- // Abort an active stream if the http2.Framer returns a
- // http2.StreamError. This can happen only if the server's response
- // is malformed http2.
- if se, ok := err.(http2.StreamError); ok {
- t.mu.Lock()
- s := t.activeStreams[se.StreamID]
- t.mu.Unlock()
- if s != nil {
- // use error detail to provide better err message
- handleMalformedHTTP2(s, streamErrorf(http2ErrConvTab[se.Code], "%v", t.framer.errorDetail()))
- }
- continue
- } else {
- // Transport error.
- t.notifyError(err)
- return
- }
- }
- switch frame := frame.(type) {
- case *http2.MetaHeadersFrame:
- t.operateHeaders(frame)
- case *http2.DataFrame:
- t.handleData(frame)
- case *http2.RSTStreamFrame:
- t.handleRSTStream(frame)
- case *http2.SettingsFrame:
- t.handleSettings(frame)
- case *http2.PingFrame:
- t.handlePing(frame)
- case *http2.GoAwayFrame:
- t.handleGoAway(frame)
- case *http2.WindowUpdateFrame:
- t.handleWindowUpdate(frame)
- default:
- grpclog.Printf("transport: http2Client.reader got unhandled frame type %v.", frame)
- }
- }
-}
-
-func (t *http2Client) applySettings(ss []http2.Setting) {
- for _, s := range ss {
- switch s.ID {
- case http2.SettingMaxConcurrentStreams:
- // TODO(zhaoq): This is a hack to avoid significant refactoring of the
- // code to deal with the unrealistic int32 overflow. Probably will try
- // to find a better way to handle this later.
- if s.Val > math.MaxInt32 {
- s.Val = math.MaxInt32
- }
- t.mu.Lock()
- reset := t.streamsQuota != nil
- if !reset {
- t.streamsQuota = newQuotaPool(int(s.Val) - len(t.activeStreams))
- }
- ms := t.maxStreams
- t.maxStreams = int(s.Val)
- t.mu.Unlock()
- if reset {
- t.streamsQuota.reset(int(s.Val) - ms)
- }
- case http2.SettingInitialWindowSize:
- t.mu.Lock()
- for _, stream := range t.activeStreams {
- // Adjust the sending quota for each stream.
- stream.sendQuotaPool.reset(int(s.Val - t.streamSendQuota))
- }
- t.streamSendQuota = s.Val
- t.mu.Unlock()
- }
- }
-}
-
-// controller running in a separate goroutine takes charge of sending control
-// frames (e.g., window update, reset stream, setting, etc.) to the server.
-func (t *http2Client) controller() {
- for {
- select {
- case i := <-t.controlBuf.get():
- t.controlBuf.load()
- select {
- case <-t.writableChan:
- switch i := i.(type) {
- case *windowUpdate:
- t.framer.writeWindowUpdate(true, i.streamID, i.increment)
- case *settings:
- if i.ack {
- t.framer.writeSettingsAck(true)
- t.applySettings(i.ss)
- } else {
- t.framer.writeSettings(true, i.ss...)
- }
- case *resetStream:
- t.framer.writeRSTStream(true, i.streamID, i.code)
- case *flushIO:
- t.framer.flushWrite()
- case *ping:
- t.framer.writePing(true, i.ack, i.data)
- default:
- grpclog.Printf("transport: http2Client.controller got unexpected item type %v\n", i)
- }
- t.writableChan <- 0
- continue
- case <-t.shutdownChan:
- return
- }
- case <-t.shutdownChan:
- return
- }
- }
-}
-
-func (t *http2Client) Error() <-chan struct{} {
- return t.errorChan
-}
-
-func (t *http2Client) GoAway() <-chan struct{} {
- return t.goAway
-}
-
-func (t *http2Client) notifyError(err error) {
- t.mu.Lock()
- // make sure t.errorChan is closed only once.
- if t.state == draining {
- t.mu.Unlock()
- t.Close()
- return
- }
- if t.state == reachable {
- t.state = unreachable
- close(t.errorChan)
- grpclog.Printf("transport: http2Client.notifyError got notified that the client transport was broken %v.", err)
- }
- t.mu.Unlock()
-}
diff --git a/vendor/google.golang.org/grpc/transport/http2_server.go b/vendor/google.golang.org/grpc/transport/http2_server.go
deleted file mode 100644
index a62fb7c22..000000000
--- a/vendor/google.golang.org/grpc/transport/http2_server.go
+++ /dev/null
@@ -1,775 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package transport
-
-import (
- "bytes"
- "errors"
- "io"
- "math"
- "net"
- "strconv"
- "sync"
-
- "golang.org/x/net/context"
- "golang.org/x/net/http2"
- "golang.org/x/net/http2/hpack"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/credentials"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/metadata"
- "google.golang.org/grpc/peer"
-)
-
-// ErrIllegalHeaderWrite indicates that setting header is illegal because of
-// the stream's state.
-var ErrIllegalHeaderWrite = errors.New("transport: the stream is done or WriteHeader was already called")
-
-// http2Server implements the ServerTransport interface with HTTP2.
-type http2Server struct {
- conn net.Conn
- maxStreamID uint32 // max stream ID ever seen
- authInfo credentials.AuthInfo // auth info about the connection
- // writableChan synchronizes write access to the transport.
- // A writer acquires the write lock by receiving a value on writableChan
- // and releases it by sending on writableChan.
- writableChan chan int
- // shutdownChan is closed when Close is called.
- // Blocking operations should select on shutdownChan to avoid
- // blocking forever after Close.
- shutdownChan chan struct{}
- framer *framer
- hBuf *bytes.Buffer // the buffer for HPACK encoding
- hEnc *hpack.Encoder // HPACK encoder
-
- // The max number of concurrent streams.
- maxStreams uint32
- // controlBuf delivers all the control related tasks (e.g., window
- // updates, reset streams, and various settings) to the controller.
- controlBuf *recvBuffer
- fc *inFlow
- // sendQuotaPool provides flow control to outbound message.
- sendQuotaPool *quotaPool
-
- mu sync.Mutex // guard the following
- state transportState
- activeStreams map[uint32]*Stream
- // the per-stream outbound flow control window size set by the peer.
- streamSendQuota uint32
-}
-
-// newHTTP2Server constructs a ServerTransport based on HTTP2. ConnectionError is
-// returned if something goes wrong.
-func newHTTP2Server(conn net.Conn, maxStreams uint32, authInfo credentials.AuthInfo) (_ ServerTransport, err error) {
- framer := newFramer(conn)
- // Send initial settings as connection preface to client.
- var settings []http2.Setting
- // TODO(zhaoq): Have a better way to signal "no limit" because 0 is
- // permitted in the HTTP2 spec.
- if maxStreams == 0 {
- maxStreams = math.MaxUint32
- } else {
- settings = append(settings, http2.Setting{
- ID: http2.SettingMaxConcurrentStreams,
- Val: maxStreams,
- })
- }
- if initialWindowSize != defaultWindowSize {
- settings = append(settings, http2.Setting{
- ID: http2.SettingInitialWindowSize,
- Val: uint32(initialWindowSize)})
- }
- if err := framer.writeSettings(true, settings...); err != nil {
- return nil, connectionErrorf(true, err, "transport: %v", err)
- }
- // Adjust the connection flow control window if needed.
- if delta := uint32(initialConnWindowSize - defaultWindowSize); delta > 0 {
- if err := framer.writeWindowUpdate(true, 0, delta); err != nil {
- return nil, connectionErrorf(true, err, "transport: %v", err)
- }
- }
- var buf bytes.Buffer
- t := &http2Server{
- conn: conn,
- authInfo: authInfo,
- framer: framer,
- hBuf: &buf,
- hEnc: hpack.NewEncoder(&buf),
- maxStreams: maxStreams,
- controlBuf: newRecvBuffer(),
- fc: &inFlow{limit: initialConnWindowSize},
- sendQuotaPool: newQuotaPool(defaultWindowSize),
- state: reachable,
- writableChan: make(chan int, 1),
- shutdownChan: make(chan struct{}),
- activeStreams: make(map[uint32]*Stream),
- streamSendQuota: defaultWindowSize,
- }
- go t.controller()
- t.writableChan <- 0
- return t, nil
-}
-
-// operateHeader takes action on the decoded headers.
-func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream)) (close bool) {
- buf := newRecvBuffer()
- s := &Stream{
- id: frame.Header().StreamID,
- st: t,
- buf: buf,
- fc: &inFlow{limit: initialWindowSize},
- }
-
- var state decodeState
- for _, hf := range frame.Fields {
- state.processHeaderField(hf)
- }
- if err := state.err; err != nil {
- if se, ok := err.(StreamError); ok {
- t.controlBuf.put(&resetStream{s.id, statusCodeConvTab[se.Code]})
- }
- return
- }
-
- if frame.StreamEnded() {
- // s is just created by the caller. No lock needed.
- s.state = streamReadDone
- }
- s.recvCompress = state.encoding
- if state.timeoutSet {
- s.ctx, s.cancel = context.WithTimeout(context.TODO(), state.timeout)
- } else {
- s.ctx, s.cancel = context.WithCancel(context.TODO())
- }
- pr := &peer.Peer{
- Addr: t.conn.RemoteAddr(),
- }
- // Attach Auth info if there is any.
- if t.authInfo != nil {
- pr.AuthInfo = t.authInfo
- }
- s.ctx = peer.NewContext(s.ctx, pr)
- // Cache the current stream to the context so that the server application
- // can find out. Required when the server wants to send some metadata
- // back to the client (unary call only).
- s.ctx = newContextWithStream(s.ctx, s)
- // Attach the received metadata to the context.
- if len(state.mdata) > 0 {
- s.ctx = metadata.NewContext(s.ctx, state.mdata)
- }
-
- s.dec = &recvBufferReader{
- ctx: s.ctx,
- recv: s.buf,
- }
- s.recvCompress = state.encoding
- s.method = state.method
- t.mu.Lock()
- if t.state != reachable {
- t.mu.Unlock()
- return
- }
- if uint32(len(t.activeStreams)) >= t.maxStreams {
- t.mu.Unlock()
- t.controlBuf.put(&resetStream{s.id, http2.ErrCodeRefusedStream})
- return
- }
- if s.id%2 != 1 || s.id <= t.maxStreamID {
- t.mu.Unlock()
- // illegal gRPC stream id.
- grpclog.Println("transport: http2Server.HandleStreams received an illegal stream id: ", s.id)
- return true
- }
- t.maxStreamID = s.id
- s.sendQuotaPool = newQuotaPool(int(t.streamSendQuota))
- t.activeStreams[s.id] = s
- t.mu.Unlock()
- s.windowHandler = func(n int) {
- t.updateWindow(s, uint32(n))
- }
- handle(s)
- return
-}
-
-// HandleStreams receives incoming streams using the given handler. This is
-// typically run in a separate goroutine.
-func (t *http2Server) HandleStreams(handle func(*Stream)) {
- // Check the validity of client preface.
- preface := make([]byte, len(clientPreface))
- if _, err := io.ReadFull(t.conn, preface); err != nil {
- grpclog.Printf("transport: http2Server.HandleStreams failed to receive the preface from client: %v", err)
- t.Close()
- return
- }
- if !bytes.Equal(preface, clientPreface) {
- grpclog.Printf("transport: http2Server.HandleStreams received bogus greeting from client: %q", preface)
- t.Close()
- return
- }
-
- frame, err := t.framer.readFrame()
- if err == io.EOF || err == io.ErrUnexpectedEOF {
- t.Close()
- return
- }
- if err != nil {
- grpclog.Printf("transport: http2Server.HandleStreams failed to read frame: %v", err)
- t.Close()
- return
- }
- sf, ok := frame.(*http2.SettingsFrame)
- if !ok {
- grpclog.Printf("transport: http2Server.HandleStreams saw invalid preface type %T from client", frame)
- t.Close()
- return
- }
- t.handleSettings(sf)
-
- for {
- frame, err := t.framer.readFrame()
- if err != nil {
- if se, ok := err.(http2.StreamError); ok {
- t.mu.Lock()
- s := t.activeStreams[se.StreamID]
- t.mu.Unlock()
- if s != nil {
- t.closeStream(s)
- }
- t.controlBuf.put(&resetStream{se.StreamID, se.Code})
- continue
- }
- if err == io.EOF || err == io.ErrUnexpectedEOF {
- t.Close()
- return
- }
- grpclog.Printf("transport: http2Server.HandleStreams failed to read frame: %v", err)
- t.Close()
- return
- }
- switch frame := frame.(type) {
- case *http2.MetaHeadersFrame:
- if t.operateHeaders(frame, handle) {
- t.Close()
- break
- }
- case *http2.DataFrame:
- t.handleData(frame)
- case *http2.RSTStreamFrame:
- t.handleRSTStream(frame)
- case *http2.SettingsFrame:
- t.handleSettings(frame)
- case *http2.PingFrame:
- t.handlePing(frame)
- case *http2.WindowUpdateFrame:
- t.handleWindowUpdate(frame)
- case *http2.GoAwayFrame:
- // TODO: Handle GoAway from the client appropriately.
- default:
- grpclog.Printf("transport: http2Server.HandleStreams found unhandled frame type %v.", frame)
- }
- }
-}
-
-func (t *http2Server) getStream(f http2.Frame) (*Stream, bool) {
- t.mu.Lock()
- defer t.mu.Unlock()
- if t.activeStreams == nil {
- // The transport is closing.
- return nil, false
- }
- s, ok := t.activeStreams[f.Header().StreamID]
- if !ok {
- // The stream is already done.
- return nil, false
- }
- return s, true
-}
-
-// updateWindow adjusts the inbound quota for the stream and the transport.
-// Window updates will deliver to the controller for sending when
-// the cumulative quota exceeds the corresponding threshold.
-func (t *http2Server) updateWindow(s *Stream, n uint32) {
- s.mu.Lock()
- defer s.mu.Unlock()
- if s.state == streamDone {
- return
- }
- if w := t.fc.onRead(n); w > 0 {
- t.controlBuf.put(&windowUpdate{0, w})
- }
- if w := s.fc.onRead(n); w > 0 {
- t.controlBuf.put(&windowUpdate{s.id, w})
- }
-}
-
-func (t *http2Server) handleData(f *http2.DataFrame) {
- size := len(f.Data())
- if err := t.fc.onData(uint32(size)); err != nil {
- grpclog.Printf("transport: http2Server %v", err)
- t.Close()
- return
- }
- // Select the right stream to dispatch.
- s, ok := t.getStream(f)
- if !ok {
- if w := t.fc.onRead(uint32(size)); w > 0 {
- t.controlBuf.put(&windowUpdate{0, w})
- }
- return
- }
- if size > 0 {
- s.mu.Lock()
- if s.state == streamDone {
- s.mu.Unlock()
- // The stream has been closed. Release the corresponding quota.
- if w := t.fc.onRead(uint32(size)); w > 0 {
- t.controlBuf.put(&windowUpdate{0, w})
- }
- return
- }
- if err := s.fc.onData(uint32(size)); err != nil {
- s.mu.Unlock()
- t.closeStream(s)
- t.controlBuf.put(&resetStream{s.id, http2.ErrCodeFlowControl})
- return
- }
- s.mu.Unlock()
- // TODO(bradfitz, zhaoq): A copy is required here because there is no
- // guarantee f.Data() is consumed before the arrival of next frame.
- // Can this copy be eliminated?
- data := make([]byte, size)
- copy(data, f.Data())
- s.write(recvMsg{data: data})
- }
- if f.Header().Flags.Has(http2.FlagDataEndStream) {
- // Received the end of stream from the client.
- s.mu.Lock()
- if s.state != streamDone {
- s.state = streamReadDone
- }
- s.mu.Unlock()
- s.write(recvMsg{err: io.EOF})
- }
-}
-
-func (t *http2Server) handleRSTStream(f *http2.RSTStreamFrame) {
- s, ok := t.getStream(f)
- if !ok {
- return
- }
- t.closeStream(s)
-}
-
-func (t *http2Server) handleSettings(f *http2.SettingsFrame) {
- if f.IsAck() {
- return
- }
- var ss []http2.Setting
- f.ForeachSetting(func(s http2.Setting) error {
- ss = append(ss, s)
- return nil
- })
- // The settings will be applied once the ack is sent.
- t.controlBuf.put(&settings{ack: true, ss: ss})
-}
-
-func (t *http2Server) handlePing(f *http2.PingFrame) {
- if f.IsAck() { // Do nothing.
- return
- }
- pingAck := &ping{ack: true}
- copy(pingAck.data[:], f.Data[:])
- t.controlBuf.put(pingAck)
-}
-
-func (t *http2Server) handleWindowUpdate(f *http2.WindowUpdateFrame) {
- id := f.Header().StreamID
- incr := f.Increment
- if id == 0 {
- t.sendQuotaPool.add(int(incr))
- return
- }
- if s, ok := t.getStream(f); ok {
- s.sendQuotaPool.add(int(incr))
- }
-}
-
-func (t *http2Server) writeHeaders(s *Stream, b *bytes.Buffer, endStream bool) error {
- first := true
- endHeaders := false
- var err error
- // Sends the headers in a single batch.
- for !endHeaders {
- size := t.hBuf.Len()
- if size > http2MaxFrameLen {
- size = http2MaxFrameLen
- } else {
- endHeaders = true
- }
- if first {
- p := http2.HeadersFrameParam{
- StreamID: s.id,
- BlockFragment: b.Next(size),
- EndStream: endStream,
- EndHeaders: endHeaders,
- }
- err = t.framer.writeHeaders(endHeaders, p)
- first = false
- } else {
- err = t.framer.writeContinuation(endHeaders, s.id, endHeaders, b.Next(size))
- }
- if err != nil {
- t.Close()
- return connectionErrorf(true, err, "transport: %v", err)
- }
- }
- return nil
-}
-
-// WriteHeader sends the header metedata md back to the client.
-func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error {
- s.mu.Lock()
- if s.headerOk || s.state == streamDone {
- s.mu.Unlock()
- return ErrIllegalHeaderWrite
- }
- s.headerOk = true
- if md.Len() > 0 {
- if s.header.Len() > 0 {
- s.header = metadata.Join(s.header, md)
- } else {
- s.header = md
- }
- }
- md = s.header
- s.mu.Unlock()
- if _, err := wait(s.ctx, nil, nil, t.shutdownChan, t.writableChan); err != nil {
- return err
- }
- t.hBuf.Reset()
- t.hEnc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- t.hEnc.WriteField(hpack.HeaderField{Name: "content-type", Value: "application/grpc"})
- if s.sendCompress != "" {
- t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-encoding", Value: s.sendCompress})
- }
- for k, v := range md {
- if isReservedHeader(k) {
- // Clients don't tolerate reading restricted headers after some non restricted ones were sent.
- continue
- }
- for _, entry := range v {
- t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: entry})
- }
- }
- if err := t.writeHeaders(s, t.hBuf, false); err != nil {
- return err
- }
- t.writableChan <- 0
- return nil
-}
-
-// WriteStatus sends stream status to the client and terminates the stream.
-// There is no further I/O operations being able to perform on this stream.
-// TODO(zhaoq): Now it indicates the end of entire stream. Revisit if early
-// OK is adopted.
-func (t *http2Server) WriteStatus(s *Stream, statusCode codes.Code, statusDesc string) error {
- var headersSent, hasHeader bool
- s.mu.Lock()
- if s.state == streamDone {
- s.mu.Unlock()
- return nil
- }
- if s.headerOk {
- headersSent = true
- }
- if s.header.Len() > 0 {
- hasHeader = true
- }
- s.mu.Unlock()
-
- if !headersSent && hasHeader {
- t.WriteHeader(s, nil)
- headersSent = true
- }
-
- if _, err := wait(s.ctx, nil, nil, t.shutdownChan, t.writableChan); err != nil {
- return err
- }
- t.hBuf.Reset()
- if !headersSent {
- t.hEnc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- t.hEnc.WriteField(hpack.HeaderField{Name: "content-type", Value: "application/grpc"})
- }
- t.hEnc.WriteField(
- hpack.HeaderField{
- Name: "grpc-status",
- Value: strconv.Itoa(int(statusCode)),
- })
- t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-message", Value: encodeGrpcMessage(statusDesc)})
- // Attach the trailer metadata.
- for k, v := range s.trailer {
- // Clients don't tolerate reading restricted headers after some non restricted ones were sent.
- if isReservedHeader(k) {
- continue
- }
- for _, entry := range v {
- t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: entry})
- }
- }
- if err := t.writeHeaders(s, t.hBuf, true); err != nil {
- t.Close()
- return err
- }
- t.closeStream(s)
- t.writableChan <- 0
- return nil
-}
-
-// Write converts the data into HTTP2 data frame and sends it out. Non-nil error
-// is returns if it fails (e.g., framing error, transport error).
-func (t *http2Server) Write(s *Stream, data []byte, opts *Options) error {
- // TODO(zhaoq): Support multi-writers for a single stream.
- var writeHeaderFrame bool
- s.mu.Lock()
- if s.state == streamDone {
- s.mu.Unlock()
- return streamErrorf(codes.Unknown, "the stream has been done")
- }
- if !s.headerOk {
- writeHeaderFrame = true
- }
- s.mu.Unlock()
- if writeHeaderFrame {
- t.WriteHeader(s, nil)
- }
- r := bytes.NewBuffer(data)
- for {
- if r.Len() == 0 {
- return nil
- }
- size := http2MaxFrameLen
- s.sendQuotaPool.add(0)
- // Wait until the stream has some quota to send the data.
- sq, err := wait(s.ctx, nil, nil, t.shutdownChan, s.sendQuotaPool.acquire())
- if err != nil {
- return err
- }
- t.sendQuotaPool.add(0)
- // Wait until the transport has some quota to send the data.
- tq, err := wait(s.ctx, nil, nil, t.shutdownChan, t.sendQuotaPool.acquire())
- if err != nil {
- if _, ok := err.(StreamError); ok {
- t.sendQuotaPool.cancel()
- }
- return err
- }
- if sq < size {
- size = sq
- }
- if tq < size {
- size = tq
- }
- p := r.Next(size)
- ps := len(p)
- if ps < sq {
- // Overbooked stream quota. Return it back.
- s.sendQuotaPool.add(sq - ps)
- }
- if ps < tq {
- // Overbooked transport quota. Return it back.
- t.sendQuotaPool.add(tq - ps)
- }
- t.framer.adjustNumWriters(1)
- // Got some quota. Try to acquire writing privilege on the
- // transport.
- if _, err := wait(s.ctx, nil, nil, t.shutdownChan, t.writableChan); err != nil {
- if _, ok := err.(StreamError); ok {
- // Return the connection quota back.
- t.sendQuotaPool.add(ps)
- }
- if t.framer.adjustNumWriters(-1) == 0 {
- // This writer is the last one in this batch and has the
- // responsibility to flush the buffered frames. It queues
- // a flush request to controlBuf instead of flushing directly
- // in order to avoid the race with other writing or flushing.
- t.controlBuf.put(&flushIO{})
- }
- return err
- }
- select {
- case <-s.ctx.Done():
- t.sendQuotaPool.add(ps)
- if t.framer.adjustNumWriters(-1) == 0 {
- t.controlBuf.put(&flushIO{})
- }
- t.writableChan <- 0
- return ContextErr(s.ctx.Err())
- default:
- }
- var forceFlush bool
- if r.Len() == 0 && t.framer.adjustNumWriters(0) == 1 && !opts.Last {
- forceFlush = true
- }
- if err := t.framer.writeData(forceFlush, s.id, false, p); err != nil {
- t.Close()
- return connectionErrorf(true, err, "transport: %v", err)
- }
- if t.framer.adjustNumWriters(-1) == 0 {
- t.framer.flushWrite()
- }
- t.writableChan <- 0
- }
-
-}
-
-func (t *http2Server) applySettings(ss []http2.Setting) {
- for _, s := range ss {
- if s.ID == http2.SettingInitialWindowSize {
- t.mu.Lock()
- defer t.mu.Unlock()
- for _, stream := range t.activeStreams {
- stream.sendQuotaPool.reset(int(s.Val - t.streamSendQuota))
- }
- t.streamSendQuota = s.Val
- }
-
- }
-}
-
-// controller running in a separate goroutine takes charge of sending control
-// frames (e.g., window update, reset stream, setting, etc.) to the server.
-func (t *http2Server) controller() {
- for {
- select {
- case i := <-t.controlBuf.get():
- t.controlBuf.load()
- select {
- case <-t.writableChan:
- switch i := i.(type) {
- case *windowUpdate:
- t.framer.writeWindowUpdate(true, i.streamID, i.increment)
- case *settings:
- if i.ack {
- t.framer.writeSettingsAck(true)
- t.applySettings(i.ss)
- } else {
- t.framer.writeSettings(true, i.ss...)
- }
- case *resetStream:
- t.framer.writeRSTStream(true, i.streamID, i.code)
- case *goAway:
- t.mu.Lock()
- if t.state == closing {
- t.mu.Unlock()
- // The transport is closing.
- return
- }
- sid := t.maxStreamID
- t.state = draining
- t.mu.Unlock()
- t.framer.writeGoAway(true, sid, http2.ErrCodeNo, nil)
- case *flushIO:
- t.framer.flushWrite()
- case *ping:
- t.framer.writePing(true, i.ack, i.data)
- default:
- grpclog.Printf("transport: http2Server.controller got unexpected item type %v\n", i)
- }
- t.writableChan <- 0
- continue
- case <-t.shutdownChan:
- return
- }
- case <-t.shutdownChan:
- return
- }
- }
-}
-
-// Close starts shutting down the http2Server transport.
-// TODO(zhaoq): Now the destruction is not blocked on any pending streams. This
-// could cause some resource issue. Revisit this later.
-func (t *http2Server) Close() (err error) {
- t.mu.Lock()
- if t.state == closing {
- t.mu.Unlock()
- return errors.New("transport: Close() was already called")
- }
- t.state = closing
- streams := t.activeStreams
- t.activeStreams = nil
- t.mu.Unlock()
- close(t.shutdownChan)
- err = t.conn.Close()
- // Cancel all active streams.
- for _, s := range streams {
- s.cancel()
- }
- return
-}
-
-// closeStream clears the footprint of a stream when the stream is not needed
-// any more.
-func (t *http2Server) closeStream(s *Stream) {
- t.mu.Lock()
- delete(t.activeStreams, s.id)
- if t.state == draining && len(t.activeStreams) == 0 {
- defer t.Close()
- }
- t.mu.Unlock()
- // In case stream sending and receiving are invoked in separate
- // goroutines (e.g., bi-directional streaming), cancel needs to be
- // called to interrupt the potential blocking on other goroutines.
- s.cancel()
- s.mu.Lock()
- if q := s.fc.resetPendingData(); q > 0 {
- if w := t.fc.onRead(q); w > 0 {
- t.controlBuf.put(&windowUpdate{0, w})
- }
- }
- if s.state == streamDone {
- s.mu.Unlock()
- return
- }
- s.state = streamDone
- s.mu.Unlock()
-}
-
-func (t *http2Server) RemoteAddr() net.Addr {
- return t.conn.RemoteAddr()
-}
-
-func (t *http2Server) Drain() {
- t.controlBuf.put(&goAway{})
-}
diff --git a/vendor/google.golang.org/grpc/transport/http_util.go b/vendor/google.golang.org/grpc/transport/http_util.go
deleted file mode 100644
index a3c68d4ca..000000000
--- a/vendor/google.golang.org/grpc/transport/http_util.go
+++ /dev/null
@@ -1,513 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package transport
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io"
- "net"
- "strconv"
- "strings"
- "sync/atomic"
- "time"
-
- "golang.org/x/net/http2"
- "golang.org/x/net/http2/hpack"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/metadata"
-)
-
-const (
- // The primary user agent
- primaryUA = "grpc-go/1.0"
- // http2MaxFrameLen specifies the max length of a HTTP2 frame.
- http2MaxFrameLen = 16384 // 16KB frame
- // http://http2.github.io/http2-spec/#SettingValues
- http2InitHeaderTableSize = 4096
- // http2IOBufSize specifies the buffer size for sending frames.
- http2IOBufSize = 32 * 1024
-)
-
-var (
- clientPreface = []byte(http2.ClientPreface)
- http2ErrConvTab = map[http2.ErrCode]codes.Code{
- http2.ErrCodeNo: codes.Internal,
- http2.ErrCodeProtocol: codes.Internal,
- http2.ErrCodeInternal: codes.Internal,
- http2.ErrCodeFlowControl: codes.ResourceExhausted,
- http2.ErrCodeSettingsTimeout: codes.Internal,
- http2.ErrCodeStreamClosed: codes.Internal,
- http2.ErrCodeFrameSize: codes.Internal,
- http2.ErrCodeRefusedStream: codes.Unavailable,
- http2.ErrCodeCancel: codes.Canceled,
- http2.ErrCodeCompression: codes.Internal,
- http2.ErrCodeConnect: codes.Internal,
- http2.ErrCodeEnhanceYourCalm: codes.ResourceExhausted,
- http2.ErrCodeInadequateSecurity: codes.PermissionDenied,
- http2.ErrCodeHTTP11Required: codes.FailedPrecondition,
- }
- statusCodeConvTab = map[codes.Code]http2.ErrCode{
- codes.Internal: http2.ErrCodeInternal,
- codes.Canceled: http2.ErrCodeCancel,
- codes.Unavailable: http2.ErrCodeRefusedStream,
- codes.ResourceExhausted: http2.ErrCodeEnhanceYourCalm,
- codes.PermissionDenied: http2.ErrCodeInadequateSecurity,
- }
-)
-
-// Records the states during HPACK decoding. Must be reset once the
-// decoding of the entire headers are finished.
-type decodeState struct {
- err error // first error encountered decoding
-
- encoding string
- // statusCode caches the stream status received from the trailer
- // the server sent. Client side only.
- statusCode codes.Code
- statusDesc string
- // Server side only fields.
- timeoutSet bool
- timeout time.Duration
- method string
- // key-value metadata map from the peer.
- mdata map[string][]string
-}
-
-// isReservedHeader checks whether hdr belongs to HTTP2 headers
-// reserved by gRPC protocol. Any other headers are classified as the
-// user-specified metadata.
-func isReservedHeader(hdr string) bool {
- if hdr != "" && hdr[0] == ':' {
- return true
- }
- switch hdr {
- case "content-type",
- "grpc-message-type",
- "grpc-encoding",
- "grpc-message",
- "grpc-status",
- "grpc-timeout",
- "te":
- return true
- default:
- return false
- }
-}
-
-// isWhitelistedPseudoHeader checks whether hdr belongs to HTTP2 pseudoheaders
-// that should be propagated into metadata visible to users.
-func isWhitelistedPseudoHeader(hdr string) bool {
- switch hdr {
- case ":authority":
- return true
- default:
- return false
- }
-}
-
-func (d *decodeState) setErr(err error) {
- if d.err == nil {
- d.err = err
- }
-}
-
-func validContentType(t string) bool {
- e := "application/grpc"
- if !strings.HasPrefix(t, e) {
- return false
- }
- // Support variations on the content-type
- // (e.g. "application/grpc+blah", "application/grpc;blah").
- if len(t) > len(e) && t[len(e)] != '+' && t[len(e)] != ';' {
- return false
- }
- return true
-}
-
-func (d *decodeState) processHeaderField(f hpack.HeaderField) {
- switch f.Name {
- case "content-type":
- if !validContentType(f.Value) {
- d.setErr(streamErrorf(codes.FailedPrecondition, "transport: received the unexpected content-type %q", f.Value))
- return
- }
- case "grpc-encoding":
- d.encoding = f.Value
- case "grpc-status":
- code, err := strconv.Atoi(f.Value)
- if err != nil {
- d.setErr(streamErrorf(codes.Internal, "transport: malformed grpc-status: %v", err))
- return
- }
- d.statusCode = codes.Code(code)
- case "grpc-message":
- d.statusDesc = decodeGrpcMessage(f.Value)
- case "grpc-timeout":
- d.timeoutSet = true
- var err error
- d.timeout, err = decodeTimeout(f.Value)
- if err != nil {
- d.setErr(streamErrorf(codes.Internal, "transport: malformed time-out: %v", err))
- return
- }
- case ":path":
- d.method = f.Value
- default:
- if !isReservedHeader(f.Name) || isWhitelistedPseudoHeader(f.Name) {
- if f.Name == "user-agent" {
- i := strings.LastIndex(f.Value, " ")
- if i == -1 {
- // There is no application user agent string being set.
- return
- }
- // Extract the application user agent string.
- f.Value = f.Value[:i]
- }
- if d.mdata == nil {
- d.mdata = make(map[string][]string)
- }
- k, v, err := metadata.DecodeKeyValue(f.Name, f.Value)
- if err != nil {
- grpclog.Printf("Failed to decode (%q, %q): %v", f.Name, f.Value, err)
- return
- }
- d.mdata[k] = append(d.mdata[k], v)
- }
- }
-}
-
-type timeoutUnit uint8
-
-const (
- hour timeoutUnit = 'H'
- minute timeoutUnit = 'M'
- second timeoutUnit = 'S'
- millisecond timeoutUnit = 'm'
- microsecond timeoutUnit = 'u'
- nanosecond timeoutUnit = 'n'
-)
-
-func timeoutUnitToDuration(u timeoutUnit) (d time.Duration, ok bool) {
- switch u {
- case hour:
- return time.Hour, true
- case minute:
- return time.Minute, true
- case second:
- return time.Second, true
- case millisecond:
- return time.Millisecond, true
- case microsecond:
- return time.Microsecond, true
- case nanosecond:
- return time.Nanosecond, true
- default:
- }
- return
-}
-
-const maxTimeoutValue int64 = 100000000 - 1
-
-// div does integer division and round-up the result. Note that this is
-// equivalent to (d+r-1)/r but has less chance to overflow.
-func div(d, r time.Duration) int64 {
- if m := d % r; m > 0 {
- return int64(d/r + 1)
- }
- return int64(d / r)
-}
-
-// TODO(zhaoq): It is the simplistic and not bandwidth efficient. Improve it.
-func encodeTimeout(t time.Duration) string {
- if t <= 0 {
- return "0n"
- }
- if d := div(t, time.Nanosecond); d <= maxTimeoutValue {
- return strconv.FormatInt(d, 10) + "n"
- }
- if d := div(t, time.Microsecond); d <= maxTimeoutValue {
- return strconv.FormatInt(d, 10) + "u"
- }
- if d := div(t, time.Millisecond); d <= maxTimeoutValue {
- return strconv.FormatInt(d, 10) + "m"
- }
- if d := div(t, time.Second); d <= maxTimeoutValue {
- return strconv.FormatInt(d, 10) + "S"
- }
- if d := div(t, time.Minute); d <= maxTimeoutValue {
- return strconv.FormatInt(d, 10) + "M"
- }
- // Note that maxTimeoutValue * time.Hour > MaxInt64.
- return strconv.FormatInt(div(t, time.Hour), 10) + "H"
-}
-
-func decodeTimeout(s string) (time.Duration, error) {
- size := len(s)
- if size < 2 {
- return 0, fmt.Errorf("transport: timeout string is too short: %q", s)
- }
- unit := timeoutUnit(s[size-1])
- d, ok := timeoutUnitToDuration(unit)
- if !ok {
- return 0, fmt.Errorf("transport: timeout unit is not recognized: %q", s)
- }
- t, err := strconv.ParseInt(s[:size-1], 10, 64)
- if err != nil {
- return 0, err
- }
- return d * time.Duration(t), nil
-}
-
-const (
- spaceByte = ' '
- tildaByte = '~'
- percentByte = '%'
-)
-
-// encodeGrpcMessage is used to encode status code in header field
-// "grpc-message".
-// It checks to see if each individual byte in msg is an
-// allowable byte, and then either percent encoding or passing it through.
-// When percent encoding, the byte is converted into hexadecimal notation
-// with a '%' prepended.
-func encodeGrpcMessage(msg string) string {
- if msg == "" {
- return ""
- }
- lenMsg := len(msg)
- for i := 0; i < lenMsg; i++ {
- c := msg[i]
- if !(c >= spaceByte && c < tildaByte && c != percentByte) {
- return encodeGrpcMessageUnchecked(msg)
- }
- }
- return msg
-}
-
-func encodeGrpcMessageUnchecked(msg string) string {
- var buf bytes.Buffer
- lenMsg := len(msg)
- for i := 0; i < lenMsg; i++ {
- c := msg[i]
- if c >= spaceByte && c < tildaByte && c != percentByte {
- buf.WriteByte(c)
- } else {
- buf.WriteString(fmt.Sprintf("%%%02X", c))
- }
- }
- return buf.String()
-}
-
-// decodeGrpcMessage decodes the msg encoded by encodeGrpcMessage.
-func decodeGrpcMessage(msg string) string {
- if msg == "" {
- return ""
- }
- lenMsg := len(msg)
- for i := 0; i < lenMsg; i++ {
- if msg[i] == percentByte && i+2 < lenMsg {
- return decodeGrpcMessageUnchecked(msg)
- }
- }
- return msg
-}
-
-func decodeGrpcMessageUnchecked(msg string) string {
- var buf bytes.Buffer
- lenMsg := len(msg)
- for i := 0; i < lenMsg; i++ {
- c := msg[i]
- if c == percentByte && i+2 < lenMsg {
- parsed, err := strconv.ParseUint(msg[i+1:i+3], 16, 8)
- if err != nil {
- buf.WriteByte(c)
- } else {
- buf.WriteByte(byte(parsed))
- i += 2
- }
- } else {
- buf.WriteByte(c)
- }
- }
- return buf.String()
-}
-
-type framer struct {
- numWriters int32
- reader io.Reader
- writer *bufio.Writer
- fr *http2.Framer
-}
-
-func newFramer(conn net.Conn) *framer {
- f := &framer{
- reader: bufio.NewReaderSize(conn, http2IOBufSize),
- writer: bufio.NewWriterSize(conn, http2IOBufSize),
- }
- f.fr = http2.NewFramer(f.writer, f.reader)
- f.fr.ReadMetaHeaders = hpack.NewDecoder(http2InitHeaderTableSize, nil)
- return f
-}
-
-func (f *framer) adjustNumWriters(i int32) int32 {
- return atomic.AddInt32(&f.numWriters, i)
-}
-
-// The following writeXXX functions can only be called when the caller gets
-// unblocked from writableChan channel (i.e., owns the privilege to write).
-
-func (f *framer) writeContinuation(forceFlush bool, streamID uint32, endHeaders bool, headerBlockFragment []byte) error {
- if err := f.fr.WriteContinuation(streamID, endHeaders, headerBlockFragment); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) writeData(forceFlush bool, streamID uint32, endStream bool, data []byte) error {
- if err := f.fr.WriteData(streamID, endStream, data); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) writeGoAway(forceFlush bool, maxStreamID uint32, code http2.ErrCode, debugData []byte) error {
- if err := f.fr.WriteGoAway(maxStreamID, code, debugData); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) writeHeaders(forceFlush bool, p http2.HeadersFrameParam) error {
- if err := f.fr.WriteHeaders(p); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) writePing(forceFlush, ack bool, data [8]byte) error {
- if err := f.fr.WritePing(ack, data); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) writePriority(forceFlush bool, streamID uint32, p http2.PriorityParam) error {
- if err := f.fr.WritePriority(streamID, p); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) writePushPromise(forceFlush bool, p http2.PushPromiseParam) error {
- if err := f.fr.WritePushPromise(p); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) writeRSTStream(forceFlush bool, streamID uint32, code http2.ErrCode) error {
- if err := f.fr.WriteRSTStream(streamID, code); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) writeSettings(forceFlush bool, settings ...http2.Setting) error {
- if err := f.fr.WriteSettings(settings...); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) writeSettingsAck(forceFlush bool) error {
- if err := f.fr.WriteSettingsAck(); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) writeWindowUpdate(forceFlush bool, streamID, incr uint32) error {
- if err := f.fr.WriteWindowUpdate(streamID, incr); err != nil {
- return err
- }
- if forceFlush {
- return f.writer.Flush()
- }
- return nil
-}
-
-func (f *framer) flushWrite() error {
- return f.writer.Flush()
-}
-
-func (f *framer) readFrame() (http2.Frame, error) {
- return f.fr.ReadFrame()
-}
-
-func (f *framer) errorDetail() error {
- return f.fr.ErrorDetail()
-}
diff --git a/vendor/google.golang.org/grpc/transport/pre_go16.go b/vendor/google.golang.org/grpc/transport/pre_go16.go
deleted file mode 100644
index 33d91c17c..000000000
--- a/vendor/google.golang.org/grpc/transport/pre_go16.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// +build !go1.6
-
-/*
- * Copyright 2016, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-package transport
-
-import (
- "net"
- "time"
-
- "golang.org/x/net/context"
-)
-
-// dialContext connects to the address on the named network.
-func dialContext(ctx context.Context, network, address string) (net.Conn, error) {
- var dialer net.Dialer
- if deadline, ok := ctx.Deadline(); ok {
- dialer.Timeout = deadline.Sub(time.Now())
- }
- return dialer.Dial(network, address)
-}
diff --git a/vendor/google.golang.org/grpc/transport/transport.go b/vendor/google.golang.org/grpc/transport/transport.go
deleted file mode 100644
index 413f7493b..000000000
--- a/vendor/google.golang.org/grpc/transport/transport.go
+++ /dev/null
@@ -1,595 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*
-Package transport defines and implements message oriented communication channel
-to complete various transactions (e.g., an RPC).
-*/
-package transport // import "google.golang.org/grpc/transport"
-
-import (
- "bytes"
- "fmt"
- "io"
- "net"
- "sync"
-
- "golang.org/x/net/context"
- "golang.org/x/net/trace"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/credentials"
- "google.golang.org/grpc/metadata"
-)
-
-// recvMsg represents the received msg from the transport. All transport
-// protocol specific info has been removed.
-type recvMsg struct {
- data []byte
- // nil: received some data
- // io.EOF: stream is completed. data is nil.
- // other non-nil error: transport failure. data is nil.
- err error
-}
-
-func (*recvMsg) item() {}
-
-// All items in an out of a recvBuffer should be the same type.
-type item interface {
- item()
-}
-
-// recvBuffer is an unbounded channel of item.
-type recvBuffer struct {
- c chan item
- mu sync.Mutex
- backlog []item
-}
-
-func newRecvBuffer() *recvBuffer {
- b := &recvBuffer{
- c: make(chan item, 1),
- }
- return b
-}
-
-func (b *recvBuffer) put(r item) {
- b.mu.Lock()
- defer b.mu.Unlock()
- if len(b.backlog) == 0 {
- select {
- case b.c <- r:
- return
- default:
- }
- }
- b.backlog = append(b.backlog, r)
-}
-
-func (b *recvBuffer) load() {
- b.mu.Lock()
- defer b.mu.Unlock()
- if len(b.backlog) > 0 {
- select {
- case b.c <- b.backlog[0]:
- b.backlog = b.backlog[1:]
- default:
- }
- }
-}
-
-// get returns the channel that receives an item in the buffer.
-//
-// Upon receipt of an item, the caller should call load to send another
-// item onto the channel if there is any.
-func (b *recvBuffer) get() <-chan item {
- return b.c
-}
-
-// recvBufferReader implements io.Reader interface to read the data from
-// recvBuffer.
-type recvBufferReader struct {
- ctx context.Context
- goAway chan struct{}
- recv *recvBuffer
- last *bytes.Reader // Stores the remaining data in the previous calls.
- err error
-}
-
-// Read reads the next len(p) bytes from last. If last is drained, it tries to
-// read additional data from recv. It blocks if there no additional data available
-// in recv. If Read returns any non-nil error, it will continue to return that error.
-func (r *recvBufferReader) Read(p []byte) (n int, err error) {
- if r.err != nil {
- return 0, r.err
- }
- defer func() { r.err = err }()
- if r.last != nil && r.last.Len() > 0 {
- // Read remaining data left in last call.
- return r.last.Read(p)
- }
- select {
- case <-r.ctx.Done():
- return 0, ContextErr(r.ctx.Err())
- case <-r.goAway:
- return 0, ErrStreamDrain
- case i := <-r.recv.get():
- r.recv.load()
- m := i.(*recvMsg)
- if m.err != nil {
- return 0, m.err
- }
- r.last = bytes.NewReader(m.data)
- return r.last.Read(p)
- }
-}
-
-type streamState uint8
-
-const (
- streamActive streamState = iota
- streamWriteDone // EndStream sent
- streamReadDone // EndStream received
- streamDone // the entire stream is finished.
-)
-
-// Stream represents an RPC in the transport layer.
-type Stream struct {
- id uint32
- // nil for client side Stream.
- st ServerTransport
- // ctx is the associated context of the stream.
- ctx context.Context
- // cancel is always nil for client side Stream.
- cancel context.CancelFunc
- // done is closed when the final status arrives.
- done chan struct{}
- // goAway is closed when the server sent GoAways signal before this stream was initiated.
- goAway chan struct{}
- // method records the associated RPC method of the stream.
- method string
- recvCompress string
- sendCompress string
- buf *recvBuffer
- dec io.Reader
- fc *inFlow
- recvQuota uint32
- // The accumulated inbound quota pending for window update.
- updateQuota uint32
- // The handler to control the window update procedure for both this
- // particular stream and the associated transport.
- windowHandler func(int)
-
- sendQuotaPool *quotaPool
- // Close headerChan to indicate the end of reception of header metadata.
- headerChan chan struct{}
- // header caches the received header metadata.
- header metadata.MD
- // The key-value map of trailer metadata.
- trailer metadata.MD
-
- mu sync.RWMutex // guard the following
- // headerOK becomes true from the first header is about to send.
- headerOk bool
- state streamState
- // true iff headerChan is closed. Used to avoid closing headerChan
- // multiple times.
- headerDone bool
- // the status received from the server.
- statusCode codes.Code
- statusDesc string
-}
-
-// RecvCompress returns the compression algorithm applied to the inbound
-// message. It is empty string if there is no compression applied.
-func (s *Stream) RecvCompress() string {
- return s.recvCompress
-}
-
-// SetSendCompress sets the compression algorithm to the stream.
-func (s *Stream) SetSendCompress(str string) {
- s.sendCompress = str
-}
-
-// Done returns a chanel which is closed when it receives the final status
-// from the server.
-func (s *Stream) Done() <-chan struct{} {
- return s.done
-}
-
-// GoAway returns a channel which is closed when the server sent GoAways signal
-// before this stream was initiated.
-func (s *Stream) GoAway() <-chan struct{} {
- return s.goAway
-}
-
-// Header acquires the key-value pairs of header metadata once it
-// is available. It blocks until i) the metadata is ready or ii) there is no
-// header metadata or iii) the stream is cancelled/expired.
-func (s *Stream) Header() (metadata.MD, error) {
- select {
- case <-s.ctx.Done():
- return nil, ContextErr(s.ctx.Err())
- case <-s.goAway:
- return nil, ErrStreamDrain
- case <-s.headerChan:
- return s.header.Copy(), nil
- }
-}
-
-// Trailer returns the cached trailer metedata. Note that if it is not called
-// after the entire stream is done, it could return an empty MD. Client
-// side only.
-func (s *Stream) Trailer() metadata.MD {
- s.mu.RLock()
- defer s.mu.RUnlock()
- return s.trailer.Copy()
-}
-
-// ServerTransport returns the underlying ServerTransport for the stream.
-// The client side stream always returns nil.
-func (s *Stream) ServerTransport() ServerTransport {
- return s.st
-}
-
-// Context returns the context of the stream.
-func (s *Stream) Context() context.Context {
- return s.ctx
-}
-
-// TraceContext recreates the context of s with a trace.Trace.
-func (s *Stream) TraceContext(tr trace.Trace) {
- s.ctx = trace.NewContext(s.ctx, tr)
-}
-
-// Method returns the method for the stream.
-func (s *Stream) Method() string {
- return s.method
-}
-
-// StatusCode returns statusCode received from the server.
-func (s *Stream) StatusCode() codes.Code {
- return s.statusCode
-}
-
-// StatusDesc returns statusDesc received from the server.
-func (s *Stream) StatusDesc() string {
- return s.statusDesc
-}
-
-// SetHeader sets the header metadata. This can be called multiple times.
-// Server side only.
-func (s *Stream) SetHeader(md metadata.MD) error {
- s.mu.Lock()
- defer s.mu.Unlock()
- if s.headerOk || s.state == streamDone {
- return ErrIllegalHeaderWrite
- }
- if md.Len() == 0 {
- return nil
- }
- s.header = metadata.Join(s.header, md)
- return nil
-}
-
-// SetTrailer sets the trailer metadata which will be sent with the RPC status
-// by the server. This can be called multiple times. Server side only.
-func (s *Stream) SetTrailer(md metadata.MD) error {
- if md.Len() == 0 {
- return nil
- }
- s.mu.Lock()
- defer s.mu.Unlock()
- s.trailer = metadata.Join(s.trailer, md)
- return nil
-}
-
-func (s *Stream) write(m recvMsg) {
- s.buf.put(&m)
-}
-
-// Read reads all the data available for this Stream from the transport and
-// passes them into the decoder, which converts them into a gRPC message stream.
-// The error is io.EOF when the stream is done or another non-nil error if
-// the stream broke.
-func (s *Stream) Read(p []byte) (n int, err error) {
- n, err = s.dec.Read(p)
- if err != nil {
- return
- }
- s.windowHandler(n)
- return
-}
-
-// The key to save transport.Stream in the context.
-type streamKey struct{}
-
-// newContextWithStream creates a new context from ctx and attaches stream
-// to it.
-func newContextWithStream(ctx context.Context, stream *Stream) context.Context {
- return context.WithValue(ctx, streamKey{}, stream)
-}
-
-// StreamFromContext returns the stream saved in ctx.
-func StreamFromContext(ctx context.Context) (s *Stream, ok bool) {
- s, ok = ctx.Value(streamKey{}).(*Stream)
- return
-}
-
-// state of transport
-type transportState int
-
-const (
- reachable transportState = iota
- unreachable
- closing
- draining
-)
-
-// NewServerTransport creates a ServerTransport with conn or non-nil error
-// if it fails.
-func NewServerTransport(protocol string, conn net.Conn, maxStreams uint32, authInfo credentials.AuthInfo) (ServerTransport, error) {
- return newHTTP2Server(conn, maxStreams, authInfo)
-}
-
-// ConnectOptions covers all relevant options for communicating with the server.
-type ConnectOptions struct {
- // UserAgent is the application user agent.
- UserAgent string
- // Dialer specifies how to dial a network address.
- Dialer func(context.Context, string) (net.Conn, error)
- // PerRPCCredentials stores the PerRPCCredentials required to issue RPCs.
- PerRPCCredentials []credentials.PerRPCCredentials
- // TransportCredentials stores the Authenticator required to setup a client connection.
- TransportCredentials credentials.TransportCredentials
-}
-
-// TargetInfo contains the information of the target such as network address and metadata.
-type TargetInfo struct {
- Addr string
- Metadata interface{}
-}
-
-// NewClientTransport establishes the transport with the required ConnectOptions
-// and returns it to the caller.
-func NewClientTransport(ctx context.Context, target TargetInfo, opts ConnectOptions) (ClientTransport, error) {
- return newHTTP2Client(ctx, target, opts)
-}
-
-// Options provides additional hints and information for message
-// transmission.
-type Options struct {
- // Last indicates whether this write is the last piece for
- // this stream.
- Last bool
-
- // Delay is a hint to the transport implementation for whether
- // the data could be buffered for a batching write. The
- // Transport implementation may ignore the hint.
- Delay bool
-}
-
-// CallHdr carries the information of a particular RPC.
-type CallHdr struct {
- // Host specifies the peer's host.
- Host string
-
- // Method specifies the operation to perform.
- Method string
-
- // RecvCompress specifies the compression algorithm applied on
- // inbound messages.
- RecvCompress string
-
- // SendCompress specifies the compression algorithm applied on
- // outbound message.
- SendCompress string
-
- // Flush indicates whether a new stream command should be sent
- // to the peer without waiting for the first data. This is
- // only a hint. The transport may modify the flush decision
- // for performance purposes.
- Flush bool
-}
-
-// ClientTransport is the common interface for all gRPC client-side transport
-// implementations.
-type ClientTransport interface {
- // Close tears down this transport. Once it returns, the transport
- // should not be accessed any more. The caller must make sure this
- // is called only once.
- Close() error
-
- // GracefulClose starts to tear down the transport. It stops accepting
- // new RPCs and wait the completion of the pending RPCs.
- GracefulClose() error
-
- // Write sends the data for the given stream. A nil stream indicates
- // the write is to be performed on the transport as a whole.
- Write(s *Stream, data []byte, opts *Options) error
-
- // NewStream creates a Stream for an RPC.
- NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, error)
-
- // CloseStream clears the footprint of a stream when the stream is
- // not needed any more. The err indicates the error incurred when
- // CloseStream is called. Must be called when a stream is finished
- // unless the associated transport is closing.
- CloseStream(stream *Stream, err error)
-
- // Error returns a channel that is closed when some I/O error
- // happens. Typically the caller should have a goroutine to monitor
- // this in order to take action (e.g., close the current transport
- // and create a new one) in error case. It should not return nil
- // once the transport is initiated.
- Error() <-chan struct{}
-
- // GoAway returns a channel that is closed when ClientTranspor
- // receives the draining signal from the server (e.g., GOAWAY frame in
- // HTTP/2).
- GoAway() <-chan struct{}
-}
-
-// ServerTransport is the common interface for all gRPC server-side transport
-// implementations.
-//
-// Methods may be called concurrently from multiple goroutines, but
-// Write methods for a given Stream will be called serially.
-type ServerTransport interface {
- // HandleStreams receives incoming streams using the given handler.
- HandleStreams(func(*Stream))
-
- // WriteHeader sends the header metadata for the given stream.
- // WriteHeader may not be called on all streams.
- WriteHeader(s *Stream, md metadata.MD) error
-
- // Write sends the data for the given stream.
- // Write may not be called on all streams.
- Write(s *Stream, data []byte, opts *Options) error
-
- // WriteStatus sends the status of a stream to the client.
- // WriteStatus is the final call made on a stream and always
- // occurs.
- WriteStatus(s *Stream, statusCode codes.Code, statusDesc string) error
-
- // Close tears down the transport. Once it is called, the transport
- // should not be accessed any more. All the pending streams and their
- // handlers will be terminated asynchronously.
- Close() error
-
- // RemoteAddr returns the remote network address.
- RemoteAddr() net.Addr
-
- // Drain notifies the client this ServerTransport stops accepting new RPCs.
- Drain()
-}
-
-// streamErrorf creates an StreamError with the specified error code and description.
-func streamErrorf(c codes.Code, format string, a ...interface{}) StreamError {
- return StreamError{
- Code: c,
- Desc: fmt.Sprintf(format, a...),
- }
-}
-
-// connectionErrorf creates an ConnectionError with the specified error description.
-func connectionErrorf(temp bool, e error, format string, a ...interface{}) ConnectionError {
- return ConnectionError{
- Desc: fmt.Sprintf(format, a...),
- temp: temp,
- err: e,
- }
-}
-
-// ConnectionError is an error that results in the termination of the
-// entire connection and the retry of all the active streams.
-type ConnectionError struct {
- Desc string
- temp bool
- err error
-}
-
-func (e ConnectionError) Error() string {
- return fmt.Sprintf("connection error: desc = %q", e.Desc)
-}
-
-// Temporary indicates if this connection error is temporary or fatal.
-func (e ConnectionError) Temporary() bool {
- return e.temp
-}
-
-// Origin returns the original error of this connection error.
-func (e ConnectionError) Origin() error {
- // Never return nil error here.
- // If the original error is nil, return itself.
- if e.err == nil {
- return e
- }
- return e.err
-}
-
-var (
- // ErrConnClosing indicates that the transport is closing.
- ErrConnClosing = connectionErrorf(true, nil, "transport is closing")
- // ErrStreamDrain indicates that the stream is rejected by the server because
- // the server stops accepting new RPCs.
- ErrStreamDrain = streamErrorf(codes.Unavailable, "the server stops accepting new RPCs")
-)
-
-// StreamError is an error that only affects one stream within a connection.
-type StreamError struct {
- Code codes.Code
- Desc string
-}
-
-func (e StreamError) Error() string {
- return fmt.Sprintf("stream error: code = %d desc = %q", e.Code, e.Desc)
-}
-
-// ContextErr converts the error from context package into a StreamError.
-func ContextErr(err error) StreamError {
- switch err {
- case context.DeadlineExceeded:
- return streamErrorf(codes.DeadlineExceeded, "%v", err)
- case context.Canceled:
- return streamErrorf(codes.Canceled, "%v", err)
- }
- panic(fmt.Sprintf("Unexpected error from context packet: %v", err))
-}
-
-// wait blocks until it can receive from ctx.Done, closing, or proceed.
-// If it receives from ctx.Done, it returns 0, the StreamError for ctx.Err.
-// If it receives from done, it returns 0, io.EOF if ctx is not done; otherwise
-// it return the StreamError for ctx.Err.
-// If it receives from goAway, it returns 0, ErrStreamDrain.
-// If it receives from closing, it returns 0, ErrConnClosing.
-// If it receives from proceed, it returns the received integer, nil.
-func wait(ctx context.Context, done, goAway, closing <-chan struct{}, proceed <-chan int) (int, error) {
- select {
- case <-ctx.Done():
- return 0, ContextErr(ctx.Err())
- case <-done:
- // User cancellation has precedence.
- select {
- case <-ctx.Done():
- return 0, ContextErr(ctx.Err())
- default:
- }
- return 0, io.EOF
- case <-goAway:
- return 0, ErrStreamDrain
- case <-closing:
- return 0, ErrConnClosing
- case i := <-proceed:
- return i, nil
- }
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/LICENSE b/vendor/gopkg.in/square/go-jose.v2/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/vendor/gopkg.in/square/go-jose.v2/README.md b/vendor/gopkg.in/square/go-jose.v2/README.md
deleted file mode 100644
index 43bf1fbea..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/README.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# Go JOSE
-
-[![godoc](http://img.shields.io/badge/godoc-version_1-blue.svg?style=flat)](https://godoc.org/gopkg.in/square/go-jose.v1)
-[![godoc](http://img.shields.io/badge/godoc-version_2-blue.svg?style=flat)](https://godoc.org/gopkg.in/square/go-jose.v2)
-[![license](http://img.shields.io/badge/license-apache_2.0-blue.svg?style=flat)](https://raw.githubusercontent.com/square/go-jose/master/LICENSE)
-[![build](https://travis-ci.org/square/go-jose.svg?branch=master)](https://travis-ci.org/square/go-jose)
-[![coverage](https://coveralls.io/repos/github/square/go-jose/badge.svg?branch=master)](https://coveralls.io/r/square/go-jose)
-
-Package jose aims to provide an implementation of the Javascript Object Signing
-and Encryption set of standards. This includes support for JSON Web Encryption,
-JSON Web Signature, and JSON Web Token standards.
-
-**Disclaimer**: This library contains encryption software that is subject to
-the U.S. Export Administration Regulations. You may not export, re-export,
-transfer or download this code or any part of it in violation of any United
-States law, directive or regulation. In particular this software may not be
-exported or re-exported in any form or on any media to Iran, North Sudan,
-Syria, Cuba, or North Korea, or to denied persons or entities mentioned on any
-US maintained blocked list.
-
-## Overview
-
-The implementation follows the
-[JSON Web Encryption](http://dx.doi.org/10.17487/RFC7516) (RFC 7516),
-[JSON Web Signature](http://dx.doi.org/10.17487/RFC7515) (RFC 7515), and
-[JSON Web Token](http://dx.doi.org/10.17487/RFC7519) (RFC 7519).
-Tables of supported algorithms are shown below. The library supports both
-the compact and full serialization formats, and has optional support for
-multiple recipients. It also comes with a small command-line utility
-([`jose-util`](https://github.com/square/go-jose/tree/v2/jose-util))
-for dealing with JOSE messages in a shell.
-
-**Note**: We use a forked version of the `encoding/json` package from the Go
-standard library which uses case-sensitive matching for member names (instead
-of [case-insensitive matching](https://www.ietf.org/mail-archive/web/json/current/msg03763.html)).
-This is to avoid differences in interpretation of messages between go-jose and
-libraries in other languages.
-
-### Versions
-
-We use [gopkg.in](https://gopkg.in) for versioning.
-
-[Version 1](https://gopkg.in/square/go-jose.v1) is the old stable version:
-
- import "gopkg.in/square/go-jose.v1"
-
-[Version 2](https://gopkg.in/square/go-jose.v2) is for new development:
-
- import "gopkg.in/square/go-jose.v2"
-
-The interface for [go-jose.v1](https://gopkg.in/square/go-jose.v1) will remain
-backwards compatible. No new feature development will take place on the `v1` branch,
-however bug fixes and security fixes will be backported.
-
-The interface for [go-jose.v2](https://gopkg.in/square/go-jose.v2) is mostly
-stable, but we suggest pinning to a particular revision for now as we still reserve
-the right to make changes. New feature development happens on this branch.
-
-New in [go-jose.v2](https://gopkg.in/square/go-jose.v2) is a
-[jwt](https://godoc.org/gopkg.in/square/go-jose.v2/jwt) sub-package
-contributed by [@shaxbee](https://github.com/shaxbee).
-
-### Supported algorithms
-
-See below for a table of supported algorithms. Algorithm identifiers match
-the names in the [JSON Web Algorithms](http://dx.doi.org/10.17487/RFC7518)
-standard where possible. The Godoc reference has a list of constants.
-
- Key encryption | Algorithm identifier(s)
- :------------------------- | :------------------------------
- RSA-PKCS#1v1.5 | RSA1_5
- RSA-OAEP | RSA-OAEP, RSA-OAEP-256
- AES key wrap | A128KW, A192KW, A256KW
- AES-GCM key wrap | A128GCMKW, A192GCMKW, A256GCMKW
- ECDH-ES + AES key wrap | ECDH-ES+A128KW, ECDH-ES+A192KW, ECDH-ES+A256KW
- ECDH-ES (direct) | ECDH-ES<sup>1</sup>
- Direct encryption | dir<sup>1</sup>
-
-<sup>1. Not supported in multi-recipient mode</sup>
-
- Signing / MAC | Algorithm identifier(s)
- :------------------------- | :------------------------------
- RSASSA-PKCS#1v1.5 | RS256, RS384, RS512
- RSASSA-PSS | PS256, PS384, PS512
- HMAC | HS256, HS384, HS512
- ECDSA | ES256, ES384, ES512
-
- Content encryption | Algorithm identifier(s)
- :------------------------- | :------------------------------
- AES-CBC+HMAC | A128CBC-HS256, A192CBC-HS384, A256CBC-HS512
- AES-GCM | A128GCM, A192GCM, A256GCM
-
- Compression | Algorithm identifiers(s)
- :------------------------- | -------------------------------
- DEFLATE (RFC 1951) | DEF
-
-### Supported key types
-
-See below for a table of supported key types. These are understood by the
-library, and can be passed to corresponding functions such as `NewEncrypter` or
-`NewSigner`. Each of these keys can also be wrapped in a JWK if desired, which
-allows attaching a key id.
-
- Algorithm(s) | Corresponding types
- :------------------------- | -------------------------------
- RSA | *[rsa.PublicKey](http://golang.org/pkg/crypto/rsa/#PublicKey), *[rsa.PrivateKey](http://golang.org/pkg/crypto/rsa/#PrivateKey)
- ECDH, ECDSA | *[ecdsa.PublicKey](http://golang.org/pkg/crypto/ecdsa/#PublicKey), *[ecdsa.PrivateKey](http://golang.org/pkg/crypto/ecdsa/#PrivateKey)
- AES, HMAC | []byte
-
-## Examples
-
-[![godoc](http://img.shields.io/badge/godoc-version_1-blue.svg?style=flat)](https://godoc.org/gopkg.in/square/go-jose.v1)
-[![godoc](http://img.shields.io/badge/godoc-version_2-blue.svg?style=flat)](https://godoc.org/gopkg.in/square/go-jose.v2)
-
-Examples can be found in the Godoc
-reference for this package. The
-[`jose-util`](https://github.com/square/go-jose/tree/v2/jose-util)
-subdirectory also contains a small command-line utility which might be useful
-as an example.
diff --git a/vendor/gopkg.in/square/go-jose.v2/asymmetric.go b/vendor/gopkg.in/square/go-jose.v2/asymmetric.go
deleted file mode 100644
index 15e9d11a2..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/asymmetric.go
+++ /dev/null
@@ -1,591 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 jose
-
-import (
- "crypto"
- "crypto/aes"
- "crypto/ecdsa"
- "crypto/rand"
- "crypto/rsa"
- "crypto/sha1"
- "crypto/sha256"
- "errors"
- "fmt"
- "math/big"
-
- "golang.org/x/crypto/ed25519"
- "gopkg.in/square/go-jose.v2/cipher"
- "gopkg.in/square/go-jose.v2/json"
-)
-
-// A generic RSA-based encrypter/verifier
-type rsaEncrypterVerifier struct {
- publicKey *rsa.PublicKey
-}
-
-// A generic RSA-based decrypter/signer
-type rsaDecrypterSigner struct {
- privateKey *rsa.PrivateKey
-}
-
-// A generic EC-based encrypter/verifier
-type ecEncrypterVerifier struct {
- publicKey *ecdsa.PublicKey
-}
-
-type edEncrypterVerifier struct {
- publicKey ed25519.PublicKey
-}
-
-// A key generator for ECDH-ES
-type ecKeyGenerator struct {
- size int
- algID string
- publicKey *ecdsa.PublicKey
-}
-
-// A generic EC-based decrypter/signer
-type ecDecrypterSigner struct {
- privateKey *ecdsa.PrivateKey
-}
-
-type edDecrypterSigner struct {
- privateKey ed25519.PrivateKey
-}
-
-// newRSARecipient creates recipientKeyInfo based on the given key.
-func newRSARecipient(keyAlg KeyAlgorithm, publicKey *rsa.PublicKey) (recipientKeyInfo, error) {
- // Verify that key management algorithm is supported by this encrypter
- switch keyAlg {
- case RSA1_5, RSA_OAEP, RSA_OAEP_256:
- default:
- return recipientKeyInfo{}, ErrUnsupportedAlgorithm
- }
-
- if publicKey == nil {
- return recipientKeyInfo{}, errors.New("invalid public key")
- }
-
- return recipientKeyInfo{
- keyAlg: keyAlg,
- keyEncrypter: &rsaEncrypterVerifier{
- publicKey: publicKey,
- },
- }, nil
-}
-
-// newRSASigner creates a recipientSigInfo based on the given key.
-func newRSASigner(sigAlg SignatureAlgorithm, privateKey *rsa.PrivateKey) (recipientSigInfo, error) {
- // Verify that key management algorithm is supported by this encrypter
- switch sigAlg {
- case RS256, RS384, RS512, PS256, PS384, PS512:
- default:
- return recipientSigInfo{}, ErrUnsupportedAlgorithm
- }
-
- if privateKey == nil {
- return recipientSigInfo{}, errors.New("invalid private key")
- }
-
- return recipientSigInfo{
- sigAlg: sigAlg,
- publicKey: &JSONWebKey{
- Key: &privateKey.PublicKey,
- },
- signer: &rsaDecrypterSigner{
- privateKey: privateKey,
- },
- }, nil
-}
-
-func newEd25519Signer(sigAlg SignatureAlgorithm, privateKey ed25519.PrivateKey) (recipientSigInfo, error) {
- if sigAlg != EdDSA {
- return recipientSigInfo{}, ErrUnsupportedAlgorithm
- }
-
- if privateKey == nil {
- return recipientSigInfo{}, errors.New("invalid private key")
- }
- return recipientSigInfo{
- sigAlg: sigAlg,
- publicKey: &JSONWebKey{
- Key: privateKey.Public(),
- },
- signer: &edDecrypterSigner{
- privateKey: privateKey,
- },
- }, nil
-}
-
-// newECDHRecipient creates recipientKeyInfo based on the given key.
-func newECDHRecipient(keyAlg KeyAlgorithm, publicKey *ecdsa.PublicKey) (recipientKeyInfo, error) {
- // Verify that key management algorithm is supported by this encrypter
- switch keyAlg {
- case ECDH_ES, ECDH_ES_A128KW, ECDH_ES_A192KW, ECDH_ES_A256KW:
- default:
- return recipientKeyInfo{}, ErrUnsupportedAlgorithm
- }
-
- if publicKey == nil || !publicKey.Curve.IsOnCurve(publicKey.X, publicKey.Y) {
- return recipientKeyInfo{}, errors.New("invalid public key")
- }
-
- return recipientKeyInfo{
- keyAlg: keyAlg,
- keyEncrypter: &ecEncrypterVerifier{
- publicKey: publicKey,
- },
- }, nil
-}
-
-// newECDSASigner creates a recipientSigInfo based on the given key.
-func newECDSASigner(sigAlg SignatureAlgorithm, privateKey *ecdsa.PrivateKey) (recipientSigInfo, error) {
- // Verify that key management algorithm is supported by this encrypter
- switch sigAlg {
- case ES256, ES384, ES512:
- default:
- return recipientSigInfo{}, ErrUnsupportedAlgorithm
- }
-
- if privateKey == nil {
- return recipientSigInfo{}, errors.New("invalid private key")
- }
-
- return recipientSigInfo{
- sigAlg: sigAlg,
- publicKey: &JSONWebKey{
- Key: &privateKey.PublicKey,
- },
- signer: &ecDecrypterSigner{
- privateKey: privateKey,
- },
- }, nil
-}
-
-// Encrypt the given payload and update the object.
-func (ctx rsaEncrypterVerifier) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) {
- encryptedKey, err := ctx.encrypt(cek, alg)
- if err != nil {
- return recipientInfo{}, err
- }
-
- return recipientInfo{
- encryptedKey: encryptedKey,
- header: &rawHeader{},
- }, nil
-}
-
-// Encrypt the given payload. Based on the key encryption algorithm,
-// this will either use RSA-PKCS1v1.5 or RSA-OAEP (with SHA-1 or SHA-256).
-func (ctx rsaEncrypterVerifier) encrypt(cek []byte, alg KeyAlgorithm) ([]byte, error) {
- switch alg {
- case RSA1_5:
- return rsa.EncryptPKCS1v15(randReader, ctx.publicKey, cek)
- case RSA_OAEP:
- return rsa.EncryptOAEP(sha1.New(), randReader, ctx.publicKey, cek, []byte{})
- case RSA_OAEP_256:
- return rsa.EncryptOAEP(sha256.New(), randReader, ctx.publicKey, cek, []byte{})
- }
-
- return nil, ErrUnsupportedAlgorithm
-}
-
-// Decrypt the given payload and return the content encryption key.
-func (ctx rsaDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {
- return ctx.decrypt(recipient.encryptedKey, headers.getAlgorithm(), generator)
-}
-
-// Decrypt the given payload. Based on the key encryption algorithm,
-// this will either use RSA-PKCS1v1.5 or RSA-OAEP (with SHA-1 or SHA-256).
-func (ctx rsaDecrypterSigner) decrypt(jek []byte, alg KeyAlgorithm, generator keyGenerator) ([]byte, error) {
- // Note: The random reader on decrypt operations is only used for blinding,
- // so stubbing is meanlingless (hence the direct use of rand.Reader).
- switch alg {
- case RSA1_5:
- defer func() {
- // DecryptPKCS1v15SessionKey sometimes panics on an invalid payload
- // because of an index out of bounds error, which we want to ignore.
- // This has been fixed in Go 1.3.1 (released 2014/08/13), the recover()
- // only exists for preventing crashes with unpatched versions.
- // See: https://groups.google.com/forum/#!topic/golang-dev/7ihX6Y6kx9k
- // See: https://code.google.com/p/go/source/detail?r=58ee390ff31602edb66af41ed10901ec95904d33
- _ = recover()
- }()
-
- // Perform some input validation.
- keyBytes := ctx.privateKey.PublicKey.N.BitLen() / 8
- if keyBytes != len(jek) {
- // Input size is incorrect, the encrypted payload should always match
- // the size of the public modulus (e.g. using a 2048 bit key will
- // produce 256 bytes of output). Reject this since it's invalid input.
- return nil, ErrCryptoFailure
- }
-
- cek, _, err := generator.genKey()
- if err != nil {
- return nil, ErrCryptoFailure
- }
-
- // When decrypting an RSA-PKCS1v1.5 payload, we must take precautions to
- // prevent chosen-ciphertext attacks as described in RFC 3218, "Preventing
- // the Million Message Attack on Cryptographic Message Syntax". We are
- // therefore deliberately ignoring errors here.
- _ = rsa.DecryptPKCS1v15SessionKey(rand.Reader, ctx.privateKey, jek, cek)
-
- return cek, nil
- case RSA_OAEP:
- // Use rand.Reader for RSA blinding
- return rsa.DecryptOAEP(sha1.New(), rand.Reader, ctx.privateKey, jek, []byte{})
- case RSA_OAEP_256:
- // Use rand.Reader for RSA blinding
- return rsa.DecryptOAEP(sha256.New(), rand.Reader, ctx.privateKey, jek, []byte{})
- }
-
- return nil, ErrUnsupportedAlgorithm
-}
-
-// Sign the given payload
-func (ctx rsaDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {
- var hash crypto.Hash
-
- switch alg {
- case RS256, PS256:
- hash = crypto.SHA256
- case RS384, PS384:
- hash = crypto.SHA384
- case RS512, PS512:
- hash = crypto.SHA512
- default:
- return Signature{}, ErrUnsupportedAlgorithm
- }
-
- hasher := hash.New()
-
- // According to documentation, Write() on hash never fails
- _, _ = hasher.Write(payload)
- hashed := hasher.Sum(nil)
-
- var out []byte
- var err error
-
- switch alg {
- case RS256, RS384, RS512:
- out, err = rsa.SignPKCS1v15(randReader, ctx.privateKey, hash, hashed)
- case PS256, PS384, PS512:
- out, err = rsa.SignPSS(randReader, ctx.privateKey, hash, hashed, &rsa.PSSOptions{
- SaltLength: rsa.PSSSaltLengthAuto,
- })
- }
-
- if err != nil {
- return Signature{}, err
- }
-
- return Signature{
- Signature: out,
- protected: &rawHeader{},
- }, nil
-}
-
-// Verify the given payload
-func (ctx rsaEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error {
- var hash crypto.Hash
-
- switch alg {
- case RS256, PS256:
- hash = crypto.SHA256
- case RS384, PS384:
- hash = crypto.SHA384
- case RS512, PS512:
- hash = crypto.SHA512
- default:
- return ErrUnsupportedAlgorithm
- }
-
- hasher := hash.New()
-
- // According to documentation, Write() on hash never fails
- _, _ = hasher.Write(payload)
- hashed := hasher.Sum(nil)
-
- switch alg {
- case RS256, RS384, RS512:
- return rsa.VerifyPKCS1v15(ctx.publicKey, hash, hashed, signature)
- case PS256, PS384, PS512:
- return rsa.VerifyPSS(ctx.publicKey, hash, hashed, signature, nil)
- }
-
- return ErrUnsupportedAlgorithm
-}
-
-// Encrypt the given payload and update the object.
-func (ctx ecEncrypterVerifier) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) {
- switch alg {
- case ECDH_ES:
- // ECDH-ES mode doesn't wrap a key, the shared secret is used directly as the key.
- return recipientInfo{
- header: &rawHeader{},
- }, nil
- case ECDH_ES_A128KW, ECDH_ES_A192KW, ECDH_ES_A256KW:
- default:
- return recipientInfo{}, ErrUnsupportedAlgorithm
- }
-
- generator := ecKeyGenerator{
- algID: string(alg),
- publicKey: ctx.publicKey,
- }
-
- switch alg {
- case ECDH_ES_A128KW:
- generator.size = 16
- case ECDH_ES_A192KW:
- generator.size = 24
- case ECDH_ES_A256KW:
- generator.size = 32
- }
-
- kek, header, err := generator.genKey()
- if err != nil {
- return recipientInfo{}, err
- }
-
- block, err := aes.NewCipher(kek)
- if err != nil {
- return recipientInfo{}, err
- }
-
- jek, err := josecipher.KeyWrap(block, cek)
- if err != nil {
- return recipientInfo{}, err
- }
-
- return recipientInfo{
- encryptedKey: jek,
- header: &header,
- }, nil
-}
-
-// Get key size for EC key generator
-func (ctx ecKeyGenerator) keySize() int {
- return ctx.size
-}
-
-// Get a content encryption key for ECDH-ES
-func (ctx ecKeyGenerator) genKey() ([]byte, rawHeader, error) {
- priv, err := ecdsa.GenerateKey(ctx.publicKey.Curve, randReader)
- if err != nil {
- return nil, rawHeader{}, err
- }
-
- out := josecipher.DeriveECDHES(ctx.algID, []byte{}, []byte{}, priv, ctx.publicKey, ctx.size)
-
- b, err := json.Marshal(&JSONWebKey{
- Key: &priv.PublicKey,
- })
- if err != nil {
- return nil, nil, err
- }
-
- headers := rawHeader{
- headerEPK: makeRawMessage(b),
- }
-
- return out, headers, nil
-}
-
-// Decrypt the given payload and return the content encryption key.
-func (ctx ecDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {
- epk, err := headers.getEPK()
- if err != nil {
- return nil, errors.New("square/go-jose: invalid epk header")
- }
- if epk == nil {
- return nil, errors.New("square/go-jose: missing epk header")
- }
-
- publicKey, ok := epk.Key.(*ecdsa.PublicKey)
- if publicKey == nil || !ok {
- return nil, errors.New("square/go-jose: invalid epk header")
- }
-
- if !ctx.privateKey.Curve.IsOnCurve(publicKey.X, publicKey.Y) {
- return nil, errors.New("square/go-jose: invalid public key in epk header")
- }
-
- apuData, err := headers.getAPU()
- if err != nil {
- return nil, errors.New("square/go-jose: invalid apu header")
- }
- apvData, err := headers.getAPV()
- if err != nil {
- return nil, errors.New("square/go-jose: invalid apv header")
- }
-
- deriveKey := func(algID string, size int) []byte {
- return josecipher.DeriveECDHES(algID, apuData.bytes(), apvData.bytes(), ctx.privateKey, publicKey, size)
- }
-
- var keySize int
-
- algorithm := headers.getAlgorithm()
- switch algorithm {
- case ECDH_ES:
- // ECDH-ES uses direct key agreement, no key unwrapping necessary.
- return deriveKey(string(headers.getEncryption()), generator.keySize()), nil
- case ECDH_ES_A128KW:
- keySize = 16
- case ECDH_ES_A192KW:
- keySize = 24
- case ECDH_ES_A256KW:
- keySize = 32
- default:
- return nil, ErrUnsupportedAlgorithm
- }
-
- key := deriveKey(string(algorithm), keySize)
- block, err := aes.NewCipher(key)
- if err != nil {
- return nil, err
- }
-
- return josecipher.KeyUnwrap(block, recipient.encryptedKey)
-}
-func (ctx edDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {
- if alg != EdDSA {
- return Signature{}, ErrUnsupportedAlgorithm
- }
-
- sig, err := ctx.privateKey.Sign(randReader, payload, crypto.Hash(0))
- if err != nil {
- return Signature{}, err
- }
-
- return Signature{
- Signature: sig,
- protected: &rawHeader{},
- }, nil
-}
-
-func (ctx edEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error {
- if alg != EdDSA {
- return ErrUnsupportedAlgorithm
- }
- ok := ed25519.Verify(ctx.publicKey, payload, signature)
- if !ok {
- return errors.New("square/go-jose: ed25519 signature failed to verify")
- }
- return nil
-}
-
-// Sign the given payload
-func (ctx ecDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {
- var expectedBitSize int
- var hash crypto.Hash
-
- switch alg {
- case ES256:
- expectedBitSize = 256
- hash = crypto.SHA256
- case ES384:
- expectedBitSize = 384
- hash = crypto.SHA384
- case ES512:
- expectedBitSize = 521
- hash = crypto.SHA512
- }
-
- curveBits := ctx.privateKey.Curve.Params().BitSize
- if expectedBitSize != curveBits {
- return Signature{}, fmt.Errorf("square/go-jose: expected %d bit key, got %d bits instead", expectedBitSize, curveBits)
- }
-
- hasher := hash.New()
-
- // According to documentation, Write() on hash never fails
- _, _ = hasher.Write(payload)
- hashed := hasher.Sum(nil)
-
- r, s, err := ecdsa.Sign(randReader, ctx.privateKey, hashed)
- if err != nil {
- return Signature{}, err
- }
-
- keyBytes := curveBits / 8
- if curveBits%8 > 0 {
- keyBytes++
- }
-
- // We serialize the outpus (r and s) into big-endian byte arrays and pad
- // them with zeros on the left to make sure the sizes work out. Both arrays
- // must be keyBytes long, and the output must be 2*keyBytes long.
- rBytes := r.Bytes()
- rBytesPadded := make([]byte, keyBytes)
- copy(rBytesPadded[keyBytes-len(rBytes):], rBytes)
-
- sBytes := s.Bytes()
- sBytesPadded := make([]byte, keyBytes)
- copy(sBytesPadded[keyBytes-len(sBytes):], sBytes)
-
- out := append(rBytesPadded, sBytesPadded...)
-
- return Signature{
- Signature: out,
- protected: &rawHeader{},
- }, nil
-}
-
-// Verify the given payload
-func (ctx ecEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error {
- var keySize int
- var hash crypto.Hash
-
- switch alg {
- case ES256:
- keySize = 32
- hash = crypto.SHA256
- case ES384:
- keySize = 48
- hash = crypto.SHA384
- case ES512:
- keySize = 66
- hash = crypto.SHA512
- default:
- return ErrUnsupportedAlgorithm
- }
-
- if len(signature) != 2*keySize {
- return fmt.Errorf("square/go-jose: invalid signature size, have %d bytes, wanted %d", len(signature), 2*keySize)
- }
-
- hasher := hash.New()
-
- // According to documentation, Write() on hash never fails
- _, _ = hasher.Write(payload)
- hashed := hasher.Sum(nil)
-
- r := big.NewInt(0).SetBytes(signature[:keySize])
- s := big.NewInt(0).SetBytes(signature[keySize:])
-
- match := ecdsa.Verify(ctx.publicKey, hashed, r, s)
- if !match {
- return errors.New("square/go-jose: ecdsa signature failed to verify")
- }
-
- return nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/cipher/cbc_hmac.go b/vendor/gopkg.in/square/go-jose.v2/cipher/cbc_hmac.go
deleted file mode 100644
index 126b85ce2..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/cipher/cbc_hmac.go
+++ /dev/null
@@ -1,196 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 josecipher
-
-import (
- "bytes"
- "crypto/cipher"
- "crypto/hmac"
- "crypto/sha256"
- "crypto/sha512"
- "crypto/subtle"
- "encoding/binary"
- "errors"
- "hash"
-)
-
-const (
- nonceBytes = 16
-)
-
-// NewCBCHMAC instantiates a new AEAD based on CBC+HMAC.
-func NewCBCHMAC(key []byte, newBlockCipher func([]byte) (cipher.Block, error)) (cipher.AEAD, error) {
- keySize := len(key) / 2
- integrityKey := key[:keySize]
- encryptionKey := key[keySize:]
-
- blockCipher, err := newBlockCipher(encryptionKey)
- if err != nil {
- return nil, err
- }
-
- var hash func() hash.Hash
- switch keySize {
- case 16:
- hash = sha256.New
- case 24:
- hash = sha512.New384
- case 32:
- hash = sha512.New
- }
-
- return &cbcAEAD{
- hash: hash,
- blockCipher: blockCipher,
- authtagBytes: keySize,
- integrityKey: integrityKey,
- }, nil
-}
-
-// An AEAD based on CBC+HMAC
-type cbcAEAD struct {
- hash func() hash.Hash
- authtagBytes int
- integrityKey []byte
- blockCipher cipher.Block
-}
-
-func (ctx *cbcAEAD) NonceSize() int {
- return nonceBytes
-}
-
-func (ctx *cbcAEAD) Overhead() int {
- // Maximum overhead is block size (for padding) plus auth tag length, where
- // the length of the auth tag is equivalent to the key size.
- return ctx.blockCipher.BlockSize() + ctx.authtagBytes
-}
-
-// Seal encrypts and authenticates the plaintext.
-func (ctx *cbcAEAD) Seal(dst, nonce, plaintext, data []byte) []byte {
- // Output buffer -- must take care not to mangle plaintext input.
- ciphertext := make([]byte, uint64(len(plaintext))+uint64(ctx.Overhead()))[:len(plaintext)]
- copy(ciphertext, plaintext)
- ciphertext = padBuffer(ciphertext, ctx.blockCipher.BlockSize())
-
- cbc := cipher.NewCBCEncrypter(ctx.blockCipher, nonce)
-
- cbc.CryptBlocks(ciphertext, ciphertext)
- authtag := ctx.computeAuthTag(data, nonce, ciphertext)
-
- ret, out := resize(dst, uint64(len(dst))+uint64(len(ciphertext))+uint64(len(authtag)))
- copy(out, ciphertext)
- copy(out[len(ciphertext):], authtag)
-
- return ret
-}
-
-// Open decrypts and authenticates the ciphertext.
-func (ctx *cbcAEAD) Open(dst, nonce, ciphertext, data []byte) ([]byte, error) {
- if len(ciphertext) < ctx.authtagBytes {
- return nil, errors.New("square/go-jose: invalid ciphertext (too short)")
- }
-
- offset := len(ciphertext) - ctx.authtagBytes
- expectedTag := ctx.computeAuthTag(data, nonce, ciphertext[:offset])
- match := subtle.ConstantTimeCompare(expectedTag, ciphertext[offset:])
- if match != 1 {
- return nil, errors.New("square/go-jose: invalid ciphertext (auth tag mismatch)")
- }
-
- cbc := cipher.NewCBCDecrypter(ctx.blockCipher, nonce)
-
- // Make copy of ciphertext buffer, don't want to modify in place
- buffer := append([]byte{}, []byte(ciphertext[:offset])...)
-
- if len(buffer)%ctx.blockCipher.BlockSize() > 0 {
- return nil, errors.New("square/go-jose: invalid ciphertext (invalid length)")
- }
-
- cbc.CryptBlocks(buffer, buffer)
-
- // Remove padding
- plaintext, err := unpadBuffer(buffer, ctx.blockCipher.BlockSize())
- if err != nil {
- return nil, err
- }
-
- ret, out := resize(dst, uint64(len(dst))+uint64(len(plaintext)))
- copy(out, plaintext)
-
- return ret, nil
-}
-
-// Compute an authentication tag
-func (ctx *cbcAEAD) computeAuthTag(aad, nonce, ciphertext []byte) []byte {
- buffer := make([]byte, uint64(len(aad))+uint64(len(nonce))+uint64(len(ciphertext))+8)
- n := 0
- n += copy(buffer, aad)
- n += copy(buffer[n:], nonce)
- n += copy(buffer[n:], ciphertext)
- binary.BigEndian.PutUint64(buffer[n:], uint64(len(aad))*8)
-
- // According to documentation, Write() on hash.Hash never fails.
- hmac := hmac.New(ctx.hash, ctx.integrityKey)
- _, _ = hmac.Write(buffer)
-
- return hmac.Sum(nil)[:ctx.authtagBytes]
-}
-
-// resize ensures the the given slice has a capacity of at least n bytes.
-// If the capacity of the slice is less than n, a new slice is allocated
-// and the existing data will be copied.
-func resize(in []byte, n uint64) (head, tail []byte) {
- if uint64(cap(in)) >= n {
- head = in[:n]
- } else {
- head = make([]byte, n)
- copy(head, in)
- }
-
- tail = head[len(in):]
- return
-}
-
-// Apply padding
-func padBuffer(buffer []byte, blockSize int) []byte {
- missing := blockSize - (len(buffer) % blockSize)
- ret, out := resize(buffer, uint64(len(buffer))+uint64(missing))
- padding := bytes.Repeat([]byte{byte(missing)}, missing)
- copy(out, padding)
- return ret
-}
-
-// Remove padding
-func unpadBuffer(buffer []byte, blockSize int) ([]byte, error) {
- if len(buffer)%blockSize != 0 {
- return nil, errors.New("square/go-jose: invalid padding")
- }
-
- last := buffer[len(buffer)-1]
- count := int(last)
-
- if count == 0 || count > blockSize || count > len(buffer) {
- return nil, errors.New("square/go-jose: invalid padding")
- }
-
- padding := bytes.Repeat([]byte{last}, count)
- if !bytes.HasSuffix(buffer, padding) {
- return nil, errors.New("square/go-jose: invalid padding")
- }
-
- return buffer[:len(buffer)-count], nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/cipher/concat_kdf.go b/vendor/gopkg.in/square/go-jose.v2/cipher/concat_kdf.go
deleted file mode 100644
index f62c3bdba..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/cipher/concat_kdf.go
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 josecipher
-
-import (
- "crypto"
- "encoding/binary"
- "hash"
- "io"
-)
-
-type concatKDF struct {
- z, info []byte
- i uint32
- cache []byte
- hasher hash.Hash
-}
-
-// NewConcatKDF builds a KDF reader based on the given inputs.
-func NewConcatKDF(hash crypto.Hash, z, algID, ptyUInfo, ptyVInfo, supPubInfo, supPrivInfo []byte) io.Reader {
- buffer := make([]byte, uint64(len(algID))+uint64(len(ptyUInfo))+uint64(len(ptyVInfo))+uint64(len(supPubInfo))+uint64(len(supPrivInfo)))
- n := 0
- n += copy(buffer, algID)
- n += copy(buffer[n:], ptyUInfo)
- n += copy(buffer[n:], ptyVInfo)
- n += copy(buffer[n:], supPubInfo)
- copy(buffer[n:], supPrivInfo)
-
- hasher := hash.New()
-
- return &concatKDF{
- z: z,
- info: buffer,
- hasher: hasher,
- cache: []byte{},
- i: 1,
- }
-}
-
-func (ctx *concatKDF) Read(out []byte) (int, error) {
- copied := copy(out, ctx.cache)
- ctx.cache = ctx.cache[copied:]
-
- for copied < len(out) {
- ctx.hasher.Reset()
-
- // Write on a hash.Hash never fails
- _ = binary.Write(ctx.hasher, binary.BigEndian, ctx.i)
- _, _ = ctx.hasher.Write(ctx.z)
- _, _ = ctx.hasher.Write(ctx.info)
-
- hash := ctx.hasher.Sum(nil)
- chunkCopied := copy(out[copied:], hash)
- copied += chunkCopied
- ctx.cache = hash[chunkCopied:]
-
- ctx.i++
- }
-
- return copied, nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/cipher/ecdh_es.go b/vendor/gopkg.in/square/go-jose.v2/cipher/ecdh_es.go
deleted file mode 100644
index c128e327f..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/cipher/ecdh_es.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 josecipher
-
-import (
- "crypto"
- "crypto/ecdsa"
- "encoding/binary"
-)
-
-// DeriveECDHES derives a shared encryption key using ECDH/ConcatKDF as described in JWE/JWA.
-// It is an error to call this function with a private/public key that are not on the same
-// curve. Callers must ensure that the keys are valid before calling this function. Output
-// size may be at most 1<<16 bytes (64 KiB).
-func DeriveECDHES(alg string, apuData, apvData []byte, priv *ecdsa.PrivateKey, pub *ecdsa.PublicKey, size int) []byte {
- if size > 1<<16 {
- panic("ECDH-ES output size too large, must be less than or equal to 1<<16")
- }
-
- // algId, partyUInfo, partyVInfo inputs must be prefixed with the length
- algID := lengthPrefixed([]byte(alg))
- ptyUInfo := lengthPrefixed(apuData)
- ptyVInfo := lengthPrefixed(apvData)
-
- // suppPubInfo is the encoded length of the output size in bits
- supPubInfo := make([]byte, 4)
- binary.BigEndian.PutUint32(supPubInfo, uint32(size)*8)
-
- if !priv.PublicKey.Curve.IsOnCurve(pub.X, pub.Y) {
- panic("public key not on same curve as private key")
- }
-
- z, _ := priv.PublicKey.Curve.ScalarMult(pub.X, pub.Y, priv.D.Bytes())
- reader := NewConcatKDF(crypto.SHA256, z.Bytes(), algID, ptyUInfo, ptyVInfo, supPubInfo, []byte{})
-
- key := make([]byte, size)
-
- // Read on the KDF will never fail
- _, _ = reader.Read(key)
- return key
-}
-
-func lengthPrefixed(data []byte) []byte {
- out := make([]byte, len(data)+4)
- binary.BigEndian.PutUint32(out, uint32(len(data)))
- copy(out[4:], data)
- return out
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/cipher/key_wrap.go b/vendor/gopkg.in/square/go-jose.v2/cipher/key_wrap.go
deleted file mode 100644
index 1d36d5015..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/cipher/key_wrap.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 josecipher
-
-import (
- "crypto/cipher"
- "crypto/subtle"
- "encoding/binary"
- "errors"
-)
-
-var defaultIV = []byte{0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6}
-
-// KeyWrap implements NIST key wrapping; it wraps a content encryption key (cek) with the given block cipher.
-func KeyWrap(block cipher.Block, cek []byte) ([]byte, error) {
- if len(cek)%8 != 0 {
- return nil, errors.New("square/go-jose: key wrap input must be 8 byte blocks")
- }
-
- n := len(cek) / 8
- r := make([][]byte, n)
-
- for i := range r {
- r[i] = make([]byte, 8)
- copy(r[i], cek[i*8:])
- }
-
- buffer := make([]byte, 16)
- tBytes := make([]byte, 8)
- copy(buffer, defaultIV)
-
- for t := 0; t < 6*n; t++ {
- copy(buffer[8:], r[t%n])
-
- block.Encrypt(buffer, buffer)
-
- binary.BigEndian.PutUint64(tBytes, uint64(t+1))
-
- for i := 0; i < 8; i++ {
- buffer[i] = buffer[i] ^ tBytes[i]
- }
- copy(r[t%n], buffer[8:])
- }
-
- out := make([]byte, (n+1)*8)
- copy(out, buffer[:8])
- for i := range r {
- copy(out[(i+1)*8:], r[i])
- }
-
- return out, nil
-}
-
-// KeyUnwrap implements NIST key unwrapping; it unwraps a content encryption key (cek) with the given block cipher.
-func KeyUnwrap(block cipher.Block, ciphertext []byte) ([]byte, error) {
- if len(ciphertext)%8 != 0 {
- return nil, errors.New("square/go-jose: key wrap input must be 8 byte blocks")
- }
-
- n := (len(ciphertext) / 8) - 1
- r := make([][]byte, n)
-
- for i := range r {
- r[i] = make([]byte, 8)
- copy(r[i], ciphertext[(i+1)*8:])
- }
-
- buffer := make([]byte, 16)
- tBytes := make([]byte, 8)
- copy(buffer[:8], ciphertext[:8])
-
- for t := 6*n - 1; t >= 0; t-- {
- binary.BigEndian.PutUint64(tBytes, uint64(t+1))
-
- for i := 0; i < 8; i++ {
- buffer[i] = buffer[i] ^ tBytes[i]
- }
- copy(buffer[8:], r[t%n])
-
- block.Decrypt(buffer, buffer)
-
- copy(r[t%n], buffer[8:])
- }
-
- if subtle.ConstantTimeCompare(buffer[:8], defaultIV) == 0 {
- return nil, errors.New("square/go-jose: failed to unwrap key")
- }
-
- out := make([]byte, n*8)
- for i := range r {
- copy(out[i*8:], r[i])
- }
-
- return out, nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/crypter.go b/vendor/gopkg.in/square/go-jose.v2/crypter.go
deleted file mode 100644
index 0681c8119..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/crypter.go
+++ /dev/null
@@ -1,510 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 jose
-
-import (
- "crypto/ecdsa"
- "crypto/rsa"
- "errors"
- "fmt"
- "reflect"
-
- "gopkg.in/square/go-jose.v2/json"
-)
-
-// Encrypter represents an encrypter which produces an encrypted JWE object.
-type Encrypter interface {
- Encrypt(plaintext []byte) (*JSONWebEncryption, error)
- EncryptWithAuthData(plaintext []byte, aad []byte) (*JSONWebEncryption, error)
- Options() EncrypterOptions
-}
-
-// A generic content cipher
-type contentCipher interface {
- keySize() int
- encrypt(cek []byte, aad, plaintext []byte) (*aeadParts, error)
- decrypt(cek []byte, aad []byte, parts *aeadParts) ([]byte, error)
-}
-
-// A key generator (for generating/getting a CEK)
-type keyGenerator interface {
- keySize() int
- genKey() ([]byte, rawHeader, error)
-}
-
-// A generic key encrypter
-type keyEncrypter interface {
- encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) // Encrypt a key
-}
-
-// A generic key decrypter
-type keyDecrypter interface {
- decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) // Decrypt a key
-}
-
-// A generic encrypter based on the given key encrypter and content cipher.
-type genericEncrypter struct {
- contentAlg ContentEncryption
- compressionAlg CompressionAlgorithm
- cipher contentCipher
- recipients []recipientKeyInfo
- keyGenerator keyGenerator
- extraHeaders map[HeaderKey]interface{}
-}
-
-type recipientKeyInfo struct {
- keyID string
- keyAlg KeyAlgorithm
- keyEncrypter keyEncrypter
-}
-
-// EncrypterOptions represents options that can be set on new encrypters.
-type EncrypterOptions struct {
- Compression CompressionAlgorithm
-
- // Optional map of additional keys to be inserted into the protected header
- // of a JWS object. Some specifications which make use of JWS like to insert
- // additional values here. All values must be JSON-serializable.
- ExtraHeaders map[HeaderKey]interface{}
-}
-
-// WithHeader adds an arbitrary value to the ExtraHeaders map, initializing it
-// if necessary. It returns itself and so can be used in a fluent style.
-func (eo *EncrypterOptions) WithHeader(k HeaderKey, v interface{}) *EncrypterOptions {
- if eo.ExtraHeaders == nil {
- eo.ExtraHeaders = map[HeaderKey]interface{}{}
- }
- eo.ExtraHeaders[k] = v
- return eo
-}
-
-// WithContentType adds a content type ("cty") header and returns the updated
-// EncrypterOptions.
-func (eo *EncrypterOptions) WithContentType(contentType ContentType) *EncrypterOptions {
- return eo.WithHeader(HeaderContentType, contentType)
-}
-
-// WithType adds a type ("typ") header and returns the updated EncrypterOptions.
-func (eo *EncrypterOptions) WithType(typ ContentType) *EncrypterOptions {
- return eo.WithHeader(HeaderType, typ)
-}
-
-// Recipient represents an algorithm/key to encrypt messages to.
-type Recipient struct {
- Algorithm KeyAlgorithm
- Key interface{}
- KeyID string
-}
-
-// NewEncrypter creates an appropriate encrypter based on the key type
-func NewEncrypter(enc ContentEncryption, rcpt Recipient, opts *EncrypterOptions) (Encrypter, error) {
- encrypter := &genericEncrypter{
- contentAlg: enc,
- recipients: []recipientKeyInfo{},
- cipher: getContentCipher(enc),
- }
- if opts != nil {
- encrypter.compressionAlg = opts.Compression
- encrypter.extraHeaders = opts.ExtraHeaders
- }
-
- if encrypter.cipher == nil {
- return nil, ErrUnsupportedAlgorithm
- }
-
- var keyID string
- var rawKey interface{}
- switch encryptionKey := rcpt.Key.(type) {
- case JSONWebKey:
- keyID, rawKey = encryptionKey.KeyID, encryptionKey.Key
- case *JSONWebKey:
- keyID, rawKey = encryptionKey.KeyID, encryptionKey.Key
- default:
- rawKey = encryptionKey
- }
-
- switch rcpt.Algorithm {
- case DIRECT:
- // Direct encryption mode must be treated differently
- if reflect.TypeOf(rawKey) != reflect.TypeOf([]byte{}) {
- return nil, ErrUnsupportedKeyType
- }
- encrypter.keyGenerator = staticKeyGenerator{
- key: rawKey.([]byte),
- }
- recipientInfo, _ := newSymmetricRecipient(rcpt.Algorithm, rawKey.([]byte))
- recipientInfo.keyID = keyID
- if rcpt.KeyID != "" {
- recipientInfo.keyID = rcpt.KeyID
- }
- encrypter.recipients = []recipientKeyInfo{recipientInfo}
- return encrypter, nil
- case ECDH_ES:
- // ECDH-ES (w/o key wrapping) is similar to DIRECT mode
- typeOf := reflect.TypeOf(rawKey)
- if typeOf != reflect.TypeOf(&ecdsa.PublicKey{}) {
- return nil, ErrUnsupportedKeyType
- }
- encrypter.keyGenerator = ecKeyGenerator{
- size: encrypter.cipher.keySize(),
- algID: string(enc),
- publicKey: rawKey.(*ecdsa.PublicKey),
- }
- recipientInfo, _ := newECDHRecipient(rcpt.Algorithm, rawKey.(*ecdsa.PublicKey))
- recipientInfo.keyID = keyID
- if rcpt.KeyID != "" {
- recipientInfo.keyID = rcpt.KeyID
- }
- encrypter.recipients = []recipientKeyInfo{recipientInfo}
- return encrypter, nil
- default:
- // Can just add a standard recipient
- encrypter.keyGenerator = randomKeyGenerator{
- size: encrypter.cipher.keySize(),
- }
- err := encrypter.addRecipient(rcpt)
- return encrypter, err
- }
-}
-
-// NewMultiEncrypter creates a multi-encrypter based on the given parameters
-func NewMultiEncrypter(enc ContentEncryption, rcpts []Recipient, opts *EncrypterOptions) (Encrypter, error) {
- cipher := getContentCipher(enc)
-
- if cipher == nil {
- return nil, ErrUnsupportedAlgorithm
- }
- if rcpts == nil || len(rcpts) == 0 {
- return nil, fmt.Errorf("square/go-jose: recipients is nil or empty")
- }
-
- encrypter := &genericEncrypter{
- contentAlg: enc,
- recipients: []recipientKeyInfo{},
- cipher: cipher,
- keyGenerator: randomKeyGenerator{
- size: cipher.keySize(),
- },
- }
-
- if opts != nil {
- encrypter.compressionAlg = opts.Compression
- }
-
- for _, recipient := range rcpts {
- err := encrypter.addRecipient(recipient)
- if err != nil {
- return nil, err
- }
- }
-
- return encrypter, nil
-}
-
-func (ctx *genericEncrypter) addRecipient(recipient Recipient) (err error) {
- var recipientInfo recipientKeyInfo
-
- switch recipient.Algorithm {
- case DIRECT, ECDH_ES:
- return fmt.Errorf("square/go-jose: key algorithm '%s' not supported in multi-recipient mode", recipient.Algorithm)
- }
-
- recipientInfo, err = makeJWERecipient(recipient.Algorithm, recipient.Key)
- if recipient.KeyID != "" {
- recipientInfo.keyID = recipient.KeyID
- }
-
- if err == nil {
- ctx.recipients = append(ctx.recipients, recipientInfo)
- }
- return err
-}
-
-func makeJWERecipient(alg KeyAlgorithm, encryptionKey interface{}) (recipientKeyInfo, error) {
- switch encryptionKey := encryptionKey.(type) {
- case *rsa.PublicKey:
- return newRSARecipient(alg, encryptionKey)
- case *ecdsa.PublicKey:
- return newECDHRecipient(alg, encryptionKey)
- case []byte:
- return newSymmetricRecipient(alg, encryptionKey)
- case *JSONWebKey:
- recipient, err := makeJWERecipient(alg, encryptionKey.Key)
- recipient.keyID = encryptionKey.KeyID
- return recipient, err
- default:
- return recipientKeyInfo{}, ErrUnsupportedKeyType
- }
-}
-
-// newDecrypter creates an appropriate decrypter based on the key type
-func newDecrypter(decryptionKey interface{}) (keyDecrypter, error) {
- switch decryptionKey := decryptionKey.(type) {
- case *rsa.PrivateKey:
- return &rsaDecrypterSigner{
- privateKey: decryptionKey,
- }, nil
- case *ecdsa.PrivateKey:
- return &ecDecrypterSigner{
- privateKey: decryptionKey,
- }, nil
- case []byte:
- return &symmetricKeyCipher{
- key: decryptionKey,
- }, nil
- case JSONWebKey:
- return newDecrypter(decryptionKey.Key)
- case *JSONWebKey:
- return newDecrypter(decryptionKey.Key)
- default:
- return nil, ErrUnsupportedKeyType
- }
-}
-
-// Implementation of encrypt method producing a JWE object.
-func (ctx *genericEncrypter) Encrypt(plaintext []byte) (*JSONWebEncryption, error) {
- return ctx.EncryptWithAuthData(plaintext, nil)
-}
-
-// Implementation of encrypt method producing a JWE object.
-func (ctx *genericEncrypter) EncryptWithAuthData(plaintext, aad []byte) (*JSONWebEncryption, error) {
- obj := &JSONWebEncryption{}
- obj.aad = aad
-
- obj.protected = &rawHeader{}
- err := obj.protected.set(headerEncryption, ctx.contentAlg)
- if err != nil {
- return nil, err
- }
-
- obj.recipients = make([]recipientInfo, len(ctx.recipients))
-
- if len(ctx.recipients) == 0 {
- return nil, fmt.Errorf("square/go-jose: no recipients to encrypt to")
- }
-
- cek, headers, err := ctx.keyGenerator.genKey()
- if err != nil {
- return nil, err
- }
-
- obj.protected.merge(&headers)
-
- for i, info := range ctx.recipients {
- recipient, err := info.keyEncrypter.encryptKey(cek, info.keyAlg)
- if err != nil {
- return nil, err
- }
-
- err = recipient.header.set(headerAlgorithm, info.keyAlg)
- if err != nil {
- return nil, err
- }
-
- if info.keyID != "" {
- err = recipient.header.set(headerKeyID, info.keyID)
- if err != nil {
- return nil, err
- }
- }
- obj.recipients[i] = recipient
- }
-
- if len(ctx.recipients) == 1 {
- // Move per-recipient headers into main protected header if there's
- // only a single recipient.
- obj.protected.merge(obj.recipients[0].header)
- obj.recipients[0].header = nil
- }
-
- if ctx.compressionAlg != NONE {
- plaintext, err = compress(ctx.compressionAlg, plaintext)
- if err != nil {
- return nil, err
- }
-
- err = obj.protected.set(headerCompression, ctx.compressionAlg)
- if err != nil {
- return nil, err
- }
- }
-
- for k, v := range ctx.extraHeaders {
- b, err := json.Marshal(v)
- if err != nil {
- return nil, err
- }
- (*obj.protected)[k] = makeRawMessage(b)
- }
-
- authData := obj.computeAuthData()
- parts, err := ctx.cipher.encrypt(cek, authData, plaintext)
- if err != nil {
- return nil, err
- }
-
- obj.iv = parts.iv
- obj.ciphertext = parts.ciphertext
- obj.tag = parts.tag
-
- return obj, nil
-}
-
-func (ctx *genericEncrypter) Options() EncrypterOptions {
- return EncrypterOptions{
- Compression: ctx.compressionAlg,
- ExtraHeaders: ctx.extraHeaders,
- }
-}
-
-// Decrypt and validate the object and return the plaintext. Note that this
-// function does not support multi-recipient, if you desire multi-recipient
-// decryption use DecryptMulti instead.
-func (obj JSONWebEncryption) Decrypt(decryptionKey interface{}) ([]byte, error) {
- headers := obj.mergedHeaders(nil)
-
- if len(obj.recipients) > 1 {
- return nil, errors.New("square/go-jose: too many recipients in payload; expecting only one")
- }
-
- critical, err := headers.getCritical()
- if err != nil {
- return nil, fmt.Errorf("square/go-jose: invalid crit header")
- }
-
- if len(critical) > 0 {
- return nil, fmt.Errorf("square/go-jose: unsupported crit header")
- }
-
- decrypter, err := newDecrypter(decryptionKey)
- if err != nil {
- return nil, err
- }
-
- cipher := getContentCipher(headers.getEncryption())
- if cipher == nil {
- return nil, fmt.Errorf("square/go-jose: unsupported enc value '%s'", string(headers.getEncryption()))
- }
-
- generator := randomKeyGenerator{
- size: cipher.keySize(),
- }
-
- parts := &aeadParts{
- iv: obj.iv,
- ciphertext: obj.ciphertext,
- tag: obj.tag,
- }
-
- authData := obj.computeAuthData()
-
- var plaintext []byte
- recipient := obj.recipients[0]
- recipientHeaders := obj.mergedHeaders(&recipient)
-
- cek, err := decrypter.decryptKey(recipientHeaders, &recipient, generator)
- if err == nil {
- // Found a valid CEK -- let's try to decrypt.
- plaintext, err = cipher.decrypt(cek, authData, parts)
- }
-
- if plaintext == nil {
- return nil, ErrCryptoFailure
- }
-
- // The "zip" header parameter may only be present in the protected header.
- if comp := obj.protected.getCompression(); comp != "" {
- plaintext, err = decompress(comp, plaintext)
- }
-
- return plaintext, err
-}
-
-// DecryptMulti decrypts and validates the object and returns the plaintexts,
-// with support for multiple recipients. It returns the index of the recipient
-// for which the decryption was successful, the merged headers for that recipient,
-// and the plaintext.
-func (obj JSONWebEncryption) DecryptMulti(decryptionKey interface{}) (int, Header, []byte, error) {
- globalHeaders := obj.mergedHeaders(nil)
-
- critical, err := globalHeaders.getCritical()
- if err != nil {
- return -1, Header{}, nil, fmt.Errorf("square/go-jose: invalid crit header")
- }
-
- if len(critical) > 0 {
- return -1, Header{}, nil, fmt.Errorf("square/go-jose: unsupported crit header")
- }
-
- decrypter, err := newDecrypter(decryptionKey)
- if err != nil {
- return -1, Header{}, nil, err
- }
-
- encryption := globalHeaders.getEncryption()
- cipher := getContentCipher(encryption)
- if cipher == nil {
- return -1, Header{}, nil, fmt.Errorf("square/go-jose: unsupported enc value '%s'", string(encryption))
- }
-
- generator := randomKeyGenerator{
- size: cipher.keySize(),
- }
-
- parts := &aeadParts{
- iv: obj.iv,
- ciphertext: obj.ciphertext,
- tag: obj.tag,
- }
-
- authData := obj.computeAuthData()
-
- index := -1
- var plaintext []byte
- var headers rawHeader
-
- for i, recipient := range obj.recipients {
- recipientHeaders := obj.mergedHeaders(&recipient)
-
- cek, err := decrypter.decryptKey(recipientHeaders, &recipient, generator)
- if err == nil {
- // Found a valid CEK -- let's try to decrypt.
- plaintext, err = cipher.decrypt(cek, authData, parts)
- if err == nil {
- index = i
- headers = recipientHeaders
- break
- }
- }
- }
-
- if plaintext == nil || err != nil {
- return -1, Header{}, nil, ErrCryptoFailure
- }
-
- // The "zip" header parameter may only be present in the protected header.
- if comp := obj.protected.getCompression(); comp != "" {
- plaintext, err = decompress(comp, plaintext)
- }
-
- sanitized, err := headers.sanitized()
- if err != nil {
- return -1, Header{}, nil, fmt.Errorf("square/go-jose: failed to sanitize header: %v", err)
- }
-
- return index, sanitized, plaintext, err
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/doc.go b/vendor/gopkg.in/square/go-jose.v2/doc.go
deleted file mode 100644
index dd1387f3f..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/doc.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 jose aims to provide an implementation of the Javascript Object Signing
-and Encryption set of standards. It implements encryption and signing based on
-the JSON Web Encryption and JSON Web Signature standards, with optional JSON
-Web Token support available in a sub-package. The library supports both the
-compact and full serialization formats, and has optional support for multiple
-recipients.
-
-*/
-package jose
diff --git a/vendor/gopkg.in/square/go-jose.v2/encoding.go b/vendor/gopkg.in/square/go-jose.v2/encoding.go
deleted file mode 100644
index 9f37ef465..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/encoding.go
+++ /dev/null
@@ -1,178 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 jose
-
-import (
- "bytes"
- "compress/flate"
- "encoding/base64"
- "encoding/binary"
- "encoding/json"
- "io"
- "math/big"
- "regexp"
-)
-
-var stripWhitespaceRegex = regexp.MustCompile("\\s")
-
-// Helper function to serialize known-good objects.
-// Precondition: value is not a nil pointer.
-func mustSerializeJSON(value interface{}) []byte {
- out, err := json.Marshal(value)
- if err != nil {
- panic(err)
- }
- // We never want to serialize the top-level value "null," since it's not a
- // valid JOSE message. But if a caller passes in a nil pointer to this method,
- // MarshalJSON will happily serialize it as the top-level value "null". If
- // that value is then embedded in another operation, for instance by being
- // base64-encoded and fed as input to a signing algorithm
- // (https://github.com/square/go-jose/issues/22), the result will be
- // incorrect. Because this method is intended for known-good objects, and a nil
- // pointer is not a known-good object, we are free to panic in this case.
- // Note: It's not possible to directly check whether the data pointed at by an
- // interface is a nil pointer, so we do this hacky workaround.
- // https://groups.google.com/forum/#!topic/golang-nuts/wnH302gBa4I
- if string(out) == "null" {
- panic("Tried to serialize a nil pointer.")
- }
- return out
-}
-
-// Strip all newlines and whitespace
-func stripWhitespace(data string) string {
- return stripWhitespaceRegex.ReplaceAllString(data, "")
-}
-
-// Perform compression based on algorithm
-func compress(algorithm CompressionAlgorithm, input []byte) ([]byte, error) {
- switch algorithm {
- case DEFLATE:
- return deflate(input)
- default:
- return nil, ErrUnsupportedAlgorithm
- }
-}
-
-// Perform decompression based on algorithm
-func decompress(algorithm CompressionAlgorithm, input []byte) ([]byte, error) {
- switch algorithm {
- case DEFLATE:
- return inflate(input)
- default:
- return nil, ErrUnsupportedAlgorithm
- }
-}
-
-// Compress with DEFLATE
-func deflate(input []byte) ([]byte, error) {
- output := new(bytes.Buffer)
-
- // Writing to byte buffer, err is always nil
- writer, _ := flate.NewWriter(output, 1)
- _, _ = io.Copy(writer, bytes.NewBuffer(input))
-
- err := writer.Close()
- return output.Bytes(), err
-}
-
-// Decompress with DEFLATE
-func inflate(input []byte) ([]byte, error) {
- output := new(bytes.Buffer)
- reader := flate.NewReader(bytes.NewBuffer(input))
-
- _, err := io.Copy(output, reader)
- if err != nil {
- return nil, err
- }
-
- err = reader.Close()
- return output.Bytes(), err
-}
-
-// byteBuffer represents a slice of bytes that can be serialized to url-safe base64.
-type byteBuffer struct {
- data []byte
-}
-
-func newBuffer(data []byte) *byteBuffer {
- if data == nil {
- return nil
- }
- return &byteBuffer{
- data: data,
- }
-}
-
-func newFixedSizeBuffer(data []byte, length int) *byteBuffer {
- if len(data) > length {
- panic("square/go-jose: invalid call to newFixedSizeBuffer (len(data) > length)")
- }
- pad := make([]byte, length-len(data))
- return newBuffer(append(pad, data...))
-}
-
-func newBufferFromInt(num uint64) *byteBuffer {
- data := make([]byte, 8)
- binary.BigEndian.PutUint64(data, num)
- return newBuffer(bytes.TrimLeft(data, "\x00"))
-}
-
-func (b *byteBuffer) MarshalJSON() ([]byte, error) {
- return json.Marshal(b.base64())
-}
-
-func (b *byteBuffer) UnmarshalJSON(data []byte) error {
- var encoded string
- err := json.Unmarshal(data, &encoded)
- if err != nil {
- return err
- }
-
- if encoded == "" {
- return nil
- }
-
- decoded, err := base64.RawURLEncoding.DecodeString(encoded)
- if err != nil {
- return err
- }
-
- *b = *newBuffer(decoded)
-
- return nil
-}
-
-func (b *byteBuffer) base64() string {
- return base64.RawURLEncoding.EncodeToString(b.data)
-}
-
-func (b *byteBuffer) bytes() []byte {
- // Handling nil here allows us to transparently handle nil slices when serializing.
- if b == nil {
- return nil
- }
- return b.data
-}
-
-func (b byteBuffer) bigInt() *big.Int {
- return new(big.Int).SetBytes(b.data)
-}
-
-func (b byteBuffer) toInt() int {
- return int(b.bigInt().Int64())
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/LICENSE b/vendor/gopkg.in/square/go-jose.v2/json/LICENSE
deleted file mode 100644
index 744875676..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/README.md b/vendor/gopkg.in/square/go-jose.v2/json/README.md
deleted file mode 100644
index 86de5e558..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Safe JSON
-
-This repository contains a fork of the `encoding/json` package from Go 1.6.
-
-The following changes were made:
-
-* Object deserialization uses case-sensitive member name matching instead of
- [case-insensitive matching](https://www.ietf.org/mail-archive/web/json/current/msg03763.html).
- This is to avoid differences in the interpretation of JOSE messages between
- go-jose and libraries written in other languages.
-* When deserializing a JSON object, we check for duplicate keys and reject the
- input whenever we detect a duplicate. Rather than trying to work with malformed
- data, we prefer to reject it right away.
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/decode.go b/vendor/gopkg.in/square/go-jose.v2/json/decode.go
deleted file mode 100644
index 37457e5a8..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/decode.go
+++ /dev/null
@@ -1,1183 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Represents JSON data structure using native Go types: booleans, floats,
-// strings, arrays, and maps.
-
-package json
-
-import (
- "bytes"
- "encoding"
- "encoding/base64"
- "errors"
- "fmt"
- "reflect"
- "runtime"
- "strconv"
- "unicode"
- "unicode/utf16"
- "unicode/utf8"
-)
-
-// Unmarshal parses the JSON-encoded data and stores the result
-// in the value pointed to by v.
-//
-// Unmarshal uses the inverse of the encodings that
-// Marshal uses, allocating maps, slices, and pointers as necessary,
-// with the following additional rules:
-//
-// To unmarshal JSON into a pointer, Unmarshal first handles the case of
-// the JSON being the JSON literal null. In that case, Unmarshal sets
-// the pointer to nil. Otherwise, Unmarshal unmarshals the JSON into
-// the value pointed at by the pointer. If the pointer is nil, Unmarshal
-// allocates a new value for it to point to.
-//
-// To unmarshal JSON into a struct, Unmarshal matches incoming object
-// keys to the keys used by Marshal (either the struct field name or its tag),
-// preferring an exact match but also accepting a case-insensitive match.
-// Unmarshal will only set exported fields of the struct.
-//
-// To unmarshal JSON into an interface value,
-// Unmarshal stores one of these in the interface value:
-//
-// bool, for JSON booleans
-// float64, for JSON numbers
-// string, for JSON strings
-// []interface{}, for JSON arrays
-// map[string]interface{}, for JSON objects
-// nil for JSON null
-//
-// To unmarshal a JSON array into a slice, Unmarshal resets the slice length
-// to zero and then appends each element to the slice.
-// As a special case, to unmarshal an empty JSON array into a slice,
-// Unmarshal replaces the slice with a new empty slice.
-//
-// To unmarshal a JSON array into a Go array, Unmarshal decodes
-// JSON array elements into corresponding Go array elements.
-// If the Go array is smaller than the JSON array,
-// the additional JSON array elements are discarded.
-// If the JSON array is smaller than the Go array,
-// the additional Go array elements are set to zero values.
-//
-// To unmarshal a JSON object into a string-keyed map, Unmarshal first
-// establishes a map to use, If the map is nil, Unmarshal allocates a new map.
-// Otherwise Unmarshal reuses the existing map, keeping existing entries.
-// Unmarshal then stores key-value pairs from the JSON object into the map.
-//
-// If a JSON value is not appropriate for a given target type,
-// or if a JSON number overflows the target type, Unmarshal
-// skips that field and completes the unmarshaling as best it can.
-// If no more serious errors are encountered, Unmarshal returns
-// an UnmarshalTypeError describing the earliest such error.
-//
-// The JSON null value unmarshals into an interface, map, pointer, or slice
-// by setting that Go value to nil. Because null is often used in JSON to mean
-// ``not present,'' unmarshaling a JSON null into any other Go type has no effect
-// on the value and produces no error.
-//
-// When unmarshaling quoted strings, invalid UTF-8 or
-// invalid UTF-16 surrogate pairs are not treated as an error.
-// Instead, they are replaced by the Unicode replacement
-// character U+FFFD.
-//
-func Unmarshal(data []byte, v interface{}) error {
- // Check for well-formedness.
- // Avoids filling out half a data structure
- // before discovering a JSON syntax error.
- var d decodeState
- err := checkValid(data, &d.scan)
- if err != nil {
- return err
- }
-
- d.init(data)
- return d.unmarshal(v)
-}
-
-// Unmarshaler is the interface implemented by objects
-// that can unmarshal a JSON description of themselves.
-// The input can be assumed to be a valid encoding of
-// a JSON value. UnmarshalJSON must copy the JSON data
-// if it wishes to retain the data after returning.
-type Unmarshaler interface {
- UnmarshalJSON([]byte) error
-}
-
-// An UnmarshalTypeError describes a JSON value that was
-// not appropriate for a value of a specific Go type.
-type UnmarshalTypeError struct {
- Value string // description of JSON value - "bool", "array", "number -5"
- Type reflect.Type // type of Go value it could not be assigned to
- Offset int64 // error occurred after reading Offset bytes
-}
-
-func (e *UnmarshalTypeError) Error() string {
- return "json: cannot unmarshal " + e.Value + " into Go value of type " + e.Type.String()
-}
-
-// An UnmarshalFieldError describes a JSON object key that
-// led to an unexported (and therefore unwritable) struct field.
-// (No longer used; kept for compatibility.)
-type UnmarshalFieldError struct {
- Key string
- Type reflect.Type
- Field reflect.StructField
-}
-
-func (e *UnmarshalFieldError) Error() string {
- return "json: cannot unmarshal object key " + strconv.Quote(e.Key) + " into unexported field " + e.Field.Name + " of type " + e.Type.String()
-}
-
-// An InvalidUnmarshalError describes an invalid argument passed to Unmarshal.
-// (The argument to Unmarshal must be a non-nil pointer.)
-type InvalidUnmarshalError struct {
- Type reflect.Type
-}
-
-func (e *InvalidUnmarshalError) Error() string {
- if e.Type == nil {
- return "json: Unmarshal(nil)"
- }
-
- if e.Type.Kind() != reflect.Ptr {
- return "json: Unmarshal(non-pointer " + e.Type.String() + ")"
- }
- return "json: Unmarshal(nil " + e.Type.String() + ")"
-}
-
-func (d *decodeState) unmarshal(v interface{}) (err error) {
- defer func() {
- if r := recover(); r != nil {
- if _, ok := r.(runtime.Error); ok {
- panic(r)
- }
- err = r.(error)
- }
- }()
-
- rv := reflect.ValueOf(v)
- if rv.Kind() != reflect.Ptr || rv.IsNil() {
- return &InvalidUnmarshalError{reflect.TypeOf(v)}
- }
-
- d.scan.reset()
- // We decode rv not rv.Elem because the Unmarshaler interface
- // test must be applied at the top level of the value.
- d.value(rv)
- return d.savedError
-}
-
-// A Number represents a JSON number literal.
-type Number string
-
-// String returns the literal text of the number.
-func (n Number) String() string { return string(n) }
-
-// Float64 returns the number as a float64.
-func (n Number) Float64() (float64, error) {
- return strconv.ParseFloat(string(n), 64)
-}
-
-// Int64 returns the number as an int64.
-func (n Number) Int64() (int64, error) {
- return strconv.ParseInt(string(n), 10, 64)
-}
-
-// isValidNumber reports whether s is a valid JSON number literal.
-func isValidNumber(s string) bool {
- // This function implements the JSON numbers grammar.
- // See https://tools.ietf.org/html/rfc7159#section-6
- // and http://json.org/number.gif
-
- if s == "" {
- return false
- }
-
- // Optional -
- if s[0] == '-' {
- s = s[1:]
- if s == "" {
- return false
- }
- }
-
- // Digits
- switch {
- default:
- return false
-
- case s[0] == '0':
- s = s[1:]
-
- case '1' <= s[0] && s[0] <= '9':
- s = s[1:]
- for len(s) > 0 && '0' <= s[0] && s[0] <= '9' {
- s = s[1:]
- }
- }
-
- // . followed by 1 or more digits.
- if len(s) >= 2 && s[0] == '.' && '0' <= s[1] && s[1] <= '9' {
- s = s[2:]
- for len(s) > 0 && '0' <= s[0] && s[0] <= '9' {
- s = s[1:]
- }
- }
-
- // e or E followed by an optional - or + and
- // 1 or more digits.
- if len(s) >= 2 && (s[0] == 'e' || s[0] == 'E') {
- s = s[1:]
- if s[0] == '+' || s[0] == '-' {
- s = s[1:]
- if s == "" {
- return false
- }
- }
- for len(s) > 0 && '0' <= s[0] && s[0] <= '9' {
- s = s[1:]
- }
- }
-
- // Make sure we are at the end.
- return s == ""
-}
-
-// decodeState represents the state while decoding a JSON value.
-type decodeState struct {
- data []byte
- off int // read offset in data
- scan scanner
- nextscan scanner // for calls to nextValue
- savedError error
- useNumber bool
-}
-
-// errPhase is used for errors that should not happen unless
-// there is a bug in the JSON decoder or something is editing
-// the data slice while the decoder executes.
-var errPhase = errors.New("JSON decoder out of sync - data changing underfoot?")
-
-func (d *decodeState) init(data []byte) *decodeState {
- d.data = data
- d.off = 0
- d.savedError = nil
- return d
-}
-
-// error aborts the decoding by panicking with err.
-func (d *decodeState) error(err error) {
- panic(err)
-}
-
-// saveError saves the first err it is called with,
-// for reporting at the end of the unmarshal.
-func (d *decodeState) saveError(err error) {
- if d.savedError == nil {
- d.savedError = err
- }
-}
-
-// next cuts off and returns the next full JSON value in d.data[d.off:].
-// The next value is known to be an object or array, not a literal.
-func (d *decodeState) next() []byte {
- c := d.data[d.off]
- item, rest, err := nextValue(d.data[d.off:], &d.nextscan)
- if err != nil {
- d.error(err)
- }
- d.off = len(d.data) - len(rest)
-
- // Our scanner has seen the opening brace/bracket
- // and thinks we're still in the middle of the object.
- // invent a closing brace/bracket to get it out.
- if c == '{' {
- d.scan.step(&d.scan, '}')
- } else {
- d.scan.step(&d.scan, ']')
- }
-
- return item
-}
-
-// scanWhile processes bytes in d.data[d.off:] until it
-// receives a scan code not equal to op.
-// It updates d.off and returns the new scan code.
-func (d *decodeState) scanWhile(op int) int {
- var newOp int
- for {
- if d.off >= len(d.data) {
- newOp = d.scan.eof()
- d.off = len(d.data) + 1 // mark processed EOF with len+1
- } else {
- c := d.data[d.off]
- d.off++
- newOp = d.scan.step(&d.scan, c)
- }
- if newOp != op {
- break
- }
- }
- return newOp
-}
-
-// value decodes a JSON value from d.data[d.off:] into the value.
-// it updates d.off to point past the decoded value.
-func (d *decodeState) value(v reflect.Value) {
- if !v.IsValid() {
- _, rest, err := nextValue(d.data[d.off:], &d.nextscan)
- if err != nil {
- d.error(err)
- }
- d.off = len(d.data) - len(rest)
-
- // d.scan thinks we're still at the beginning of the item.
- // Feed in an empty string - the shortest, simplest value -
- // so that it knows we got to the end of the value.
- if d.scan.redo {
- // rewind.
- d.scan.redo = false
- d.scan.step = stateBeginValue
- }
- d.scan.step(&d.scan, '"')
- d.scan.step(&d.scan, '"')
-
- n := len(d.scan.parseState)
- if n > 0 && d.scan.parseState[n-1] == parseObjectKey {
- // d.scan thinks we just read an object key; finish the object
- d.scan.step(&d.scan, ':')
- d.scan.step(&d.scan, '"')
- d.scan.step(&d.scan, '"')
- d.scan.step(&d.scan, '}')
- }
-
- return
- }
-
- switch op := d.scanWhile(scanSkipSpace); op {
- default:
- d.error(errPhase)
-
- case scanBeginArray:
- d.array(v)
-
- case scanBeginObject:
- d.object(v)
-
- case scanBeginLiteral:
- d.literal(v)
- }
-}
-
-type unquotedValue struct{}
-
-// valueQuoted is like value but decodes a
-// quoted string literal or literal null into an interface value.
-// If it finds anything other than a quoted string literal or null,
-// valueQuoted returns unquotedValue{}.
-func (d *decodeState) valueQuoted() interface{} {
- switch op := d.scanWhile(scanSkipSpace); op {
- default:
- d.error(errPhase)
-
- case scanBeginArray:
- d.array(reflect.Value{})
-
- case scanBeginObject:
- d.object(reflect.Value{})
-
- case scanBeginLiteral:
- switch v := d.literalInterface().(type) {
- case nil, string:
- return v
- }
- }
- return unquotedValue{}
-}
-
-// indirect walks down v allocating pointers as needed,
-// until it gets to a non-pointer.
-// if it encounters an Unmarshaler, indirect stops and returns that.
-// if decodingNull is true, indirect stops at the last pointer so it can be set to nil.
-func (d *decodeState) indirect(v reflect.Value, decodingNull bool) (Unmarshaler, encoding.TextUnmarshaler, reflect.Value) {
- // If v is a named type and is addressable,
- // start with its address, so that if the type has pointer methods,
- // we find them.
- if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() {
- v = v.Addr()
- }
- for {
- // Load value from interface, but only if the result will be
- // usefully addressable.
- if v.Kind() == reflect.Interface && !v.IsNil() {
- e := v.Elem()
- if e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) {
- v = e
- continue
- }
- }
-
- if v.Kind() != reflect.Ptr {
- break
- }
-
- if v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() {
- break
- }
- if v.IsNil() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- if v.Type().NumMethod() > 0 {
- if u, ok := v.Interface().(Unmarshaler); ok {
- return u, nil, reflect.Value{}
- }
- if u, ok := v.Interface().(encoding.TextUnmarshaler); ok {
- return nil, u, reflect.Value{}
- }
- }
- v = v.Elem()
- }
- return nil, nil, v
-}
-
-// array consumes an array from d.data[d.off-1:], decoding into the value v.
-// the first byte of the array ('[') has been read already.
-func (d *decodeState) array(v reflect.Value) {
- // Check for unmarshaler.
- u, ut, pv := d.indirect(v, false)
- if u != nil {
- d.off--
- err := u.UnmarshalJSON(d.next())
- if err != nil {
- d.error(err)
- }
- return
- }
- if ut != nil {
- d.saveError(&UnmarshalTypeError{"array", v.Type(), int64(d.off)})
- d.off--
- d.next()
- return
- }
-
- v = pv
-
- // Check type of target.
- switch v.Kind() {
- case reflect.Interface:
- if v.NumMethod() == 0 {
- // Decoding into nil interface? Switch to non-reflect code.
- v.Set(reflect.ValueOf(d.arrayInterface()))
- return
- }
- // Otherwise it's invalid.
- fallthrough
- default:
- d.saveError(&UnmarshalTypeError{"array", v.Type(), int64(d.off)})
- d.off--
- d.next()
- return
- case reflect.Array:
- case reflect.Slice:
- break
- }
-
- i := 0
- for {
- // Look ahead for ] - can only happen on first iteration.
- op := d.scanWhile(scanSkipSpace)
- if op == scanEndArray {
- break
- }
-
- // Back up so d.value can have the byte we just read.
- d.off--
- d.scan.undo(op)
-
- // Get element of array, growing if necessary.
- if v.Kind() == reflect.Slice {
- // Grow slice if necessary
- if i >= v.Cap() {
- newcap := v.Cap() + v.Cap()/2
- if newcap < 4 {
- newcap = 4
- }
- newv := reflect.MakeSlice(v.Type(), v.Len(), newcap)
- reflect.Copy(newv, v)
- v.Set(newv)
- }
- if i >= v.Len() {
- v.SetLen(i + 1)
- }
- }
-
- if i < v.Len() {
- // Decode into element.
- d.value(v.Index(i))
- } else {
- // Ran out of fixed array: skip.
- d.value(reflect.Value{})
- }
- i++
-
- // Next token must be , or ].
- op = d.scanWhile(scanSkipSpace)
- if op == scanEndArray {
- break
- }
- if op != scanArrayValue {
- d.error(errPhase)
- }
- }
-
- if i < v.Len() {
- if v.Kind() == reflect.Array {
- // Array. Zero the rest.
- z := reflect.Zero(v.Type().Elem())
- for ; i < v.Len(); i++ {
- v.Index(i).Set(z)
- }
- } else {
- v.SetLen(i)
- }
- }
- if i == 0 && v.Kind() == reflect.Slice {
- v.Set(reflect.MakeSlice(v.Type(), 0, 0))
- }
-}
-
-var nullLiteral = []byte("null")
-
-// object consumes an object from d.data[d.off-1:], decoding into the value v.
-// the first byte ('{') of the object has been read already.
-func (d *decodeState) object(v reflect.Value) {
- // Check for unmarshaler.
- u, ut, pv := d.indirect(v, false)
- if u != nil {
- d.off--
- err := u.UnmarshalJSON(d.next())
- if err != nil {
- d.error(err)
- }
- return
- }
- if ut != nil {
- d.saveError(&UnmarshalTypeError{"object", v.Type(), int64(d.off)})
- d.off--
- d.next() // skip over { } in input
- return
- }
- v = pv
-
- // Decoding into nil interface? Switch to non-reflect code.
- if v.Kind() == reflect.Interface && v.NumMethod() == 0 {
- v.Set(reflect.ValueOf(d.objectInterface()))
- return
- }
-
- // Check type of target: struct or map[string]T
- switch v.Kind() {
- case reflect.Map:
- // map must have string kind
- t := v.Type()
- if t.Key().Kind() != reflect.String {
- d.saveError(&UnmarshalTypeError{"object", v.Type(), int64(d.off)})
- d.off--
- d.next() // skip over { } in input
- return
- }
- if v.IsNil() {
- v.Set(reflect.MakeMap(t))
- }
- case reflect.Struct:
-
- default:
- d.saveError(&UnmarshalTypeError{"object", v.Type(), int64(d.off)})
- d.off--
- d.next() // skip over { } in input
- return
- }
-
- var mapElem reflect.Value
- keys := map[string]bool{}
-
- for {
- // Read opening " of string key or closing }.
- op := d.scanWhile(scanSkipSpace)
- if op == scanEndObject {
- // closing } - can only happen on first iteration.
- break
- }
- if op != scanBeginLiteral {
- d.error(errPhase)
- }
-
- // Read key.
- start := d.off - 1
- op = d.scanWhile(scanContinue)
- item := d.data[start : d.off-1]
- key, ok := unquote(item)
- if !ok {
- d.error(errPhase)
- }
-
- // Check for duplicate keys.
- _, ok = keys[key]
- if !ok {
- keys[key] = true
- } else {
- d.error(fmt.Errorf("json: duplicate key '%s' in object", key))
- }
-
- // Figure out field corresponding to key.
- var subv reflect.Value
- destring := false // whether the value is wrapped in a string to be decoded first
-
- if v.Kind() == reflect.Map {
- elemType := v.Type().Elem()
- if !mapElem.IsValid() {
- mapElem = reflect.New(elemType).Elem()
- } else {
- mapElem.Set(reflect.Zero(elemType))
- }
- subv = mapElem
- } else {
- var f *field
- fields := cachedTypeFields(v.Type())
- for i := range fields {
- ff := &fields[i]
- if bytes.Equal(ff.nameBytes, []byte(key)) {
- f = ff
- break
- }
- }
- if f != nil {
- subv = v
- destring = f.quoted
- for _, i := range f.index {
- if subv.Kind() == reflect.Ptr {
- if subv.IsNil() {
- subv.Set(reflect.New(subv.Type().Elem()))
- }
- subv = subv.Elem()
- }
- subv = subv.Field(i)
- }
- }
- }
-
- // Read : before value.
- if op == scanSkipSpace {
- op = d.scanWhile(scanSkipSpace)
- }
- if op != scanObjectKey {
- d.error(errPhase)
- }
-
- // Read value.
- if destring {
- switch qv := d.valueQuoted().(type) {
- case nil:
- d.literalStore(nullLiteral, subv, false)
- case string:
- d.literalStore([]byte(qv), subv, true)
- default:
- d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v", subv.Type()))
- }
- } else {
- d.value(subv)
- }
-
- // Write value back to map;
- // if using struct, subv points into struct already.
- if v.Kind() == reflect.Map {
- kv := reflect.ValueOf(key).Convert(v.Type().Key())
- v.SetMapIndex(kv, subv)
- }
-
- // Next token must be , or }.
- op = d.scanWhile(scanSkipSpace)
- if op == scanEndObject {
- break
- }
- if op != scanObjectValue {
- d.error(errPhase)
- }
- }
-}
-
-// literal consumes a literal from d.data[d.off-1:], decoding into the value v.
-// The first byte of the literal has been read already
-// (that's how the caller knows it's a literal).
-func (d *decodeState) literal(v reflect.Value) {
- // All bytes inside literal return scanContinue op code.
- start := d.off - 1
- op := d.scanWhile(scanContinue)
-
- // Scan read one byte too far; back up.
- d.off--
- d.scan.undo(op)
-
- d.literalStore(d.data[start:d.off], v, false)
-}
-
-// convertNumber converts the number literal s to a float64 or a Number
-// depending on the setting of d.useNumber.
-func (d *decodeState) convertNumber(s string) (interface{}, error) {
- if d.useNumber {
- return Number(s), nil
- }
- f, err := strconv.ParseFloat(s, 64)
- if err != nil {
- return nil, &UnmarshalTypeError{"number " + s, reflect.TypeOf(0.0), int64(d.off)}
- }
- return f, nil
-}
-
-var numberType = reflect.TypeOf(Number(""))
-
-// literalStore decodes a literal stored in item into v.
-//
-// fromQuoted indicates whether this literal came from unwrapping a
-// string from the ",string" struct tag option. this is used only to
-// produce more helpful error messages.
-func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool) {
- // Check for unmarshaler.
- if len(item) == 0 {
- //Empty string given
- d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- return
- }
- wantptr := item[0] == 'n' // null
- u, ut, pv := d.indirect(v, wantptr)
- if u != nil {
- err := u.UnmarshalJSON(item)
- if err != nil {
- d.error(err)
- }
- return
- }
- if ut != nil {
- if item[0] != '"' {
- if fromQuoted {
- d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)})
- }
- return
- }
- s, ok := unquoteBytes(item)
- if !ok {
- if fromQuoted {
- d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.error(errPhase)
- }
- }
- err := ut.UnmarshalText(s)
- if err != nil {
- d.error(err)
- }
- return
- }
-
- v = pv
-
- switch c := item[0]; c {
- case 'n': // null
- switch v.Kind() {
- case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice:
- v.Set(reflect.Zero(v.Type()))
- // otherwise, ignore null for primitives/string
- }
- case 't', 'f': // true, false
- value := c == 't'
- switch v.Kind() {
- default:
- if fromQuoted {
- d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.saveError(&UnmarshalTypeError{"bool", v.Type(), int64(d.off)})
- }
- case reflect.Bool:
- v.SetBool(value)
- case reflect.Interface:
- if v.NumMethod() == 0 {
- v.Set(reflect.ValueOf(value))
- } else {
- d.saveError(&UnmarshalTypeError{"bool", v.Type(), int64(d.off)})
- }
- }
-
- case '"': // string
- s, ok := unquoteBytes(item)
- if !ok {
- if fromQuoted {
- d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.error(errPhase)
- }
- }
- switch v.Kind() {
- default:
- d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)})
- case reflect.Slice:
- if v.Type().Elem().Kind() != reflect.Uint8 {
- d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)})
- break
- }
- b := make([]byte, base64.StdEncoding.DecodedLen(len(s)))
- n, err := base64.StdEncoding.Decode(b, s)
- if err != nil {
- d.saveError(err)
- break
- }
- v.SetBytes(b[:n])
- case reflect.String:
- v.SetString(string(s))
- case reflect.Interface:
- if v.NumMethod() == 0 {
- v.Set(reflect.ValueOf(string(s)))
- } else {
- d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)})
- }
- }
-
- default: // number
- if c != '-' && (c < '0' || c > '9') {
- if fromQuoted {
- d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.error(errPhase)
- }
- }
- s := string(item)
- switch v.Kind() {
- default:
- if v.Kind() == reflect.String && v.Type() == numberType {
- v.SetString(s)
- if !isValidNumber(s) {
- d.error(fmt.Errorf("json: invalid number literal, trying to unmarshal %q into Number", item))
- }
- break
- }
- if fromQuoted {
- d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.error(&UnmarshalTypeError{"number", v.Type(), int64(d.off)})
- }
- case reflect.Interface:
- n, err := d.convertNumber(s)
- if err != nil {
- d.saveError(err)
- break
- }
- if v.NumMethod() != 0 {
- d.saveError(&UnmarshalTypeError{"number", v.Type(), int64(d.off)})
- break
- }
- v.Set(reflect.ValueOf(n))
-
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- n, err := strconv.ParseInt(s, 10, 64)
- if err != nil || v.OverflowInt(n) {
- d.saveError(&UnmarshalTypeError{"number " + s, v.Type(), int64(d.off)})
- break
- }
- v.SetInt(n)
-
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- n, err := strconv.ParseUint(s, 10, 64)
- if err != nil || v.OverflowUint(n) {
- d.saveError(&UnmarshalTypeError{"number " + s, v.Type(), int64(d.off)})
- break
- }
- v.SetUint(n)
-
- case reflect.Float32, reflect.Float64:
- n, err := strconv.ParseFloat(s, v.Type().Bits())
- if err != nil || v.OverflowFloat(n) {
- d.saveError(&UnmarshalTypeError{"number " + s, v.Type(), int64(d.off)})
- break
- }
- v.SetFloat(n)
- }
- }
-}
-
-// The xxxInterface routines build up a value to be stored
-// in an empty interface. They are not strictly necessary,
-// but they avoid the weight of reflection in this common case.
-
-// valueInterface is like value but returns interface{}
-func (d *decodeState) valueInterface() interface{} {
- switch d.scanWhile(scanSkipSpace) {
- default:
- d.error(errPhase)
- panic("unreachable")
- case scanBeginArray:
- return d.arrayInterface()
- case scanBeginObject:
- return d.objectInterface()
- case scanBeginLiteral:
- return d.literalInterface()
- }
-}
-
-// arrayInterface is like array but returns []interface{}.
-func (d *decodeState) arrayInterface() []interface{} {
- var v = make([]interface{}, 0)
- for {
- // Look ahead for ] - can only happen on first iteration.
- op := d.scanWhile(scanSkipSpace)
- if op == scanEndArray {
- break
- }
-
- // Back up so d.value can have the byte we just read.
- d.off--
- d.scan.undo(op)
-
- v = append(v, d.valueInterface())
-
- // Next token must be , or ].
- op = d.scanWhile(scanSkipSpace)
- if op == scanEndArray {
- break
- }
- if op != scanArrayValue {
- d.error(errPhase)
- }
- }
- return v
-}
-
-// objectInterface is like object but returns map[string]interface{}.
-func (d *decodeState) objectInterface() map[string]interface{} {
- m := make(map[string]interface{})
- keys := map[string]bool{}
-
- for {
- // Read opening " of string key or closing }.
- op := d.scanWhile(scanSkipSpace)
- if op == scanEndObject {
- // closing } - can only happen on first iteration.
- break
- }
- if op != scanBeginLiteral {
- d.error(errPhase)
- }
-
- // Read string key.
- start := d.off - 1
- op = d.scanWhile(scanContinue)
- item := d.data[start : d.off-1]
- key, ok := unquote(item)
- if !ok {
- d.error(errPhase)
- }
-
- // Check for duplicate keys.
- _, ok = keys[key]
- if !ok {
- keys[key] = true
- } else {
- d.error(fmt.Errorf("json: duplicate key '%s' in object", key))
- }
-
- // Read : before value.
- if op == scanSkipSpace {
- op = d.scanWhile(scanSkipSpace)
- }
- if op != scanObjectKey {
- d.error(errPhase)
- }
-
- // Read value.
- m[key] = d.valueInterface()
-
- // Next token must be , or }.
- op = d.scanWhile(scanSkipSpace)
- if op == scanEndObject {
- break
- }
- if op != scanObjectValue {
- d.error(errPhase)
- }
- }
- return m
-}
-
-// literalInterface is like literal but returns an interface value.
-func (d *decodeState) literalInterface() interface{} {
- // All bytes inside literal return scanContinue op code.
- start := d.off - 1
- op := d.scanWhile(scanContinue)
-
- // Scan read one byte too far; back up.
- d.off--
- d.scan.undo(op)
- item := d.data[start:d.off]
-
- switch c := item[0]; c {
- case 'n': // null
- return nil
-
- case 't', 'f': // true, false
- return c == 't'
-
- case '"': // string
- s, ok := unquote(item)
- if !ok {
- d.error(errPhase)
- }
- return s
-
- default: // number
- if c != '-' && (c < '0' || c > '9') {
- d.error(errPhase)
- }
- n, err := d.convertNumber(string(item))
- if err != nil {
- d.saveError(err)
- }
- return n
- }
-}
-
-// getu4 decodes \uXXXX from the beginning of s, returning the hex value,
-// or it returns -1.
-func getu4(s []byte) rune {
- if len(s) < 6 || s[0] != '\\' || s[1] != 'u' {
- return -1
- }
- r, err := strconv.ParseUint(string(s[2:6]), 16, 64)
- if err != nil {
- return -1
- }
- return rune(r)
-}
-
-// unquote converts a quoted JSON string literal s into an actual string t.
-// The rules are different than for Go, so cannot use strconv.Unquote.
-func unquote(s []byte) (t string, ok bool) {
- s, ok = unquoteBytes(s)
- t = string(s)
- return
-}
-
-func unquoteBytes(s []byte) (t []byte, ok bool) {
- if len(s) < 2 || s[0] != '"' || s[len(s)-1] != '"' {
- return
- }
- s = s[1 : len(s)-1]
-
- // Check for unusual characters. If there are none,
- // then no unquoting is needed, so return a slice of the
- // original bytes.
- r := 0
- for r < len(s) {
- c := s[r]
- if c == '\\' || c == '"' || c < ' ' {
- break
- }
- if c < utf8.RuneSelf {
- r++
- continue
- }
- rr, size := utf8.DecodeRune(s[r:])
- if rr == utf8.RuneError && size == 1 {
- break
- }
- r += size
- }
- if r == len(s) {
- return s, true
- }
-
- b := make([]byte, len(s)+2*utf8.UTFMax)
- w := copy(b, s[0:r])
- for r < len(s) {
- // Out of room? Can only happen if s is full of
- // malformed UTF-8 and we're replacing each
- // byte with RuneError.
- if w >= len(b)-2*utf8.UTFMax {
- nb := make([]byte, (len(b)+utf8.UTFMax)*2)
- copy(nb, b[0:w])
- b = nb
- }
- switch c := s[r]; {
- case c == '\\':
- r++
- if r >= len(s) {
- return
- }
- switch s[r] {
- default:
- return
- case '"', '\\', '/', '\'':
- b[w] = s[r]
- r++
- w++
- case 'b':
- b[w] = '\b'
- r++
- w++
- case 'f':
- b[w] = '\f'
- r++
- w++
- case 'n':
- b[w] = '\n'
- r++
- w++
- case 'r':
- b[w] = '\r'
- r++
- w++
- case 't':
- b[w] = '\t'
- r++
- w++
- case 'u':
- r--
- rr := getu4(s[r:])
- if rr < 0 {
- return
- }
- r += 6
- if utf16.IsSurrogate(rr) {
- rr1 := getu4(s[r:])
- if dec := utf16.DecodeRune(rr, rr1); dec != unicode.ReplacementChar {
- // A valid pair; consume.
- r += 6
- w += utf8.EncodeRune(b[w:], dec)
- break
- }
- // Invalid surrogate; fall back to replacement rune.
- rr = unicode.ReplacementChar
- }
- w += utf8.EncodeRune(b[w:], rr)
- }
-
- // Quote, control characters are invalid.
- case c == '"', c < ' ':
- return
-
- // ASCII
- case c < utf8.RuneSelf:
- b[w] = c
- r++
- w++
-
- // Coerce to well-formed UTF-8.
- default:
- rr, size := utf8.DecodeRune(s[r:])
- r += size
- w += utf8.EncodeRune(b[w:], rr)
- }
- }
- return b[0:w], true
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/encode.go b/vendor/gopkg.in/square/go-jose.v2/json/encode.go
deleted file mode 100644
index 1dae8bb7c..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/encode.go
+++ /dev/null
@@ -1,1197 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package json implements encoding and decoding of JSON objects as defined in
-// RFC 4627. The mapping between JSON objects and Go values is described
-// in the documentation for the Marshal and Unmarshal functions.
-//
-// See "JSON and Go" for an introduction to this package:
-// https://golang.org/doc/articles/json_and_go.html
-package json
-
-import (
- "bytes"
- "encoding"
- "encoding/base64"
- "fmt"
- "math"
- "reflect"
- "runtime"
- "sort"
- "strconv"
- "strings"
- "sync"
- "unicode"
- "unicode/utf8"
-)
-
-// Marshal returns the JSON encoding of v.
-//
-// Marshal traverses the value v recursively.
-// If an encountered value implements the Marshaler interface
-// and is not a nil pointer, Marshal calls its MarshalJSON method
-// to produce JSON. If no MarshalJSON method is present but the
-// value implements encoding.TextMarshaler instead, Marshal calls
-// its MarshalText method.
-// The nil pointer exception is not strictly necessary
-// but mimics a similar, necessary exception in the behavior of
-// UnmarshalJSON.
-//
-// Otherwise, Marshal uses the following type-dependent default encodings:
-//
-// Boolean values encode as JSON booleans.
-//
-// Floating point, integer, and Number values encode as JSON numbers.
-//
-// String values encode as JSON strings coerced to valid UTF-8,
-// replacing invalid bytes with the Unicode replacement rune.
-// The angle brackets "<" and ">" are escaped to "\u003c" and "\u003e"
-// to keep some browsers from misinterpreting JSON output as HTML.
-// Ampersand "&" is also escaped to "\u0026" for the same reason.
-//
-// Array and slice values encode as JSON arrays, except that
-// []byte encodes as a base64-encoded string, and a nil slice
-// encodes as the null JSON object.
-//
-// Struct values encode as JSON objects. Each exported struct field
-// becomes a member of the object unless
-// - the field's tag is "-", or
-// - the field is empty and its tag specifies the "omitempty" option.
-// The empty values are false, 0, any
-// nil pointer or interface value, and any array, slice, map, or string of
-// length zero. The object's default key string is the struct field name
-// but can be specified in the struct field's tag value. The "json" key in
-// the struct field's tag value is the key name, followed by an optional comma
-// and options. Examples:
-//
-// // Field is ignored by this package.
-// Field int `json:"-"`
-//
-// // Field appears in JSON as key "myName".
-// Field int `json:"myName"`
-//
-// // Field appears in JSON as key "myName" and
-// // the field is omitted from the object if its value is empty,
-// // as defined above.
-// Field int `json:"myName,omitempty"`
-//
-// // Field appears in JSON as key "Field" (the default), but
-// // the field is skipped if empty.
-// // Note the leading comma.
-// Field int `json:",omitempty"`
-//
-// The "string" option signals that a field is stored as JSON inside a
-// JSON-encoded string. It applies only to fields of string, floating point,
-// integer, or boolean types. This extra level of encoding is sometimes used
-// when communicating with JavaScript programs:
-//
-// Int64String int64 `json:",string"`
-//
-// The key name will be used if it's a non-empty string consisting of
-// only Unicode letters, digits, dollar signs, percent signs, hyphens,
-// underscores and slashes.
-//
-// Anonymous struct fields are usually marshaled as if their inner exported fields
-// were fields in the outer struct, subject to the usual Go visibility rules amended
-// as described in the next paragraph.
-// An anonymous struct field with a name given in its JSON tag is treated as
-// having that name, rather than being anonymous.
-// An anonymous struct field of interface type is treated the same as having
-// that type as its name, rather than being anonymous.
-//
-// The Go visibility rules for struct fields are amended for JSON when
-// deciding which field to marshal or unmarshal. If there are
-// multiple fields at the same level, and that level is the least
-// nested (and would therefore be the nesting level selected by the
-// usual Go rules), the following extra rules apply:
-//
-// 1) Of those fields, if any are JSON-tagged, only tagged fields are considered,
-// even if there are multiple untagged fields that would otherwise conflict.
-// 2) If there is exactly one field (tagged or not according to the first rule), that is selected.
-// 3) Otherwise there are multiple fields, and all are ignored; no error occurs.
-//
-// Handling of anonymous struct fields is new in Go 1.1.
-// Prior to Go 1.1, anonymous struct fields were ignored. To force ignoring of
-// an anonymous struct field in both current and earlier versions, give the field
-// a JSON tag of "-".
-//
-// Map values encode as JSON objects.
-// The map's key type must be string; the map keys are used as JSON object
-// keys, subject to the UTF-8 coercion described for string values above.
-//
-// Pointer values encode as the value pointed to.
-// A nil pointer encodes as the null JSON object.
-//
-// Interface values encode as the value contained in the interface.
-// A nil interface value encodes as the null JSON object.
-//
-// Channel, complex, and function values cannot be encoded in JSON.
-// Attempting to encode such a value causes Marshal to return
-// an UnsupportedTypeError.
-//
-// JSON cannot represent cyclic data structures and Marshal does not
-// handle them. Passing cyclic structures to Marshal will result in
-// an infinite recursion.
-//
-func Marshal(v interface{}) ([]byte, error) {
- e := &encodeState{}
- err := e.marshal(v)
- if err != nil {
- return nil, err
- }
- return e.Bytes(), nil
-}
-
-// MarshalIndent is like Marshal but applies Indent to format the output.
-func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) {
- b, err := Marshal(v)
- if err != nil {
- return nil, err
- }
- var buf bytes.Buffer
- err = Indent(&buf, b, prefix, indent)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// HTMLEscape appends to dst the JSON-encoded src with <, >, &, U+2028 and U+2029
-// characters inside string literals changed to \u003c, \u003e, \u0026, \u2028, \u2029
-// so that the JSON will be safe to embed inside HTML <script> tags.
-// For historical reasons, web browsers don't honor standard HTML
-// escaping within <script> tags, so an alternative JSON encoding must
-// be used.
-func HTMLEscape(dst *bytes.Buffer, src []byte) {
- // The characters can only appear in string literals,
- // so just scan the string one byte at a time.
- start := 0
- for i, c := range src {
- if c == '<' || c == '>' || c == '&' {
- if start < i {
- dst.Write(src[start:i])
- }
- dst.WriteString(`\u00`)
- dst.WriteByte(hex[c>>4])
- dst.WriteByte(hex[c&0xF])
- start = i + 1
- }
- // Convert U+2028 and U+2029 (E2 80 A8 and E2 80 A9).
- if c == 0xE2 && i+2 < len(src) && src[i+1] == 0x80 && src[i+2]&^1 == 0xA8 {
- if start < i {
- dst.Write(src[start:i])
- }
- dst.WriteString(`\u202`)
- dst.WriteByte(hex[src[i+2]&0xF])
- start = i + 3
- }
- }
- if start < len(src) {
- dst.Write(src[start:])
- }
-}
-
-// Marshaler is the interface implemented by objects that
-// can marshal themselves into valid JSON.
-type Marshaler interface {
- MarshalJSON() ([]byte, error)
-}
-
-// An UnsupportedTypeError is returned by Marshal when attempting
-// to encode an unsupported value type.
-type UnsupportedTypeError struct {
- Type reflect.Type
-}
-
-func (e *UnsupportedTypeError) Error() string {
- return "json: unsupported type: " + e.Type.String()
-}
-
-type UnsupportedValueError struct {
- Value reflect.Value
- Str string
-}
-
-func (e *UnsupportedValueError) Error() string {
- return "json: unsupported value: " + e.Str
-}
-
-// Before Go 1.2, an InvalidUTF8Error was returned by Marshal when
-// attempting to encode a string value with invalid UTF-8 sequences.
-// As of Go 1.2, Marshal instead coerces the string to valid UTF-8 by
-// replacing invalid bytes with the Unicode replacement rune U+FFFD.
-// This error is no longer generated but is kept for backwards compatibility
-// with programs that might mention it.
-type InvalidUTF8Error struct {
- S string // the whole string value that caused the error
-}
-
-func (e *InvalidUTF8Error) Error() string {
- return "json: invalid UTF-8 in string: " + strconv.Quote(e.S)
-}
-
-type MarshalerError struct {
- Type reflect.Type
- Err error
-}
-
-func (e *MarshalerError) Error() string {
- return "json: error calling MarshalJSON for type " + e.Type.String() + ": " + e.Err.Error()
-}
-
-var hex = "0123456789abcdef"
-
-// An encodeState encodes JSON into a bytes.Buffer.
-type encodeState struct {
- bytes.Buffer // accumulated output
- scratch [64]byte
-}
-
-var encodeStatePool sync.Pool
-
-func newEncodeState() *encodeState {
- if v := encodeStatePool.Get(); v != nil {
- e := v.(*encodeState)
- e.Reset()
- return e
- }
- return new(encodeState)
-}
-
-func (e *encodeState) marshal(v interface{}) (err error) {
- defer func() {
- if r := recover(); r != nil {
- if _, ok := r.(runtime.Error); ok {
- panic(r)
- }
- if s, ok := r.(string); ok {
- panic(s)
- }
- err = r.(error)
- }
- }()
- e.reflectValue(reflect.ValueOf(v))
- return nil
-}
-
-func (e *encodeState) error(err error) {
- panic(err)
-}
-
-func isEmptyValue(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
- return v.Len() == 0
- case reflect.Bool:
- return !v.Bool()
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return v.Int() == 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return v.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return v.Float() == 0
- case reflect.Interface, reflect.Ptr:
- return v.IsNil()
- }
- return false
-}
-
-func (e *encodeState) reflectValue(v reflect.Value) {
- valueEncoder(v)(e, v, false)
-}
-
-type encoderFunc func(e *encodeState, v reflect.Value, quoted bool)
-
-var encoderCache struct {
- sync.RWMutex
- m map[reflect.Type]encoderFunc
-}
-
-func valueEncoder(v reflect.Value) encoderFunc {
- if !v.IsValid() {
- return invalidValueEncoder
- }
- return typeEncoder(v.Type())
-}
-
-func typeEncoder(t reflect.Type) encoderFunc {
- encoderCache.RLock()
- f := encoderCache.m[t]
- encoderCache.RUnlock()
- if f != nil {
- return f
- }
-
- // To deal with recursive types, populate the map with an
- // indirect func before we build it. This type waits on the
- // real func (f) to be ready and then calls it. This indirect
- // func is only used for recursive types.
- encoderCache.Lock()
- if encoderCache.m == nil {
- encoderCache.m = make(map[reflect.Type]encoderFunc)
- }
- var wg sync.WaitGroup
- wg.Add(1)
- encoderCache.m[t] = func(e *encodeState, v reflect.Value, quoted bool) {
- wg.Wait()
- f(e, v, quoted)
- }
- encoderCache.Unlock()
-
- // Compute fields without lock.
- // Might duplicate effort but won't hold other computations back.
- f = newTypeEncoder(t, true)
- wg.Done()
- encoderCache.Lock()
- encoderCache.m[t] = f
- encoderCache.Unlock()
- return f
-}
-
-var (
- marshalerType = reflect.TypeOf(new(Marshaler)).Elem()
- textMarshalerType = reflect.TypeOf(new(encoding.TextMarshaler)).Elem()
-)
-
-// newTypeEncoder constructs an encoderFunc for a type.
-// The returned encoder only checks CanAddr when allowAddr is true.
-func newTypeEncoder(t reflect.Type, allowAddr bool) encoderFunc {
- if t.Implements(marshalerType) {
- return marshalerEncoder
- }
- if t.Kind() != reflect.Ptr && allowAddr {
- if reflect.PtrTo(t).Implements(marshalerType) {
- return newCondAddrEncoder(addrMarshalerEncoder, newTypeEncoder(t, false))
- }
- }
-
- if t.Implements(textMarshalerType) {
- return textMarshalerEncoder
- }
- if t.Kind() != reflect.Ptr && allowAddr {
- if reflect.PtrTo(t).Implements(textMarshalerType) {
- return newCondAddrEncoder(addrTextMarshalerEncoder, newTypeEncoder(t, false))
- }
- }
-
- switch t.Kind() {
- case reflect.Bool:
- return boolEncoder
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return intEncoder
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return uintEncoder
- case reflect.Float32:
- return float32Encoder
- case reflect.Float64:
- return float64Encoder
- case reflect.String:
- return stringEncoder
- case reflect.Interface:
- return interfaceEncoder
- case reflect.Struct:
- return newStructEncoder(t)
- case reflect.Map:
- return newMapEncoder(t)
- case reflect.Slice:
- return newSliceEncoder(t)
- case reflect.Array:
- return newArrayEncoder(t)
- case reflect.Ptr:
- return newPtrEncoder(t)
- default:
- return unsupportedTypeEncoder
- }
-}
-
-func invalidValueEncoder(e *encodeState, v reflect.Value, quoted bool) {
- e.WriteString("null")
-}
-
-func marshalerEncoder(e *encodeState, v reflect.Value, quoted bool) {
- if v.Kind() == reflect.Ptr && v.IsNil() {
- e.WriteString("null")
- return
- }
- m := v.Interface().(Marshaler)
- b, err := m.MarshalJSON()
- if err == nil {
- // copy JSON into buffer, checking validity.
- err = compact(&e.Buffer, b, true)
- }
- if err != nil {
- e.error(&MarshalerError{v.Type(), err})
- }
-}
-
-func addrMarshalerEncoder(e *encodeState, v reflect.Value, quoted bool) {
- va := v.Addr()
- if va.IsNil() {
- e.WriteString("null")
- return
- }
- m := va.Interface().(Marshaler)
- b, err := m.MarshalJSON()
- if err == nil {
- // copy JSON into buffer, checking validity.
- err = compact(&e.Buffer, b, true)
- }
- if err != nil {
- e.error(&MarshalerError{v.Type(), err})
- }
-}
-
-func textMarshalerEncoder(e *encodeState, v reflect.Value, quoted bool) {
- if v.Kind() == reflect.Ptr && v.IsNil() {
- e.WriteString("null")
- return
- }
- m := v.Interface().(encoding.TextMarshaler)
- b, err := m.MarshalText()
- if err != nil {
- e.error(&MarshalerError{v.Type(), err})
- }
- e.stringBytes(b)
-}
-
-func addrTextMarshalerEncoder(e *encodeState, v reflect.Value, quoted bool) {
- va := v.Addr()
- if va.IsNil() {
- e.WriteString("null")
- return
- }
- m := va.Interface().(encoding.TextMarshaler)
- b, err := m.MarshalText()
- if err != nil {
- e.error(&MarshalerError{v.Type(), err})
- }
- e.stringBytes(b)
-}
-
-func boolEncoder(e *encodeState, v reflect.Value, quoted bool) {
- if quoted {
- e.WriteByte('"')
- }
- if v.Bool() {
- e.WriteString("true")
- } else {
- e.WriteString("false")
- }
- if quoted {
- e.WriteByte('"')
- }
-}
-
-func intEncoder(e *encodeState, v reflect.Value, quoted bool) {
- b := strconv.AppendInt(e.scratch[:0], v.Int(), 10)
- if quoted {
- e.WriteByte('"')
- }
- e.Write(b)
- if quoted {
- e.WriteByte('"')
- }
-}
-
-func uintEncoder(e *encodeState, v reflect.Value, quoted bool) {
- b := strconv.AppendUint(e.scratch[:0], v.Uint(), 10)
- if quoted {
- e.WriteByte('"')
- }
- e.Write(b)
- if quoted {
- e.WriteByte('"')
- }
-}
-
-type floatEncoder int // number of bits
-
-func (bits floatEncoder) encode(e *encodeState, v reflect.Value, quoted bool) {
- f := v.Float()
- if math.IsInf(f, 0) || math.IsNaN(f) {
- e.error(&UnsupportedValueError{v, strconv.FormatFloat(f, 'g', -1, int(bits))})
- }
- b := strconv.AppendFloat(e.scratch[:0], f, 'g', -1, int(bits))
- if quoted {
- e.WriteByte('"')
- }
- e.Write(b)
- if quoted {
- e.WriteByte('"')
- }
-}
-
-var (
- float32Encoder = (floatEncoder(32)).encode
- float64Encoder = (floatEncoder(64)).encode
-)
-
-func stringEncoder(e *encodeState, v reflect.Value, quoted bool) {
- if v.Type() == numberType {
- numStr := v.String()
- // In Go1.5 the empty string encodes to "0", while this is not a valid number literal
- // we keep compatibility so check validity after this.
- if numStr == "" {
- numStr = "0" // Number's zero-val
- }
- if !isValidNumber(numStr) {
- e.error(fmt.Errorf("json: invalid number literal %q", numStr))
- }
- e.WriteString(numStr)
- return
- }
- if quoted {
- sb, err := Marshal(v.String())
- if err != nil {
- e.error(err)
- }
- e.string(string(sb))
- } else {
- e.string(v.String())
- }
-}
-
-func interfaceEncoder(e *encodeState, v reflect.Value, quoted bool) {
- if v.IsNil() {
- e.WriteString("null")
- return
- }
- e.reflectValue(v.Elem())
-}
-
-func unsupportedTypeEncoder(e *encodeState, v reflect.Value, quoted bool) {
- e.error(&UnsupportedTypeError{v.Type()})
-}
-
-type structEncoder struct {
- fields []field
- fieldEncs []encoderFunc
-}
-
-func (se *structEncoder) encode(e *encodeState, v reflect.Value, quoted bool) {
- e.WriteByte('{')
- first := true
- for i, f := range se.fields {
- fv := fieldByIndex(v, f.index)
- if !fv.IsValid() || f.omitEmpty && isEmptyValue(fv) {
- continue
- }
- if first {
- first = false
- } else {
- e.WriteByte(',')
- }
- e.string(f.name)
- e.WriteByte(':')
- se.fieldEncs[i](e, fv, f.quoted)
- }
- e.WriteByte('}')
-}
-
-func newStructEncoder(t reflect.Type) encoderFunc {
- fields := cachedTypeFields(t)
- se := &structEncoder{
- fields: fields,
- fieldEncs: make([]encoderFunc, len(fields)),
- }
- for i, f := range fields {
- se.fieldEncs[i] = typeEncoder(typeByIndex(t, f.index))
- }
- return se.encode
-}
-
-type mapEncoder struct {
- elemEnc encoderFunc
-}
-
-func (me *mapEncoder) encode(e *encodeState, v reflect.Value, _ bool) {
- if v.IsNil() {
- e.WriteString("null")
- return
- }
- e.WriteByte('{')
- var sv stringValues = v.MapKeys()
- sort.Sort(sv)
- for i, k := range sv {
- if i > 0 {
- e.WriteByte(',')
- }
- e.string(k.String())
- e.WriteByte(':')
- me.elemEnc(e, v.MapIndex(k), false)
- }
- e.WriteByte('}')
-}
-
-func newMapEncoder(t reflect.Type) encoderFunc {
- if t.Key().Kind() != reflect.String {
- return unsupportedTypeEncoder
- }
- me := &mapEncoder{typeEncoder(t.Elem())}
- return me.encode
-}
-
-func encodeByteSlice(e *encodeState, v reflect.Value, _ bool) {
- if v.IsNil() {
- e.WriteString("null")
- return
- }
- s := v.Bytes()
- e.WriteByte('"')
- if len(s) < 1024 {
- // for small buffers, using Encode directly is much faster.
- dst := make([]byte, base64.StdEncoding.EncodedLen(len(s)))
- base64.StdEncoding.Encode(dst, s)
- e.Write(dst)
- } else {
- // for large buffers, avoid unnecessary extra temporary
- // buffer space.
- enc := base64.NewEncoder(base64.StdEncoding, e)
- enc.Write(s)
- enc.Close()
- }
- e.WriteByte('"')
-}
-
-// sliceEncoder just wraps an arrayEncoder, checking to make sure the value isn't nil.
-type sliceEncoder struct {
- arrayEnc encoderFunc
-}
-
-func (se *sliceEncoder) encode(e *encodeState, v reflect.Value, _ bool) {
- if v.IsNil() {
- e.WriteString("null")
- return
- }
- se.arrayEnc(e, v, false)
-}
-
-func newSliceEncoder(t reflect.Type) encoderFunc {
- // Byte slices get special treatment; arrays don't.
- if t.Elem().Kind() == reflect.Uint8 {
- return encodeByteSlice
- }
- enc := &sliceEncoder{newArrayEncoder(t)}
- return enc.encode
-}
-
-type arrayEncoder struct {
- elemEnc encoderFunc
-}
-
-func (ae *arrayEncoder) encode(e *encodeState, v reflect.Value, _ bool) {
- e.WriteByte('[')
- n := v.Len()
- for i := 0; i < n; i++ {
- if i > 0 {
- e.WriteByte(',')
- }
- ae.elemEnc(e, v.Index(i), false)
- }
- e.WriteByte(']')
-}
-
-func newArrayEncoder(t reflect.Type) encoderFunc {
- enc := &arrayEncoder{typeEncoder(t.Elem())}
- return enc.encode
-}
-
-type ptrEncoder struct {
- elemEnc encoderFunc
-}
-
-func (pe *ptrEncoder) encode(e *encodeState, v reflect.Value, quoted bool) {
- if v.IsNil() {
- e.WriteString("null")
- return
- }
- pe.elemEnc(e, v.Elem(), quoted)
-}
-
-func newPtrEncoder(t reflect.Type) encoderFunc {
- enc := &ptrEncoder{typeEncoder(t.Elem())}
- return enc.encode
-}
-
-type condAddrEncoder struct {
- canAddrEnc, elseEnc encoderFunc
-}
-
-func (ce *condAddrEncoder) encode(e *encodeState, v reflect.Value, quoted bool) {
- if v.CanAddr() {
- ce.canAddrEnc(e, v, quoted)
- } else {
- ce.elseEnc(e, v, quoted)
- }
-}
-
-// newCondAddrEncoder returns an encoder that checks whether its value
-// CanAddr and delegates to canAddrEnc if so, else to elseEnc.
-func newCondAddrEncoder(canAddrEnc, elseEnc encoderFunc) encoderFunc {
- enc := &condAddrEncoder{canAddrEnc: canAddrEnc, elseEnc: elseEnc}
- return enc.encode
-}
-
-func isValidTag(s string) bool {
- if s == "" {
- return false
- }
- for _, c := range s {
- switch {
- case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c):
- // Backslash and quote chars are reserved, but
- // otherwise any punctuation chars are allowed
- // in a tag name.
- default:
- if !unicode.IsLetter(c) && !unicode.IsDigit(c) {
- return false
- }
- }
- }
- return true
-}
-
-func fieldByIndex(v reflect.Value, index []int) reflect.Value {
- for _, i := range index {
- if v.Kind() == reflect.Ptr {
- if v.IsNil() {
- return reflect.Value{}
- }
- v = v.Elem()
- }
- v = v.Field(i)
- }
- return v
-}
-
-func typeByIndex(t reflect.Type, index []int) reflect.Type {
- for _, i := range index {
- if t.Kind() == reflect.Ptr {
- t = t.Elem()
- }
- t = t.Field(i).Type
- }
- return t
-}
-
-// stringValues is a slice of reflect.Value holding *reflect.StringValue.
-// It implements the methods to sort by string.
-type stringValues []reflect.Value
-
-func (sv stringValues) Len() int { return len(sv) }
-func (sv stringValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] }
-func (sv stringValues) Less(i, j int) bool { return sv.get(i) < sv.get(j) }
-func (sv stringValues) get(i int) string { return sv[i].String() }
-
-// NOTE: keep in sync with stringBytes below.
-func (e *encodeState) string(s string) int {
- len0 := e.Len()
- e.WriteByte('"')
- start := 0
- for i := 0; i < len(s); {
- if b := s[i]; b < utf8.RuneSelf {
- if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' {
- i++
- continue
- }
- if start < i {
- e.WriteString(s[start:i])
- }
- switch b {
- case '\\', '"':
- e.WriteByte('\\')
- e.WriteByte(b)
- case '\n':
- e.WriteByte('\\')
- e.WriteByte('n')
- case '\r':
- e.WriteByte('\\')
- e.WriteByte('r')
- case '\t':
- e.WriteByte('\\')
- e.WriteByte('t')
- default:
- // This encodes bytes < 0x20 except for \n and \r,
- // as well as <, > and &. The latter are escaped because they
- // can lead to security holes when user-controlled strings
- // are rendered into JSON and served to some browsers.
- e.WriteString(`\u00`)
- e.WriteByte(hex[b>>4])
- e.WriteByte(hex[b&0xF])
- }
- i++
- start = i
- continue
- }
- c, size := utf8.DecodeRuneInString(s[i:])
- if c == utf8.RuneError && size == 1 {
- if start < i {
- e.WriteString(s[start:i])
- }
- e.WriteString(`\ufffd`)
- i += size
- start = i
- continue
- }
- // U+2028 is LINE SEPARATOR.
- // U+2029 is PARAGRAPH SEPARATOR.
- // They are both technically valid characters in JSON strings,
- // but don't work in JSONP, which has to be evaluated as JavaScript,
- // and can lead to security holes there. It is valid JSON to
- // escape them, so we do so unconditionally.
- // See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion.
- if c == '\u2028' || c == '\u2029' {
- if start < i {
- e.WriteString(s[start:i])
- }
- e.WriteString(`\u202`)
- e.WriteByte(hex[c&0xF])
- i += size
- start = i
- continue
- }
- i += size
- }
- if start < len(s) {
- e.WriteString(s[start:])
- }
- e.WriteByte('"')
- return e.Len() - len0
-}
-
-// NOTE: keep in sync with string above.
-func (e *encodeState) stringBytes(s []byte) int {
- len0 := e.Len()
- e.WriteByte('"')
- start := 0
- for i := 0; i < len(s); {
- if b := s[i]; b < utf8.RuneSelf {
- if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' {
- i++
- continue
- }
- if start < i {
- e.Write(s[start:i])
- }
- switch b {
- case '\\', '"':
- e.WriteByte('\\')
- e.WriteByte(b)
- case '\n':
- e.WriteByte('\\')
- e.WriteByte('n')
- case '\r':
- e.WriteByte('\\')
- e.WriteByte('r')
- case '\t':
- e.WriteByte('\\')
- e.WriteByte('t')
- default:
- // This encodes bytes < 0x20 except for \n and \r,
- // as well as <, >, and &. The latter are escaped because they
- // can lead to security holes when user-controlled strings
- // are rendered into JSON and served to some browsers.
- e.WriteString(`\u00`)
- e.WriteByte(hex[b>>4])
- e.WriteByte(hex[b&0xF])
- }
- i++
- start = i
- continue
- }
- c, size := utf8.DecodeRune(s[i:])
- if c == utf8.RuneError && size == 1 {
- if start < i {
- e.Write(s[start:i])
- }
- e.WriteString(`\ufffd`)
- i += size
- start = i
- continue
- }
- // U+2028 is LINE SEPARATOR.
- // U+2029 is PARAGRAPH SEPARATOR.
- // They are both technically valid characters in JSON strings,
- // but don't work in JSONP, which has to be evaluated as JavaScript,
- // and can lead to security holes there. It is valid JSON to
- // escape them, so we do so unconditionally.
- // See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion.
- if c == '\u2028' || c == '\u2029' {
- if start < i {
- e.Write(s[start:i])
- }
- e.WriteString(`\u202`)
- e.WriteByte(hex[c&0xF])
- i += size
- start = i
- continue
- }
- i += size
- }
- if start < len(s) {
- e.Write(s[start:])
- }
- e.WriteByte('"')
- return e.Len() - len0
-}
-
-// A field represents a single field found in a struct.
-type field struct {
- name string
- nameBytes []byte // []byte(name)
-
- tag bool
- index []int
- typ reflect.Type
- omitEmpty bool
- quoted bool
-}
-
-func fillField(f field) field {
- f.nameBytes = []byte(f.name)
- return f
-}
-
-// byName sorts field by name, breaking ties with depth,
-// then breaking ties with "name came from json tag", then
-// breaking ties with index sequence.
-type byName []field
-
-func (x byName) Len() int { return len(x) }
-
-func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byName) Less(i, j int) bool {
- if x[i].name != x[j].name {
- return x[i].name < x[j].name
- }
- if len(x[i].index) != len(x[j].index) {
- return len(x[i].index) < len(x[j].index)
- }
- if x[i].tag != x[j].tag {
- return x[i].tag
- }
- return byIndex(x).Less(i, j)
-}
-
-// byIndex sorts field by index sequence.
-type byIndex []field
-
-func (x byIndex) Len() int { return len(x) }
-
-func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byIndex) Less(i, j int) bool {
- for k, xik := range x[i].index {
- if k >= len(x[j].index) {
- return false
- }
- if xik != x[j].index[k] {
- return xik < x[j].index[k]
- }
- }
- return len(x[i].index) < len(x[j].index)
-}
-
-// typeFields returns a list of fields that JSON should recognize for the given type.
-// The algorithm is breadth-first search over the set of structs to include - the top struct
-// and then any reachable anonymous structs.
-func typeFields(t reflect.Type) []field {
- // Anonymous fields to explore at the current level and the next.
- current := []field{}
- next := []field{{typ: t}}
-
- // Count of queued names for current level and the next.
- count := map[reflect.Type]int{}
- nextCount := map[reflect.Type]int{}
-
- // Types already visited at an earlier level.
- visited := map[reflect.Type]bool{}
-
- // Fields found.
- var fields []field
-
- for len(next) > 0 {
- current, next = next, current[:0]
- count, nextCount = nextCount, map[reflect.Type]int{}
-
- for _, f := range current {
- if visited[f.typ] {
- continue
- }
- visited[f.typ] = true
-
- // Scan f.typ for fields to include.
- for i := 0; i < f.typ.NumField(); i++ {
- sf := f.typ.Field(i)
- if sf.PkgPath != "" && !sf.Anonymous { // unexported
- continue
- }
- tag := sf.Tag.Get("json")
- if tag == "-" {
- continue
- }
- name, opts := parseTag(tag)
- if !isValidTag(name) {
- name = ""
- }
- index := make([]int, len(f.index)+1)
- copy(index, f.index)
- index[len(f.index)] = i
-
- ft := sf.Type
- if ft.Name() == "" && ft.Kind() == reflect.Ptr {
- // Follow pointer.
- ft = ft.Elem()
- }
-
- // Only strings, floats, integers, and booleans can be quoted.
- quoted := false
- if opts.Contains("string") {
- switch ft.Kind() {
- case reflect.Bool,
- reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
- reflect.Float32, reflect.Float64,
- reflect.String:
- quoted = true
- }
- }
-
- // Record found field and index sequence.
- if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
- tagged := name != ""
- if name == "" {
- name = sf.Name
- }
- fields = append(fields, fillField(field{
- name: name,
- tag: tagged,
- index: index,
- typ: ft,
- omitEmpty: opts.Contains("omitempty"),
- quoted: quoted,
- }))
- if count[f.typ] > 1 {
- // If there were multiple instances, add a second,
- // so that the annihilation code will see a duplicate.
- // It only cares about the distinction between 1 or 2,
- // so don't bother generating any more copies.
- fields = append(fields, fields[len(fields)-1])
- }
- continue
- }
-
- // Record new anonymous struct to explore in next round.
- nextCount[ft]++
- if nextCount[ft] == 1 {
- next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft}))
- }
- }
- }
- }
-
- sort.Sort(byName(fields))
-
- // Delete all fields that are hidden by the Go rules for embedded fields,
- // except that fields with JSON tags are promoted.
-
- // The fields are sorted in primary order of name, secondary order
- // of field index length. Loop over names; for each name, delete
- // hidden fields by choosing the one dominant field that survives.
- out := fields[:0]
- for advance, i := 0, 0; i < len(fields); i += advance {
- // One iteration per name.
- // Find the sequence of fields with the name of this first field.
- fi := fields[i]
- name := fi.name
- for advance = 1; i+advance < len(fields); advance++ {
- fj := fields[i+advance]
- if fj.name != name {
- break
- }
- }
- if advance == 1 { // Only one field with this name
- out = append(out, fi)
- continue
- }
- dominant, ok := dominantField(fields[i : i+advance])
- if ok {
- out = append(out, dominant)
- }
- }
-
- fields = out
- sort.Sort(byIndex(fields))
-
- return fields
-}
-
-// dominantField looks through the fields, all of which are known to
-// have the same name, to find the single field that dominates the
-// others using Go's embedding rules, modified by the presence of
-// JSON tags. If there are multiple top-level fields, the boolean
-// will be false: This condition is an error in Go and we skip all
-// the fields.
-func dominantField(fields []field) (field, bool) {
- // The fields are sorted in increasing index-length order. The winner
- // must therefore be one with the shortest index length. Drop all
- // longer entries, which is easy: just truncate the slice.
- length := len(fields[0].index)
- tagged := -1 // Index of first tagged field.
- for i, f := range fields {
- if len(f.index) > length {
- fields = fields[:i]
- break
- }
- if f.tag {
- if tagged >= 0 {
- // Multiple tagged fields at the same level: conflict.
- // Return no field.
- return field{}, false
- }
- tagged = i
- }
- }
- if tagged >= 0 {
- return fields[tagged], true
- }
- // All remaining fields have the same length. If there's more than one,
- // we have a conflict (two fields named "X" at the same level) and we
- // return no field.
- if len(fields) > 1 {
- return field{}, false
- }
- return fields[0], true
-}
-
-var fieldCache struct {
- sync.RWMutex
- m map[reflect.Type][]field
-}
-
-// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.
-func cachedTypeFields(t reflect.Type) []field {
- fieldCache.RLock()
- f := fieldCache.m[t]
- fieldCache.RUnlock()
- if f != nil {
- return f
- }
-
- // Compute fields without lock.
- // Might duplicate effort but won't hold other computations back.
- f = typeFields(t)
- if f == nil {
- f = []field{}
- }
-
- fieldCache.Lock()
- if fieldCache.m == nil {
- fieldCache.m = map[reflect.Type][]field{}
- }
- fieldCache.m[t] = f
- fieldCache.Unlock()
- return f
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/indent.go b/vendor/gopkg.in/square/go-jose.v2/json/indent.go
deleted file mode 100644
index 7cd9f4db1..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/indent.go
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package json
-
-import "bytes"
-
-// Compact appends to dst the JSON-encoded src with
-// insignificant space characters elided.
-func Compact(dst *bytes.Buffer, src []byte) error {
- return compact(dst, src, false)
-}
-
-func compact(dst *bytes.Buffer, src []byte, escape bool) error {
- origLen := dst.Len()
- var scan scanner
- scan.reset()
- start := 0
- for i, c := range src {
- if escape && (c == '<' || c == '>' || c == '&') {
- if start < i {
- dst.Write(src[start:i])
- }
- dst.WriteString(`\u00`)
- dst.WriteByte(hex[c>>4])
- dst.WriteByte(hex[c&0xF])
- start = i + 1
- }
- // Convert U+2028 and U+2029 (E2 80 A8 and E2 80 A9).
- if c == 0xE2 && i+2 < len(src) && src[i+1] == 0x80 && src[i+2]&^1 == 0xA8 {
- if start < i {
- dst.Write(src[start:i])
- }
- dst.WriteString(`\u202`)
- dst.WriteByte(hex[src[i+2]&0xF])
- start = i + 3
- }
- v := scan.step(&scan, c)
- if v >= scanSkipSpace {
- if v == scanError {
- break
- }
- if start < i {
- dst.Write(src[start:i])
- }
- start = i + 1
- }
- }
- if scan.eof() == scanError {
- dst.Truncate(origLen)
- return scan.err
- }
- if start < len(src) {
- dst.Write(src[start:])
- }
- return nil
-}
-
-func newline(dst *bytes.Buffer, prefix, indent string, depth int) {
- dst.WriteByte('\n')
- dst.WriteString(prefix)
- for i := 0; i < depth; i++ {
- dst.WriteString(indent)
- }
-}
-
-// Indent appends to dst an indented form of the JSON-encoded src.
-// Each element in a JSON object or array begins on a new,
-// indented line beginning with prefix followed by one or more
-// copies of indent according to the indentation nesting.
-// The data appended to dst does not begin with the prefix nor
-// any indentation, to make it easier to embed inside other formatted JSON data.
-// Although leading space characters (space, tab, carriage return, newline)
-// at the beginning of src are dropped, trailing space characters
-// at the end of src are preserved and copied to dst.
-// For example, if src has no trailing spaces, neither will dst;
-// if src ends in a trailing newline, so will dst.
-func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error {
- origLen := dst.Len()
- var scan scanner
- scan.reset()
- needIndent := false
- depth := 0
- for _, c := range src {
- scan.bytes++
- v := scan.step(&scan, c)
- if v == scanSkipSpace {
- continue
- }
- if v == scanError {
- break
- }
- if needIndent && v != scanEndObject && v != scanEndArray {
- needIndent = false
- depth++
- newline(dst, prefix, indent, depth)
- }
-
- // Emit semantically uninteresting bytes
- // (in particular, punctuation in strings) unmodified.
- if v == scanContinue {
- dst.WriteByte(c)
- continue
- }
-
- // Add spacing around real punctuation.
- switch c {
- case '{', '[':
- // delay indent so that empty object and array are formatted as {} and [].
- needIndent = true
- dst.WriteByte(c)
-
- case ',':
- dst.WriteByte(c)
- newline(dst, prefix, indent, depth)
-
- case ':':
- dst.WriteByte(c)
- dst.WriteByte(' ')
-
- case '}', ']':
- if needIndent {
- // suppress indent in empty object/array
- needIndent = false
- } else {
- depth--
- newline(dst, prefix, indent, depth)
- }
- dst.WriteByte(c)
-
- default:
- dst.WriteByte(c)
- }
- }
- if scan.eof() == scanError {
- dst.Truncate(origLen)
- return scan.err
- }
- return nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/scanner.go b/vendor/gopkg.in/square/go-jose.v2/json/scanner.go
deleted file mode 100644
index ee6622e8c..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/scanner.go
+++ /dev/null
@@ -1,623 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package json
-
-// JSON value parser state machine.
-// Just about at the limit of what is reasonable to write by hand.
-// Some parts are a bit tedious, but overall it nicely factors out the
-// otherwise common code from the multiple scanning functions
-// in this package (Compact, Indent, checkValid, nextValue, etc).
-//
-// This file starts with two simple examples using the scanner
-// before diving into the scanner itself.
-
-import "strconv"
-
-// checkValid verifies that data is valid JSON-encoded data.
-// scan is passed in for use by checkValid to avoid an allocation.
-func checkValid(data []byte, scan *scanner) error {
- scan.reset()
- for _, c := range data {
- scan.bytes++
- if scan.step(scan, c) == scanError {
- return scan.err
- }
- }
- if scan.eof() == scanError {
- return scan.err
- }
- return nil
-}
-
-// nextValue splits data after the next whole JSON value,
-// returning that value and the bytes that follow it as separate slices.
-// scan is passed in for use by nextValue to avoid an allocation.
-func nextValue(data []byte, scan *scanner) (value, rest []byte, err error) {
- scan.reset()
- for i, c := range data {
- v := scan.step(scan, c)
- if v >= scanEndObject {
- switch v {
- // probe the scanner with a space to determine whether we will
- // get scanEnd on the next character. Otherwise, if the next character
- // is not a space, scanEndTop allocates a needless error.
- case scanEndObject, scanEndArray:
- if scan.step(scan, ' ') == scanEnd {
- return data[:i+1], data[i+1:], nil
- }
- case scanError:
- return nil, nil, scan.err
- case scanEnd:
- return data[:i], data[i:], nil
- }
- }
- }
- if scan.eof() == scanError {
- return nil, nil, scan.err
- }
- return data, nil, nil
-}
-
-// A SyntaxError is a description of a JSON syntax error.
-type SyntaxError struct {
- msg string // description of error
- Offset int64 // error occurred after reading Offset bytes
-}
-
-func (e *SyntaxError) Error() string { return e.msg }
-
-// A scanner is a JSON scanning state machine.
-// Callers call scan.reset() and then pass bytes in one at a time
-// by calling scan.step(&scan, c) for each byte.
-// The return value, referred to as an opcode, tells the
-// caller about significant parsing events like beginning
-// and ending literals, objects, and arrays, so that the
-// caller can follow along if it wishes.
-// The return value scanEnd indicates that a single top-level
-// JSON value has been completed, *before* the byte that
-// just got passed in. (The indication must be delayed in order
-// to recognize the end of numbers: is 123 a whole value or
-// the beginning of 12345e+6?).
-type scanner struct {
- // The step is a func to be called to execute the next transition.
- // Also tried using an integer constant and a single func
- // with a switch, but using the func directly was 10% faster
- // on a 64-bit Mac Mini, and it's nicer to read.
- step func(*scanner, byte) int
-
- // Reached end of top-level value.
- endTop bool
-
- // Stack of what we're in the middle of - array values, object keys, object values.
- parseState []int
-
- // Error that happened, if any.
- err error
-
- // 1-byte redo (see undo method)
- redo bool
- redoCode int
- redoState func(*scanner, byte) int
-
- // total bytes consumed, updated by decoder.Decode
- bytes int64
-}
-
-// These values are returned by the state transition functions
-// assigned to scanner.state and the method scanner.eof.
-// They give details about the current state of the scan that
-// callers might be interested to know about.
-// It is okay to ignore the return value of any particular
-// call to scanner.state: if one call returns scanError,
-// every subsequent call will return scanError too.
-const (
- // Continue.
- scanContinue = iota // uninteresting byte
- scanBeginLiteral // end implied by next result != scanContinue
- scanBeginObject // begin object
- scanObjectKey // just finished object key (string)
- scanObjectValue // just finished non-last object value
- scanEndObject // end object (implies scanObjectValue if possible)
- scanBeginArray // begin array
- scanArrayValue // just finished array value
- scanEndArray // end array (implies scanArrayValue if possible)
- scanSkipSpace // space byte; can skip; known to be last "continue" result
-
- // Stop.
- scanEnd // top-level value ended *before* this byte; known to be first "stop" result
- scanError // hit an error, scanner.err.
-)
-
-// These values are stored in the parseState stack.
-// They give the current state of a composite value
-// being scanned. If the parser is inside a nested value
-// the parseState describes the nested state, outermost at entry 0.
-const (
- parseObjectKey = iota // parsing object key (before colon)
- parseObjectValue // parsing object value (after colon)
- parseArrayValue // parsing array value
-)
-
-// reset prepares the scanner for use.
-// It must be called before calling s.step.
-func (s *scanner) reset() {
- s.step = stateBeginValue
- s.parseState = s.parseState[0:0]
- s.err = nil
- s.redo = false
- s.endTop = false
-}
-
-// eof tells the scanner that the end of input has been reached.
-// It returns a scan status just as s.step does.
-func (s *scanner) eof() int {
- if s.err != nil {
- return scanError
- }
- if s.endTop {
- return scanEnd
- }
- s.step(s, ' ')
- if s.endTop {
- return scanEnd
- }
- if s.err == nil {
- s.err = &SyntaxError{"unexpected end of JSON input", s.bytes}
- }
- return scanError
-}
-
-// pushParseState pushes a new parse state p onto the parse stack.
-func (s *scanner) pushParseState(p int) {
- s.parseState = append(s.parseState, p)
-}
-
-// popParseState pops a parse state (already obtained) off the stack
-// and updates s.step accordingly.
-func (s *scanner) popParseState() {
- n := len(s.parseState) - 1
- s.parseState = s.parseState[0:n]
- s.redo = false
- if n == 0 {
- s.step = stateEndTop
- s.endTop = true
- } else {
- s.step = stateEndValue
- }
-}
-
-func isSpace(c byte) bool {
- return c == ' ' || c == '\t' || c == '\r' || c == '\n'
-}
-
-// stateBeginValueOrEmpty is the state after reading `[`.
-func stateBeginValueOrEmpty(s *scanner, c byte) int {
- if c <= ' ' && isSpace(c) {
- return scanSkipSpace
- }
- if c == ']' {
- return stateEndValue(s, c)
- }
- return stateBeginValue(s, c)
-}
-
-// stateBeginValue is the state at the beginning of the input.
-func stateBeginValue(s *scanner, c byte) int {
- if c <= ' ' && isSpace(c) {
- return scanSkipSpace
- }
- switch c {
- case '{':
- s.step = stateBeginStringOrEmpty
- s.pushParseState(parseObjectKey)
- return scanBeginObject
- case '[':
- s.step = stateBeginValueOrEmpty
- s.pushParseState(parseArrayValue)
- return scanBeginArray
- case '"':
- s.step = stateInString
- return scanBeginLiteral
- case '-':
- s.step = stateNeg
- return scanBeginLiteral
- case '0': // beginning of 0.123
- s.step = state0
- return scanBeginLiteral
- case 't': // beginning of true
- s.step = stateT
- return scanBeginLiteral
- case 'f': // beginning of false
- s.step = stateF
- return scanBeginLiteral
- case 'n': // beginning of null
- s.step = stateN
- return scanBeginLiteral
- }
- if '1' <= c && c <= '9' { // beginning of 1234.5
- s.step = state1
- return scanBeginLiteral
- }
- return s.error(c, "looking for beginning of value")
-}
-
-// stateBeginStringOrEmpty is the state after reading `{`.
-func stateBeginStringOrEmpty(s *scanner, c byte) int {
- if c <= ' ' && isSpace(c) {
- return scanSkipSpace
- }
- if c == '}' {
- n := len(s.parseState)
- s.parseState[n-1] = parseObjectValue
- return stateEndValue(s, c)
- }
- return stateBeginString(s, c)
-}
-
-// stateBeginString is the state after reading `{"key": value,`.
-func stateBeginString(s *scanner, c byte) int {
- if c <= ' ' && isSpace(c) {
- return scanSkipSpace
- }
- if c == '"' {
- s.step = stateInString
- return scanBeginLiteral
- }
- return s.error(c, "looking for beginning of object key string")
-}
-
-// stateEndValue is the state after completing a value,
-// such as after reading `{}` or `true` or `["x"`.
-func stateEndValue(s *scanner, c byte) int {
- n := len(s.parseState)
- if n == 0 {
- // Completed top-level before the current byte.
- s.step = stateEndTop
- s.endTop = true
- return stateEndTop(s, c)
- }
- if c <= ' ' && isSpace(c) {
- s.step = stateEndValue
- return scanSkipSpace
- }
- ps := s.parseState[n-1]
- switch ps {
- case parseObjectKey:
- if c == ':' {
- s.parseState[n-1] = parseObjectValue
- s.step = stateBeginValue
- return scanObjectKey
- }
- return s.error(c, "after object key")
- case parseObjectValue:
- if c == ',' {
- s.parseState[n-1] = parseObjectKey
- s.step = stateBeginString
- return scanObjectValue
- }
- if c == '}' {
- s.popParseState()
- return scanEndObject
- }
- return s.error(c, "after object key:value pair")
- case parseArrayValue:
- if c == ',' {
- s.step = stateBeginValue
- return scanArrayValue
- }
- if c == ']' {
- s.popParseState()
- return scanEndArray
- }
- return s.error(c, "after array element")
- }
- return s.error(c, "")
-}
-
-// stateEndTop is the state after finishing the top-level value,
-// such as after reading `{}` or `[1,2,3]`.
-// Only space characters should be seen now.
-func stateEndTop(s *scanner, c byte) int {
- if c != ' ' && c != '\t' && c != '\r' && c != '\n' {
- // Complain about non-space byte on next call.
- s.error(c, "after top-level value")
- }
- return scanEnd
-}
-
-// stateInString is the state after reading `"`.
-func stateInString(s *scanner, c byte) int {
- if c == '"' {
- s.step = stateEndValue
- return scanContinue
- }
- if c == '\\' {
- s.step = stateInStringEsc
- return scanContinue
- }
- if c < 0x20 {
- return s.error(c, "in string literal")
- }
- return scanContinue
-}
-
-// stateInStringEsc is the state after reading `"\` during a quoted string.
-func stateInStringEsc(s *scanner, c byte) int {
- switch c {
- case 'b', 'f', 'n', 'r', 't', '\\', '/', '"':
- s.step = stateInString
- return scanContinue
- case 'u':
- s.step = stateInStringEscU
- return scanContinue
- }
- return s.error(c, "in string escape code")
-}
-
-// stateInStringEscU is the state after reading `"\u` during a quoted string.
-func stateInStringEscU(s *scanner, c byte) int {
- if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' {
- s.step = stateInStringEscU1
- return scanContinue
- }
- // numbers
- return s.error(c, "in \\u hexadecimal character escape")
-}
-
-// stateInStringEscU1 is the state after reading `"\u1` during a quoted string.
-func stateInStringEscU1(s *scanner, c byte) int {
- if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' {
- s.step = stateInStringEscU12
- return scanContinue
- }
- // numbers
- return s.error(c, "in \\u hexadecimal character escape")
-}
-
-// stateInStringEscU12 is the state after reading `"\u12` during a quoted string.
-func stateInStringEscU12(s *scanner, c byte) int {
- if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' {
- s.step = stateInStringEscU123
- return scanContinue
- }
- // numbers
- return s.error(c, "in \\u hexadecimal character escape")
-}
-
-// stateInStringEscU123 is the state after reading `"\u123` during a quoted string.
-func stateInStringEscU123(s *scanner, c byte) int {
- if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' {
- s.step = stateInString
- return scanContinue
- }
- // numbers
- return s.error(c, "in \\u hexadecimal character escape")
-}
-
-// stateNeg is the state after reading `-` during a number.
-func stateNeg(s *scanner, c byte) int {
- if c == '0' {
- s.step = state0
- return scanContinue
- }
- if '1' <= c && c <= '9' {
- s.step = state1
- return scanContinue
- }
- return s.error(c, "in numeric literal")
-}
-
-// state1 is the state after reading a non-zero integer during a number,
-// such as after reading `1` or `100` but not `0`.
-func state1(s *scanner, c byte) int {
- if '0' <= c && c <= '9' {
- s.step = state1
- return scanContinue
- }
- return state0(s, c)
-}
-
-// state0 is the state after reading `0` during a number.
-func state0(s *scanner, c byte) int {
- if c == '.' {
- s.step = stateDot
- return scanContinue
- }
- if c == 'e' || c == 'E' {
- s.step = stateE
- return scanContinue
- }
- return stateEndValue(s, c)
-}
-
-// stateDot is the state after reading the integer and decimal point in a number,
-// such as after reading `1.`.
-func stateDot(s *scanner, c byte) int {
- if '0' <= c && c <= '9' {
- s.step = stateDot0
- return scanContinue
- }
- return s.error(c, "after decimal point in numeric literal")
-}
-
-// stateDot0 is the state after reading the integer, decimal point, and subsequent
-// digits of a number, such as after reading `3.14`.
-func stateDot0(s *scanner, c byte) int {
- if '0' <= c && c <= '9' {
- return scanContinue
- }
- if c == 'e' || c == 'E' {
- s.step = stateE
- return scanContinue
- }
- return stateEndValue(s, c)
-}
-
-// stateE is the state after reading the mantissa and e in a number,
-// such as after reading `314e` or `0.314e`.
-func stateE(s *scanner, c byte) int {
- if c == '+' || c == '-' {
- s.step = stateESign
- return scanContinue
- }
- return stateESign(s, c)
-}
-
-// stateESign is the state after reading the mantissa, e, and sign in a number,
-// such as after reading `314e-` or `0.314e+`.
-func stateESign(s *scanner, c byte) int {
- if '0' <= c && c <= '9' {
- s.step = stateE0
- return scanContinue
- }
- return s.error(c, "in exponent of numeric literal")
-}
-
-// stateE0 is the state after reading the mantissa, e, optional sign,
-// and at least one digit of the exponent in a number,
-// such as after reading `314e-2` or `0.314e+1` or `3.14e0`.
-func stateE0(s *scanner, c byte) int {
- if '0' <= c && c <= '9' {
- return scanContinue
- }
- return stateEndValue(s, c)
-}
-
-// stateT is the state after reading `t`.
-func stateT(s *scanner, c byte) int {
- if c == 'r' {
- s.step = stateTr
- return scanContinue
- }
- return s.error(c, "in literal true (expecting 'r')")
-}
-
-// stateTr is the state after reading `tr`.
-func stateTr(s *scanner, c byte) int {
- if c == 'u' {
- s.step = stateTru
- return scanContinue
- }
- return s.error(c, "in literal true (expecting 'u')")
-}
-
-// stateTru is the state after reading `tru`.
-func stateTru(s *scanner, c byte) int {
- if c == 'e' {
- s.step = stateEndValue
- return scanContinue
- }
- return s.error(c, "in literal true (expecting 'e')")
-}
-
-// stateF is the state after reading `f`.
-func stateF(s *scanner, c byte) int {
- if c == 'a' {
- s.step = stateFa
- return scanContinue
- }
- return s.error(c, "in literal false (expecting 'a')")
-}
-
-// stateFa is the state after reading `fa`.
-func stateFa(s *scanner, c byte) int {
- if c == 'l' {
- s.step = stateFal
- return scanContinue
- }
- return s.error(c, "in literal false (expecting 'l')")
-}
-
-// stateFal is the state after reading `fal`.
-func stateFal(s *scanner, c byte) int {
- if c == 's' {
- s.step = stateFals
- return scanContinue
- }
- return s.error(c, "in literal false (expecting 's')")
-}
-
-// stateFals is the state after reading `fals`.
-func stateFals(s *scanner, c byte) int {
- if c == 'e' {
- s.step = stateEndValue
- return scanContinue
- }
- return s.error(c, "in literal false (expecting 'e')")
-}
-
-// stateN is the state after reading `n`.
-func stateN(s *scanner, c byte) int {
- if c == 'u' {
- s.step = stateNu
- return scanContinue
- }
- return s.error(c, "in literal null (expecting 'u')")
-}
-
-// stateNu is the state after reading `nu`.
-func stateNu(s *scanner, c byte) int {
- if c == 'l' {
- s.step = stateNul
- return scanContinue
- }
- return s.error(c, "in literal null (expecting 'l')")
-}
-
-// stateNul is the state after reading `nul`.
-func stateNul(s *scanner, c byte) int {
- if c == 'l' {
- s.step = stateEndValue
- return scanContinue
- }
- return s.error(c, "in literal null (expecting 'l')")
-}
-
-// stateError is the state after reaching a syntax error,
-// such as after reading `[1}` or `5.1.2`.
-func stateError(s *scanner, c byte) int {
- return scanError
-}
-
-// error records an error and switches to the error state.
-func (s *scanner) error(c byte, context string) int {
- s.step = stateError
- s.err = &SyntaxError{"invalid character " + quoteChar(c) + " " + context, s.bytes}
- return scanError
-}
-
-// quoteChar formats c as a quoted character literal
-func quoteChar(c byte) string {
- // special cases - different from quoted strings
- if c == '\'' {
- return `'\''`
- }
- if c == '"' {
- return `'"'`
- }
-
- // use quoted string with different quotation marks
- s := strconv.Quote(string(c))
- return "'" + s[1:len(s)-1] + "'"
-}
-
-// undo causes the scanner to return scanCode from the next state transition.
-// This gives callers a simple 1-byte undo mechanism.
-func (s *scanner) undo(scanCode int) {
- if s.redo {
- panic("json: invalid use of scanner")
- }
- s.redoCode = scanCode
- s.redoState = s.step
- s.step = stateRedo
- s.redo = true
-}
-
-// stateRedo helps implement the scanner's 1-byte undo.
-func stateRedo(s *scanner, c byte) int {
- s.redo = false
- s.step = s.redoState
- return s.redoCode
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/stream.go b/vendor/gopkg.in/square/go-jose.v2/json/stream.go
deleted file mode 100644
index 8ddcf4d27..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/stream.go
+++ /dev/null
@@ -1,480 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package json
-
-import (
- "bytes"
- "errors"
- "io"
-)
-
-// A Decoder reads and decodes JSON objects from an input stream.
-type Decoder struct {
- r io.Reader
- buf []byte
- d decodeState
- scanp int // start of unread data in buf
- scan scanner
- err error
-
- tokenState int
- tokenStack []int
-}
-
-// NewDecoder returns a new decoder that reads from r.
-//
-// The decoder introduces its own buffering and may
-// read data from r beyond the JSON values requested.
-func NewDecoder(r io.Reader) *Decoder {
- return &Decoder{r: r}
-}
-
-// UseNumber causes the Decoder to unmarshal a number into an interface{} as a
-// Number instead of as a float64.
-func (dec *Decoder) UseNumber() { dec.d.useNumber = true }
-
-// Decode reads the next JSON-encoded value from its
-// input and stores it in the value pointed to by v.
-//
-// See the documentation for Unmarshal for details about
-// the conversion of JSON into a Go value.
-func (dec *Decoder) Decode(v interface{}) error {
- if dec.err != nil {
- return dec.err
- }
-
- if err := dec.tokenPrepareForDecode(); err != nil {
- return err
- }
-
- if !dec.tokenValueAllowed() {
- return &SyntaxError{msg: "not at beginning of value"}
- }
-
- // Read whole value into buffer.
- n, err := dec.readValue()
- if err != nil {
- return err
- }
- dec.d.init(dec.buf[dec.scanp : dec.scanp+n])
- dec.scanp += n
-
- // Don't save err from unmarshal into dec.err:
- // the connection is still usable since we read a complete JSON
- // object from it before the error happened.
- err = dec.d.unmarshal(v)
-
- // fixup token streaming state
- dec.tokenValueEnd()
-
- return err
-}
-
-// Buffered returns a reader of the data remaining in the Decoder's
-// buffer. The reader is valid until the next call to Decode.
-func (dec *Decoder) Buffered() io.Reader {
- return bytes.NewReader(dec.buf[dec.scanp:])
-}
-
-// readValue reads a JSON value into dec.buf.
-// It returns the length of the encoding.
-func (dec *Decoder) readValue() (int, error) {
- dec.scan.reset()
-
- scanp := dec.scanp
- var err error
-Input:
- for {
- // Look in the buffer for a new value.
- for i, c := range dec.buf[scanp:] {
- dec.scan.bytes++
- v := dec.scan.step(&dec.scan, c)
- if v == scanEnd {
- scanp += i
- break Input
- }
- // scanEnd is delayed one byte.
- // We might block trying to get that byte from src,
- // so instead invent a space byte.
- if (v == scanEndObject || v == scanEndArray) && dec.scan.step(&dec.scan, ' ') == scanEnd {
- scanp += i + 1
- break Input
- }
- if v == scanError {
- dec.err = dec.scan.err
- return 0, dec.scan.err
- }
- }
- scanp = len(dec.buf)
-
- // Did the last read have an error?
- // Delayed until now to allow buffer scan.
- if err != nil {
- if err == io.EOF {
- if dec.scan.step(&dec.scan, ' ') == scanEnd {
- break Input
- }
- if nonSpace(dec.buf) {
- err = io.ErrUnexpectedEOF
- }
- }
- dec.err = err
- return 0, err
- }
-
- n := scanp - dec.scanp
- err = dec.refill()
- scanp = dec.scanp + n
- }
- return scanp - dec.scanp, nil
-}
-
-func (dec *Decoder) refill() error {
- // Make room to read more into the buffer.
- // First slide down data already consumed.
- if dec.scanp > 0 {
- n := copy(dec.buf, dec.buf[dec.scanp:])
- dec.buf = dec.buf[:n]
- dec.scanp = 0
- }
-
- // Grow buffer if not large enough.
- const minRead = 512
- if cap(dec.buf)-len(dec.buf) < minRead {
- newBuf := make([]byte, len(dec.buf), 2*cap(dec.buf)+minRead)
- copy(newBuf, dec.buf)
- dec.buf = newBuf
- }
-
- // Read. Delay error for next iteration (after scan).
- n, err := dec.r.Read(dec.buf[len(dec.buf):cap(dec.buf)])
- dec.buf = dec.buf[0 : len(dec.buf)+n]
-
- return err
-}
-
-func nonSpace(b []byte) bool {
- for _, c := range b {
- if !isSpace(c) {
- return true
- }
- }
- return false
-}
-
-// An Encoder writes JSON objects to an output stream.
-type Encoder struct {
- w io.Writer
- err error
-}
-
-// NewEncoder returns a new encoder that writes to w.
-func NewEncoder(w io.Writer) *Encoder {
- return &Encoder{w: w}
-}
-
-// Encode writes the JSON encoding of v to the stream,
-// followed by a newline character.
-//
-// See the documentation for Marshal for details about the
-// conversion of Go values to JSON.
-func (enc *Encoder) Encode(v interface{}) error {
- if enc.err != nil {
- return enc.err
- }
- e := newEncodeState()
- err := e.marshal(v)
- if err != nil {
- return err
- }
-
- // Terminate each value with a newline.
- // This makes the output look a little nicer
- // when debugging, and some kind of space
- // is required if the encoded value was a number,
- // so that the reader knows there aren't more
- // digits coming.
- e.WriteByte('\n')
-
- if _, err = enc.w.Write(e.Bytes()); err != nil {
- enc.err = err
- }
- encodeStatePool.Put(e)
- return err
-}
-
-// RawMessage is a raw encoded JSON object.
-// It implements Marshaler and Unmarshaler and can
-// be used to delay JSON decoding or precompute a JSON encoding.
-type RawMessage []byte
-
-// MarshalJSON returns *m as the JSON encoding of m.
-func (m *RawMessage) MarshalJSON() ([]byte, error) {
- return *m, nil
-}
-
-// UnmarshalJSON sets *m to a copy of data.
-func (m *RawMessage) UnmarshalJSON(data []byte) error {
- if m == nil {
- return errors.New("json.RawMessage: UnmarshalJSON on nil pointer")
- }
- *m = append((*m)[0:0], data...)
- return nil
-}
-
-var _ Marshaler = (*RawMessage)(nil)
-var _ Unmarshaler = (*RawMessage)(nil)
-
-// A Token holds a value of one of these types:
-//
-// Delim, for the four JSON delimiters [ ] { }
-// bool, for JSON booleans
-// float64, for JSON numbers
-// Number, for JSON numbers
-// string, for JSON string literals
-// nil, for JSON null
-//
-type Token interface{}
-
-const (
- tokenTopValue = iota
- tokenArrayStart
- tokenArrayValue
- tokenArrayComma
- tokenObjectStart
- tokenObjectKey
- tokenObjectColon
- tokenObjectValue
- tokenObjectComma
-)
-
-// advance tokenstate from a separator state to a value state
-func (dec *Decoder) tokenPrepareForDecode() error {
- // Note: Not calling peek before switch, to avoid
- // putting peek into the standard Decode path.
- // peek is only called when using the Token API.
- switch dec.tokenState {
- case tokenArrayComma:
- c, err := dec.peek()
- if err != nil {
- return err
- }
- if c != ',' {
- return &SyntaxError{"expected comma after array element", 0}
- }
- dec.scanp++
- dec.tokenState = tokenArrayValue
- case tokenObjectColon:
- c, err := dec.peek()
- if err != nil {
- return err
- }
- if c != ':' {
- return &SyntaxError{"expected colon after object key", 0}
- }
- dec.scanp++
- dec.tokenState = tokenObjectValue
- }
- return nil
-}
-
-func (dec *Decoder) tokenValueAllowed() bool {
- switch dec.tokenState {
- case tokenTopValue, tokenArrayStart, tokenArrayValue, tokenObjectValue:
- return true
- }
- return false
-}
-
-func (dec *Decoder) tokenValueEnd() {
- switch dec.tokenState {
- case tokenArrayStart, tokenArrayValue:
- dec.tokenState = tokenArrayComma
- case tokenObjectValue:
- dec.tokenState = tokenObjectComma
- }
-}
-
-// A Delim is a JSON array or object delimiter, one of [ ] { or }.
-type Delim rune
-
-func (d Delim) String() string {
- return string(d)
-}
-
-// Token returns the next JSON token in the input stream.
-// At the end of the input stream, Token returns nil, io.EOF.
-//
-// Token guarantees that the delimiters [ ] { } it returns are
-// properly nested and matched: if Token encounters an unexpected
-// delimiter in the input, it will return an error.
-//
-// The input stream consists of basic JSON values—bool, string,
-// number, and null—along with delimiters [ ] { } of type Delim
-// to mark the start and end of arrays and objects.
-// Commas and colons are elided.
-func (dec *Decoder) Token() (Token, error) {
- for {
- c, err := dec.peek()
- if err != nil {
- return nil, err
- }
- switch c {
- case '[':
- if !dec.tokenValueAllowed() {
- return dec.tokenError(c)
- }
- dec.scanp++
- dec.tokenStack = append(dec.tokenStack, dec.tokenState)
- dec.tokenState = tokenArrayStart
- return Delim('['), nil
-
- case ']':
- if dec.tokenState != tokenArrayStart && dec.tokenState != tokenArrayComma {
- return dec.tokenError(c)
- }
- dec.scanp++
- dec.tokenState = dec.tokenStack[len(dec.tokenStack)-1]
- dec.tokenStack = dec.tokenStack[:len(dec.tokenStack)-1]
- dec.tokenValueEnd()
- return Delim(']'), nil
-
- case '{':
- if !dec.tokenValueAllowed() {
- return dec.tokenError(c)
- }
- dec.scanp++
- dec.tokenStack = append(dec.tokenStack, dec.tokenState)
- dec.tokenState = tokenObjectStart
- return Delim('{'), nil
-
- case '}':
- if dec.tokenState != tokenObjectStart && dec.tokenState != tokenObjectComma {
- return dec.tokenError(c)
- }
- dec.scanp++
- dec.tokenState = dec.tokenStack[len(dec.tokenStack)-1]
- dec.tokenStack = dec.tokenStack[:len(dec.tokenStack)-1]
- dec.tokenValueEnd()
- return Delim('}'), nil
-
- case ':':
- if dec.tokenState != tokenObjectColon {
- return dec.tokenError(c)
- }
- dec.scanp++
- dec.tokenState = tokenObjectValue
- continue
-
- case ',':
- if dec.tokenState == tokenArrayComma {
- dec.scanp++
- dec.tokenState = tokenArrayValue
- continue
- }
- if dec.tokenState == tokenObjectComma {
- dec.scanp++
- dec.tokenState = tokenObjectKey
- continue
- }
- return dec.tokenError(c)
-
- case '"':
- if dec.tokenState == tokenObjectStart || dec.tokenState == tokenObjectKey {
- var x string
- old := dec.tokenState
- dec.tokenState = tokenTopValue
- err := dec.Decode(&x)
- dec.tokenState = old
- if err != nil {
- clearOffset(err)
- return nil, err
- }
- dec.tokenState = tokenObjectColon
- return x, nil
- }
- fallthrough
-
- default:
- if !dec.tokenValueAllowed() {
- return dec.tokenError(c)
- }
- var x interface{}
- if err := dec.Decode(&x); err != nil {
- clearOffset(err)
- return nil, err
- }
- return x, nil
- }
- }
-}
-
-func clearOffset(err error) {
- if s, ok := err.(*SyntaxError); ok {
- s.Offset = 0
- }
-}
-
-func (dec *Decoder) tokenError(c byte) (Token, error) {
- var context string
- switch dec.tokenState {
- case tokenTopValue:
- context = " looking for beginning of value"
- case tokenArrayStart, tokenArrayValue, tokenObjectValue:
- context = " looking for beginning of value"
- case tokenArrayComma:
- context = " after array element"
- case tokenObjectKey:
- context = " looking for beginning of object key string"
- case tokenObjectColon:
- context = " after object key"
- case tokenObjectComma:
- context = " after object key:value pair"
- }
- return nil, &SyntaxError{"invalid character " + quoteChar(c) + " " + context, 0}
-}
-
-// More reports whether there is another element in the
-// current array or object being parsed.
-func (dec *Decoder) More() bool {
- c, err := dec.peek()
- return err == nil && c != ']' && c != '}'
-}
-
-func (dec *Decoder) peek() (byte, error) {
- var err error
- for {
- for i := dec.scanp; i < len(dec.buf); i++ {
- c := dec.buf[i]
- if isSpace(c) {
- continue
- }
- dec.scanp = i
- return c, nil
- }
- // buffer has been scanned, now report any error
- if err != nil {
- return 0, err
- }
- err = dec.refill()
- }
-}
-
-/*
-TODO
-
-// EncodeToken writes the given JSON token to the stream.
-// It returns an error if the delimiters [ ] { } are not properly used.
-//
-// EncodeToken does not call Flush, because usually it is part of
-// a larger operation such as Encode, and those will call Flush when finished.
-// Callers that create an Encoder and then invoke EncodeToken directly,
-// without using Encode, need to call Flush when finished to ensure that
-// the JSON is written to the underlying writer.
-func (e *Encoder) EncodeToken(t Token) error {
- ...
-}
-
-*/
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/tags.go b/vendor/gopkg.in/square/go-jose.v2/json/tags.go
deleted file mode 100644
index c38fd5102..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/tags.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package json
-
-import (
- "strings"
-)
-
-// tagOptions is the string following a comma in a struct field's "json"
-// tag, or the empty string. It does not include the leading comma.
-type tagOptions string
-
-// parseTag splits a struct field's json tag into its name and
-// comma-separated options.
-func parseTag(tag string) (string, tagOptions) {
- if idx := strings.Index(tag, ","); idx != -1 {
- return tag[:idx], tagOptions(tag[idx+1:])
- }
- return tag, tagOptions("")
-}
-
-// Contains reports whether a comma-separated list of options
-// contains a particular substr flag. substr must be surrounded by a
-// string boundary or commas.
-func (o tagOptions) Contains(optionName string) bool {
- if len(o) == 0 {
- return false
- }
- s := string(o)
- for s != "" {
- var next string
- i := strings.Index(s, ",")
- if i >= 0 {
- s, next = s[:i], s[i+1:]
- }
- if s == optionName {
- return true
- }
- s = next
- }
- return false
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwe.go b/vendor/gopkg.in/square/go-jose.v2/jwe.go
deleted file mode 100644
index f2176cfb0..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/jwe.go
+++ /dev/null
@@ -1,291 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 jose
-
-import (
- "encoding/base64"
- "encoding/json"
- "fmt"
- "strings"
-)
-
-// rawJSONWebEncryption represents a raw JWE JSON object. Used for parsing/serializing.
-type rawJSONWebEncryption struct {
- Protected *byteBuffer `json:"protected,omitempty"`
- Unprotected *rawHeader `json:"unprotected,omitempty"`
- Header *rawHeader `json:"header,omitempty"`
- Recipients []rawRecipientInfo `json:"recipients,omitempty"`
- Aad *byteBuffer `json:"aad,omitempty"`
- EncryptedKey *byteBuffer `json:"encrypted_key,omitempty"`
- Iv *byteBuffer `json:"iv,omitempty"`
- Ciphertext *byteBuffer `json:"ciphertext,omitempty"`
- Tag *byteBuffer `json:"tag,omitempty"`
-}
-
-// rawRecipientInfo represents a raw JWE Per-Recipient header JSON object. Used for parsing/serializing.
-type rawRecipientInfo struct {
- Header *rawHeader `json:"header,omitempty"`
- EncryptedKey string `json:"encrypted_key,omitempty"`
-}
-
-// JSONWebEncryption represents an encrypted JWE object after parsing.
-type JSONWebEncryption struct {
- Header Header
- protected, unprotected *rawHeader
- recipients []recipientInfo
- aad, iv, ciphertext, tag []byte
- original *rawJSONWebEncryption
-}
-
-// recipientInfo represents a raw JWE Per-Recipient header JSON object after parsing.
-type recipientInfo struct {
- header *rawHeader
- encryptedKey []byte
-}
-
-// GetAuthData retrieves the (optional) authenticated data attached to the object.
-func (obj JSONWebEncryption) GetAuthData() []byte {
- if obj.aad != nil {
- out := make([]byte, len(obj.aad))
- copy(out, obj.aad)
- return out
- }
-
- return nil
-}
-
-// Get the merged header values
-func (obj JSONWebEncryption) mergedHeaders(recipient *recipientInfo) rawHeader {
- out := rawHeader{}
- out.merge(obj.protected)
- out.merge(obj.unprotected)
-
- if recipient != nil {
- out.merge(recipient.header)
- }
-
- return out
-}
-
-// Get the additional authenticated data from a JWE object.
-func (obj JSONWebEncryption) computeAuthData() []byte {
- var protected string
-
- if obj.original != nil {
- protected = obj.original.Protected.base64()
- } else {
- protected = base64.RawURLEncoding.EncodeToString(mustSerializeJSON((obj.protected)))
- }
-
- output := []byte(protected)
- if obj.aad != nil {
- output = append(output, '.')
- output = append(output, []byte(base64.RawURLEncoding.EncodeToString(obj.aad))...)
- }
-
- return output
-}
-
-// ParseEncrypted parses an encrypted message in compact or full serialization format.
-func ParseEncrypted(input string) (*JSONWebEncryption, error) {
- input = stripWhitespace(input)
- if strings.HasPrefix(input, "{") {
- return parseEncryptedFull(input)
- }
-
- return parseEncryptedCompact(input)
-}
-
-// parseEncryptedFull parses a message in compact format.
-func parseEncryptedFull(input string) (*JSONWebEncryption, error) {
- var parsed rawJSONWebEncryption
- err := json.Unmarshal([]byte(input), &parsed)
- if err != nil {
- return nil, err
- }
-
- return parsed.sanitized()
-}
-
-// sanitized produces a cleaned-up JWE object from the raw JSON.
-func (parsed *rawJSONWebEncryption) sanitized() (*JSONWebEncryption, error) {
- obj := &JSONWebEncryption{
- original: parsed,
- unprotected: parsed.Unprotected,
- }
-
- // Check that there is not a nonce in the unprotected headers
- if parsed.Unprotected != nil {
- if nonce := parsed.Unprotected.getNonce(); nonce != "" {
- return nil, ErrUnprotectedNonce
- }
- }
- if parsed.Header != nil {
- if nonce := parsed.Header.getNonce(); nonce != "" {
- return nil, ErrUnprotectedNonce
- }
- }
-
- if parsed.Protected != nil && len(parsed.Protected.bytes()) > 0 {
- err := json.Unmarshal(parsed.Protected.bytes(), &obj.protected)
- if err != nil {
- return nil, fmt.Errorf("square/go-jose: invalid protected header: %s, %s", err, parsed.Protected.base64())
- }
- }
-
- // Note: this must be called _after_ we parse the protected header,
- // otherwise fields from the protected header will not get picked up.
- var err error
- mergedHeaders := obj.mergedHeaders(nil)
- obj.Header, err = mergedHeaders.sanitized()
- if err != nil {
- return nil, fmt.Errorf("square/go-jose: cannot sanitize merged headers: %v (%v)", err, mergedHeaders)
- }
-
- if len(parsed.Recipients) == 0 {
- obj.recipients = []recipientInfo{
- {
- header: parsed.Header,
- encryptedKey: parsed.EncryptedKey.bytes(),
- },
- }
- } else {
- obj.recipients = make([]recipientInfo, len(parsed.Recipients))
- for r := range parsed.Recipients {
- encryptedKey, err := base64.RawURLEncoding.DecodeString(parsed.Recipients[r].EncryptedKey)
- if err != nil {
- return nil, err
- }
-
- // Check that there is not a nonce in the unprotected header
- if parsed.Recipients[r].Header != nil && parsed.Recipients[r].Header.getNonce() != "" {
- return nil, ErrUnprotectedNonce
- }
-
- obj.recipients[r].header = parsed.Recipients[r].Header
- obj.recipients[r].encryptedKey = encryptedKey
- }
- }
-
- for _, recipient := range obj.recipients {
- headers := obj.mergedHeaders(&recipient)
- if headers.getAlgorithm() == "" || headers.getEncryption() == "" {
- return nil, fmt.Errorf("square/go-jose: message is missing alg/enc headers")
- }
- }
-
- obj.iv = parsed.Iv.bytes()
- obj.ciphertext = parsed.Ciphertext.bytes()
- obj.tag = parsed.Tag.bytes()
- obj.aad = parsed.Aad.bytes()
-
- return obj, nil
-}
-
-// parseEncryptedCompact parses a message in compact format.
-func parseEncryptedCompact(input string) (*JSONWebEncryption, error) {
- parts := strings.Split(input, ".")
- if len(parts) != 5 {
- return nil, fmt.Errorf("square/go-jose: compact JWE format must have five parts")
- }
-
- rawProtected, err := base64.RawURLEncoding.DecodeString(parts[0])
- if err != nil {
- return nil, err
- }
-
- encryptedKey, err := base64.RawURLEncoding.DecodeString(parts[1])
- if err != nil {
- return nil, err
- }
-
- iv, err := base64.RawURLEncoding.DecodeString(parts[2])
- if err != nil {
- return nil, err
- }
-
- ciphertext, err := base64.RawURLEncoding.DecodeString(parts[3])
- if err != nil {
- return nil, err
- }
-
- tag, err := base64.RawURLEncoding.DecodeString(parts[4])
- if err != nil {
- return nil, err
- }
-
- raw := &rawJSONWebEncryption{
- Protected: newBuffer(rawProtected),
- EncryptedKey: newBuffer(encryptedKey),
- Iv: newBuffer(iv),
- Ciphertext: newBuffer(ciphertext),
- Tag: newBuffer(tag),
- }
-
- return raw.sanitized()
-}
-
-// CompactSerialize serializes an object using the compact serialization format.
-func (obj JSONWebEncryption) CompactSerialize() (string, error) {
- if len(obj.recipients) != 1 || obj.unprotected != nil ||
- obj.protected == nil || obj.recipients[0].header != nil {
- return "", ErrNotSupported
- }
-
- serializedProtected := mustSerializeJSON(obj.protected)
-
- return fmt.Sprintf(
- "%s.%s.%s.%s.%s",
- base64.RawURLEncoding.EncodeToString(serializedProtected),
- base64.RawURLEncoding.EncodeToString(obj.recipients[0].encryptedKey),
- base64.RawURLEncoding.EncodeToString(obj.iv),
- base64.RawURLEncoding.EncodeToString(obj.ciphertext),
- base64.RawURLEncoding.EncodeToString(obj.tag)), nil
-}
-
-// FullSerialize serializes an object using the full JSON serialization format.
-func (obj JSONWebEncryption) FullSerialize() string {
- raw := rawJSONWebEncryption{
- Unprotected: obj.unprotected,
- Iv: newBuffer(obj.iv),
- Ciphertext: newBuffer(obj.ciphertext),
- EncryptedKey: newBuffer(obj.recipients[0].encryptedKey),
- Tag: newBuffer(obj.tag),
- Aad: newBuffer(obj.aad),
- Recipients: []rawRecipientInfo{},
- }
-
- if len(obj.recipients) > 1 {
- for _, recipient := range obj.recipients {
- info := rawRecipientInfo{
- Header: recipient.header,
- EncryptedKey: base64.RawURLEncoding.EncodeToString(recipient.encryptedKey),
- }
- raw.Recipients = append(raw.Recipients, info)
- }
- } else {
- // Use flattened serialization
- raw.Header = obj.recipients[0].header
- raw.EncryptedKey = newBuffer(obj.recipients[0].encryptedKey)
- }
-
- if obj.protected != nil {
- raw.Protected = newBuffer(mustSerializeJSON(obj.protected))
- }
-
- return string(mustSerializeJSON(raw))
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwk.go b/vendor/gopkg.in/square/go-jose.v2/jwk.go
deleted file mode 100644
index 8e8f9e7f7..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/jwk.go
+++ /dev/null
@@ -1,537 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 jose
-
-import (
- "crypto"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rsa"
- "crypto/x509"
- "encoding/base64"
- "errors"
- "fmt"
- "math/big"
- "reflect"
- "strings"
-
- "golang.org/x/crypto/ed25519"
-
- "gopkg.in/square/go-jose.v2/json"
-)
-
-// rawJSONWebKey represents a public or private key in JWK format, used for parsing/serializing.
-type rawJSONWebKey struct {
- Use string `json:"use,omitempty"`
- Kty string `json:"kty,omitempty"`
- Kid string `json:"kid,omitempty"`
- Crv string `json:"crv,omitempty"`
- Alg string `json:"alg,omitempty"`
- K *byteBuffer `json:"k,omitempty"`
- X *byteBuffer `json:"x,omitempty"`
- Y *byteBuffer `json:"y,omitempty"`
- N *byteBuffer `json:"n,omitempty"`
- E *byteBuffer `json:"e,omitempty"`
- // -- Following fields are only used for private keys --
- // RSA uses D, P and Q, while ECDSA uses only D. Fields Dp, Dq, and Qi are
- // completely optional. Therefore for RSA/ECDSA, D != nil is a contract that
- // we have a private key whereas D == nil means we have only a public key.
- D *byteBuffer `json:"d,omitempty"`
- P *byteBuffer `json:"p,omitempty"`
- Q *byteBuffer `json:"q,omitempty"`
- Dp *byteBuffer `json:"dp,omitempty"`
- Dq *byteBuffer `json:"dq,omitempty"`
- Qi *byteBuffer `json:"qi,omitempty"`
- // Certificates
- X5c []string `json:"x5c,omitempty"`
-}
-
-// JSONWebKey represents a public or private key in JWK format.
-type JSONWebKey struct {
- Key interface{}
- Certificates []*x509.Certificate
- KeyID string
- Algorithm string
- Use string
-}
-
-// MarshalJSON serializes the given key to its JSON representation.
-func (k JSONWebKey) MarshalJSON() ([]byte, error) {
- var raw *rawJSONWebKey
- var err error
-
- switch key := k.Key.(type) {
- case ed25519.PublicKey:
- raw = fromEdPublicKey(key)
- case *ecdsa.PublicKey:
- raw, err = fromEcPublicKey(key)
- case *rsa.PublicKey:
- raw = fromRsaPublicKey(key)
- case ed25519.PrivateKey:
- raw, err = fromEdPrivateKey(key)
- case *ecdsa.PrivateKey:
- raw, err = fromEcPrivateKey(key)
- case *rsa.PrivateKey:
- raw, err = fromRsaPrivateKey(key)
- case []byte:
- raw, err = fromSymmetricKey(key)
- default:
- return nil, fmt.Errorf("square/go-jose: unknown key type '%s'", reflect.TypeOf(key))
- }
-
- if err != nil {
- return nil, err
- }
-
- raw.Kid = k.KeyID
- raw.Alg = k.Algorithm
- raw.Use = k.Use
-
- for _, cert := range k.Certificates {
- raw.X5c = append(raw.X5c, base64.StdEncoding.EncodeToString(cert.Raw))
- }
-
- return json.Marshal(raw)
-}
-
-// UnmarshalJSON reads a key from its JSON representation.
-func (k *JSONWebKey) UnmarshalJSON(data []byte) (err error) {
- var raw rawJSONWebKey
- err = json.Unmarshal(data, &raw)
- if err != nil {
- return err
- }
-
- var key interface{}
- switch raw.Kty {
- case "EC":
- if raw.D != nil {
- key, err = raw.ecPrivateKey()
- } else {
- key, err = raw.ecPublicKey()
- }
- case "RSA":
- if raw.D != nil {
- key, err = raw.rsaPrivateKey()
- } else {
- key, err = raw.rsaPublicKey()
- }
- case "oct":
- key, err = raw.symmetricKey()
- case "OKP":
- if raw.Crv == "Ed25519" && raw.X != nil {
- if raw.D != nil {
- key, err = raw.edPrivateKey()
- } else {
- key, err = raw.edPublicKey()
- }
- } else {
- err = fmt.Errorf("square/go-jose: unknown curve %s'", raw.Crv)
- }
- default:
- err = fmt.Errorf("square/go-jose: unknown json web key type '%s'", raw.Kty)
- }
-
- if err == nil {
- *k = JSONWebKey{Key: key, KeyID: raw.Kid, Algorithm: raw.Alg, Use: raw.Use}
- }
-
- k.Certificates = make([]*x509.Certificate, len(raw.X5c))
- for i, cert := range raw.X5c {
- raw, err := base64.StdEncoding.DecodeString(cert)
- if err != nil {
- return err
- }
- k.Certificates[i], err = x509.ParseCertificate(raw)
- if err != nil {
- return err
- }
- }
-
- return
-}
-
-// JSONWebKeySet represents a JWK Set object.
-type JSONWebKeySet struct {
- Keys []JSONWebKey `json:"keys"`
-}
-
-// Key convenience method returns keys by key ID. Specification states
-// that a JWK Set "SHOULD" use distinct key IDs, but allows for some
-// cases where they are not distinct. Hence method returns a slice
-// of JSONWebKeys.
-func (s *JSONWebKeySet) Key(kid string) []JSONWebKey {
- var keys []JSONWebKey
- for _, key := range s.Keys {
- if key.KeyID == kid {
- keys = append(keys, key)
- }
- }
-
- return keys
-}
-
-const rsaThumbprintTemplate = `{"e":"%s","kty":"RSA","n":"%s"}`
-const ecThumbprintTemplate = `{"crv":"%s","kty":"EC","x":"%s","y":"%s"}`
-const edThumbprintTemplate = `{"crv":"%s","kty":"OKP",x":"%s"}`
-
-func ecThumbprintInput(curve elliptic.Curve, x, y *big.Int) (string, error) {
- coordLength := curveSize(curve)
- crv, err := curveName(curve)
- if err != nil {
- return "", err
- }
-
- return fmt.Sprintf(ecThumbprintTemplate, crv,
- newFixedSizeBuffer(x.Bytes(), coordLength).base64(),
- newFixedSizeBuffer(y.Bytes(), coordLength).base64()), nil
-}
-
-func rsaThumbprintInput(n *big.Int, e int) (string, error) {
- return fmt.Sprintf(rsaThumbprintTemplate,
- newBufferFromInt(uint64(e)).base64(),
- newBuffer(n.Bytes()).base64()), nil
-}
-
-func edThumbprintInput(ed ed25519.PublicKey) (string, error) {
- crv := "Ed25519"
- return fmt.Sprintf(edThumbprintTemplate, crv,
- newFixedSizeBuffer(ed, 32).base64()), nil
-}
-
-// Thumbprint computes the JWK Thumbprint of a key using the
-// indicated hash algorithm.
-func (k *JSONWebKey) Thumbprint(hash crypto.Hash) ([]byte, error) {
- var input string
- var err error
- switch key := k.Key.(type) {
- case ed25519.PublicKey:
- input, err = edThumbprintInput(key)
- case *ecdsa.PublicKey:
- input, err = ecThumbprintInput(key.Curve, key.X, key.Y)
- case *ecdsa.PrivateKey:
- input, err = ecThumbprintInput(key.Curve, key.X, key.Y)
- case *rsa.PublicKey:
- input, err = rsaThumbprintInput(key.N, key.E)
- case *rsa.PrivateKey:
- input, err = rsaThumbprintInput(key.N, key.E)
- case ed25519.PrivateKey:
- input, err = edThumbprintInput(ed25519.PublicKey(key[0:32]))
- default:
- return nil, fmt.Errorf("square/go-jose: unknown key type '%s'", reflect.TypeOf(key))
- }
-
- if err != nil {
- return nil, err
- }
-
- h := hash.New()
- h.Write([]byte(input))
- return h.Sum(nil), nil
-}
-
-// IsPublic returns true if the JWK represents a public key (not symmetric, not private).
-func (k *JSONWebKey) IsPublic() bool {
- switch k.Key.(type) {
- case *ecdsa.PublicKey, *rsa.PublicKey, *ed25519.PublicKey:
- return true
- default:
- return false
- }
-}
-
-// Valid checks that the key contains the expected parameters.
-func (k *JSONWebKey) Valid() bool {
- if k.Key == nil {
- return false
- }
- switch key := k.Key.(type) {
- case *ecdsa.PublicKey:
- if key.Curve == nil || key.X == nil || key.Y == nil {
- return false
- }
- case *ecdsa.PrivateKey:
- if key.Curve == nil || key.X == nil || key.Y == nil || key.D == nil {
- return false
- }
- case *rsa.PublicKey:
- if key.N == nil || key.E == 0 {
- return false
- }
- case *rsa.PrivateKey:
- if key.N == nil || key.E == 0 || key.D == nil || len(key.Primes) < 2 {
- return false
- }
- case *ed25519.PublicKey:
- if len(*key) != 32 {
- return false
- }
- case *ed25519.PrivateKey:
- if len(*key) != 64 {
- return false
- }
- default:
- return false
- }
- return true
-}
-
-func (key rawJSONWebKey) rsaPublicKey() (*rsa.PublicKey, error) {
- if key.N == nil || key.E == nil {
- return nil, fmt.Errorf("square/go-jose: invalid RSA key, missing n/e values")
- }
-
- return &rsa.PublicKey{
- N: key.N.bigInt(),
- E: key.E.toInt(),
- }, nil
-}
-
-func fromEdPublicKey(pub ed25519.PublicKey) *rawJSONWebKey {
- return &rawJSONWebKey{
- Kty: "OKP",
- Crv: "Ed25519",
- X: newBuffer(pub),
- }
-}
-
-func fromRsaPublicKey(pub *rsa.PublicKey) *rawJSONWebKey {
- return &rawJSONWebKey{
- Kty: "RSA",
- N: newBuffer(pub.N.Bytes()),
- E: newBufferFromInt(uint64(pub.E)),
- }
-}
-
-func (key rawJSONWebKey) ecPublicKey() (*ecdsa.PublicKey, error) {
- var curve elliptic.Curve
- switch key.Crv {
- case "P-256":
- curve = elliptic.P256()
- case "P-384":
- curve = elliptic.P384()
- case "P-521":
- curve = elliptic.P521()
- default:
- return nil, fmt.Errorf("square/go-jose: unsupported elliptic curve '%s'", key.Crv)
- }
-
- if key.X == nil || key.Y == nil {
- return nil, errors.New("square/go-jose: invalid EC key, missing x/y values")
- }
-
- x := key.X.bigInt()
- y := key.Y.bigInt()
-
- if !curve.IsOnCurve(x, y) {
- return nil, errors.New("square/go-jose: invalid EC key, X/Y are not on declared curve")
- }
-
- return &ecdsa.PublicKey{
- Curve: curve,
- X: x,
- Y: y,
- }, nil
-}
-
-func fromEcPublicKey(pub *ecdsa.PublicKey) (*rawJSONWebKey, error) {
- if pub == nil || pub.X == nil || pub.Y == nil {
- return nil, fmt.Errorf("square/go-jose: invalid EC key (nil, or X/Y missing)")
- }
-
- name, err := curveName(pub.Curve)
- if err != nil {
- return nil, err
- }
-
- size := curveSize(pub.Curve)
-
- xBytes := pub.X.Bytes()
- yBytes := pub.Y.Bytes()
-
- if len(xBytes) > size || len(yBytes) > size {
- return nil, fmt.Errorf("square/go-jose: invalid EC key (X/Y too large)")
- }
-
- key := &rawJSONWebKey{
- Kty: "EC",
- Crv: name,
- X: newFixedSizeBuffer(xBytes, size),
- Y: newFixedSizeBuffer(yBytes, size),
- }
-
- return key, nil
-}
-
-func (key rawJSONWebKey) edPrivateKey() (ed25519.PrivateKey, error) {
- var missing []string
- switch {
- case key.D == nil:
- missing = append(missing, "D")
- case key.X == nil:
- missing = append(missing, "X")
- }
-
- if len(missing) > 0 {
- return nil, fmt.Errorf("square/go-jose: invalid Ed25519 private key, missing %s value(s)", strings.Join(missing, ", "))
- }
-
- privateKey := make([]byte, ed25519.PrivateKeySize)
- copy(privateKey[0:32], key.X.bytes())
- copy(privateKey[32:], key.D.bytes())
- rv := ed25519.PrivateKey(privateKey)
- return rv, nil
-}
-
-func (key rawJSONWebKey) edPublicKey() (ed25519.PublicKey, error) {
- if key.X == nil {
- return nil, fmt.Errorf("square/go-jose: invalid Ed key, missing x value")
- }
- publicKey := make([]byte, ed25519.PublicKeySize)
- copy(publicKey[0:32], key.X.bytes())
- rv := ed25519.PublicKey(publicKey)
- return rv, nil
-}
-
-func (key rawJSONWebKey) rsaPrivateKey() (*rsa.PrivateKey, error) {
- var missing []string
- switch {
- case key.N == nil:
- missing = append(missing, "N")
- case key.E == nil:
- missing = append(missing, "E")
- case key.D == nil:
- missing = append(missing, "D")
- case key.P == nil:
- missing = append(missing, "P")
- case key.Q == nil:
- missing = append(missing, "Q")
- }
-
- if len(missing) > 0 {
- return nil, fmt.Errorf("square/go-jose: invalid RSA private key, missing %s value(s)", strings.Join(missing, ", "))
- }
-
- rv := &rsa.PrivateKey{
- PublicKey: rsa.PublicKey{
- N: key.N.bigInt(),
- E: key.E.toInt(),
- },
- D: key.D.bigInt(),
- Primes: []*big.Int{
- key.P.bigInt(),
- key.Q.bigInt(),
- },
- }
-
- if key.Dp != nil {
- rv.Precomputed.Dp = key.Dp.bigInt()
- }
- if key.Dq != nil {
- rv.Precomputed.Dq = key.Dq.bigInt()
- }
- if key.Qi != nil {
- rv.Precomputed.Qinv = key.Qi.bigInt()
- }
-
- err := rv.Validate()
- return rv, err
-}
-
-func fromEdPrivateKey(ed ed25519.PrivateKey) (*rawJSONWebKey, error) {
- raw := fromEdPublicKey(ed25519.PublicKey(ed[0:32]))
-
- raw.D = newBuffer(ed[32:])
- return raw, nil
-}
-
-func fromRsaPrivateKey(rsa *rsa.PrivateKey) (*rawJSONWebKey, error) {
- if len(rsa.Primes) != 2 {
- return nil, ErrUnsupportedKeyType
- }
-
- raw := fromRsaPublicKey(&rsa.PublicKey)
-
- raw.D = newBuffer(rsa.D.Bytes())
- raw.P = newBuffer(rsa.Primes[0].Bytes())
- raw.Q = newBuffer(rsa.Primes[1].Bytes())
-
- return raw, nil
-}
-
-func (key rawJSONWebKey) ecPrivateKey() (*ecdsa.PrivateKey, error) {
- var curve elliptic.Curve
- switch key.Crv {
- case "P-256":
- curve = elliptic.P256()
- case "P-384":
- curve = elliptic.P384()
- case "P-521":
- curve = elliptic.P521()
- default:
- return nil, fmt.Errorf("square/go-jose: unsupported elliptic curve '%s'", key.Crv)
- }
-
- if key.X == nil || key.Y == nil || key.D == nil {
- return nil, fmt.Errorf("square/go-jose: invalid EC private key, missing x/y/d values")
- }
-
- x := key.X.bigInt()
- y := key.Y.bigInt()
-
- if !curve.IsOnCurve(x, y) {
- return nil, errors.New("square/go-jose: invalid EC key, X/Y are not on declared curve")
- }
-
- return &ecdsa.PrivateKey{
- PublicKey: ecdsa.PublicKey{
- Curve: curve,
- X: x,
- Y: y,
- },
- D: key.D.bigInt(),
- }, nil
-}
-
-func fromEcPrivateKey(ec *ecdsa.PrivateKey) (*rawJSONWebKey, error) {
- raw, err := fromEcPublicKey(&ec.PublicKey)
- if err != nil {
- return nil, err
- }
-
- if ec.D == nil {
- return nil, fmt.Errorf("square/go-jose: invalid EC private key")
- }
-
- raw.D = newBuffer(ec.D.Bytes())
-
- return raw, nil
-}
-
-func fromSymmetricKey(key []byte) (*rawJSONWebKey, error) {
- return &rawJSONWebKey{
- Kty: "oct",
- K: newBuffer(key),
- }, nil
-}
-
-func (key rawJSONWebKey) symmetricKey() ([]byte, error) {
- if key.K == nil {
- return nil, fmt.Errorf("square/go-jose: invalid OCT (symmetric) key, missing k value")
- }
- return key.K.bytes(), nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/jws.go b/vendor/gopkg.in/square/go-jose.v2/jws.go
deleted file mode 100644
index 5e23a91b0..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/jws.go
+++ /dev/null
@@ -1,282 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 jose
-
-import (
- "encoding/base64"
- "errors"
- "fmt"
- "strings"
-
- "gopkg.in/square/go-jose.v2/json"
-)
-
-// rawJSONWebSignature represents a raw JWS JSON object. Used for parsing/serializing.
-type rawJSONWebSignature struct {
- Payload *byteBuffer `json:"payload,omitempty"`
- Signatures []rawSignatureInfo `json:"signatures,omitempty"`
- Protected *byteBuffer `json:"protected,omitempty"`
- Header *rawHeader `json:"header,omitempty"`
- Signature *byteBuffer `json:"signature,omitempty"`
-}
-
-// rawSignatureInfo represents a single JWS signature over the JWS payload and protected header.
-type rawSignatureInfo struct {
- Protected *byteBuffer `json:"protected,omitempty"`
- Header *rawHeader `json:"header,omitempty"`
- Signature *byteBuffer `json:"signature,omitempty"`
-}
-
-// JSONWebSignature represents a signed JWS object after parsing.
-type JSONWebSignature struct {
- payload []byte
- // Signatures attached to this object (may be more than one for multi-sig).
- // Be careful about accessing these directly, prefer to use Verify() or
- // VerifyMulti() to ensure that the data you're getting is verified.
- Signatures []Signature
-}
-
-// Signature represents a single signature over the JWS payload and protected header.
-type Signature struct {
- // Header fields, such as the signature algorithm
- Header Header
-
- // The actual signature value
- Signature []byte
-
- protected *rawHeader
- header *rawHeader
- original *rawSignatureInfo
-}
-
-// ParseSigned parses a signed message in compact or full serialization format.
-func ParseSigned(input string) (*JSONWebSignature, error) {
- input = stripWhitespace(input)
- if strings.HasPrefix(input, "{") {
- return parseSignedFull(input)
- }
-
- return parseSignedCompact(input)
-}
-
-// Get a header value
-func (sig Signature) mergedHeaders() rawHeader {
- out := rawHeader{}
- out.merge(sig.protected)
- out.merge(sig.header)
- return out
-}
-
-// Compute data to be signed
-func (obj JSONWebSignature) computeAuthData(signature *Signature) []byte {
- var serializedProtected string
-
- if signature.original != nil && signature.original.Protected != nil {
- serializedProtected = signature.original.Protected.base64()
- } else if signature.protected != nil {
- serializedProtected = base64.RawURLEncoding.EncodeToString(mustSerializeJSON(signature.protected))
- } else {
- serializedProtected = ""
- }
-
- return []byte(fmt.Sprintf("%s.%s",
- serializedProtected,
- base64.RawURLEncoding.EncodeToString(obj.payload)))
-}
-
-// parseSignedFull parses a message in full format.
-func parseSignedFull(input string) (*JSONWebSignature, error) {
- var parsed rawJSONWebSignature
- err := json.Unmarshal([]byte(input), &parsed)
- if err != nil {
- return nil, err
- }
-
- return parsed.sanitized()
-}
-
-// sanitized produces a cleaned-up JWS object from the raw JSON.
-func (parsed *rawJSONWebSignature) sanitized() (*JSONWebSignature, error) {
- if parsed.Payload == nil {
- return nil, fmt.Errorf("square/go-jose: missing payload in JWS message")
- }
-
- obj := &JSONWebSignature{
- payload: parsed.Payload.bytes(),
- Signatures: make([]Signature, len(parsed.Signatures)),
- }
-
- if len(parsed.Signatures) == 0 {
- // No signatures array, must be flattened serialization
- signature := Signature{}
- if parsed.Protected != nil && len(parsed.Protected.bytes()) > 0 {
- signature.protected = &rawHeader{}
- err := json.Unmarshal(parsed.Protected.bytes(), signature.protected)
- if err != nil {
- return nil, err
- }
- }
-
- // Check that there is not a nonce in the unprotected header
- if parsed.Header != nil && parsed.Header.getNonce() != "" {
- return nil, ErrUnprotectedNonce
- }
-
- signature.header = parsed.Header
- signature.Signature = parsed.Signature.bytes()
- // Make a fake "original" rawSignatureInfo to store the unprocessed
- // Protected header. This is necessary because the Protected header can
- // contain arbitrary fields not registered as part of the spec. See
- // https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-4
- // If we unmarshal Protected into a rawHeader with its explicit list of fields,
- // we cannot marshal losslessly. So we have to keep around the original bytes.
- // This is used in computeAuthData, which will first attempt to use
- // the original bytes of a protected header, and fall back on marshaling the
- // header struct only if those bytes are not available.
- signature.original = &rawSignatureInfo{
- Protected: parsed.Protected,
- Header: parsed.Header,
- Signature: parsed.Signature,
- }
-
- var err error
- signature.Header, err = signature.mergedHeaders().sanitized()
- if err != nil {
- return nil, err
- }
-
- // As per RFC 7515 Section 4.1.3, only public keys are allowed to be embedded.
- jwk := signature.Header.JSONWebKey
- if jwk != nil && (!jwk.Valid() || !jwk.IsPublic()) {
- return nil, errors.New("square/go-jose: invalid embedded jwk, must be public key")
- }
-
- obj.Signatures = append(obj.Signatures, signature)
- }
-
- for i, sig := range parsed.Signatures {
- if sig.Protected != nil && len(sig.Protected.bytes()) > 0 {
- obj.Signatures[i].protected = &rawHeader{}
- err := json.Unmarshal(sig.Protected.bytes(), obj.Signatures[i].protected)
- if err != nil {
- return nil, err
- }
- }
-
- // Check that there is not a nonce in the unprotected header
- if sig.Header != nil && sig.Header.getNonce() != "" {
- return nil, ErrUnprotectedNonce
- }
-
- var err error
- obj.Signatures[i].Header, err = obj.Signatures[i].mergedHeaders().sanitized()
- if err != nil {
- return nil, err
- }
-
- obj.Signatures[i].Signature = sig.Signature.bytes()
-
- // As per RFC 7515 Section 4.1.3, only public keys are allowed to be embedded.
- jwk := obj.Signatures[i].Header.JSONWebKey
- if jwk != nil && (!jwk.Valid() || !jwk.IsPublic()) {
- return nil, errors.New("square/go-jose: invalid embedded jwk, must be public key")
- }
-
- // Copy value of sig
- original := sig
-
- obj.Signatures[i].header = sig.Header
- obj.Signatures[i].original = &original
- }
-
- return obj, nil
-}
-
-// parseSignedCompact parses a message in compact format.
-func parseSignedCompact(input string) (*JSONWebSignature, error) {
- parts := strings.Split(input, ".")
- if len(parts) != 3 {
- return nil, fmt.Errorf("square/go-jose: compact JWS format must have three parts")
- }
-
- rawProtected, err := base64.RawURLEncoding.DecodeString(parts[0])
- if err != nil {
- return nil, err
- }
-
- payload, err := base64.RawURLEncoding.DecodeString(parts[1])
- if err != nil {
- return nil, err
- }
-
- signature, err := base64.RawURLEncoding.DecodeString(parts[2])
- if err != nil {
- return nil, err
- }
-
- raw := &rawJSONWebSignature{
- Payload: newBuffer(payload),
- Protected: newBuffer(rawProtected),
- Signature: newBuffer(signature),
- }
- return raw.sanitized()
-}
-
-// CompactSerialize serializes an object using the compact serialization format.
-func (obj JSONWebSignature) CompactSerialize() (string, error) {
- if len(obj.Signatures) != 1 || obj.Signatures[0].header != nil || obj.Signatures[0].protected == nil {
- return "", ErrNotSupported
- }
-
- serializedProtected := mustSerializeJSON(obj.Signatures[0].protected)
-
- return fmt.Sprintf(
- "%s.%s.%s",
- base64.RawURLEncoding.EncodeToString(serializedProtected),
- base64.RawURLEncoding.EncodeToString(obj.payload),
- base64.RawURLEncoding.EncodeToString(obj.Signatures[0].Signature)), nil
-}
-
-// FullSerialize serializes an object using the full JSON serialization format.
-func (obj JSONWebSignature) FullSerialize() string {
- raw := rawJSONWebSignature{
- Payload: newBuffer(obj.payload),
- }
-
- if len(obj.Signatures) == 1 {
- if obj.Signatures[0].protected != nil {
- serializedProtected := mustSerializeJSON(obj.Signatures[0].protected)
- raw.Protected = newBuffer(serializedProtected)
- }
- raw.Header = obj.Signatures[0].header
- raw.Signature = newBuffer(obj.Signatures[0].Signature)
- } else {
- raw.Signatures = make([]rawSignatureInfo, len(obj.Signatures))
- for i, signature := range obj.Signatures {
- raw.Signatures[i] = rawSignatureInfo{
- Header: signature.header,
- Signature: newBuffer(signature.Signature),
- }
-
- if signature.protected != nil {
- raw.Signatures[i].Protected = newBuffer(mustSerializeJSON(signature.protected))
- }
- }
- }
-
- return string(mustSerializeJSON(raw))
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/builder.go b/vendor/gopkg.in/square/go-jose.v2/jwt/builder.go
deleted file mode 100644
index 686ec80a4..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/builder.go
+++ /dev/null
@@ -1,334 +0,0 @@
-/*-
- * Copyright 2016 Zbigniew Mandziejewicz
- * Copyright 2016 Square, Inc.
- *
- * 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 jwt
-
-import (
- "bytes"
- "reflect"
-
- "gopkg.in/square/go-jose.v2/json"
-
- "gopkg.in/square/go-jose.v2"
-)
-
-// Builder is a utility for making JSON Web Tokens. Calls can be chained, and
-// errors are accumulated until the final call to CompactSerialize/FullSerialize.
-type Builder interface {
- // Claims encodes claims into JWE/JWS form. Multiple calls will merge claims
- // into single JSON object. If you are passing private claims, make sure to set
- // struct field tags to specify the name for the JSON key to be used when
- // serializing.
- Claims(i interface{}) Builder
- // Token builds a JSONWebToken from provided data.
- Token() (*JSONWebToken, error)
- // FullSerialize serializes a token using the full serialization format.
- FullSerialize() (string, error)
- // CompactSerialize serializes a token using the compact serialization format.
- CompactSerialize() (string, error)
-}
-
-// NestedBuilder is a utility for making Signed-Then-Encrypted JSON Web Tokens.
-// Calls can be chained, and errors are accumulated until final call to
-// CompactSerialize/FullSerialize.
-type NestedBuilder interface {
- // Claims encodes claims into JWE/JWS form. Multiple calls will merge claims
- // into single JSON object. If you are passing private claims, make sure to set
- // struct field tags to specify the name for the JSON key to be used when
- // serializing.
- Claims(i interface{}) NestedBuilder
- // Token builds a NestedJSONWebToken from provided data.
- Token() (*NestedJSONWebToken, error)
- // FullSerialize serializes a token using the full serialization format.
- FullSerialize() (string, error)
- // CompactSerialize serializes a token using the compact serialization format.
- CompactSerialize() (string, error)
-}
-
-type builder struct {
- payload map[string]interface{}
- err error
-}
-
-type signedBuilder struct {
- builder
- sig jose.Signer
-}
-
-type encryptedBuilder struct {
- builder
- enc jose.Encrypter
-}
-
-type nestedBuilder struct {
- builder
- sig jose.Signer
- enc jose.Encrypter
-}
-
-// Signed creates builder for signed tokens.
-func Signed(sig jose.Signer) Builder {
- return &signedBuilder{
- sig: sig,
- }
-}
-
-// Encrypted creates builder for encrypted tokens.
-func Encrypted(enc jose.Encrypter) Builder {
- return &encryptedBuilder{
- enc: enc,
- }
-}
-
-// SignedAndEncrypted creates builder for signed-then-encrypted tokens.
-// ErrInvalidContentType will be returned if encrypter doesn't have JWT content type.
-func SignedAndEncrypted(sig jose.Signer, enc jose.Encrypter) NestedBuilder {
- if contentType, _ := enc.Options().ExtraHeaders[jose.HeaderContentType].(jose.ContentType); contentType != "JWT" {
- return &nestedBuilder{
- builder: builder{
- err: ErrInvalidContentType,
- },
- }
- }
- return &nestedBuilder{
- sig: sig,
- enc: enc,
- }
-}
-
-func (b builder) claims(i interface{}) builder {
- if b.err != nil {
- return b
- }
-
- m, ok := i.(map[string]interface{})
- switch {
- case ok:
- return b.merge(m)
- case reflect.Indirect(reflect.ValueOf(i)).Kind() == reflect.Struct:
- m, err := normalize(i)
- if err != nil {
- return builder{
- err: err,
- }
- }
- return b.merge(m)
- default:
- return builder{
- err: ErrInvalidClaims,
- }
- }
-}
-
-func normalize(i interface{}) (map[string]interface{}, error) {
- m := make(map[string]interface{})
-
- raw, err := json.Marshal(i)
- if err != nil {
- return nil, err
- }
-
- d := json.NewDecoder(bytes.NewReader(raw))
- d.UseNumber()
-
- if err := d.Decode(&m); err != nil {
- return nil, err
- }
-
- return m, nil
-}
-
-func (b *builder) merge(m map[string]interface{}) builder {
- p := make(map[string]interface{})
- for k, v := range b.payload {
- p[k] = v
- }
- for k, v := range m {
- p[k] = v
- }
-
- return builder{
- payload: p,
- }
-}
-
-func (b *builder) token(p func(interface{}) ([]byte, error), h []jose.Header) (*JSONWebToken, error) {
- return &JSONWebToken{
- payload: p,
- Headers: h,
- }, nil
-}
-
-func (b *signedBuilder) Claims(i interface{}) Builder {
- return &signedBuilder{
- builder: b.builder.claims(i),
- sig: b.sig,
- }
-}
-
-func (b *signedBuilder) Token() (*JSONWebToken, error) {
- sig, err := b.sign()
- if err != nil {
- return nil, err
- }
-
- h := make([]jose.Header, len(sig.Signatures))
- for i, v := range sig.Signatures {
- h[i] = v.Header
- }
-
- return b.builder.token(sig.Verify, h)
-}
-
-func (b *signedBuilder) CompactSerialize() (string, error) {
- sig, err := b.sign()
- if err != nil {
- return "", err
- }
-
- return sig.CompactSerialize()
-}
-
-func (b *signedBuilder) FullSerialize() (string, error) {
- sig, err := b.sign()
- if err != nil {
- return "", err
- }
-
- return sig.FullSerialize(), nil
-}
-
-func (b *signedBuilder) sign() (*jose.JSONWebSignature, error) {
- if b.err != nil {
- return nil, b.err
- }
-
- p, err := json.Marshal(b.payload)
- if err != nil {
- return nil, err
- }
-
- return b.sig.Sign(p)
-}
-
-func (b *encryptedBuilder) Claims(i interface{}) Builder {
- return &encryptedBuilder{
- builder: b.builder.claims(i),
- enc: b.enc,
- }
-}
-
-func (b *encryptedBuilder) CompactSerialize() (string, error) {
- enc, err := b.encrypt()
- if err != nil {
- return "", err
- }
-
- return enc.CompactSerialize()
-}
-
-func (b *encryptedBuilder) FullSerialize() (string, error) {
- enc, err := b.encrypt()
- if err != nil {
- return "", err
- }
-
- return enc.FullSerialize(), nil
-}
-
-func (b *encryptedBuilder) Token() (*JSONWebToken, error) {
- enc, err := b.encrypt()
- if err != nil {
- return nil, err
- }
-
- return b.builder.token(enc.Decrypt, []jose.Header{enc.Header})
-}
-
-func (b *encryptedBuilder) encrypt() (*jose.JSONWebEncryption, error) {
- if b.err != nil {
- return nil, b.err
- }
-
- p, err := json.Marshal(b.payload)
- if err != nil {
- return nil, err
- }
-
- return b.enc.Encrypt(p)
-}
-
-func (b *nestedBuilder) Claims(i interface{}) NestedBuilder {
- return &nestedBuilder{
- builder: b.builder.claims(i),
- sig: b.sig,
- enc: b.enc,
- }
-}
-
-func (b *nestedBuilder) Token() (*NestedJSONWebToken, error) {
- enc, err := b.signAndEncrypt()
- if err != nil {
- return nil, err
- }
-
- return &NestedJSONWebToken{
- enc: enc,
- Headers: []jose.Header{enc.Header},
- }, nil
-}
-
-func (b *nestedBuilder) CompactSerialize() (string, error) {
- enc, err := b.signAndEncrypt()
- if err != nil {
- return "", err
- }
-
- return enc.CompactSerialize()
-}
-
-func (b *nestedBuilder) FullSerialize() (string, error) {
- enc, err := b.signAndEncrypt()
- if err != nil {
- return "", err
- }
-
- return enc.FullSerialize(), nil
-}
-
-func (b *nestedBuilder) signAndEncrypt() (*jose.JSONWebEncryption, error) {
- if b.err != nil {
- return nil, b.err
- }
-
- p, err := json.Marshal(b.payload)
- if err != nil {
- return nil, err
- }
-
- sig, err := b.sig.Sign(p)
- if err != nil {
- return nil, err
- }
-
- p2, err := sig.CompactSerialize()
- if err != nil {
- return nil, err
- }
-
- return b.enc.Encrypt([]byte(p2))
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/claims.go b/vendor/gopkg.in/square/go-jose.v2/jwt/claims.go
deleted file mode 100644
index 60de94002..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/claims.go
+++ /dev/null
@@ -1,115 +0,0 @@
-/*-
- * Copyright 2016 Zbigniew Mandziejewicz
- * Copyright 2016 Square, Inc.
- *
- * 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 jwt
-
-import (
- "encoding/json"
- "strconv"
- "time"
-)
-
-// Claims represents public claim values (as specified in RFC 7519).
-type Claims struct {
- Issuer string `json:"iss,omitempty"`
- Subject string `json:"sub,omitempty"`
- Audience Audience `json:"aud,omitempty"`
- Expiry NumericDate `json:"exp,omitempty"`
- NotBefore NumericDate `json:"nbf,omitempty"`
- IssuedAt NumericDate `json:"iat,omitempty"`
- ID string `json:"jti,omitempty"`
-}
-
-// NumericDate represents date and time as the number of seconds since the
-// epoch, including leap seconds. Non-integer values can be represented
-// in the serialized format, but we round to the nearest second.
-type NumericDate int64
-
-// NewNumericDate constructs NumericDate from time.Time value.
-func NewNumericDate(t time.Time) NumericDate {
- if t.IsZero() {
- return NumericDate(0)
- }
-
- // While RFC 7519 technically states that NumericDate values may be
- // non-integer values, we don't bother serializing timestamps in
- // claims with sub-second accurancy and just round to the nearest
- // second instead. Not convined sub-second accuracy is useful here.
- return NumericDate(t.Unix())
-}
-
-// MarshalJSON serializes the given NumericDate into its JSON representation.
-func (n NumericDate) MarshalJSON() ([]byte, error) {
- return []byte(strconv.FormatInt(int64(n), 10)), nil
-}
-
-// UnmarshalJSON reads a date from its JSON representation.
-func (n *NumericDate) UnmarshalJSON(b []byte) error {
- s := string(b)
-
- f, err := strconv.ParseFloat(s, 64)
- if err != nil {
- return ErrUnmarshalNumericDate
- }
-
- *n = NumericDate(f)
- return nil
-}
-
-// Time returns time.Time representation of NumericDate.
-func (n NumericDate) Time() time.Time {
- return time.Unix(int64(n), 0)
-}
-
-// Audience represents the recipents that the token is intended for.
-type Audience []string
-
-// UnmarshalJSON reads an audience from its JSON representation.
-func (s *Audience) UnmarshalJSON(b []byte) error {
- var v interface{}
- if err := json.Unmarshal(b, &v); err != nil {
- return err
- }
-
- switch v := v.(type) {
- case string:
- *s = []string{v}
- case []interface{}:
- a := make([]string, len(v))
- for i, e := range v {
- s, ok := e.(string)
- if !ok {
- return ErrUnmarshalAudience
- }
- a[i] = s
- }
- *s = a
- default:
- return ErrUnmarshalAudience
- }
-
- return nil
-}
-
-func (s Audience) Contains(v string) bool {
- for _, a := range s {
- if a == v {
- return true
- }
- }
- return false
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/doc.go b/vendor/gopkg.in/square/go-jose.v2/jwt/doc.go
deleted file mode 100644
index 4cf97b54e..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/doc.go
+++ /dev/null
@@ -1,22 +0,0 @@
-/*-
- * Copyright 2017 Square Inc.
- *
- * 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 jwt provides an implementation of the JSON Web Token standard.
-
-*/
-package jwt
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/errors.go b/vendor/gopkg.in/square/go-jose.v2/jwt/errors.go
deleted file mode 100644
index 6507dfb28..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/errors.go
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * Copyright 2016 Zbigniew Mandziejewicz
- * Copyright 2016 Square, Inc.
- *
- * 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 jwt
-
-import "errors"
-
-// ErrUnmarshalAudience indicates that aud claim could not be unmarshalled.
-var ErrUnmarshalAudience = errors.New("square/go-jose/jwt: expected string or array value to unmarshal to Audience")
-
-// ErrUnmarshalNumericDate indicates that JWT NumericDate could not be unmarshalled.
-var ErrUnmarshalNumericDate = errors.New("square/go-jose/jwt: expected number value to unmarshal NumericDate")
-
-// ErrInvalidClaims indicates that given claims have invalid type.
-var ErrInvalidClaims = errors.New("square/go-jose/jwt: expected claims to be value convertible into JSON object")
-
-// ErrInvalidIssuer indicates invalid iss claim.
-var ErrInvalidIssuer = errors.New("square/go-jose/jwt: validation failed, invalid issuer claim (iss)")
-
-// ErrInvalidSubject indicates invalid sub claim.
-var ErrInvalidSubject = errors.New("square/go-jose/jwt: validation failed, invalid subject claim (sub)")
-
-// ErrInvalidAudience indicated invalid aud claim.
-var ErrInvalidAudience = errors.New("square/go-jose/jwt: validation failed, invalid audience claim (aud)")
-
-// ErrInvalidID indicates invalid jti claim.
-var ErrInvalidID = errors.New("square/go-jose/jwt: validation failed, invalid ID claim (jti)")
-
-// ErrNotValidYet indicates that token is used before time indicated in nbf claim.
-var ErrNotValidYet = errors.New("square/go-jose/jwt: validation failed, token not valid yet (nbf)")
-
-// ErrExpired indicates that token is used after expiry time indicated in exp claim.
-var ErrExpired = errors.New("square/go-jose/jwt: validation failed, token is expired (exp)")
-
-// ErrInvalidContentType indicated that token requires JWT cty header.
-var ErrInvalidContentType = errors.New("square/go-jose/jwt: expected content type to be JWT (cty header)")
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/jwt.go b/vendor/gopkg.in/square/go-jose.v2/jwt/jwt.go
deleted file mode 100644
index 2155b2d27..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/jwt.go
+++ /dev/null
@@ -1,113 +0,0 @@
-/*-
- * Copyright 2016 Zbigniew Mandziejewicz
- * Copyright 2016 Square, Inc.
- *
- * 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 jwt
-
-import (
- "gopkg.in/square/go-jose.v2"
- "gopkg.in/square/go-jose.v2/json"
- "strings"
-)
-
-// JSONWebToken represents a JSON Web Token (as specified in RFC7519).
-type JSONWebToken struct {
- payload func(k interface{}) ([]byte, error)
- Headers []jose.Header
-}
-
-type NestedJSONWebToken struct {
- enc *jose.JSONWebEncryption
- Headers []jose.Header
-}
-
-// Claims deserializes a JSONWebToken into dest using the provided key.
-func (t *JSONWebToken) Claims(key interface{}, dest ...interface{}) error {
- b, err := t.payload(key)
- if err != nil {
- return err
- }
-
- for _, d := range dest {
- if err := json.Unmarshal(b, d); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func (t *NestedJSONWebToken) Decrypt(decryptionKey interface{}) (*JSONWebToken, error) {
- b, err := t.enc.Decrypt(decryptionKey)
- if err != nil {
- return nil, err
- }
-
- sig, err := ParseSigned(string(b))
- if err != nil {
- return nil, err
- }
-
- return sig, nil
-}
-
-// ParseSigned parses token from JWS form.
-func ParseSigned(s string) (*JSONWebToken, error) {
- sig, err := jose.ParseSigned(s)
- if err != nil {
- return nil, err
- }
- headers := make([]jose.Header, len(sig.Signatures))
- for i, signature := range sig.Signatures {
- headers[i] = signature.Header
- }
-
- return &JSONWebToken{
- payload: sig.Verify,
- Headers: headers,
- }, nil
-}
-
-// ParseEncrypted parses token from JWE form.
-func ParseEncrypted(s string) (*JSONWebToken, error) {
- enc, err := jose.ParseEncrypted(s)
- if err != nil {
- return nil, err
- }
-
- return &JSONWebToken{
- payload: enc.Decrypt,
- Headers: []jose.Header{enc.Header},
- }, nil
-}
-
-// ParseSignedAndEncrypted parses signed-then-encrypted token from JWE form.
-func ParseSignedAndEncrypted(s string) (*NestedJSONWebToken, error) {
- enc, err := jose.ParseEncrypted(s)
- if err != nil {
- return nil, err
- }
-
- contentType, _ := enc.Header.ExtraHeaders[jose.HeaderContentType].(string)
- if strings.ToUpper(contentType) != "JWT" {
- return nil, ErrInvalidContentType
- }
-
- return &NestedJSONWebToken{
- enc: enc,
- Headers: []jose.Header{enc.Header},
- }, nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/validation.go b/vendor/gopkg.in/square/go-jose.v2/jwt/validation.go
deleted file mode 100644
index fdcee371b..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/validation.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*-
- * Copyright 2016 Zbigniew Mandziejewicz
- * Copyright 2016 Square, Inc.
- *
- * 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 jwt
-
-import "time"
-
-const (
- // DefaultLeeway defines the default leeway for matching NotBefore/Expiry claims.
- DefaultLeeway = 1.0 * time.Minute
-)
-
-// Expected defines values used for protected claims validation.
-// If field has zero value then validation is skipped.
-type Expected struct {
- // Issuer matches the "iss" claim exactly.
- Issuer string
- // Subject matches the "sub" claim exactly.
- Subject string
- // Audience matches the values in "aud" claim, regardless of their order.
- Audience Audience
- // ID matches the "jti" claim exactly.
- ID string
- // Time matches the "exp" and "ebf" claims with leeway.
- Time time.Time
-}
-
-// WithTime copies expectations with new time.
-func (e Expected) WithTime(t time.Time) Expected {
- e.Time = t
- return e
-}
-
-// Validate checks claims in a token against expected values.
-// A default leeway value of one minute is used to compare time values.
-func (c Claims) Validate(e Expected) error {
- return c.ValidateWithLeeway(e, DefaultLeeway)
-}
-
-// ValidateWithLeeway checks claims in a token against expected values. A
-// custom leeway may be specified for comparing time values. You may pass a
-// zero value to check time values with no leeway, but you should not that
-// numeric date values are rounded to the nearest second and sub-second
-// precision is not supported.
-func (c Claims) ValidateWithLeeway(e Expected, leeway time.Duration) error {
- if e.Issuer != "" && e.Issuer != c.Issuer {
- return ErrInvalidIssuer
- }
-
- if e.Subject != "" && e.Subject != c.Subject {
- return ErrInvalidSubject
- }
-
- if e.ID != "" && e.ID != c.ID {
- return ErrInvalidID
- }
-
- if len(e.Audience) != 0 {
- for _, v := range e.Audience {
- if !c.Audience.Contains(v) {
- return ErrInvalidAudience
- }
- }
- }
-
- if !e.Time.IsZero() && e.Time.Add(leeway).Before(c.NotBefore.Time()) {
- return ErrNotValidYet
- }
-
- if !e.Time.IsZero() && e.Time.Add(-leeway).After(c.Expiry.Time()) {
- return ErrExpired
- }
-
- return nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/shared.go b/vendor/gopkg.in/square/go-jose.v2/shared.go
deleted file mode 100644
index 4c19dc382..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/shared.go
+++ /dev/null
@@ -1,417 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 jose
-
-import (
- "crypto/elliptic"
- "errors"
- "fmt"
-
- "gopkg.in/square/go-jose.v2/json"
-)
-
-// KeyAlgorithm represents a key management algorithm.
-type KeyAlgorithm string
-
-// SignatureAlgorithm represents a signature (or MAC) algorithm.
-type SignatureAlgorithm string
-
-// ContentEncryption represents a content encryption algorithm.
-type ContentEncryption string
-
-// CompressionAlgorithm represents an algorithm used for plaintext compression.
-type CompressionAlgorithm string
-
-// ContentType represents type of the contained data.
-type ContentType string
-
-var (
- // ErrCryptoFailure represents an error in cryptographic primitive. This
- // occurs when, for example, a message had an invalid authentication tag or
- // could not be decrypted.
- ErrCryptoFailure = errors.New("square/go-jose: error in cryptographic primitive")
-
- // ErrUnsupportedAlgorithm indicates that a selected algorithm is not
- // supported. This occurs when trying to instantiate an encrypter for an
- // algorithm that is not yet implemented.
- ErrUnsupportedAlgorithm = errors.New("square/go-jose: unknown/unsupported algorithm")
-
- // ErrUnsupportedKeyType indicates that the given key type/format is not
- // supported. This occurs when trying to instantiate an encrypter and passing
- // it a key of an unrecognized type or with unsupported parameters, such as
- // an RSA private key with more than two primes.
- ErrUnsupportedKeyType = errors.New("square/go-jose: unsupported key type/format")
-
- // ErrNotSupported serialization of object is not supported. This occurs when
- // trying to compact-serialize an object which can't be represented in
- // compact form.
- ErrNotSupported = errors.New("square/go-jose: compact serialization not supported for object")
-
- // ErrUnprotectedNonce indicates that while parsing a JWS or JWE object, a
- // nonce header parameter was included in an unprotected header object.
- ErrUnprotectedNonce = errors.New("square/go-jose: Nonce parameter included in unprotected header")
-)
-
-// Key management algorithms
-const (
- ED25519 = KeyAlgorithm("ED25519")
- RSA1_5 = KeyAlgorithm("RSA1_5") // RSA-PKCS1v1.5
- RSA_OAEP = KeyAlgorithm("RSA-OAEP") // RSA-OAEP-SHA1
- RSA_OAEP_256 = KeyAlgorithm("RSA-OAEP-256") // RSA-OAEP-SHA256
- A128KW = KeyAlgorithm("A128KW") // AES key wrap (128)
- A192KW = KeyAlgorithm("A192KW") // AES key wrap (192)
- A256KW = KeyAlgorithm("A256KW") // AES key wrap (256)
- DIRECT = KeyAlgorithm("dir") // Direct encryption
- ECDH_ES = KeyAlgorithm("ECDH-ES") // ECDH-ES
- ECDH_ES_A128KW = KeyAlgorithm("ECDH-ES+A128KW") // ECDH-ES + AES key wrap (128)
- ECDH_ES_A192KW = KeyAlgorithm("ECDH-ES+A192KW") // ECDH-ES + AES key wrap (192)
- ECDH_ES_A256KW = KeyAlgorithm("ECDH-ES+A256KW") // ECDH-ES + AES key wrap (256)
- A128GCMKW = KeyAlgorithm("A128GCMKW") // AES-GCM key wrap (128)
- A192GCMKW = KeyAlgorithm("A192GCMKW") // AES-GCM key wrap (192)
- A256GCMKW = KeyAlgorithm("A256GCMKW") // AES-GCM key wrap (256)
- PBES2_HS256_A128KW = KeyAlgorithm("PBES2-HS256+A128KW") // PBES2 + HMAC-SHA256 + AES key wrap (128)
- PBES2_HS384_A192KW = KeyAlgorithm("PBES2-HS384+A192KW") // PBES2 + HMAC-SHA384 + AES key wrap (192)
- PBES2_HS512_A256KW = KeyAlgorithm("PBES2-HS512+A256KW") // PBES2 + HMAC-SHA512 + AES key wrap (256)
-)
-
-// Signature algorithms
-const (
- EdDSA = SignatureAlgorithm("EdDSA")
- HS256 = SignatureAlgorithm("HS256") // HMAC using SHA-256
- HS384 = SignatureAlgorithm("HS384") // HMAC using SHA-384
- HS512 = SignatureAlgorithm("HS512") // HMAC using SHA-512
- RS256 = SignatureAlgorithm("RS256") // RSASSA-PKCS-v1.5 using SHA-256
- RS384 = SignatureAlgorithm("RS384") // RSASSA-PKCS-v1.5 using SHA-384
- RS512 = SignatureAlgorithm("RS512") // RSASSA-PKCS-v1.5 using SHA-512
- ES256 = SignatureAlgorithm("ES256") // ECDSA using P-256 and SHA-256
- ES384 = SignatureAlgorithm("ES384") // ECDSA using P-384 and SHA-384
- ES512 = SignatureAlgorithm("ES512") // ECDSA using P-521 and SHA-512
- PS256 = SignatureAlgorithm("PS256") // RSASSA-PSS using SHA256 and MGF1-SHA256
- PS384 = SignatureAlgorithm("PS384") // RSASSA-PSS using SHA384 and MGF1-SHA384
- PS512 = SignatureAlgorithm("PS512") // RSASSA-PSS using SHA512 and MGF1-SHA512
-)
-
-// Content encryption algorithms
-const (
- A128CBC_HS256 = ContentEncryption("A128CBC-HS256") // AES-CBC + HMAC-SHA256 (128)
- A192CBC_HS384 = ContentEncryption("A192CBC-HS384") // AES-CBC + HMAC-SHA384 (192)
- A256CBC_HS512 = ContentEncryption("A256CBC-HS512") // AES-CBC + HMAC-SHA512 (256)
- A128GCM = ContentEncryption("A128GCM") // AES-GCM (128)
- A192GCM = ContentEncryption("A192GCM") // AES-GCM (192)
- A256GCM = ContentEncryption("A256GCM") // AES-GCM (256)
-)
-
-// Compression algorithms
-const (
- NONE = CompressionAlgorithm("") // No compression
- DEFLATE = CompressionAlgorithm("DEF") // DEFLATE (RFC 1951)
-)
-
-// A key in the protected header of a JWS object. Use of the Header...
-// constants is preferred to enhance type safety.
-type HeaderKey string
-
-const (
- HeaderType HeaderKey = "typ" // string
- HeaderContentType = "cty" // string
-
- // These are set by go-jose and shouldn't need to be set by consumers of the
- // library.
- headerAlgorithm = "alg" // string
- headerEncryption = "enc" // ContentEncryption
- headerCompression = "zip" // CompressionAlgorithm
- headerCritical = "crit" // []string
-
- headerAPU = "apu" // *byteBuffer
- headerAPV = "apv" // *byteBuffer
- headerEPK = "epk" // *JSONWebKey
- headerIV = "iv" // *byteBuffer
- headerTag = "tag" // *byteBuffer
-
- headerJWK = "jwk" // *JSONWebKey
- headerKeyID = "kid" // string
- headerNonce = "nonce" // string
-)
-
-// rawHeader represents the JOSE header for JWE/JWS objects (used for parsing).
-//
-// The decoding of the constituent items is deferred because we want to marshal
-// some members into particular structs rather than generic maps, but at the
-// same time we need to receive any extra fields unhandled by this library to
-// pass through to consuming code in case it wants to examine them.
-type rawHeader map[HeaderKey]*json.RawMessage
-
-// Header represents the read-only JOSE header for JWE/JWS objects.
-type Header struct {
- KeyID string
- JSONWebKey *JSONWebKey
- Algorithm string
- Nonce string
-
- // Any headers not recognised above get unmarshaled from JSON in a generic
- // manner and placed in this map.
- ExtraHeaders map[HeaderKey]interface{}
-}
-
-func (parsed rawHeader) set(k HeaderKey, v interface{}) error {
- b, err := json.Marshal(v)
- if err != nil {
- return err
- }
-
- parsed[k] = makeRawMessage(b)
- return nil
-}
-
-// getString gets a string from the raw JSON, defaulting to "".
-func (parsed rawHeader) getString(k HeaderKey) string {
- v, ok := parsed[k]
- if !ok {
- return ""
- }
- var s string
- err := json.Unmarshal(*v, &s)
- if err != nil {
- return ""
- }
- return s
-}
-
-// getByteBuffer gets a byte buffer from the raw JSON. Returns (nil, nil) if
-// not specified.
-func (parsed rawHeader) getByteBuffer(k HeaderKey) (*byteBuffer, error) {
- v := parsed[k]
- if v == nil {
- return nil, nil
- }
- var bb *byteBuffer
- err := json.Unmarshal(*v, &bb)
- if err != nil {
- return nil, err
- }
- return bb, nil
-}
-
-// getAlgorithm extracts parsed "alg" from the raw JSON as a KeyAlgorithm.
-func (parsed rawHeader) getAlgorithm() KeyAlgorithm {
- return KeyAlgorithm(parsed.getString(headerAlgorithm))
-}
-
-// getSignatureAlgorithm extracts parsed "alg" from the raw JSON as a SignatureAlgorithm.
-func (parsed rawHeader) getSignatureAlgorithm() SignatureAlgorithm {
- return SignatureAlgorithm(parsed.getString(headerAlgorithm))
-}
-
-// getEncryption extracts parsed "enc" from the raw JSON.
-func (parsed rawHeader) getEncryption() ContentEncryption {
- return ContentEncryption(parsed.getString(headerEncryption))
-}
-
-// getCompression extracts parsed "zip" from the raw JSON.
-func (parsed rawHeader) getCompression() CompressionAlgorithm {
- return CompressionAlgorithm(parsed.getString(headerCompression))
-}
-
-func (parsed rawHeader) getNonce() string {
- return parsed.getString(headerNonce)
-}
-
-// getEPK extracts parsed "epk" from the raw JSON.
-func (parsed rawHeader) getEPK() (*JSONWebKey, error) {
- v := parsed[headerEPK]
- if v == nil {
- return nil, nil
- }
- var epk *JSONWebKey
- err := json.Unmarshal(*v, &epk)
- if err != nil {
- return nil, err
- }
- return epk, nil
-}
-
-// getAPU extracts parsed "apu" from the raw JSON.
-func (parsed rawHeader) getAPU() (*byteBuffer, error) {
- return parsed.getByteBuffer(headerAPU)
-}
-
-// getAPV extracts parsed "apv" from the raw JSON.
-func (parsed rawHeader) getAPV() (*byteBuffer, error) {
- return parsed.getByteBuffer(headerAPV)
-}
-
-// getIV extracts parsed "iv" frpom the raw JSON.
-func (parsed rawHeader) getIV() (*byteBuffer, error) {
- return parsed.getByteBuffer(headerIV)
-}
-
-// getTag extracts parsed "tag" frpom the raw JSON.
-func (parsed rawHeader) getTag() (*byteBuffer, error) {
- return parsed.getByteBuffer(headerTag)
-}
-
-// getJWK extracts parsed "jwk" from the raw JSON.
-func (parsed rawHeader) getJWK() (*JSONWebKey, error) {
- v := parsed[headerJWK]
- if v == nil {
- return nil, nil
- }
- var jwk *JSONWebKey
- err := json.Unmarshal(*v, &jwk)
- if err != nil {
- return nil, err
- }
- return jwk, nil
-}
-
-// getCritical extracts parsed "crit" from the raw JSON. If omitted, it
-// returns an empty slice.
-func (parsed rawHeader) getCritical() ([]string, error) {
- v := parsed[headerCritical]
- if v == nil {
- return nil, nil
- }
-
- var q []string
- err := json.Unmarshal(*v, &q)
- if err != nil {
- return nil, err
- }
- return q, nil
-}
-
-// sanitized produces a cleaned-up header object from the raw JSON.
-func (parsed rawHeader) sanitized() (h Header, err error) {
- for k, v := range parsed {
- if v == nil {
- continue
- }
- switch k {
- case headerJWK:
- var jwk *JSONWebKey
- err = json.Unmarshal(*v, &jwk)
- if err != nil {
- err = fmt.Errorf("failed to unmarshal JWK: %v: %#v", err, string(*v))
- return
- }
- h.JSONWebKey = jwk
- case headerKeyID:
- var s string
- err = json.Unmarshal(*v, &s)
- if err != nil {
- err = fmt.Errorf("failed to unmarshal key ID: %v: %#v", err, string(*v))
- return
- }
- h.KeyID = s
- case headerAlgorithm:
- var s string
- err = json.Unmarshal(*v, &s)
- if err != nil {
- err = fmt.Errorf("failed to unmarshal algorithm: %v: %#v", err, string(*v))
- return
- }
- h.Algorithm = s
- case headerNonce:
- var s string
- err = json.Unmarshal(*v, &s)
- if err != nil {
- err = fmt.Errorf("failed to unmarshal nonce: %v: %#v", err, string(*v))
- return
- }
- h.Nonce = s
- default:
- if h.ExtraHeaders == nil {
- h.ExtraHeaders = map[HeaderKey]interface{}{}
- }
- var v2 interface{}
- err = json.Unmarshal(*v, &v2)
- if err != nil {
- err = fmt.Errorf("failed to unmarshal value: %v: %#v", err, string(*v))
- return
- }
- h.ExtraHeaders[k] = v2
- }
- }
- return
-}
-
-func (dst rawHeader) isSet(k HeaderKey) bool {
- dvr := dst[k]
- if dvr == nil {
- return false
- }
-
- var dv interface{}
- err := json.Unmarshal(*dvr, &dv)
- if err != nil {
- return true
- }
-
- if dvStr, ok := dv.(string); ok {
- return dvStr != ""
- }
-
- return true
-}
-
-// Merge headers from src into dst, giving precedence to headers from l.
-func (dst rawHeader) merge(src *rawHeader) {
- if src == nil {
- return
- }
-
- for k, v := range *src {
- if dst.isSet(k) {
- continue
- }
-
- dst[k] = v
- }
-}
-
-// Get JOSE name of curve
-func curveName(crv elliptic.Curve) (string, error) {
- switch crv {
- case elliptic.P256():
- return "P-256", nil
- case elliptic.P384():
- return "P-384", nil
- case elliptic.P521():
- return "P-521", nil
- default:
- return "", fmt.Errorf("square/go-jose: unsupported/unknown elliptic curve")
- }
-}
-
-// Get size of curve in bytes
-func curveSize(crv elliptic.Curve) int {
- bits := crv.Params().BitSize
-
- div := bits / 8
- mod := bits % 8
-
- if mod == 0 {
- return div
- }
-
- return div + 1
-}
-
-func makeRawMessage(b []byte) *json.RawMessage {
- rm := json.RawMessage(b)
- return &rm
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/signing.go b/vendor/gopkg.in/square/go-jose.v2/signing.go
deleted file mode 100644
index 13e956d66..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/signing.go
+++ /dev/null
@@ -1,343 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 jose
-
-import (
- "crypto/ecdsa"
- "crypto/rsa"
- "encoding/base64"
- "errors"
- "fmt"
-
- "golang.org/x/crypto/ed25519"
-
- "gopkg.in/square/go-jose.v2/json"
-)
-
-// NonceSource represents a source of random nonces to go into JWS objects
-type NonceSource interface {
- Nonce() (string, error)
-}
-
-// Signer represents a signer which takes a payload and produces a signed JWS object.
-type Signer interface {
- Sign(payload []byte) (*JSONWebSignature, error)
- Options() SignerOptions
-}
-
-// SigningKey represents an algorithm/key used to sign a message.
-type SigningKey struct {
- Algorithm SignatureAlgorithm
- Key interface{}
-}
-
-// SignerOptions represents options that can be set when creating signers.
-type SignerOptions struct {
- NonceSource NonceSource
- EmbedJWK bool
-
- // Optional map of additional keys to be inserted into the protected header
- // of a JWS object. Some specifications which make use of JWS like to insert
- // additional values here. All values must be JSON-serializable.
- ExtraHeaders map[HeaderKey]interface{}
-}
-
-// WithHeader adds an arbitrary value to the ExtraHeaders map, initializing it
-// if necessary. It returns itself and so can be used in a fluent style.
-func (so *SignerOptions) WithHeader(k HeaderKey, v interface{}) *SignerOptions {
- if so.ExtraHeaders == nil {
- so.ExtraHeaders = map[HeaderKey]interface{}{}
- }
- so.ExtraHeaders[k] = v
- return so
-}
-
-// WithContentType adds a content type ("cty") header and returns the updated
-// SignerOptions.
-func (so *SignerOptions) WithContentType(contentType ContentType) *SignerOptions {
- return so.WithHeader(HeaderContentType, contentType)
-}
-
-// WithType adds a type ("typ") header and returns the updated SignerOptions.
-func (so *SignerOptions) WithType(typ ContentType) *SignerOptions {
- return so.WithHeader(HeaderType, typ)
-}
-
-type payloadSigner interface {
- signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error)
-}
-
-type payloadVerifier interface {
- verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error
-}
-
-type genericSigner struct {
- recipients []recipientSigInfo
- nonceSource NonceSource
- embedJWK bool
- extraHeaders map[HeaderKey]interface{}
-}
-
-type recipientSigInfo struct {
- sigAlg SignatureAlgorithm
- publicKey *JSONWebKey
- signer payloadSigner
-}
-
-// NewSigner creates an appropriate signer based on the key type
-func NewSigner(sig SigningKey, opts *SignerOptions) (Signer, error) {
- return NewMultiSigner([]SigningKey{sig}, opts)
-}
-
-// NewMultiSigner creates a signer for multiple recipients
-func NewMultiSigner(sigs []SigningKey, opts *SignerOptions) (Signer, error) {
- signer := &genericSigner{recipients: []recipientSigInfo{}}
-
- if opts != nil {
- signer.nonceSource = opts.NonceSource
- signer.embedJWK = opts.EmbedJWK
- signer.extraHeaders = opts.ExtraHeaders
- }
-
- for _, sig := range sigs {
- err := signer.addRecipient(sig.Algorithm, sig.Key)
- if err != nil {
- return nil, err
- }
- }
-
- return signer, nil
-}
-
-// newVerifier creates a verifier based on the key type
-func newVerifier(verificationKey interface{}) (payloadVerifier, error) {
- switch verificationKey := verificationKey.(type) {
- case ed25519.PublicKey:
- return &edEncrypterVerifier{
- publicKey: verificationKey,
- }, nil
- case *rsa.PublicKey:
- return &rsaEncrypterVerifier{
- publicKey: verificationKey,
- }, nil
- case *ecdsa.PublicKey:
- return &ecEncrypterVerifier{
- publicKey: verificationKey,
- }, nil
- case []byte:
- return &symmetricMac{
- key: verificationKey,
- }, nil
- case JSONWebKey:
- return newVerifier(verificationKey.Key)
- case *JSONWebKey:
- return newVerifier(verificationKey.Key)
- default:
- return nil, ErrUnsupportedKeyType
- }
-}
-
-func (ctx *genericSigner) addRecipient(alg SignatureAlgorithm, signingKey interface{}) error {
- recipient, err := makeJWSRecipient(alg, signingKey)
- if err != nil {
- return err
- }
-
- ctx.recipients = append(ctx.recipients, recipient)
- return nil
-}
-
-func makeJWSRecipient(alg SignatureAlgorithm, signingKey interface{}) (recipientSigInfo, error) {
- switch signingKey := signingKey.(type) {
- case ed25519.PrivateKey:
- return newEd25519Signer(alg, signingKey)
- case *rsa.PrivateKey:
- return newRSASigner(alg, signingKey)
- case *ecdsa.PrivateKey:
- return newECDSASigner(alg, signingKey)
- case []byte:
- return newSymmetricSigner(alg, signingKey)
- case JSONWebKey:
- return newJWKSigner(alg, signingKey)
- case *JSONWebKey:
- return newJWKSigner(alg, *signingKey)
- default:
- return recipientSigInfo{}, ErrUnsupportedKeyType
- }
-}
-
-func newJWKSigner(alg SignatureAlgorithm, signingKey JSONWebKey) (recipientSigInfo, error) {
- recipient, err := makeJWSRecipient(alg, signingKey.Key)
- if err != nil {
- return recipientSigInfo{}, err
- }
- if recipient.publicKey != nil {
- // recipient.publicKey is a JWK synthesized for embedding when recipientSigInfo
- // was created for the inner key (such as a RSA or ECDSA public key). It contains
- // the pub key for embedding, but doesn't have extra params like key id.
- publicKey := signingKey
- publicKey.Key = recipient.publicKey.Key
- recipient.publicKey = &publicKey
-
- // This should be impossible, but let's check anyway.
- if !recipient.publicKey.IsPublic() {
- return recipientSigInfo{}, errors.New("square/go-jose: public key was unexpectedly not public")
- }
- }
- return recipient, nil
-}
-
-func (ctx *genericSigner) Sign(payload []byte) (*JSONWebSignature, error) {
- obj := &JSONWebSignature{}
- obj.payload = payload
- obj.Signatures = make([]Signature, len(ctx.recipients))
-
- for i, recipient := range ctx.recipients {
- protected := map[HeaderKey]interface{}{
- headerAlgorithm: string(recipient.sigAlg),
- }
-
- if recipient.publicKey != nil {
- // We want to embed the JWK or set the kid header, but not both. Having a protected
- // header that contains an embedded JWK while also simultaneously containing the kid
- // header is confusing, and at least in ACME the two are considered to be mutually
- // exclusive. The fact that both can exist at the same time is a somewhat unfortunate
- // result of the JOSE spec. We've decided that this library will only include one or
- // the other to avoid this confusion.
- //
- // See https://github.com/square/go-jose/issues/157 for more context.
- if ctx.embedJWK {
- protected[headerJWK] = recipient.publicKey
- } else {
- protected[headerKeyID] = recipient.publicKey.KeyID
- }
- }
-
- if ctx.nonceSource != nil {
- nonce, err := ctx.nonceSource.Nonce()
- if err != nil {
- return nil, fmt.Errorf("square/go-jose: Error generating nonce: %v", err)
- }
- protected[headerNonce] = nonce
- }
-
- for k, v := range ctx.extraHeaders {
- protected[k] = v
- }
-
- serializedProtected := mustSerializeJSON(protected)
-
- input := []byte(fmt.Sprintf("%s.%s",
- base64.RawURLEncoding.EncodeToString(serializedProtected),
- base64.RawURLEncoding.EncodeToString(payload)))
-
- signatureInfo, err := recipient.signer.signPayload(input, recipient.sigAlg)
- if err != nil {
- return nil, err
- }
-
- signatureInfo.protected = &rawHeader{}
- for k, v := range protected {
- b, err := json.Marshal(v)
- if err != nil {
- return nil, fmt.Errorf("square/go-jose: Error marshalling item %#v: %v", k, err)
- }
- (*signatureInfo.protected)[k] = makeRawMessage(b)
- }
- obj.Signatures[i] = signatureInfo
- }
-
- return obj, nil
-}
-
-func (ctx *genericSigner) Options() SignerOptions {
- return SignerOptions{
- NonceSource: ctx.nonceSource,
- EmbedJWK: ctx.embedJWK,
- ExtraHeaders: ctx.extraHeaders,
- }
-}
-
-// Verify validates the signature on the object and returns the payload.
-// This function does not support multi-signature, if you desire multi-sig
-// verification use VerifyMulti instead.
-//
-// Be careful when verifying signatures based on embedded JWKs inside the
-// payload header. You cannot assume that the key received in a payload is
-// trusted.
-func (obj JSONWebSignature) Verify(verificationKey interface{}) ([]byte, error) {
- verifier, err := newVerifier(verificationKey)
- if err != nil {
- return nil, err
- }
-
- if len(obj.Signatures) > 1 {
- return nil, errors.New("square/go-jose: too many signatures in payload; expecting only one")
- }
-
- signature := obj.Signatures[0]
- headers := signature.mergedHeaders()
- critical, err := headers.getCritical()
- if err != nil {
- return nil, err
- }
- if len(critical) > 0 {
- // Unsupported crit header
- return nil, ErrCryptoFailure
- }
-
- input := obj.computeAuthData(&signature)
- alg := headers.getSignatureAlgorithm()
- err = verifier.verifyPayload(input, signature.Signature, alg)
- if err == nil {
- return obj.payload, nil
- }
-
- return nil, ErrCryptoFailure
-}
-
-// VerifyMulti validates (one of the multiple) signatures on the object and
-// returns the index of the signature that was verified, along with the signature
-// object and the payload. We return the signature and index to guarantee that
-// callers are getting the verified value.
-func (obj JSONWebSignature) VerifyMulti(verificationKey interface{}) (int, Signature, []byte, error) {
- verifier, err := newVerifier(verificationKey)
- if err != nil {
- return -1, Signature{}, nil, err
- }
-
- for i, signature := range obj.Signatures {
- headers := signature.mergedHeaders()
- critical, err := headers.getCritical()
- if err != nil {
- continue
- }
- if len(critical) > 0 {
- // Unsupported crit header
- continue
- }
-
- input := obj.computeAuthData(&signature)
- alg := headers.getSignatureAlgorithm()
- err = verifier.verifyPayload(input, signature.Signature, alg)
- if err == nil {
- return i, signature, obj.payload, nil
- }
- }
-
- return -1, Signature{}, nil, ErrCryptoFailure
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/symmetric.go b/vendor/gopkg.in/square/go-jose.v2/symmetric.go
deleted file mode 100644
index 5be00f925..000000000
--- a/vendor/gopkg.in/square/go-jose.v2/symmetric.go
+++ /dev/null
@@ -1,360 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * 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 jose
-
-import (
- "crypto/aes"
- "crypto/cipher"
- "crypto/hmac"
- "crypto/rand"
- "crypto/sha256"
- "crypto/sha512"
- "crypto/subtle"
- "errors"
- "fmt"
- "hash"
- "io"
-
- "gopkg.in/square/go-jose.v2/cipher"
-)
-
-// Random reader (stubbed out in tests)
-var randReader = rand.Reader
-
-// Dummy key cipher for shared symmetric key mode
-type symmetricKeyCipher struct {
- key []byte // Pre-shared content-encryption key
-}
-
-// Signer/verifier for MAC modes
-type symmetricMac struct {
- key []byte
-}
-
-// Input/output from an AEAD operation
-type aeadParts struct {
- iv, ciphertext, tag []byte
-}
-
-// A content cipher based on an AEAD construction
-type aeadContentCipher struct {
- keyBytes int
- authtagBytes int
- getAead func(key []byte) (cipher.AEAD, error)
-}
-
-// Random key generator
-type randomKeyGenerator struct {
- size int
-}
-
-// Static key generator
-type staticKeyGenerator struct {
- key []byte
-}
-
-// Create a new content cipher based on AES-GCM
-func newAESGCM(keySize int) contentCipher {
- return &aeadContentCipher{
- keyBytes: keySize,
- authtagBytes: 16,
- getAead: func(key []byte) (cipher.AEAD, error) {
- aes, err := aes.NewCipher(key)
- if err != nil {
- return nil, err
- }
-
- return cipher.NewGCM(aes)
- },
- }
-}
-
-// Create a new content cipher based on AES-CBC+HMAC
-func newAESCBC(keySize int) contentCipher {
- return &aeadContentCipher{
- keyBytes: keySize * 2,
- authtagBytes: 16,
- getAead: func(key []byte) (cipher.AEAD, error) {
- return josecipher.NewCBCHMAC(key, aes.NewCipher)
- },
- }
-}
-
-// Get an AEAD cipher object for the given content encryption algorithm
-func getContentCipher(alg ContentEncryption) contentCipher {
- switch alg {
- case A128GCM:
- return newAESGCM(16)
- case A192GCM:
- return newAESGCM(24)
- case A256GCM:
- return newAESGCM(32)
- case A128CBC_HS256:
- return newAESCBC(16)
- case A192CBC_HS384:
- return newAESCBC(24)
- case A256CBC_HS512:
- return newAESCBC(32)
- default:
- return nil
- }
-}
-
-// newSymmetricRecipient creates a JWE encrypter based on AES-GCM key wrap.
-func newSymmetricRecipient(keyAlg KeyAlgorithm, key []byte) (recipientKeyInfo, error) {
- switch keyAlg {
- case DIRECT, A128GCMKW, A192GCMKW, A256GCMKW, A128KW, A192KW, A256KW:
- default:
- return recipientKeyInfo{}, ErrUnsupportedAlgorithm
- }
-
- return recipientKeyInfo{
- keyAlg: keyAlg,
- keyEncrypter: &symmetricKeyCipher{
- key: key,
- },
- }, nil
-}
-
-// newSymmetricSigner creates a recipientSigInfo based on the given key.
-func newSymmetricSigner(sigAlg SignatureAlgorithm, key []byte) (recipientSigInfo, error) {
- // Verify that key management algorithm is supported by this encrypter
- switch sigAlg {
- case HS256, HS384, HS512:
- default:
- return recipientSigInfo{}, ErrUnsupportedAlgorithm
- }
-
- return recipientSigInfo{
- sigAlg: sigAlg,
- signer: &symmetricMac{
- key: key,
- },
- }, nil
-}
-
-// Generate a random key for the given content cipher
-func (ctx randomKeyGenerator) genKey() ([]byte, rawHeader, error) {
- key := make([]byte, ctx.size)
- _, err := io.ReadFull(randReader, key)
- if err != nil {
- return nil, rawHeader{}, err
- }
-
- return key, rawHeader{}, nil
-}
-
-// Key size for random generator
-func (ctx randomKeyGenerator) keySize() int {
- return ctx.size
-}
-
-// Generate a static key (for direct mode)
-func (ctx staticKeyGenerator) genKey() ([]byte, rawHeader, error) {
- cek := make([]byte, len(ctx.key))
- copy(cek, ctx.key)
- return cek, rawHeader{}, nil
-}
-
-// Key size for static generator
-func (ctx staticKeyGenerator) keySize() int {
- return len(ctx.key)
-}
-
-// Get key size for this cipher
-func (ctx aeadContentCipher) keySize() int {
- return ctx.keyBytes
-}
-
-// Encrypt some data
-func (ctx aeadContentCipher) encrypt(key, aad, pt []byte) (*aeadParts, error) {
- // Get a new AEAD instance
- aead, err := ctx.getAead(key)
- if err != nil {
- return nil, err
- }
-
- // Initialize a new nonce
- iv := make([]byte, aead.NonceSize())
- _, err = io.ReadFull(randReader, iv)
- if err != nil {
- return nil, err
- }
-
- ciphertextAndTag := aead.Seal(nil, iv, pt, aad)
- offset := len(ciphertextAndTag) - ctx.authtagBytes
-
- return &aeadParts{
- iv: iv,
- ciphertext: ciphertextAndTag[:offset],
- tag: ciphertextAndTag[offset:],
- }, nil
-}
-
-// Decrypt some data
-func (ctx aeadContentCipher) decrypt(key, aad []byte, parts *aeadParts) ([]byte, error) {
- aead, err := ctx.getAead(key)
- if err != nil {
- return nil, err
- }
-
- return aead.Open(nil, parts.iv, append(parts.ciphertext, parts.tag...), aad)
-}
-
-// Encrypt the content encryption key.
-func (ctx *symmetricKeyCipher) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) {
- switch alg {
- case DIRECT:
- return recipientInfo{
- header: &rawHeader{},
- }, nil
- case A128GCMKW, A192GCMKW, A256GCMKW:
- aead := newAESGCM(len(ctx.key))
-
- parts, err := aead.encrypt(ctx.key, []byte{}, cek)
- if err != nil {
- return recipientInfo{}, err
- }
-
- header := &rawHeader{}
- header.set(headerIV, newBuffer(parts.iv))
- header.set(headerTag, newBuffer(parts.tag))
-
- return recipientInfo{
- header: header,
- encryptedKey: parts.ciphertext,
- }, nil
- case A128KW, A192KW, A256KW:
- block, err := aes.NewCipher(ctx.key)
- if err != nil {
- return recipientInfo{}, err
- }
-
- jek, err := josecipher.KeyWrap(block, cek)
- if err != nil {
- return recipientInfo{}, err
- }
-
- return recipientInfo{
- encryptedKey: jek,
- header: &rawHeader{},
- }, nil
- }
-
- return recipientInfo{}, ErrUnsupportedAlgorithm
-}
-
-// Decrypt the content encryption key.
-func (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {
- switch headers.getAlgorithm() {
- case DIRECT:
- cek := make([]byte, len(ctx.key))
- copy(cek, ctx.key)
- return cek, nil
- case A128GCMKW, A192GCMKW, A256GCMKW:
- aead := newAESGCM(len(ctx.key))
-
- iv, err := headers.getIV()
- if err != nil {
- return nil, fmt.Errorf("square/go-jose: invalid IV: %v", err)
- }
- tag, err := headers.getTag()
- if err != nil {
- return nil, fmt.Errorf("square/go-jose: invalid tag: %v", err)
- }
-
- parts := &aeadParts{
- iv: iv.bytes(),
- ciphertext: recipient.encryptedKey,
- tag: tag.bytes(),
- }
-
- cek, err := aead.decrypt(ctx.key, []byte{}, parts)
- if err != nil {
- return nil, err
- }
-
- return cek, nil
- case A128KW, A192KW, A256KW:
- block, err := aes.NewCipher(ctx.key)
- if err != nil {
- return nil, err
- }
-
- cek, err := josecipher.KeyUnwrap(block, recipient.encryptedKey)
- if err != nil {
- return nil, err
- }
- return cek, nil
- }
-
- return nil, ErrUnsupportedAlgorithm
-}
-
-// Sign the given payload
-func (ctx symmetricMac) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {
- mac, err := ctx.hmac(payload, alg)
- if err != nil {
- return Signature{}, errors.New("square/go-jose: failed to compute hmac")
- }
-
- return Signature{
- Signature: mac,
- protected: &rawHeader{},
- }, nil
-}
-
-// Verify the given payload
-func (ctx symmetricMac) verifyPayload(payload []byte, mac []byte, alg SignatureAlgorithm) error {
- expected, err := ctx.hmac(payload, alg)
- if err != nil {
- return errors.New("square/go-jose: failed to compute hmac")
- }
-
- if len(mac) != len(expected) {
- return errors.New("square/go-jose: invalid hmac")
- }
-
- match := subtle.ConstantTimeCompare(mac, expected)
- if match != 1 {
- return errors.New("square/go-jose: invalid hmac")
- }
-
- return nil
-}
-
-// Compute the HMAC based on the given alg value
-func (ctx symmetricMac) hmac(payload []byte, alg SignatureAlgorithm) ([]byte, error) {
- var hash func() hash.Hash
-
- switch alg {
- case HS256:
- hash = sha256.New
- case HS384:
- hash = sha512.New384
- case HS512:
- hash = sha512.New
- default:
- return nil, ErrUnsupportedAlgorithm
- }
-
- hmac := hmac.New(hash, ctx.key)
-
- // According to documentation, Write() on hash never fails
- _, _ = hmac.Write(payload)
- return hmac.Sum(nil), nil
-}
diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go
deleted file mode 100644
index 8a5d1fbbb..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// Package v1alpha1 is the v1alpha1 version of the API.
-// AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration
-// InitializerConfiguration and validatingWebhookConfiguration is for the
-// new dynamic admission controller configuration.
-// +groupName=admissionregistration.k8s.io
-package v1alpha1 // import "k8s.io/api/admissionregistration/v1alpha1"
diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go
deleted file mode 100644
index f5d4941d3..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go
+++ /dev/null
@@ -1,1028 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1alpha1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto
-
- It has these top-level messages:
- Initializer
- InitializerConfiguration
- InitializerConfigurationList
- Rule
-*/
-package v1alpha1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *Initializer) Reset() { *m = Initializer{} }
-func (*Initializer) ProtoMessage() {}
-func (*Initializer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *InitializerConfiguration) Reset() { *m = InitializerConfiguration{} }
-func (*InitializerConfiguration) ProtoMessage() {}
-func (*InitializerConfiguration) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{1}
-}
-
-func (m *InitializerConfigurationList) Reset() { *m = InitializerConfigurationList{} }
-func (*InitializerConfigurationList) ProtoMessage() {}
-func (*InitializerConfigurationList) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{2}
-}
-
-func (m *Rule) Reset() { *m = Rule{} }
-func (*Rule) ProtoMessage() {}
-func (*Rule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func init() {
- proto.RegisterType((*Initializer)(nil), "k8s.io.api.admissionregistration.v1alpha1.Initializer")
- proto.RegisterType((*InitializerConfiguration)(nil), "k8s.io.api.admissionregistration.v1alpha1.InitializerConfiguration")
- proto.RegisterType((*InitializerConfigurationList)(nil), "k8s.io.api.admissionregistration.v1alpha1.InitializerConfigurationList")
- proto.RegisterType((*Rule)(nil), "k8s.io.api.admissionregistration.v1alpha1.Rule")
-}
-func (m *Initializer) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Initializer) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *InitializerConfiguration) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *InitializerConfiguration) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- if len(m.Initializers) > 0 {
- for _, msg := range m.Initializers {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *InitializerConfigurationList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *InitializerConfigurationList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n2, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *Rule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Rule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.APIVersions) > 0 {
- for _, s := range m.APIVersions {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *Initializer) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *InitializerConfiguration) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Initializers) > 0 {
- for _, e := range m.Initializers {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *InitializerConfigurationList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *Rule) Size() (n int) {
- var l int
- _ = l
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.APIVersions) > 0 {
- for _, s := range m.APIVersions {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *Initializer) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Initializer{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "Rule", "Rule", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *InitializerConfiguration) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&InitializerConfiguration{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Initializers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Initializers), "Initializer", "Initializer", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *InitializerConfigurationList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&InitializerConfigurationList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "InitializerConfiguration", "InitializerConfiguration", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Rule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Rule{`,
- `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
- `APIVersions:` + fmt.Sprintf("%v", this.APIVersions) + `,`,
- `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *Initializer) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Initializer: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Initializer: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, Rule{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *InitializerConfiguration) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: InitializerConfiguration: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: InitializerConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Initializers", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Initializers = append(m.Initializers, Initializer{})
- if err := m.Initializers[len(m.Initializers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *InitializerConfigurationList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: InitializerConfigurationList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: InitializerConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, InitializerConfiguration{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Rule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Rule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIVersions", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIVersions = append(m.APIVersions, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 545 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0x4d, 0x8b, 0x13, 0x3f,
- 0x18, 0x6f, 0xfe, 0xdb, 0x42, 0x9b, 0x76, 0xf9, 0xcb, 0xe0, 0xa1, 0x14, 0x99, 0x96, 0x9e, 0x2a,
- 0x62, 0x62, 0x57, 0x59, 0xbc, 0xee, 0xec, 0x41, 0x0a, 0xbe, 0x2c, 0x41, 0x3c, 0x88, 0x07, 0xd3,
- 0xf6, 0xd9, 0x69, 0x6c, 0x27, 0x19, 0x92, 0x4c, 0x41, 0x4f, 0x5e, 0xbc, 0x0b, 0x7e, 0xa9, 0x1e,
- 0xf7, 0xb8, 0xa7, 0x62, 0x47, 0xf0, 0xe8, 0x67, 0x90, 0x99, 0xe9, 0xec, 0xcc, 0x5a, 0x8b, 0xab,
- 0xb7, 0x3c, 0xbf, 0x27, 0xbf, 0xb7, 0x04, 0xb3, 0xf9, 0x63, 0x43, 0x84, 0xa2, 0xf3, 0x68, 0x0c,
- 0x5a, 0x82, 0x05, 0x43, 0x97, 0x20, 0xa7, 0x4a, 0xd3, 0xed, 0x82, 0x87, 0x82, 0xf2, 0x69, 0x20,
- 0x8c, 0x11, 0x4a, 0x6a, 0xf0, 0x85, 0xb1, 0x9a, 0x5b, 0xa1, 0x24, 0x5d, 0x0e, 0xf9, 0x22, 0x9c,
- 0xf1, 0x21, 0xf5, 0x41, 0x82, 0xe6, 0x16, 0xa6, 0x24, 0xd4, 0xca, 0x2a, 0xe7, 0x6e, 0x46, 0x25,
- 0x3c, 0x14, 0xe4, 0xb7, 0x54, 0x92, 0x53, 0x3b, 0xf7, 0x7d, 0x61, 0x67, 0xd1, 0x98, 0x4c, 0x54,
- 0x40, 0x7d, 0xe5, 0x2b, 0x9a, 0x2a, 0x8c, 0xa3, 0xf3, 0x74, 0x4a, 0x87, 0xf4, 0x94, 0x29, 0x77,
- 0x1e, 0x15, 0xa1, 0x02, 0x3e, 0x99, 0x09, 0x09, 0xfa, 0x3d, 0x0d, 0xe7, 0x7e, 0x02, 0x18, 0x1a,
- 0x80, 0xe5, 0x74, 0xb9, 0x93, 0xa7, 0x43, 0xf7, 0xb1, 0x74, 0x24, 0xad, 0x08, 0x60, 0x87, 0x70,
- 0xfc, 0x27, 0x82, 0x99, 0xcc, 0x20, 0xe0, 0x3b, 0xbc, 0x87, 0xfb, 0x78, 0x91, 0x15, 0x0b, 0x2a,
- 0xa4, 0x35, 0x56, 0xff, 0x4a, 0xea, 0x7f, 0x42, 0xb8, 0x39, 0x92, 0xc2, 0x0a, 0xbe, 0x10, 0x1f,
- 0x40, 0x3b, 0x3d, 0x5c, 0x95, 0x3c, 0x80, 0x36, 0xea, 0xa1, 0x41, 0xc3, 0x6b, 0xad, 0xd6, 0xdd,
- 0x4a, 0xbc, 0xee, 0x56, 0x9f, 0xf3, 0x00, 0x58, 0xba, 0x71, 0x5e, 0xe2, 0x9a, 0x8e, 0x16, 0x60,
- 0xda, 0xff, 0xf5, 0x0e, 0x06, 0xcd, 0x23, 0x4a, 0x6e, 0xfc, 0xde, 0x84, 0x45, 0x0b, 0xf0, 0x0e,
- 0xb7, 0x9a, 0xb5, 0x64, 0x32, 0x2c, 0x13, 0xeb, 0xff, 0x40, 0xb8, 0x5d, 0xca, 0x71, 0xaa, 0xe4,
- 0xb9, 0xf0, 0xa3, 0x4c, 0xc0, 0x79, 0x8b, 0xeb, 0xc9, 0xeb, 0x4e, 0xb9, 0xe5, 0x69, 0xb0, 0xe6,
- 0xd1, 0x83, 0x92, 0xeb, 0x55, 0x59, 0x12, 0xce, 0xfd, 0x04, 0x30, 0x24, 0xb9, 0x4d, 0x96, 0x43,
- 0xf2, 0x62, 0xfc, 0x0e, 0x26, 0xf6, 0x19, 0x58, 0xee, 0x39, 0x5b, 0x5b, 0x5c, 0x60, 0xec, 0x4a,
- 0xd5, 0x09, 0x71, 0x4b, 0x14, 0xee, 0x79, 0xb7, 0xe3, 0xbf, 0xe8, 0x56, 0x0a, 0xef, 0xdd, 0xde,
- 0x7a, 0xb5, 0x4a, 0xa0, 0x61, 0xd7, 0x1c, 0xfa, 0xdf, 0x11, 0xbe, 0xb3, 0xaf, 0xf0, 0x53, 0x61,
- 0xac, 0xf3, 0x66, 0xa7, 0x34, 0xb9, 0x59, 0xe9, 0x84, 0x9d, 0x56, 0xbe, 0xb5, 0x8d, 0x51, 0xcf,
- 0x91, 0x52, 0xe1, 0x19, 0xae, 0x09, 0x0b, 0x41, 0xde, 0xf4, 0xf4, 0xdf, 0x9a, 0x5e, 0x4b, 0x5d,
- 0xfc, 0xec, 0x28, 0x51, 0x66, 0x99, 0x41, 0xff, 0x0b, 0xc2, 0xd5, 0xe4, 0xab, 0x9d, 0x7b, 0xb8,
- 0xc1, 0x43, 0xf1, 0x44, 0xab, 0x28, 0x34, 0x6d, 0xd4, 0x3b, 0x18, 0x34, 0xbc, 0xc3, 0x78, 0xdd,
- 0x6d, 0x9c, 0x9c, 0x8d, 0x32, 0x90, 0x15, 0x7b, 0x67, 0x88, 0x9b, 0x3c, 0x14, 0xaf, 0x40, 0x27,
- 0x39, 0xb2, 0x94, 0x0d, 0xef, 0xff, 0x78, 0xdd, 0x6d, 0x9e, 0x9c, 0x8d, 0x72, 0x98, 0x95, 0xef,
- 0x24, 0xfa, 0x1a, 0x8c, 0x8a, 0xf4, 0x04, 0x4c, 0xfb, 0xa0, 0xd0, 0x67, 0x39, 0xc8, 0x8a, 0xbd,
- 0x47, 0x56, 0x1b, 0xb7, 0x72, 0xb1, 0x71, 0x2b, 0x97, 0x1b, 0xb7, 0xf2, 0x31, 0x76, 0xd1, 0x2a,
- 0x76, 0xd1, 0x45, 0xec, 0xa2, 0xcb, 0xd8, 0x45, 0x5f, 0x63, 0x17, 0x7d, 0xfe, 0xe6, 0x56, 0x5e,
- 0xd7, 0xf3, 0xd2, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xfb, 0x23, 0x89, 0xaa, 0x04, 0x00,
- 0x00,
-}
diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto
deleted file mode 100644
index 11de02ff4..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.admissionregistration.v1alpha1;
-
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1alpha1";
-
-// Initializer describes the name and the failure policy of an initializer, and
-// what resources it applies to.
-message Initializer {
- // Name is the identifier of the initializer. It will be added to the
- // object that needs to be initialized.
- // Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where
- // "alwayspullimages" is the name of the webhook, and kubernetes.io is the name
- // of the organization.
- // Required
- optional string name = 1;
-
- // Rules describes what resources/subresources the initializer cares about.
- // The initializer cares about an operation if it matches _any_ Rule.
- // Rule.Resources must not include subresources.
- repeated Rule rules = 2;
-}
-
-// InitializerConfiguration describes the configuration of initializers.
-message InitializerConfiguration {
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Initializers is a list of resources and their default initializers
- // Order-sensitive.
- // When merging multiple InitializerConfigurations, we sort the initializers
- // from different InitializerConfigurations by the name of the
- // InitializerConfigurations; the order of the initializers from the same
- // InitializerConfiguration is preserved.
- // +patchMergeKey=name
- // +patchStrategy=merge
- // +optional
- repeated Initializer initializers = 2;
-}
-
-// InitializerConfigurationList is a list of InitializerConfiguration.
-message InitializerConfigurationList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // List of InitializerConfiguration.
- repeated InitializerConfiguration items = 2;
-}
-
-// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
-// to make sure that all the tuple expansions are valid.
-message Rule {
- // APIGroups is the API groups the resources belong to. '*' is all groups.
- // If '*' is present, the length of the slice must be one.
- // Required.
- repeated string apiGroups = 1;
-
- // APIVersions is the API versions the resources belong to. '*' is all versions.
- // If '*' is present, the length of the slice must be one.
- // Required.
- repeated string apiVersions = 2;
-
- // Resources is a list of resources this rule applies to.
- //
- // For example:
- // 'pods' means pods.
- // 'pods/log' means the log subresource of pods.
- // '*' means all resources, but not subresources.
- // 'pods/*' means all subresources of pods.
- // '*/scale' means all scale subresources.
- // '*/*' means all resources and their subresources.
- //
- // If wildcard is present, the validation rule will ensure resources do not
- // overlap with each other.
- //
- // Depending on the enclosing object, subresources might not be allowed.
- // Required.
- repeated string resources = 3;
-}
-
diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/register.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/register.go
deleted file mode 100644
index e9a4164c3..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1alpha1/register.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright 2017 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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-const GroupName = "admissionregistration.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &InitializerConfiguration{},
- &InitializerConfigurationList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go
deleted file mode 100644
index a245f1e85..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2017 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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// InitializerConfiguration describes the configuration of initializers.
-type InitializerConfiguration struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Initializers is a list of resources and their default initializers
- // Order-sensitive.
- // When merging multiple InitializerConfigurations, we sort the initializers
- // from different InitializerConfigurations by the name of the
- // InitializerConfigurations; the order of the initializers from the same
- // InitializerConfiguration is preserved.
- // +patchMergeKey=name
- // +patchStrategy=merge
- // +optional
- Initializers []Initializer `json:"initializers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=initializers"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// InitializerConfigurationList is a list of InitializerConfiguration.
-type InitializerConfigurationList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // List of InitializerConfiguration.
- Items []InitializerConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// Initializer describes the name and the failure policy of an initializer, and
-// what resources it applies to.
-type Initializer struct {
- // Name is the identifier of the initializer. It will be added to the
- // object that needs to be initialized.
- // Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where
- // "alwayspullimages" is the name of the webhook, and kubernetes.io is the name
- // of the organization.
- // Required
- Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
-
- // Rules describes what resources/subresources the initializer cares about.
- // The initializer cares about an operation if it matches _any_ Rule.
- // Rule.Resources must not include subresources.
- Rules []Rule `json:"rules,omitempty" protobuf:"bytes,2,rep,name=rules"`
-}
-
-// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
-// to make sure that all the tuple expansions are valid.
-type Rule struct {
- // APIGroups is the API groups the resources belong to. '*' is all groups.
- // If '*' is present, the length of the slice must be one.
- // Required.
- APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,1,rep,name=apiGroups"`
-
- // APIVersions is the API versions the resources belong to. '*' is all versions.
- // If '*' is present, the length of the slice must be one.
- // Required.
- APIVersions []string `json:"apiVersions,omitempty" protobuf:"bytes,2,rep,name=apiVersions"`
-
- // Resources is a list of resources this rule applies to.
- //
- // For example:
- // 'pods' means pods.
- // 'pods/log' means the log subresource of pods.
- // '*' means all resources, but not subresources.
- // 'pods/*' means all subresources of pods.
- // '*/scale' means all scale subresources.
- // '*/*' means all resources and their subresources.
- //
- // If wildcard is present, the validation rule will ensure resources do not
- // overlap with each other.
- //
- // Depending on the enclosing object, subresources might not be allowed.
- // Required.
- Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`
-}
diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go
deleted file mode 100644
index e2494e5d7..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-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
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_Initializer = map[string]string{
- "": "Initializer describes the name and the failure policy of an initializer, and what resources it applies to.",
- "name": "Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required",
- "rules": "Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources.",
-}
-
-func (Initializer) SwaggerDoc() map[string]string {
- return map_Initializer
-}
-
-var map_InitializerConfiguration = map[string]string{
- "": "InitializerConfiguration describes the configuration of initializers.",
- "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
- "initializers": "Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved.",
-}
-
-func (InitializerConfiguration) SwaggerDoc() map[string]string {
- return map_InitializerConfiguration
-}
-
-var map_InitializerConfigurationList = map[string]string{
- "": "InitializerConfigurationList is a list of InitializerConfiguration.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
- "items": "List of InitializerConfiguration.",
-}
-
-func (InitializerConfigurationList) SwaggerDoc() map[string]string {
- return map_InitializerConfigurationList
-}
-
-var map_Rule = map[string]string{
- "": "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.",
- "apiGroups": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.",
- "apiVersions": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.",
- "resources": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.",
-}
-
-func (Rule) SwaggerDoc() map[string]string {
- return map_Rule
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go
deleted file mode 100644
index 2ca492946..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,145 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Initializer) DeepCopyInto(out *Initializer) {
- *out = *in
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]Rule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Initializer.
-func (in *Initializer) DeepCopy() *Initializer {
- if in == nil {
- return nil
- }
- out := new(Initializer)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *InitializerConfiguration) DeepCopyInto(out *InitializerConfiguration) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Initializers != nil {
- in, out := &in.Initializers, &out.Initializers
- *out = make([]Initializer, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitializerConfiguration.
-func (in *InitializerConfiguration) DeepCopy() *InitializerConfiguration {
- if in == nil {
- return nil
- }
- out := new(InitializerConfiguration)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *InitializerConfiguration) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *InitializerConfigurationList) DeepCopyInto(out *InitializerConfigurationList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]InitializerConfiguration, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitializerConfigurationList.
-func (in *InitializerConfigurationList) DeepCopy() *InitializerConfigurationList {
- if in == nil {
- return nil
- }
- out := new(InitializerConfigurationList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *InitializerConfigurationList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Rule) DeepCopyInto(out *Rule) {
- *out = *in
- if in.APIGroups != nil {
- in, out := &in.APIGroups, &out.APIGroups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.APIVersions != nil {
- in, out := &in.APIVersions, &out.APIVersions
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Resources != nil {
- in, out := &in.Resources, &out.Resources
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
-func (in *Rule) DeepCopy() *Rule {
- if in == nil {
- return nil
- }
- out := new(Rule)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go b/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go
deleted file mode 100644
index afbb3d6d3..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// Package v1beta1 is the v1beta1 version of the API.
-// AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration
-// InitializerConfiguration and validatingWebhookConfiguration is for the
-// new dynamic admission controller configuration.
-// +groupName=admissionregistration.k8s.io
-package v1beta1 // import "k8s.io/api/admissionregistration/v1beta1"
diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go
deleted file mode 100644
index 51e5762a8..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,2150 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto
-
- It has these top-level messages:
- MutatingWebhookConfiguration
- MutatingWebhookConfigurationList
- Rule
- RuleWithOperations
- ServiceReference
- ValidatingWebhookConfiguration
- ValidatingWebhookConfigurationList
- Webhook
- WebhookClientConfig
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} }
-func (*MutatingWebhookConfiguration) ProtoMessage() {}
-func (*MutatingWebhookConfiguration) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{0}
-}
-
-func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} }
-func (*MutatingWebhookConfigurationList) ProtoMessage() {}
-func (*MutatingWebhookConfigurationList) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{1}
-}
-
-func (m *Rule) Reset() { *m = Rule{} }
-func (*Rule) ProtoMessage() {}
-func (*Rule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *RuleWithOperations) Reset() { *m = RuleWithOperations{} }
-func (*RuleWithOperations) ProtoMessage() {}
-func (*RuleWithOperations) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *ServiceReference) Reset() { *m = ServiceReference{} }
-func (*ServiceReference) ProtoMessage() {}
-func (*ServiceReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} }
-func (*ValidatingWebhookConfiguration) ProtoMessage() {}
-func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{5}
-}
-
-func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} }
-func (*ValidatingWebhookConfigurationList) ProtoMessage() {}
-func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{6}
-}
-
-func (m *Webhook) Reset() { *m = Webhook{} }
-func (*Webhook) ProtoMessage() {}
-func (*Webhook) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} }
-func (*WebhookClientConfig) ProtoMessage() {}
-func (*WebhookClientConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func init() {
- proto.RegisterType((*MutatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhookConfiguration")
- proto.RegisterType((*MutatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhookConfigurationList")
- proto.RegisterType((*Rule)(nil), "k8s.io.api.admissionregistration.v1beta1.Rule")
- proto.RegisterType((*RuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1beta1.RuleWithOperations")
- proto.RegisterType((*ServiceReference)(nil), "k8s.io.api.admissionregistration.v1beta1.ServiceReference")
- proto.RegisterType((*ValidatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration")
- proto.RegisterType((*ValidatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingWebhookConfigurationList")
- proto.RegisterType((*Webhook)(nil), "k8s.io.api.admissionregistration.v1beta1.Webhook")
- proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.api.admissionregistration.v1beta1.WebhookClientConfig")
-}
-func (m *MutatingWebhookConfiguration) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *MutatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- if len(m.Webhooks) > 0 {
- for _, msg := range m.Webhooks {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *MutatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *MutatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n2, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *Rule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Rule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.APIVersions) > 0 {
- for _, s := range m.APIVersions {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *RuleWithOperations) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RuleWithOperations) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Operations) > 0 {
- for _, s := range m.Operations {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Rule.Size()))
- n3, err := m.Rule.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *ServiceReference) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i += copy(dAtA[i:], m.Namespace)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- if m.Path != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Path)))
- i += copy(dAtA[i:], *m.Path)
- }
- return i, nil
-}
-
-func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ValidatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- if len(m.Webhooks) > 0 {
- for _, msg := range m.Webhooks {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ValidatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n5, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *Webhook) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Webhook) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ClientConfig.Size()))
- n6, err := m.ClientConfig.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if m.FailurePolicy != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
- i += copy(dAtA[i:], *m.FailurePolicy)
- }
- if m.NamespaceSelector != nil {
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NamespaceSelector.Size()))
- n7, err := m.NamespaceSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- }
- return i, nil
-}
-
-func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Service != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Service.Size()))
- n8, err := m.Service.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- }
- if m.CABundle != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle)))
- i += copy(dAtA[i:], m.CABundle)
- }
- if m.URL != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.URL)))
- i += copy(dAtA[i:], *m.URL)
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *MutatingWebhookConfiguration) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Webhooks) > 0 {
- for _, e := range m.Webhooks {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *MutatingWebhookConfigurationList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *Rule) Size() (n int) {
- var l int
- _ = l
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.APIVersions) > 0 {
- for _, s := range m.APIVersions {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RuleWithOperations) Size() (n int) {
- var l int
- _ = l
- if len(m.Operations) > 0 {
- for _, s := range m.Operations {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.Rule.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ServiceReference) Size() (n int) {
- var l int
- _ = l
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if m.Path != nil {
- l = len(*m.Path)
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ValidatingWebhookConfiguration) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Webhooks) > 0 {
- for _, e := range m.Webhooks {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ValidatingWebhookConfigurationList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *Webhook) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.ClientConfig.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.FailurePolicy != nil {
- l = len(*m.FailurePolicy)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.NamespaceSelector != nil {
- l = m.NamespaceSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *WebhookClientConfig) Size() (n int) {
- var l int
- _ = l
- if m.Service != nil {
- l = m.Service.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.CABundle != nil {
- l = len(m.CABundle)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.URL != nil {
- l = len(*m.URL)
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *MutatingWebhookConfiguration) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&MutatingWebhookConfiguration{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Webhooks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Webhooks), "Webhook", "Webhook", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *MutatingWebhookConfigurationList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&MutatingWebhookConfigurationList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "MutatingWebhookConfiguration", "MutatingWebhookConfiguration", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Rule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Rule{`,
- `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
- `APIVersions:` + fmt.Sprintf("%v", this.APIVersions) + `,`,
- `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RuleWithOperations) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RuleWithOperations{`,
- `Operations:` + fmt.Sprintf("%v", this.Operations) + `,`,
- `Rule:` + strings.Replace(strings.Replace(this.Rule.String(), "Rule", "Rule", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ServiceReference) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ServiceReference{`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Path:` + valueToStringGenerated(this.Path) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ValidatingWebhookConfiguration) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ValidatingWebhookConfiguration{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Webhooks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Webhooks), "Webhook", "Webhook", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ValidatingWebhookConfigurationList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ValidatingWebhookConfigurationList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ValidatingWebhookConfiguration", "ValidatingWebhookConfiguration", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Webhook) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Webhook{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`,
- `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + `,`,
- `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
- `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *WebhookClientConfig) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&WebhookClientConfig{`,
- `Service:` + strings.Replace(fmt.Sprintf("%v", this.Service), "ServiceReference", "ServiceReference", 1) + `,`,
- `CABundle:` + valueToStringGenerated(this.CABundle) + `,`,
- `URL:` + valueToStringGenerated(this.URL) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: MutatingWebhookConfiguration: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: MutatingWebhookConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Webhooks", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Webhooks = append(m.Webhooks, Webhook{})
- if err := m.Webhooks[len(m.Webhooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *MutatingWebhookConfigurationList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: MutatingWebhookConfigurationList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: MutatingWebhookConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, MutatingWebhookConfiguration{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Rule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Rule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIVersions", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIVersions = append(m.APIVersions, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RuleWithOperations) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RuleWithOperations: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RuleWithOperations: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Operations = append(m.Operations, OperationType(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Rule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ServiceReference) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Namespace = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.Path = &s
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ValidatingWebhookConfiguration: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ValidatingWebhookConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Webhooks", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Webhooks = append(m.Webhooks, Webhook{})
- if err := m.Webhooks[len(m.Webhooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ValidatingWebhookConfigurationList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ValidatingWebhookConfigurationList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ValidatingWebhookConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ValidatingWebhookConfiguration{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Webhook) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Webhook: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Webhook: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ClientConfig", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ClientConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, RuleWithOperations{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := FailurePolicyType(dAtA[iNdEx:postIndex])
- m.FailurePolicy = &s
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NamespaceSelector == nil {
- m.NamespaceSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *WebhookClientConfig) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: WebhookClientConfig: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: WebhookClientConfig: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Service == nil {
- m.Service = &ServiceReference{}
- }
- if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType)
- }
- var byteLen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- byteLen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if byteLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + byteLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...)
- if m.CABundle == nil {
- m.CABundle = []byte{}
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.URL = &s
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 916 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0xcf, 0x6f, 0x1b, 0x45,
- 0x14, 0xf6, 0xd6, 0x8e, 0x6c, 0x8f, 0x6d, 0xd1, 0x0c, 0x20, 0x99, 0xa8, 0xda, 0xb5, 0x7c, 0x40,
- 0x96, 0x50, 0x76, 0x71, 0x8a, 0x10, 0x42, 0x20, 0x94, 0x8d, 0x54, 0x88, 0x94, 0xb4, 0x66, 0x02,
- 0xad, 0x84, 0x38, 0x30, 0x5e, 0xbf, 0xd8, 0x83, 0xf7, 0x97, 0x66, 0x66, 0xdd, 0xe6, 0x86, 0xc4,
- 0x3f, 0x80, 0xc4, 0x1f, 0xc1, 0x5f, 0xc1, 0x3d, 0x37, 0x7a, 0x41, 0xf4, 0xb4, 0x22, 0xcb, 0x99,
- 0x03, 0xd7, 0x9e, 0xd0, 0xce, 0xae, 0xbd, 0x76, 0x1c, 0xa7, 0xee, 0x85, 0x03, 0x37, 0xcf, 0xf7,
- 0xde, 0xf7, 0xbd, 0xf7, 0x3d, 0xbf, 0xb7, 0xe8, 0xcb, 0xe9, 0x47, 0xc2, 0x64, 0x81, 0x35, 0x8d,
- 0x86, 0xc0, 0x7d, 0x90, 0x20, 0xac, 0x19, 0xf8, 0xa3, 0x80, 0x5b, 0x79, 0x80, 0x86, 0xcc, 0xa2,
- 0x23, 0x8f, 0x09, 0xc1, 0x02, 0x9f, 0xc3, 0x98, 0x09, 0xc9, 0xa9, 0x64, 0x81, 0x6f, 0xcd, 0xfa,
- 0x43, 0x90, 0xb4, 0x6f, 0x8d, 0xc1, 0x07, 0x4e, 0x25, 0x8c, 0xcc, 0x90, 0x07, 0x32, 0xc0, 0xbd,
- 0x8c, 0x69, 0xd2, 0x90, 0x99, 0x37, 0x32, 0xcd, 0x9c, 0xb9, 0xb7, 0x3f, 0x66, 0x72, 0x12, 0x0d,
- 0x4d, 0x27, 0xf0, 0xac, 0x71, 0x30, 0x0e, 0x2c, 0x25, 0x30, 0x8c, 0xce, 0xd5, 0x4b, 0x3d, 0xd4,
- 0xaf, 0x4c, 0x78, 0xaf, 0xbb, 0xd4, 0x92, 0x13, 0x70, 0xb0, 0x66, 0x6b, 0xc5, 0xf7, 0x4e, 0x8b,
- 0x1c, 0x78, 0x26, 0xc1, 0x4f, 0x6b, 0x8b, 0x7d, 0x1a, 0x32, 0x01, 0x7c, 0x06, 0xdc, 0x0a, 0xa7,
- 0xe3, 0x34, 0x26, 0x56, 0x13, 0x36, 0x79, 0xd9, 0xfb, 0xa0, 0x90, 0xf3, 0xa8, 0x33, 0x61, 0x3e,
- 0xf0, 0x8b, 0x42, 0xc3, 0x03, 0x49, 0x6f, 0x6a, 0xc2, 0xda, 0xc4, 0xe2, 0x91, 0x2f, 0x99, 0x07,
- 0x6b, 0x84, 0x0f, 0x5f, 0x45, 0x10, 0xce, 0x04, 0x3c, 0xba, 0xc6, 0xbb, 0xbf, 0x89, 0x17, 0x49,
- 0xe6, 0x5a, 0xcc, 0x97, 0x42, 0xf2, 0xeb, 0xa4, 0xee, 0xef, 0x1a, 0xba, 0x77, 0x1a, 0x49, 0x2a,
- 0x99, 0x3f, 0x7e, 0x02, 0xc3, 0x49, 0x10, 0x4c, 0x8f, 0x02, 0xff, 0x9c, 0x8d, 0xa3, 0xec, 0xef,
- 0xc1, 0xdf, 0xa1, 0x5a, 0xea, 0x6c, 0x44, 0x25, 0x6d, 0x6b, 0x1d, 0xad, 0xd7, 0x38, 0x78, 0xdf,
- 0x2c, 0xfe, 0xd3, 0x45, 0x21, 0x33, 0x9c, 0x8e, 0x53, 0x40, 0x98, 0x69, 0xb6, 0x39, 0xeb, 0x9b,
- 0x8f, 0x86, 0xdf, 0x83, 0x23, 0x4f, 0x41, 0x52, 0x1b, 0x5f, 0xc6, 0x46, 0x29, 0x89, 0x0d, 0x54,
- 0x60, 0x64, 0xa1, 0x8a, 0xcf, 0x50, 0x2d, 0xaf, 0x2c, 0xda, 0x77, 0x3a, 0xe5, 0x5e, 0xe3, 0xa0,
- 0x6f, 0x6e, 0xbb, 0x35, 0x66, 0xce, 0xb4, 0x2b, 0x69, 0x09, 0x52, 0x7b, 0x9a, 0x0b, 0x75, 0xff,
- 0xd6, 0x50, 0xe7, 0x36, 0x5f, 0x27, 0x4c, 0x48, 0xfc, 0xed, 0x9a, 0x37, 0x73, 0x3b, 0x6f, 0x29,
- 0x5b, 0x39, 0xbb, 0x9b, 0x3b, 0xab, 0xcd, 0x91, 0x25, 0x5f, 0x53, 0xb4, 0xc3, 0x24, 0x78, 0x73,
- 0x53, 0x0f, 0xb6, 0x37, 0x75, 0x5b, 0xe3, 0x76, 0x2b, 0x2f, 0xb9, 0x73, 0x9c, 0x8a, 0x93, 0xac,
- 0x46, 0xf7, 0x67, 0x0d, 0x55, 0x48, 0xe4, 0x02, 0x7e, 0x0f, 0xd5, 0x69, 0xc8, 0x3e, 0xe7, 0x41,
- 0x14, 0x8a, 0xb6, 0xd6, 0x29, 0xf7, 0xea, 0x76, 0x2b, 0x89, 0x8d, 0xfa, 0xe1, 0xe0, 0x38, 0x03,
- 0x49, 0x11, 0xc7, 0x7d, 0xd4, 0xa0, 0x21, 0x7b, 0x0c, 0x5c, 0x2d, 0xbe, 0x6a, 0xb4, 0x6e, 0xbf,
- 0x91, 0xc4, 0x46, 0xe3, 0x70, 0x70, 0x3c, 0x87, 0xc9, 0x72, 0x4e, 0xaa, 0xcf, 0x41, 0x04, 0x11,
- 0x77, 0x40, 0xb4, 0xcb, 0x85, 0x3e, 0x99, 0x83, 0xa4, 0x88, 0x77, 0x7f, 0xd1, 0x10, 0x4e, 0xbb,
- 0x7a, 0xc2, 0xe4, 0xe4, 0x51, 0x08, 0x99, 0x03, 0x81, 0x3f, 0x43, 0x28, 0x58, 0xbc, 0xf2, 0x26,
- 0x0d, 0xb5, 0x1f, 0x0b, 0xf4, 0x65, 0x6c, 0xb4, 0x16, 0xaf, 0xaf, 0x2e, 0x42, 0x20, 0x4b, 0x14,
- 0x3c, 0x40, 0x15, 0x1e, 0xb9, 0xd0, 0xbe, 0xb3, 0xf6, 0xa7, 0xbd, 0x62, 0xb2, 0x69, 0x33, 0x76,
- 0x33, 0x9f, 0xa0, 0x1a, 0x18, 0x51, 0x4a, 0xdd, 0x1f, 0x35, 0x74, 0xf7, 0x0c, 0xf8, 0x8c, 0x39,
- 0x40, 0xe0, 0x1c, 0x38, 0xf8, 0x0e, 0x60, 0x0b, 0xd5, 0x7d, 0xea, 0x81, 0x08, 0xa9, 0x03, 0x6a,
- 0x41, 0xea, 0xf6, 0x6e, 0xce, 0xad, 0x3f, 0x9c, 0x07, 0x48, 0x91, 0x83, 0x3b, 0xa8, 0x92, 0x3e,
- 0x54, 0x5f, 0xf5, 0xa2, 0x4e, 0x9a, 0x4b, 0x54, 0x04, 0xdf, 0x43, 0x95, 0x90, 0xca, 0x49, 0xbb,
- 0xac, 0x32, 0x6a, 0x69, 0x74, 0x40, 0xe5, 0x84, 0x28, 0xb4, 0xfb, 0x87, 0x86, 0xf4, 0xc7, 0xd4,
- 0x65, 0xa3, 0xff, 0xdd, 0x3d, 0xfe, 0xa3, 0xa1, 0xee, 0xed, 0xce, 0xfe, 0x83, 0x8b, 0xf4, 0x56,
- 0x2f, 0xf2, 0x8b, 0xed, 0x6d, 0xdd, 0xde, 0xfa, 0x86, 0x9b, 0xfc, 0xad, 0x8c, 0xaa, 0x79, 0xfa,
- 0x62, 0x33, 0xb4, 0x8d, 0x9b, 0xf1, 0x14, 0x35, 0x1d, 0x97, 0x81, 0x2f, 0x33, 0xe9, 0x7c, 0xb7,
- 0x3f, 0x7d, 0xed, 0xd1, 0x1f, 0x2d, 0x89, 0xd8, 0x6f, 0xe5, 0x85, 0x9a, 0xcb, 0x28, 0x59, 0x29,
- 0x84, 0x29, 0xda, 0x49, 0x4f, 0x20, 0xbb, 0xe6, 0xc6, 0xc1, 0x27, 0xaf, 0x77, 0x4d, 0xab, 0xa7,
- 0x5d, 0x4c, 0x22, 0x8d, 0x09, 0x92, 0x29, 0xe3, 0x13, 0xd4, 0x3a, 0xa7, 0xcc, 0x8d, 0x38, 0x0c,
- 0x02, 0x97, 0x39, 0x17, 0xed, 0x8a, 0x1a, 0xc3, 0xbb, 0x49, 0x6c, 0xb4, 0x1e, 0x2c, 0x07, 0x5e,
- 0xc6, 0xc6, 0xee, 0x0a, 0xa0, 0x4e, 0x7f, 0x95, 0x8c, 0x9f, 0xa1, 0xdd, 0xc5, 0xc9, 0x9d, 0x81,
- 0x0b, 0x8e, 0x0c, 0x78, 0x7b, 0x47, 0x8d, 0xeb, 0xfe, 0x96, 0xdb, 0x42, 0x87, 0xe0, 0xce, 0xa9,
- 0xf6, 0xdb, 0x49, 0x6c, 0xec, 0x3e, 0xbc, 0xae, 0x48, 0xd6, 0x8b, 0x74, 0x7f, 0xd5, 0xd0, 0x9b,
- 0x37, 0x8c, 0x19, 0x53, 0x54, 0x15, 0xd9, 0xc7, 0x23, 0xdf, 0xda, 0x8f, 0xb7, 0x1f, 0xe2, 0xf5,
- 0xaf, 0x8e, 0xdd, 0x48, 0x62, 0xa3, 0x3a, 0x47, 0xe7, 0xba, 0xb8, 0x87, 0x6a, 0x0e, 0xb5, 0x23,
- 0x7f, 0x94, 0x7f, 0xf6, 0x9a, 0x76, 0x33, 0xdd, 0xf2, 0xa3, 0xc3, 0x0c, 0x23, 0x8b, 0x28, 0x7e,
- 0x07, 0x95, 0x23, 0xee, 0xe6, 0x5f, 0x98, 0x6a, 0x12, 0x1b, 0xe5, 0xaf, 0xc9, 0x09, 0x49, 0x31,
- 0x7b, 0xff, 0xf2, 0x4a, 0x2f, 0x3d, 0xbf, 0xd2, 0x4b, 0x2f, 0xae, 0xf4, 0xd2, 0x0f, 0x89, 0xae,
- 0x5d, 0x26, 0xba, 0xf6, 0x3c, 0xd1, 0xb5, 0x17, 0x89, 0xae, 0xfd, 0x99, 0xe8, 0xda, 0x4f, 0x7f,
- 0xe9, 0xa5, 0x6f, 0xaa, 0x79, 0x6b, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x78, 0x57, 0x76, 0x28,
- 0x10, 0x0a, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto
deleted file mode 100644
index 8dcde259c..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.admissionregistration.v1beta1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
-message MutatingWebhookConfiguration {
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Webhooks is a list of webhooks and the affected resources and operations.
- // +optional
- // +patchMergeKey=name
- // +patchStrategy=merge
- repeated Webhook Webhooks = 2;
-}
-
-// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
-message MutatingWebhookConfigurationList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // List of MutatingWebhookConfiguration.
- repeated MutatingWebhookConfiguration items = 2;
-}
-
-// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
-// to make sure that all the tuple expansions are valid.
-message Rule {
- // APIGroups is the API groups the resources belong to. '*' is all groups.
- // If '*' is present, the length of the slice must be one.
- // Required.
- repeated string apiGroups = 1;
-
- // APIVersions is the API versions the resources belong to. '*' is all versions.
- // If '*' is present, the length of the slice must be one.
- // Required.
- repeated string apiVersions = 2;
-
- // Resources is a list of resources this rule applies to.
- //
- // For example:
- // 'pods' means pods.
- // 'pods/log' means the log subresource of pods.
- // '*' means all resources, but not subresources.
- // 'pods/*' means all subresources of pods.
- // '*/scale' means all scale subresources.
- // '*/*' means all resources and their subresources.
- //
- // If wildcard is present, the validation rule will ensure resources do not
- // overlap with each other.
- //
- // Depending on the enclosing object, subresources might not be allowed.
- // Required.
- repeated string resources = 3;
-}
-
-// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
-// sure that all the tuple expansions are valid.
-message RuleWithOperations {
- // Operations is the operations the admission hook cares about - CREATE, UPDATE, or *
- // for all operations.
- // If '*' is present, the length of the slice must be one.
- // Required.
- repeated string operations = 1;
-
- // Rule is embedded, it describes other criteria of the rule, like
- // APIGroups, APIVersions, Resources, etc.
- optional Rule rule = 2;
-}
-
-// ServiceReference holds a reference to Service.legacy.k8s.io
-message ServiceReference {
- // `namespace` is the namespace of the service.
- // Required
- optional string namespace = 1;
-
- // `name` is the name of the service.
- // Required
- optional string name = 2;
-
- // `path` is an optional URL path which will be sent in any request to
- // this service.
- // +optional
- optional string path = 3;
-}
-
-// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
-message ValidatingWebhookConfiguration {
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Webhooks is a list of webhooks and the affected resources and operations.
- // +optional
- // +patchMergeKey=name
- // +patchStrategy=merge
- repeated Webhook Webhooks = 2;
-}
-
-// ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
-message ValidatingWebhookConfigurationList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // List of ValidatingWebhookConfiguration.
- repeated ValidatingWebhookConfiguration items = 2;
-}
-
-// Webhook describes an admission webhook and the resources and operations it applies to.
-message Webhook {
- // The name of the admission webhook.
- // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
- // "imagepolicy" is the name of the webhook, and kubernetes.io is the name
- // of the organization.
- // Required.
- optional string name = 1;
-
- // ClientConfig defines how to communicate with the hook.
- // Required
- optional WebhookClientConfig clientConfig = 2;
-
- // Rules describes what operations on what resources/subresources the webhook cares about.
- // The webhook cares about an operation if it matches _any_ Rule.
- repeated RuleWithOperations rules = 3;
-
- // FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
- // allowed values are Ignore or Fail. Defaults to Ignore.
- // +optional
- optional string failurePolicy = 4;
-
- // NamespaceSelector decides whether to run the webhook on an object based
- // on whether the namespace for that object matches the selector. If the
- // object itself is a namespace, the matching is performed on
- // object.metadata.labels. If the object is another cluster scoped resource,
- // it never skips the webhook.
- //
- // For example, to run the webhook on any objects whose namespace is not
- // associated with "runlevel" of "0" or "1"; you will set the selector as
- // follows:
- // "namespaceSelector": {
- // "matchExpressions": [
- // {
- // "key": "runlevel",
- // "operator": "NotIn",
- // "values": [
- // "0",
- // "1"
- // ]
- // }
- // ]
- // }
- //
- // If instead you want to only run the webhook on any objects whose
- // namespace is associated with the "environment" of "prod" or "staging";
- // you will set the selector as follows:
- // "namespaceSelector": {
- // "matchExpressions": [
- // {
- // "key": "environment",
- // "operator": "In",
- // "values": [
- // "prod",
- // "staging"
- // ]
- // }
- // ]
- // }
- //
- // See
- // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
- // for more examples of label selectors.
- //
- // Default to the empty LabelSelector, which matches everything.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 5;
-}
-
-// WebhookClientConfig contains the information to make a TLS
-// connection with the webhook
-message WebhookClientConfig {
- // `url` gives the location of the webhook, in standard URL form
- // (`[scheme://]host:port/path`). Exactly one of `url` or `service`
- // must be specified.
- //
- // The `host` should not refer to a service running in the cluster; use
- // the `service` field instead. The host might be resolved via external
- // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
- // in-cluster DNS as that would be a layering violation). `host` may
- // also be an IP address.
- //
- // Please note that using `localhost` or `127.0.0.1` as a `host` is
- // risky unless you take great care to run this webhook on all hosts
- // which run an apiserver which might need to make calls to this
- // webhook. Such installs are likely to be non-portable, i.e., not easy
- // to turn up in a new cluster.
- //
- // The scheme must be "https"; the URL must begin with "https://".
- //
- // A path is optional, and if present may be any string permissible in
- // a URL. You may use the path to pass an arbitrary string to the
- // webhook, for example, a cluster identifier.
- //
- // Attempting to use a user or basic auth e.g. "user:password@" is not
- // allowed. Fragments ("#...") and query parameters ("?...") are not
- // allowed, either.
- //
- // +optional
- optional string url = 3;
-
- // `service` is a reference to the service for this webhook. Either
- // `service` or `url` must be specified.
- //
- // If the webhook is running within the cluster, then you should use `service`.
- //
- // If there is only one port open for the service, that port will be
- // used. If there are multiple ports open, port 443 will be used if it
- // is open, otherwise it is an error.
- //
- // +optional
- optional ServiceReference service = 1;
-
- // `caBundle` is a PEM encoded CA bundle which will be used to validate
- // the webhook's server certificate.
- // Required.
- optional bytes caBundle = 2;
-}
-
diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/register.go b/vendor/k8s.io/api/admissionregistration/v1beta1/register.go
deleted file mode 100644
index d126da9fb..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1beta1/register.go
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-const GroupName = "admissionregistration.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &ValidatingWebhookConfiguration{},
- &ValidatingWebhookConfigurationList{},
- &MutatingWebhookConfiguration{},
- &MutatingWebhookConfigurationList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/types.go b/vendor/k8s.io/api/admissionregistration/v1beta1/types.go
deleted file mode 100644
index be5c1339a..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1beta1/types.go
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
-// to make sure that all the tuple expansions are valid.
-type Rule struct {
- // APIGroups is the API groups the resources belong to. '*' is all groups.
- // If '*' is present, the length of the slice must be one.
- // Required.
- APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,1,rep,name=apiGroups"`
-
- // APIVersions is the API versions the resources belong to. '*' is all versions.
- // If '*' is present, the length of the slice must be one.
- // Required.
- APIVersions []string `json:"apiVersions,omitempty" protobuf:"bytes,2,rep,name=apiVersions"`
-
- // Resources is a list of resources this rule applies to.
- //
- // For example:
- // 'pods' means pods.
- // 'pods/log' means the log subresource of pods.
- // '*' means all resources, but not subresources.
- // 'pods/*' means all subresources of pods.
- // '*/scale' means all scale subresources.
- // '*/*' means all resources and their subresources.
- //
- // If wildcard is present, the validation rule will ensure resources do not
- // overlap with each other.
- //
- // Depending on the enclosing object, subresources might not be allowed.
- // Required.
- Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`
-}
-
-type FailurePolicyType string
-
-const (
- // Ignore means that an error calling the webhook is ignored.
- Ignore FailurePolicyType = "Ignore"
- // Fail means that an error calling the webhook causes the admission to fail.
- Fail FailurePolicyType = "Fail"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
-type ValidatingWebhookConfiguration struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- // Webhooks is a list of webhooks and the affected resources and operations.
- // +optional
- // +patchMergeKey=name
- // +patchStrategy=merge
- Webhooks []Webhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
-type ValidatingWebhookConfigurationList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- // List of ValidatingWebhookConfiguration.
- Items []ValidatingWebhookConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
-type MutatingWebhookConfiguration struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- // Webhooks is a list of webhooks and the affected resources and operations.
- // +optional
- // +patchMergeKey=name
- // +patchStrategy=merge
- Webhooks []Webhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
-type MutatingWebhookConfigurationList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- // List of MutatingWebhookConfiguration.
- Items []MutatingWebhookConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// Webhook describes an admission webhook and the resources and operations it applies to.
-type Webhook struct {
- // The name of the admission webhook.
- // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
- // "imagepolicy" is the name of the webhook, and kubernetes.io is the name
- // of the organization.
- // Required.
- Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
-
- // ClientConfig defines how to communicate with the hook.
- // Required
- ClientConfig WebhookClientConfig `json:"clientConfig" protobuf:"bytes,2,opt,name=clientConfig"`
-
- // Rules describes what operations on what resources/subresources the webhook cares about.
- // The webhook cares about an operation if it matches _any_ Rule.
- Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"`
-
- // FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
- // allowed values are Ignore or Fail. Defaults to Ignore.
- // +optional
- FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"`
-
- // NamespaceSelector decides whether to run the webhook on an object based
- // on whether the namespace for that object matches the selector. If the
- // object itself is a namespace, the matching is performed on
- // object.metadata.labels. If the object is another cluster scoped resource,
- // it never skips the webhook.
- //
- // For example, to run the webhook on any objects whose namespace is not
- // associated with "runlevel" of "0" or "1"; you will set the selector as
- // follows:
- // "namespaceSelector": {
- // "matchExpressions": [
- // {
- // "key": "runlevel",
- // "operator": "NotIn",
- // "values": [
- // "0",
- // "1"
- // ]
- // }
- // ]
- // }
- //
- // If instead you want to only run the webhook on any objects whose
- // namespace is associated with the "environment" of "prod" or "staging";
- // you will set the selector as follows:
- // "namespaceSelector": {
- // "matchExpressions": [
- // {
- // "key": "environment",
- // "operator": "In",
- // "values": [
- // "prod",
- // "staging"
- // ]
- // }
- // ]
- // }
- //
- // See
- // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
- // for more examples of label selectors.
- //
- // Default to the empty LabelSelector, which matches everything.
- // +optional
- NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,5,opt,name=namespaceSelector"`
-}
-
-// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
-// sure that all the tuple expansions are valid.
-type RuleWithOperations struct {
- // Operations is the operations the admission hook cares about - CREATE, UPDATE, or *
- // for all operations.
- // If '*' is present, the length of the slice must be one.
- // Required.
- Operations []OperationType `json:"operations,omitempty" protobuf:"bytes,1,rep,name=operations,casttype=OperationType"`
- // Rule is embedded, it describes other criteria of the rule, like
- // APIGroups, APIVersions, Resources, etc.
- Rule `json:",inline" protobuf:"bytes,2,opt,name=rule"`
-}
-
-type OperationType string
-
-// The constants should be kept in sync with those defined in k8s.io/kubernetes/pkg/admission/interface.go.
-const (
- OperationAll OperationType = "*"
- Create OperationType = "CREATE"
- Update OperationType = "UPDATE"
- Delete OperationType = "DELETE"
- Connect OperationType = "CONNECT"
-)
-
-// WebhookClientConfig contains the information to make a TLS
-// connection with the webhook
-type WebhookClientConfig struct {
- // `url` gives the location of the webhook, in standard URL form
- // (`[scheme://]host:port/path`). Exactly one of `url` or `service`
- // must be specified.
- //
- // The `host` should not refer to a service running in the cluster; use
- // the `service` field instead. The host might be resolved via external
- // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
- // in-cluster DNS as that would be a layering violation). `host` may
- // also be an IP address.
- //
- // Please note that using `localhost` or `127.0.0.1` as a `host` is
- // risky unless you take great care to run this webhook on all hosts
- // which run an apiserver which might need to make calls to this
- // webhook. Such installs are likely to be non-portable, i.e., not easy
- // to turn up in a new cluster.
- //
- // The scheme must be "https"; the URL must begin with "https://".
- //
- // A path is optional, and if present may be any string permissible in
- // a URL. You may use the path to pass an arbitrary string to the
- // webhook, for example, a cluster identifier.
- //
- // Attempting to use a user or basic auth e.g. "user:password@" is not
- // allowed. Fragments ("#...") and query parameters ("?...") are not
- // allowed, either.
- //
- // +optional
- URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"`
-
- // `service` is a reference to the service for this webhook. Either
- // `service` or `url` must be specified.
- //
- // If the webhook is running within the cluster, then you should use `service`.
- //
- // If there is only one port open for the service, that port will be
- // used. If there are multiple ports open, port 443 will be used if it
- // is open, otherwise it is an error.
- //
- // +optional
- Service *ServiceReference `json:"service" protobuf:"bytes,1,opt,name=service"`
-
- // `caBundle` is a PEM encoded CA bundle which will be used to validate
- // the webhook's server certificate.
- // Required.
- CABundle []byte `json:"caBundle" protobuf:"bytes,2,opt,name=caBundle"`
-}
-
-// ServiceReference holds a reference to Service.legacy.k8s.io
-type ServiceReference struct {
- // `namespace` is the namespace of the service.
- // Required
- Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"`
- // `name` is the name of the service.
- // Required
- Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
-
- // `path` is an optional URL path which will be sent in any request to
- // this service.
- // +optional
- Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"`
-}
diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 6dd18e973..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_MutatingWebhookConfiguration = map[string]string{
- "": "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.",
- "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
- "webhooks": "Webhooks is a list of webhooks and the affected resources and operations.",
-}
-
-func (MutatingWebhookConfiguration) SwaggerDoc() map[string]string {
- return map_MutatingWebhookConfiguration
-}
-
-var map_MutatingWebhookConfigurationList = map[string]string{
- "": "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
- "items": "List of MutatingWebhookConfiguration.",
-}
-
-func (MutatingWebhookConfigurationList) SwaggerDoc() map[string]string {
- return map_MutatingWebhookConfigurationList
-}
-
-var map_Rule = map[string]string{
- "": "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.",
- "apiGroups": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.",
- "apiVersions": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.",
- "resources": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.",
-}
-
-func (Rule) SwaggerDoc() map[string]string {
- return map_Rule
-}
-
-var map_RuleWithOperations = map[string]string{
- "": "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.",
- "operations": "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.",
-}
-
-func (RuleWithOperations) SwaggerDoc() map[string]string {
- return map_RuleWithOperations
-}
-
-var map_ServiceReference = map[string]string{
- "": "ServiceReference holds a reference to Service.legacy.k8s.io",
- "namespace": "`namespace` is the namespace of the service. Required",
- "name": "`name` is the name of the service. Required",
- "path": "`path` is an optional URL path which will be sent in any request to this service.",
-}
-
-func (ServiceReference) SwaggerDoc() map[string]string {
- return map_ServiceReference
-}
-
-var map_ValidatingWebhookConfiguration = map[string]string{
- "": "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.",
- "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
- "webhooks": "Webhooks is a list of webhooks and the affected resources and operations.",
-}
-
-func (ValidatingWebhookConfiguration) SwaggerDoc() map[string]string {
- return map_ValidatingWebhookConfiguration
-}
-
-var map_ValidatingWebhookConfigurationList = map[string]string{
- "": "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
- "items": "List of ValidatingWebhookConfiguration.",
-}
-
-func (ValidatingWebhookConfigurationList) SwaggerDoc() map[string]string {
- return map_ValidatingWebhookConfigurationList
-}
-
-var map_Webhook = map[string]string{
- "": "Webhook describes an admission webhook and the resources and operations it applies to.",
- "name": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.",
- "clientConfig": "ClientConfig defines how to communicate with the hook. Required",
- "rules": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.",
- "failurePolicy": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.",
- "namespaceSelector": "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.",
-}
-
-func (Webhook) SwaggerDoc() map[string]string {
- return map_Webhook
-}
-
-var map_WebhookClientConfig = map[string]string{
- "": "WebhookClientConfig contains the information to make a TLS connection with the webhook",
- "url": "`url` gives the location of the webhook, in standard URL form (`[scheme://]host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.",
- "service": "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.\n\nIf there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error.",
- "caBundle": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. Required.",
-}
-
-func (WebhookClientConfig) SwaggerDoc() map[string]string {
- return map_WebhookClientConfig
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index d8345d209..000000000
--- a/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,317 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MutatingWebhookConfiguration) DeepCopyInto(out *MutatingWebhookConfiguration) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Webhooks != nil {
- in, out := &in.Webhooks, &out.Webhooks
- *out = make([]Webhook, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfiguration.
-func (in *MutatingWebhookConfiguration) DeepCopy() *MutatingWebhookConfiguration {
- if in == nil {
- return nil
- }
- out := new(MutatingWebhookConfiguration)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *MutatingWebhookConfiguration) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MutatingWebhookConfigurationList) DeepCopyInto(out *MutatingWebhookConfigurationList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]MutatingWebhookConfiguration, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfigurationList.
-func (in *MutatingWebhookConfigurationList) DeepCopy() *MutatingWebhookConfigurationList {
- if in == nil {
- return nil
- }
- out := new(MutatingWebhookConfigurationList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Rule) DeepCopyInto(out *Rule) {
- *out = *in
- if in.APIGroups != nil {
- in, out := &in.APIGroups, &out.APIGroups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.APIVersions != nil {
- in, out := &in.APIVersions, &out.APIVersions
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Resources != nil {
- in, out := &in.Resources, &out.Resources
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
-func (in *Rule) DeepCopy() *Rule {
- if in == nil {
- return nil
- }
- out := new(Rule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RuleWithOperations) DeepCopyInto(out *RuleWithOperations) {
- *out = *in
- if in.Operations != nil {
- in, out := &in.Operations, &out.Operations
- *out = make([]OperationType, len(*in))
- copy(*out, *in)
- }
- in.Rule.DeepCopyInto(&out.Rule)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleWithOperations.
-func (in *RuleWithOperations) DeepCopy() *RuleWithOperations {
- if in == nil {
- return nil
- }
- out := new(RuleWithOperations)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ServiceReference) DeepCopyInto(out *ServiceReference) {
- *out = *in
- if in.Path != nil {
- in, out := &in.Path, &out.Path
- if *in == nil {
- *out = nil
- } else {
- *out = new(string)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference.
-func (in *ServiceReference) DeepCopy() *ServiceReference {
- if in == nil {
- return nil
- }
- out := new(ServiceReference)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ValidatingWebhookConfiguration) DeepCopyInto(out *ValidatingWebhookConfiguration) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Webhooks != nil {
- in, out := &in.Webhooks, &out.Webhooks
- *out = make([]Webhook, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfiguration.
-func (in *ValidatingWebhookConfiguration) DeepCopy() *ValidatingWebhookConfiguration {
- if in == nil {
- return nil
- }
- out := new(ValidatingWebhookConfiguration)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ValidatingWebhookConfiguration) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ValidatingWebhookConfigurationList) DeepCopyInto(out *ValidatingWebhookConfigurationList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ValidatingWebhookConfiguration, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfigurationList.
-func (in *ValidatingWebhookConfigurationList) DeepCopy() *ValidatingWebhookConfigurationList {
- if in == nil {
- return nil
- }
- out := new(ValidatingWebhookConfigurationList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Webhook) DeepCopyInto(out *Webhook) {
- *out = *in
- in.ClientConfig.DeepCopyInto(&out.ClientConfig)
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]RuleWithOperations, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.FailurePolicy != nil {
- in, out := &in.FailurePolicy, &out.FailurePolicy
- if *in == nil {
- *out = nil
- } else {
- *out = new(FailurePolicyType)
- **out = **in
- }
- }
- if in.NamespaceSelector != nil {
- in, out := &in.NamespaceSelector, &out.NamespaceSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webhook.
-func (in *Webhook) DeepCopy() *Webhook {
- if in == nil {
- return nil
- }
- out := new(Webhook)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) {
- *out = *in
- if in.URL != nil {
- in, out := &in.URL, &out.URL
- if *in == nil {
- *out = nil
- } else {
- *out = new(string)
- **out = **in
- }
- }
- if in.Service != nil {
- in, out := &in.Service, &out.Service
- if *in == nil {
- *out = nil
- } else {
- *out = new(ServiceReference)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.CABundle != nil {
- in, out := &in.CABundle, &out.CABundle
- *out = make([]byte, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig.
-func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig {
- if in == nil {
- return nil
- }
- out := new(WebhookClientConfig)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/apps/v1/doc.go b/vendor/k8s.io/api/apps/v1/doc.go
deleted file mode 100644
index 1d66c2223..000000000
--- a/vendor/k8s.io/api/apps/v1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-package v1 // import "k8s.io/api/apps/v1"
diff --git a/vendor/k8s.io/api/apps/v1/generated.pb.go b/vendor/k8s.io/api/apps/v1/generated.pb.go
deleted file mode 100644
index 02123859b..000000000
--- a/vendor/k8s.io/api/apps/v1/generated.pb.go
+++ /dev/null
@@ -1,6945 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/apps/v1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/apps/v1/generated.proto
-
- It has these top-level messages:
- ControllerRevision
- ControllerRevisionList
- DaemonSet
- DaemonSetCondition
- DaemonSetList
- DaemonSetSpec
- DaemonSetStatus
- DaemonSetUpdateStrategy
- Deployment
- DeploymentCondition
- DeploymentList
- DeploymentSpec
- DeploymentStatus
- DeploymentStrategy
- ReplicaSet
- ReplicaSetCondition
- ReplicaSetList
- ReplicaSetSpec
- ReplicaSetStatus
- RollingUpdateDaemonSet
- RollingUpdateDeployment
- RollingUpdateStatefulSetStrategy
- StatefulSet
- StatefulSetCondition
- StatefulSetList
- StatefulSetSpec
- StatefulSetStatus
- StatefulSetUpdateStrategy
-*/
-package v1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *ControllerRevision) Reset() { *m = ControllerRevision{} }
-func (*ControllerRevision) ProtoMessage() {}
-func (*ControllerRevision) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} }
-func (*ControllerRevisionList) ProtoMessage() {}
-func (*ControllerRevisionList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *DaemonSet) Reset() { *m = DaemonSet{} }
-func (*DaemonSet) ProtoMessage() {}
-func (*DaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} }
-func (*DaemonSetCondition) ProtoMessage() {}
-func (*DaemonSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *DaemonSetList) Reset() { *m = DaemonSetList{} }
-func (*DaemonSetList) ProtoMessage() {}
-func (*DaemonSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} }
-func (*DaemonSetSpec) ProtoMessage() {}
-func (*DaemonSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} }
-func (*DaemonSetStatus) ProtoMessage() {}
-func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} }
-func (*DaemonSetUpdateStrategy) ProtoMessage() {}
-func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func (m *Deployment) Reset() { *m = Deployment{} }
-func (*Deployment) ProtoMessage() {}
-func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} }
-func (*DeploymentCondition) ProtoMessage() {}
-func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
-
-func (m *DeploymentList) Reset() { *m = DeploymentList{} }
-func (*DeploymentList) ProtoMessage() {}
-func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} }
-func (*DeploymentSpec) ProtoMessage() {}
-func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
-
-func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} }
-func (*DeploymentStatus) ProtoMessage() {}
-func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
-
-func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} }
-func (*DeploymentStrategy) ProtoMessage() {}
-func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
-
-func (m *ReplicaSet) Reset() { *m = ReplicaSet{} }
-func (*ReplicaSet) ProtoMessage() {}
-func (*ReplicaSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
-
-func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} }
-func (*ReplicaSetCondition) ProtoMessage() {}
-func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
-
-func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} }
-func (*ReplicaSetList) ProtoMessage() {}
-func (*ReplicaSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
-
-func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} }
-func (*ReplicaSetSpec) ProtoMessage() {}
-func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
-
-func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} }
-func (*ReplicaSetStatus) ProtoMessage() {}
-func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
-
-func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} }
-func (*RollingUpdateDaemonSet) ProtoMessage() {}
-func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} }
-
-func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} }
-func (*RollingUpdateDeployment) ProtoMessage() {}
-func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{20}
-}
-
-func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} }
-func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {}
-func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{21}
-}
-
-func (m *StatefulSet) Reset() { *m = StatefulSet{} }
-func (*StatefulSet) ProtoMessage() {}
-func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} }
-
-func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} }
-func (*StatefulSetCondition) ProtoMessage() {}
-func (*StatefulSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} }
-
-func (m *StatefulSetList) Reset() { *m = StatefulSetList{} }
-func (*StatefulSetList) ProtoMessage() {}
-func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} }
-
-func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} }
-func (*StatefulSetSpec) ProtoMessage() {}
-func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} }
-
-func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} }
-func (*StatefulSetStatus) ProtoMessage() {}
-func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} }
-
-func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} }
-func (*StatefulSetUpdateStrategy) ProtoMessage() {}
-func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{27}
-}
-
-func init() {
- proto.RegisterType((*ControllerRevision)(nil), "k8s.io.api.apps.v1.ControllerRevision")
- proto.RegisterType((*ControllerRevisionList)(nil), "k8s.io.api.apps.v1.ControllerRevisionList")
- proto.RegisterType((*DaemonSet)(nil), "k8s.io.api.apps.v1.DaemonSet")
- proto.RegisterType((*DaemonSetCondition)(nil), "k8s.io.api.apps.v1.DaemonSetCondition")
- proto.RegisterType((*DaemonSetList)(nil), "k8s.io.api.apps.v1.DaemonSetList")
- proto.RegisterType((*DaemonSetSpec)(nil), "k8s.io.api.apps.v1.DaemonSetSpec")
- proto.RegisterType((*DaemonSetStatus)(nil), "k8s.io.api.apps.v1.DaemonSetStatus")
- proto.RegisterType((*DaemonSetUpdateStrategy)(nil), "k8s.io.api.apps.v1.DaemonSetUpdateStrategy")
- proto.RegisterType((*Deployment)(nil), "k8s.io.api.apps.v1.Deployment")
- proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.api.apps.v1.DeploymentCondition")
- proto.RegisterType((*DeploymentList)(nil), "k8s.io.api.apps.v1.DeploymentList")
- proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.api.apps.v1.DeploymentSpec")
- proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.api.apps.v1.DeploymentStatus")
- proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.api.apps.v1.DeploymentStrategy")
- proto.RegisterType((*ReplicaSet)(nil), "k8s.io.api.apps.v1.ReplicaSet")
- proto.RegisterType((*ReplicaSetCondition)(nil), "k8s.io.api.apps.v1.ReplicaSetCondition")
- proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.api.apps.v1.ReplicaSetList")
- proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.api.apps.v1.ReplicaSetSpec")
- proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.api.apps.v1.ReplicaSetStatus")
- proto.RegisterType((*RollingUpdateDaemonSet)(nil), "k8s.io.api.apps.v1.RollingUpdateDaemonSet")
- proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.api.apps.v1.RollingUpdateDeployment")
- proto.RegisterType((*RollingUpdateStatefulSetStrategy)(nil), "k8s.io.api.apps.v1.RollingUpdateStatefulSetStrategy")
- proto.RegisterType((*StatefulSet)(nil), "k8s.io.api.apps.v1.StatefulSet")
- proto.RegisterType((*StatefulSetCondition)(nil), "k8s.io.api.apps.v1.StatefulSetCondition")
- proto.RegisterType((*StatefulSetList)(nil), "k8s.io.api.apps.v1.StatefulSetList")
- proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.api.apps.v1.StatefulSetSpec")
- proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.api.apps.v1.StatefulSetStatus")
- proto.RegisterType((*StatefulSetUpdateStrategy)(nil), "k8s.io.api.apps.v1.StatefulSetUpdateStrategy")
-}
-func (m *ControllerRevision) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ControllerRevision) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Data.Size()))
- n2, err := m.Data.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
- return i, nil
-}
-
-func (m *ControllerRevisionList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ControllerRevisionList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n3, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DaemonSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n5, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n6, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- return i, nil
-}
-
-func (m *DaemonSetCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n7, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *DaemonSetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n8, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DaemonSetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Selector != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n9, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- }
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n10, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size()))
- n11, err := m.UpdateStrategy.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
- }
- return i, nil
-}
-
-func (m *DaemonSetStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentNumberScheduled))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberMisscheduled))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredNumberScheduled))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberReady))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedNumberScheduled))
- dAtA[i] = 0x38
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberAvailable))
- dAtA[i] = 0x40
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberUnavailable))
- if m.CollisionCount != nil {
- dAtA[i] = 0x48
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x52
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DaemonSetUpdateStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.RollingUpdate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
- n12, err := m.RollingUpdate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- }
- return i, nil
-}
-
-func (m *Deployment) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Deployment) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n13, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n14, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n14
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n15, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n15
- return i, nil
-}
-
-func (m *DeploymentCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
- n16, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n16
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n17, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n17
- return i, nil
-}
-
-func (m *DeploymentList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n18, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n18
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DeploymentSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Replicas != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n19, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n19
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n20, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n20
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Strategy.Size()))
- n21, err := m.Strategy.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n21
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
- }
- dAtA[i] = 0x38
- i++
- if m.Paused {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if m.ProgressDeadlineSeconds != nil {
- dAtA[i] = 0x48
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.ProgressDeadlineSeconds))
- }
- return i, nil
-}
-
-func (m *DeploymentStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UnavailableReplicas))
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x38
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
- if m.CollisionCount != nil {
- dAtA[i] = 0x40
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
- }
- return i, nil
-}
-
-func (m *DeploymentStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.RollingUpdate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
- n22, err := m.RollingUpdate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n22
- }
- return i, nil
-}
-
-func (m *ReplicaSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n23, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n23
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n24, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n24
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n25, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n25
- return i, nil
-}
-
-func (m *ReplicaSetCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n26, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n26
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *ReplicaSetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n27, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n27
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ReplicaSetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Replicas != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n28, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n28
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n29, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n29
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
- return i, nil
-}
-
-func (m *ReplicaSetStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.FullyLabeledReplicas))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RollingUpdateDaemonSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollingUpdateDaemonSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
- n30, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n30
- }
- return i, nil
-}
-
-func (m *RollingUpdateDeployment) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollingUpdateDeployment) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
- n31, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n31
- }
- if m.MaxSurge != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxSurge.Size()))
- n32, err := m.MaxSurge.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n32
- }
- return i, nil
-}
-
-func (m *RollingUpdateStatefulSetStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollingUpdateStatefulSetStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Partition != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Partition))
- }
- return i, nil
-}
-
-func (m *StatefulSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n33, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n33
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n34, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n34
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n35, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n35
- return i, nil
-}
-
-func (m *StatefulSetCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n36, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n36
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *StatefulSetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n37, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n37
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *StatefulSetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Replicas != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n38, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n38
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n39, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n39
- if len(m.VolumeClaimTemplates) > 0 {
- for _, msg := range m.VolumeClaimTemplates {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName)))
- i += copy(dAtA[i:], m.ServiceName)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodManagementPolicy)))
- i += copy(dAtA[i:], m.PodManagementPolicy)
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size()))
- n40, err := m.UpdateStrategy.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n40
- if m.RevisionHistoryLimit != nil {
- dAtA[i] = 0x40
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
- }
- return i, nil
-}
-
-func (m *StatefulSetStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.CurrentRevision)))
- i += copy(dAtA[i:], m.CurrentRevision)
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.UpdateRevision)))
- i += copy(dAtA[i:], m.UpdateRevision)
- if m.CollisionCount != nil {
- dAtA[i] = 0x48
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x52
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *StatefulSetUpdateStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.RollingUpdate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
- n41, err := m.RollingUpdate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n41
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *ControllerRevision) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Data.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.Revision))
- return n
-}
-
-func (m *ControllerRevisionList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DaemonSet) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DaemonSetCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DaemonSetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DaemonSetSpec) Size() (n int) {
- var l int
- _ = l
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.UpdateStrategy.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
- }
- return n
-}
-
-func (m *DaemonSetStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.CurrentNumberScheduled))
- n += 1 + sovGenerated(uint64(m.NumberMisscheduled))
- n += 1 + sovGenerated(uint64(m.DesiredNumberScheduled))
- n += 1 + sovGenerated(uint64(m.NumberReady))
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.UpdatedNumberScheduled))
- n += 1 + sovGenerated(uint64(m.NumberAvailable))
- n += 1 + sovGenerated(uint64(m.NumberUnavailable))
- if m.CollisionCount != nil {
- n += 1 + sovGenerated(uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DaemonSetUpdateStrategy) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.RollingUpdate != nil {
- l = m.RollingUpdate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *Deployment) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeploymentCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastUpdateTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeploymentList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeploymentSpec) Size() (n int) {
- var l int
- _ = l
- if m.Replicas != nil {
- n += 1 + sovGenerated(uint64(*m.Replicas))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Strategy.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
- }
- n += 2
- if m.ProgressDeadlineSeconds != nil {
- n += 1 + sovGenerated(uint64(*m.ProgressDeadlineSeconds))
- }
- return n
-}
-
-func (m *DeploymentStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.Replicas))
- n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
- n += 1 + sovGenerated(uint64(m.AvailableReplicas))
- n += 1 + sovGenerated(uint64(m.UnavailableReplicas))
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- n += 1 + sovGenerated(uint64(m.ReadyReplicas))
- if m.CollisionCount != nil {
- n += 1 + sovGenerated(uint64(*m.CollisionCount))
- }
- return n
-}
-
-func (m *DeploymentStrategy) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.RollingUpdate != nil {
- l = m.RollingUpdate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ReplicaSet) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ReplicaSetCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ReplicaSetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ReplicaSetSpec) Size() (n int) {
- var l int
- _ = l
- if m.Replicas != nil {
- n += 1 + sovGenerated(uint64(*m.Replicas))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.MinReadySeconds))
- return n
-}
-
-func (m *ReplicaSetStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- n += 1 + sovGenerated(uint64(m.FullyLabeledReplicas))
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.ReadyReplicas))
- n += 1 + sovGenerated(uint64(m.AvailableReplicas))
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RollingUpdateDaemonSet) Size() (n int) {
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- l = m.MaxUnavailable.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *RollingUpdateDeployment) Size() (n int) {
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- l = m.MaxUnavailable.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.MaxSurge != nil {
- l = m.MaxSurge.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *RollingUpdateStatefulSetStrategy) Size() (n int) {
- var l int
- _ = l
- if m.Partition != nil {
- n += 1 + sovGenerated(uint64(*m.Partition))
- }
- return n
-}
-
-func (m *StatefulSet) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *StatefulSetCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *StatefulSetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *StatefulSetSpec) Size() (n int) {
- var l int
- _ = l
- if m.Replicas != nil {
- n += 1 + sovGenerated(uint64(*m.Replicas))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.VolumeClaimTemplates) > 0 {
- for _, e := range m.VolumeClaimTemplates {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = len(m.ServiceName)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.PodManagementPolicy)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.UpdateStrategy.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.RevisionHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
- }
- return n
-}
-
-func (m *StatefulSetStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.Replicas))
- n += 1 + sovGenerated(uint64(m.ReadyReplicas))
- n += 1 + sovGenerated(uint64(m.CurrentReplicas))
- n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
- l = len(m.CurrentRevision)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.UpdateRevision)
- n += 1 + l + sovGenerated(uint64(l))
- if m.CollisionCount != nil {
- n += 1 + sovGenerated(uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *StatefulSetUpdateStrategy) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.RollingUpdate != nil {
- l = m.RollingUpdate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *ControllerRevision) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ControllerRevision{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Data:` + strings.Replace(strings.Replace(this.Data.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`,
- `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ControllerRevisionList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ControllerRevisionList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ControllerRevision", "ControllerRevision", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSet{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DaemonSet", "DaemonSet", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetSpec{`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "DaemonSetUpdateStrategy", "DaemonSetUpdateStrategy", 1), `&`, ``, 1) + `,`,
- `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
- `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetStatus{`,
- `CurrentNumberScheduled:` + fmt.Sprintf("%v", this.CurrentNumberScheduled) + `,`,
- `NumberMisscheduled:` + fmt.Sprintf("%v", this.NumberMisscheduled) + `,`,
- `DesiredNumberScheduled:` + fmt.Sprintf("%v", this.DesiredNumberScheduled) + `,`,
- `NumberReady:` + fmt.Sprintf("%v", this.NumberReady) + `,`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `UpdatedNumberScheduled:` + fmt.Sprintf("%v", this.UpdatedNumberScheduled) + `,`,
- `NumberAvailable:` + fmt.Sprintf("%v", this.NumberAvailable) + `,`,
- `NumberUnavailable:` + fmt.Sprintf("%v", this.NumberUnavailable) + `,`,
- `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DaemonSetCondition", "DaemonSetCondition", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetUpdateStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetUpdateStrategy{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDaemonSet", "RollingUpdateDaemonSet", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Deployment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Deployment{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Deployment", "Deployment", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentSpec{`,
- `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`,
- `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
- `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
- `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`,
- `ProgressDeadlineSeconds:` + valueToStringGenerated(this.ProgressDeadlineSeconds) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentStatus{`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
- `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
- `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + `,`,
- `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
- `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentStrategy{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDeployment", "RollingUpdateDeployment", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSet{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicaSetSpec", "ReplicaSetSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicaSetStatus", "ReplicaSetStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ReplicaSet", "ReplicaSet", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetSpec{`,
- `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetStatus{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `FullyLabeledReplicas:` + fmt.Sprintf("%v", this.FullyLabeledReplicas) + `,`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
- `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ReplicaSetCondition", "ReplicaSetCondition", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollingUpdateDaemonSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollingUpdateDaemonSet{`,
- `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollingUpdateDeployment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollingUpdateDeployment{`,
- `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollingUpdateStatefulSetStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollingUpdateStatefulSetStrategy{`,
- `Partition:` + valueToStringGenerated(this.Partition) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSet{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StatefulSet", "StatefulSet", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetSpec{`,
- `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_api_core_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`,
- `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
- `PodManagementPolicy:` + fmt.Sprintf("%v", this.PodManagementPolicy) + `,`,
- `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "StatefulSetUpdateStrategy", "StatefulSetUpdateStrategy", 1), `&`, ``, 1) + `,`,
- `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetStatus{`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
- `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
- `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
- `CurrentRevision:` + fmt.Sprintf("%v", this.CurrentRevision) + `,`,
- `UpdateRevision:` + fmt.Sprintf("%v", this.UpdateRevision) + `,`,
- `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "StatefulSetCondition", "StatefulSetCondition", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetUpdateStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetUpdateStrategy{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateStatefulSetStrategy", "RollingUpdateStatefulSetStrategy", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *ControllerRevision) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ControllerRevision: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ControllerRevision: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
- }
- m.Revision = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Revision |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ControllerRevisionList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ControllerRevisionList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ControllerRevisionList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ControllerRevision{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DaemonSetConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, DaemonSet{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
- }
- m.MinReadySeconds = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MinReadySeconds |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RevisionHistoryLimit = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentNumberScheduled", wireType)
- }
- m.CurrentNumberScheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.CurrentNumberScheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberMisscheduled", wireType)
- }
- m.NumberMisscheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberMisscheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DesiredNumberScheduled", wireType)
- }
- m.DesiredNumberScheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.DesiredNumberScheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberReady", wireType)
- }
- m.NumberReady = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberReady |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedNumberScheduled", wireType)
- }
- m.UpdatedNumberScheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UpdatedNumberScheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberAvailable", wireType)
- }
- m.NumberAvailable = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberAvailable |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberUnavailable", wireType)
- }
- m.NumberUnavailable = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberUnavailable |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CollisionCount = &v
- case 10:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, DaemonSetCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetUpdateStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetUpdateStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DaemonSetUpdateStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollingUpdate == nil {
- m.RollingUpdate = &RollingUpdateDaemonSet{}
- }
- if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Deployment) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Deployment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DeploymentConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Deployment{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Replicas = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
- }
- m.MinReadySeconds = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MinReadySeconds |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RevisionHistoryLimit = &v
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Paused = bool(v != 0)
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ProgressDeadlineSeconds", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ProgressDeadlineSeconds = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
- }
- m.UpdatedReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
- }
- m.AvailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.AvailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UnavailableReplicas", wireType)
- }
- m.UnavailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UnavailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, DeploymentCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
- }
- m.ReadyReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ReadyReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CollisionCount = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DeploymentStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollingUpdate == nil {
- m.RollingUpdate = &RollingUpdateDeployment{}
- }
- if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = ReplicaSetConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ReplicaSet{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Replicas = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
- }
- m.MinReadySeconds = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MinReadySeconds |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field FullyLabeledReplicas", wireType)
- }
- m.FullyLabeledReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.FullyLabeledReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
- }
- m.ReadyReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ReadyReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
- }
- m.AvailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.AvailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, ReplicaSetCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollingUpdateDaemonSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollingUpdateDaemonSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollingUpdateDaemonSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxUnavailable == nil {
- m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollingUpdateDeployment) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollingUpdateDeployment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollingUpdateDeployment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxUnavailable == nil {
- m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxSurge", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxSurge == nil {
- m.MaxSurge = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxSurge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollingUpdateStatefulSetStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollingUpdateStatefulSetStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollingUpdateStatefulSetStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Partition = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = StatefulSetConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, StatefulSet{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Replicas = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field VolumeClaimTemplates", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.VolumeClaimTemplates = append(m.VolumeClaimTemplates, k8s_io_api_core_v1.PersistentVolumeClaim{})
- if err := m.VolumeClaimTemplates[len(m.VolumeClaimTemplates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ServiceName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PodManagementPolicy", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PodManagementPolicy = PodManagementPolicyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RevisionHistoryLimit = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
- }
- m.ReadyReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ReadyReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
- }
- m.CurrentReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.CurrentReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
- }
- m.UpdatedReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentRevision", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CurrentRevision = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdateRevision", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UpdateRevision = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CollisionCount = &v
- case 10:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, StatefulSetCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetUpdateStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetUpdateStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = StatefulSetUpdateStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollingUpdate == nil {
- m.RollingUpdate = &RollingUpdateStatefulSetStrategy{}
- }
- if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apps/v1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 2051 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x24, 0x47,
- 0x1d, 0x75, 0xcf, 0x87, 0x3d, 0x2e, 0xaf, 0xed, 0xdd, 0xb2, 0xb1, 0x27, 0xbb, 0x64, 0x66, 0x19,
- 0x60, 0xe3, 0xcd, 0x66, 0x7b, 0xf0, 0x66, 0x13, 0xa1, 0x2c, 0x02, 0x79, 0xc6, 0x21, 0x84, 0x78,
- 0x6c, 0x53, 0x5e, 0xef, 0x61, 0x09, 0x12, 0x35, 0x33, 0xb5, 0xe3, 0x8e, 0xfb, 0x4b, 0xdd, 0xd5,
- 0xc3, 0x8e, 0xb8, 0x20, 0x24, 0x38, 0x71, 0xe0, 0x3f, 0x41, 0x08, 0xc1, 0x0d, 0x45, 0x88, 0xcb,
- 0x5e, 0x90, 0x22, 0x2e, 0xe4, 0x64, 0xb1, 0x93, 0x13, 0x42, 0x39, 0x72, 0xc9, 0x05, 0x54, 0xd5,
- 0xd5, 0xdf, 0xd5, 0x9e, 0xb1, 0x37, 0xeb, 0xa0, 0x68, 0x6f, 0x9e, 0xaa, 0xf7, 0x7b, 0xfd, 0xab,
- 0xaa, 0x5f, 0xd5, 0x7b, 0x5d, 0x6d, 0x70, 0xef, 0xf8, 0xdb, 0xae, 0xaa, 0x59, 0xcd, 0x63, 0xaf,
- 0x4b, 0x1c, 0x93, 0x50, 0xe2, 0x36, 0x87, 0xc4, 0xec, 0x5b, 0x4e, 0x53, 0x74, 0x60, 0x5b, 0x6b,
- 0x62, 0xdb, 0x76, 0x9b, 0xc3, 0xcd, 0xe6, 0x80, 0x98, 0xc4, 0xc1, 0x94, 0xf4, 0x55, 0xdb, 0xb1,
- 0xa8, 0x05, 0xa1, 0x8f, 0x51, 0xb1, 0xad, 0xa9, 0x0c, 0xa3, 0x0e, 0x37, 0xaf, 0xde, 0x1e, 0x68,
- 0xf4, 0xc8, 0xeb, 0xaa, 0x3d, 0xcb, 0x68, 0x0e, 0xac, 0x81, 0xd5, 0xe4, 0xd0, 0xae, 0xf7, 0x88,
- 0xff, 0xe2, 0x3f, 0xf8, 0x5f, 0x3e, 0xc5, 0xd5, 0x46, 0xec, 0x31, 0x3d, 0xcb, 0x21, 0x92, 0xc7,
- 0x5c, 0xbd, 0x19, 0xc3, 0xd8, 0x96, 0xae, 0xf5, 0x46, 0xcd, 0xe1, 0x66, 0x97, 0x50, 0x9c, 0x85,
- 0xde, 0x8d, 0xa0, 0x06, 0xee, 0x1d, 0x69, 0x26, 0x71, 0x46, 0x4d, 0xfb, 0x78, 0xc0, 0x1a, 0xdc,
- 0xa6, 0x41, 0x28, 0x96, 0x3d, 0xa0, 0x99, 0x17, 0xe5, 0x78, 0x26, 0xd5, 0x0c, 0x92, 0x09, 0x78,
- 0x73, 0x52, 0x80, 0xdb, 0x3b, 0x22, 0x06, 0xce, 0xc4, 0xbd, 0x9e, 0x17, 0xe7, 0x51, 0x4d, 0x6f,
- 0x6a, 0x26, 0x75, 0xa9, 0x93, 0x0e, 0x6a, 0xfc, 0x47, 0x01, 0xb0, 0x6d, 0x99, 0xd4, 0xb1, 0x74,
- 0x9d, 0x38, 0x88, 0x0c, 0x35, 0x57, 0xb3, 0x4c, 0xf8, 0x53, 0x50, 0x61, 0xe3, 0xe9, 0x63, 0x8a,
- 0xab, 0xca, 0x75, 0x65, 0x63, 0xe1, 0xce, 0xb7, 0xd4, 0x68, 0x3d, 0x42, 0x7a, 0xd5, 0x3e, 0x1e,
- 0xb0, 0x06, 0x57, 0x65, 0x68, 0x75, 0xb8, 0xa9, 0xee, 0x75, 0x3f, 0x20, 0x3d, 0xda, 0x21, 0x14,
- 0xb7, 0xe0, 0x93, 0x93, 0xfa, 0xcc, 0xf8, 0xa4, 0x0e, 0xa2, 0x36, 0x14, 0xb2, 0xc2, 0x3d, 0x50,
- 0xe2, 0xec, 0x05, 0xce, 0x7e, 0x3b, 0x97, 0x5d, 0x0c, 0x5a, 0x45, 0xf8, 0x67, 0x6f, 0x3f, 0xa6,
- 0xc4, 0x64, 0xe9, 0xb5, 0x2e, 0x09, 0xea, 0xd2, 0x36, 0xa6, 0x18, 0x71, 0x22, 0xf8, 0x1a, 0xa8,
- 0x38, 0x22, 0xfd, 0x6a, 0xf1, 0xba, 0xb2, 0x51, 0x6c, 0x5d, 0x16, 0xa8, 0x4a, 0x30, 0x2c, 0x14,
- 0x22, 0x1a, 0x7f, 0x55, 0xc0, 0x5a, 0x76, 0xdc, 0x3b, 0x9a, 0x4b, 0xe1, 0xfb, 0x99, 0xb1, 0xab,
- 0xd3, 0x8d, 0x9d, 0x45, 0xf3, 0x91, 0x87, 0x0f, 0x0e, 0x5a, 0x62, 0xe3, 0x7e, 0x0f, 0x94, 0x35,
- 0x4a, 0x0c, 0xb7, 0x5a, 0xb8, 0x5e, 0xdc, 0x58, 0xb8, 0x73, 0x43, 0xcd, 0x96, 0xb9, 0x9a, 0x4d,
- 0xac, 0xb5, 0x28, 0x28, 0xcb, 0xef, 0xb2, 0x60, 0xe4, 0x73, 0x34, 0xfe, 0xab, 0x80, 0xf9, 0x6d,
- 0x4c, 0x0c, 0xcb, 0x3c, 0x20, 0xf4, 0x02, 0x16, 0xad, 0x0d, 0x4a, 0xae, 0x4d, 0x7a, 0x62, 0xd1,
- 0xbe, 0x26, 0xcb, 0x3d, 0x4c, 0xe7, 0xc0, 0x26, 0xbd, 0x68, 0xa1, 0xd8, 0x2f, 0xc4, 0x83, 0xe1,
- 0x7b, 0x60, 0xd6, 0xa5, 0x98, 0x7a, 0x2e, 0x5f, 0xa6, 0x85, 0x3b, 0x5f, 0x3f, 0x9d, 0x86, 0x43,
- 0x5b, 0x4b, 0x82, 0x68, 0xd6, 0xff, 0x8d, 0x04, 0x45, 0xe3, 0x5f, 0x05, 0x00, 0x43, 0x6c, 0xdb,
- 0x32, 0xfb, 0x1a, 0x65, 0xf5, 0xfb, 0x16, 0x28, 0xd1, 0x91, 0x4d, 0xf8, 0x34, 0xcc, 0xb7, 0x6e,
- 0x04, 0x59, 0xdc, 0x1f, 0xd9, 0xe4, 0xb3, 0x93, 0xfa, 0x5a, 0x36, 0x82, 0xf5, 0x20, 0x1e, 0x03,
- 0x77, 0xc2, 0xfc, 0x0a, 0x3c, 0xfa, 0x6e, 0xf2, 0xd1, 0x9f, 0x9d, 0xd4, 0x25, 0xe7, 0x8a, 0x1a,
- 0x32, 0x25, 0x13, 0x84, 0x43, 0x00, 0x75, 0xec, 0xd2, 0xfb, 0x0e, 0x36, 0x5d, 0xff, 0x49, 0x9a,
- 0x41, 0xc4, 0xc8, 0x5f, 0x9d, 0x6e, 0x79, 0x58, 0x44, 0xeb, 0xaa, 0xc8, 0x02, 0xee, 0x64, 0xd8,
- 0x90, 0xe4, 0x09, 0xf0, 0x06, 0x98, 0x75, 0x08, 0x76, 0x2d, 0xb3, 0x5a, 0xe2, 0xa3, 0x08, 0x27,
- 0x10, 0xf1, 0x56, 0x24, 0x7a, 0xe1, 0x4d, 0x30, 0x67, 0x10, 0xd7, 0xc5, 0x03, 0x52, 0x2d, 0x73,
- 0xe0, 0xb2, 0x00, 0xce, 0x75, 0xfc, 0x66, 0x14, 0xf4, 0x37, 0x7e, 0xaf, 0x80, 0xc5, 0x70, 0xe6,
- 0x2e, 0x60, 0xab, 0xb4, 0x92, 0x5b, 0xe5, 0xe5, 0x53, 0xeb, 0x24, 0x67, 0x87, 0x7c, 0x58, 0x8c,
- 0xe5, 0xcc, 0x8a, 0x10, 0xfe, 0x04, 0x54, 0x5c, 0xa2, 0x93, 0x1e, 0xb5, 0x1c, 0x91, 0xf3, 0xeb,
- 0x53, 0xe6, 0x8c, 0xbb, 0x44, 0x3f, 0x10, 0xa1, 0xad, 0x4b, 0x2c, 0xe9, 0xe0, 0x17, 0x0a, 0x29,
- 0xe1, 0x8f, 0x40, 0x85, 0x12, 0xc3, 0xd6, 0x31, 0x25, 0x62, 0x9b, 0x24, 0xea, 0x9b, 0x95, 0x0b,
- 0x23, 0xdb, 0xb7, 0xfa, 0xf7, 0x05, 0x8c, 0x6f, 0x94, 0x70, 0x1e, 0x82, 0x56, 0x14, 0xd2, 0xc0,
- 0x63, 0xb0, 0xe4, 0xd9, 0x7d, 0x86, 0xa4, 0xec, 0xe8, 0x1e, 0x8c, 0x44, 0xf9, 0xdc, 0x3a, 0x75,
- 0x42, 0x0e, 0x13, 0x21, 0xad, 0x35, 0xf1, 0x80, 0xa5, 0x64, 0x3b, 0x4a, 0x51, 0xc3, 0x2d, 0xb0,
- 0x6c, 0x68, 0x26, 0x22, 0xb8, 0x3f, 0x3a, 0x20, 0x3d, 0xcb, 0xec, 0xbb, 0xbc, 0x80, 0xca, 0xad,
- 0x75, 0x41, 0xb0, 0xdc, 0x49, 0x76, 0xa3, 0x34, 0x1e, 0xee, 0x80, 0xd5, 0xe0, 0x9c, 0xfd, 0x81,
- 0xe6, 0x52, 0xcb, 0x19, 0xed, 0x68, 0x86, 0x46, 0xab, 0xb3, 0x9c, 0xa7, 0x3a, 0x3e, 0xa9, 0xaf,
- 0x22, 0x49, 0x3f, 0x92, 0x46, 0x35, 0x7e, 0x33, 0x0b, 0x96, 0x53, 0xa7, 0x01, 0x7c, 0x00, 0xd6,
- 0x7a, 0x9e, 0xe3, 0x10, 0x93, 0xee, 0x7a, 0x46, 0x97, 0x38, 0x07, 0xbd, 0x23, 0xd2, 0xf7, 0x74,
- 0xd2, 0xe7, 0x2b, 0x5a, 0x6e, 0xd5, 0x44, 0xae, 0x6b, 0x6d, 0x29, 0x0a, 0xe5, 0x44, 0xc3, 0x1f,
- 0x02, 0x68, 0xf2, 0xa6, 0x8e, 0xe6, 0xba, 0x21, 0x67, 0x81, 0x73, 0x86, 0x1b, 0x70, 0x37, 0x83,
- 0x40, 0x92, 0x28, 0x96, 0x63, 0x9f, 0xb8, 0x9a, 0x43, 0xfa, 0xe9, 0x1c, 0x8b, 0xc9, 0x1c, 0xb7,
- 0xa5, 0x28, 0x94, 0x13, 0x0d, 0xdf, 0x00, 0x0b, 0xfe, 0xd3, 0xf8, 0x9c, 0x8b, 0xc5, 0x59, 0x11,
- 0x64, 0x0b, 0xbb, 0x51, 0x17, 0x8a, 0xe3, 0xd8, 0xd0, 0xac, 0xae, 0x4b, 0x9c, 0x21, 0xe9, 0xbf,
- 0xe3, 0x7b, 0x00, 0x26, 0x94, 0x65, 0x2e, 0x94, 0xe1, 0xd0, 0xf6, 0x32, 0x08, 0x24, 0x89, 0x62,
- 0x43, 0xf3, 0xab, 0x26, 0x33, 0xb4, 0xd9, 0xe4, 0xd0, 0x0e, 0xa5, 0x28, 0x94, 0x13, 0xcd, 0x6a,
- 0xcf, 0x4f, 0x79, 0x6b, 0x88, 0x35, 0x1d, 0x77, 0x75, 0x52, 0x9d, 0x4b, 0xd6, 0xde, 0x6e, 0xb2,
- 0x1b, 0xa5, 0xf1, 0xf0, 0x1d, 0x70, 0xc5, 0x6f, 0x3a, 0x34, 0x71, 0x48, 0x52, 0xe1, 0x24, 0x2f,
- 0x09, 0x92, 0x2b, 0xbb, 0x69, 0x00, 0xca, 0xc6, 0xc0, 0xb7, 0xc0, 0x52, 0xcf, 0xd2, 0x75, 0x5e,
- 0x8f, 0x6d, 0xcb, 0x33, 0x69, 0x75, 0x9e, 0xb3, 0x40, 0xb6, 0x87, 0xda, 0x89, 0x1e, 0x94, 0x42,
- 0xc2, 0x87, 0x00, 0xf4, 0x02, 0x39, 0x70, 0xab, 0x20, 0x5f, 0xe8, 0xb3, 0x3a, 0x14, 0x09, 0x70,
- 0xd8, 0xe4, 0xa2, 0x18, 0x5b, 0xe3, 0x43, 0x05, 0xac, 0xe7, 0xec, 0x71, 0xf8, 0xbd, 0x84, 0xea,
- 0xdd, 0x4a, 0xa9, 0xde, 0xb5, 0x9c, 0xb0, 0x98, 0xf4, 0xf5, 0xc0, 0x22, 0xf3, 0x1d, 0x9a, 0x39,
- 0xf0, 0x21, 0xe2, 0x04, 0x7b, 0x55, 0x96, 0x3b, 0x8a, 0x03, 0xa3, 0x63, 0xf8, 0xca, 0xf8, 0xa4,
- 0xbe, 0x98, 0xe8, 0x43, 0x49, 0xce, 0xc6, 0x2f, 0x0b, 0x00, 0x6c, 0x13, 0x5b, 0xb7, 0x46, 0x06,
- 0x31, 0x2f, 0xc2, 0xb5, 0x6c, 0x27, 0x5c, 0x4b, 0x43, 0xba, 0x10, 0x61, 0x3e, 0xb9, 0xb6, 0x65,
- 0x27, 0x65, 0x5b, 0xbe, 0x31, 0x81, 0xe7, 0x74, 0xdf, 0xf2, 0x8f, 0x22, 0x58, 0x89, 0xc0, 0x91,
- 0x71, 0xb9, 0x97, 0x58, 0xc2, 0x57, 0x52, 0x4b, 0xb8, 0x2e, 0x09, 0x79, 0x6e, 0xce, 0xe5, 0xf3,
- 0x77, 0x10, 0xf0, 0x03, 0xb0, 0xc4, 0xac, 0x8a, 0x5f, 0x08, 0xdc, 0x08, 0xcd, 0x9e, 0xd9, 0x08,
- 0x85, 0x42, 0xb6, 0x93, 0x60, 0x42, 0x29, 0xe6, 0x1c, 0xe3, 0x35, 0xf7, 0xbc, 0x8d, 0x57, 0xe3,
- 0x0f, 0x0a, 0x58, 0x8a, 0x96, 0xe9, 0x02, 0x6c, 0x52, 0x3b, 0x69, 0x93, 0x6a, 0xa7, 0xd7, 0x65,
- 0x8e, 0x4f, 0xfa, 0x7b, 0x29, 0x9e, 0x35, 0x37, 0x4a, 0x1b, 0xec, 0x85, 0xca, 0xd6, 0xb5, 0x1e,
- 0x76, 0x85, 0xac, 0x5e, 0xf2, 0x5f, 0xa6, 0xfc, 0x36, 0x14, 0xf6, 0x26, 0x2c, 0x55, 0xe1, 0xf9,
- 0x5a, 0xaa, 0xe2, 0xe7, 0x63, 0xa9, 0xee, 0x83, 0x8a, 0x1b, 0x98, 0xa9, 0x12, 0xa7, 0xbc, 0x31,
- 0x69, 0x3b, 0x0b, 0x1f, 0x15, 0xb2, 0x86, 0x0e, 0x2a, 0x64, 0x92, 0x79, 0xa7, 0xf2, 0x17, 0xe9,
- 0x9d, 0xd8, 0x16, 0xb6, 0xb1, 0xe7, 0x92, 0x3e, 0xaf, 0xfb, 0x4a, 0xb4, 0x85, 0xf7, 0x79, 0x2b,
- 0x12, 0xbd, 0xf0, 0x10, 0xac, 0xdb, 0x8e, 0x35, 0x70, 0x88, 0xeb, 0x6e, 0x13, 0xdc, 0xd7, 0x35,
- 0x93, 0x04, 0x03, 0xf0, 0x55, 0xef, 0xda, 0xf8, 0xa4, 0xbe, 0xbe, 0x2f, 0x87, 0xa0, 0xbc, 0xd8,
- 0xc6, 0x9f, 0x4b, 0xe0, 0x72, 0xfa, 0x44, 0xcc, 0x31, 0x22, 0xca, 0xb9, 0x8c, 0xc8, 0x6b, 0xb1,
- 0x12, 0xf5, 0x5d, 0x5a, 0xec, 0x9d, 0x3f, 0x53, 0xa6, 0x5b, 0x60, 0x59, 0x18, 0x8f, 0xa0, 0x53,
- 0x58, 0xb1, 0x70, 0x79, 0x0e, 0x93, 0xdd, 0x28, 0x8d, 0x67, 0xf6, 0x22, 0x72, 0x0d, 0x01, 0x49,
- 0x29, 0x69, 0x2f, 0xb6, 0xd2, 0x00, 0x94, 0x8d, 0x81, 0x1d, 0xb0, 0xe2, 0x99, 0x59, 0x2a, 0xbf,
- 0x5c, 0xae, 0x09, 0xaa, 0x95, 0xc3, 0x2c, 0x04, 0xc9, 0xe2, 0xe0, 0x8f, 0x13, 0x8e, 0x63, 0x96,
- 0x1f, 0x04, 0xaf, 0x9c, 0x5e, 0xd1, 0x53, 0x5b, 0x0e, 0x78, 0x0f, 0x2c, 0x3a, 0xdc, 0x50, 0x06,
- 0x59, 0xfa, 0xa6, 0xec, 0x2b, 0x22, 0x6c, 0x11, 0xc5, 0x3b, 0x51, 0x12, 0x2b, 0xf1, 0x51, 0x95,
- 0x69, 0x7d, 0x54, 0xe3, 0x4f, 0x0a, 0x80, 0xd9, 0x2d, 0x38, 0xf1, 0xe5, 0x3e, 0x13, 0x11, 0x93,
- 0xc8, 0xbe, 0xdc, 0xe1, 0xdc, 0x9a, 0xec, 0x70, 0xa2, 0x13, 0x74, 0x3a, 0x8b, 0x23, 0x66, 0xe0,
- 0x62, 0x2e, 0x66, 0xa6, 0xb0, 0x38, 0x51, 0x3e, 0xcf, 0x66, 0x71, 0x62, 0x3c, 0xa7, 0x5b, 0x9c,
- 0x7f, 0x17, 0xc0, 0x4a, 0x04, 0x9e, 0xda, 0xe2, 0x48, 0x42, 0x5e, 0x5c, 0xce, 0x4c, 0xbe, 0x9c,
- 0x61, 0xb6, 0x23, 0x9a, 0xba, 0xff, 0x13, 0xdb, 0x11, 0x25, 0x94, 0x63, 0x3b, 0x7e, 0x57, 0x88,
- 0x67, 0xfd, 0xa5, 0xb7, 0x1d, 0xcf, 0x7e, 0xb9, 0xd2, 0xf8, 0x4b, 0x11, 0x5c, 0x4e, 0x6f, 0xc1,
- 0x84, 0x0e, 0x2a, 0x13, 0x75, 0x70, 0x1f, 0xac, 0x3e, 0xf2, 0x74, 0x7d, 0xc4, 0xa7, 0x21, 0x26,
- 0x86, 0xbe, 0x82, 0x7e, 0x55, 0x44, 0xae, 0x7e, 0x5f, 0x82, 0x41, 0xd2, 0xc8, 0x1c, 0x4d, 0x2f,
- 0x9e, 0x4b, 0xd3, 0x33, 0x6a, 0x53, 0x3a, 0x83, 0xda, 0x48, 0xf5, 0xb9, 0x7c, 0x0e, 0x7d, 0x9e,
- 0x5a, 0x50, 0x25, 0xc7, 0xd5, 0xc4, 0x77, 0xf8, 0x5f, 0x2b, 0x60, 0x4d, 0xfe, 0xfa, 0x0c, 0x75,
- 0xb0, 0x64, 0xe0, 0xc7, 0xf1, 0xcb, 0x8b, 0x49, 0x82, 0xe1, 0x51, 0x4d, 0x57, 0xfd, 0xaf, 0x3b,
- 0xea, 0xbb, 0x26, 0xdd, 0x73, 0x0e, 0xa8, 0xa3, 0x99, 0x03, 0x5f, 0x60, 0x3b, 0x09, 0x2e, 0x94,
- 0xe2, 0x6e, 0x7c, 0xa2, 0x80, 0xf5, 0x1c, 0x95, 0xbb, 0xd8, 0x4c, 0xe0, 0x43, 0x50, 0x31, 0xf0,
- 0xe3, 0x03, 0xcf, 0x19, 0x04, 0x92, 0x7c, 0xf6, 0xe7, 0xf0, 0x8d, 0xdc, 0x11, 0x2c, 0x28, 0xe4,
- 0x6b, 0xec, 0x81, 0xeb, 0x89, 0x41, 0xb2, 0x4d, 0x43, 0x1e, 0x79, 0x3a, 0xdf, 0x3f, 0xc2, 0x53,
- 0xdc, 0x02, 0xf3, 0x36, 0x76, 0xa8, 0x16, 0x9a, 0xd1, 0x72, 0x6b, 0x71, 0x7c, 0x52, 0x9f, 0xdf,
- 0x0f, 0x1a, 0x51, 0xd4, 0xdf, 0xf8, 0x55, 0x01, 0x2c, 0xc4, 0x48, 0x2e, 0x40, 0xdf, 0xdf, 0x4e,
- 0xe8, 0xbb, 0xf4, 0x8b, 0x49, 0x7c, 0x54, 0x79, 0x02, 0xdf, 0x49, 0x09, 0xfc, 0x37, 0x27, 0x11,
- 0x9d, 0xae, 0xf0, 0x9f, 0x16, 0xc0, 0x6a, 0x0c, 0x1d, 0x49, 0xfc, 0x77, 0x12, 0x12, 0xbf, 0x91,
- 0x92, 0xf8, 0xaa, 0x2c, 0xe6, 0x85, 0xc6, 0x4f, 0xd6, 0xf8, 0x3f, 0x2a, 0x60, 0x39, 0x36, 0x77,
- 0x17, 0x20, 0xf2, 0xdb, 0x49, 0x91, 0xaf, 0x4f, 0xa8, 0x97, 0x1c, 0x95, 0x7f, 0x52, 0x4e, 0xe4,
- 0xfd, 0xa5, 0x97, 0xf9, 0x9f, 0x83, 0xd5, 0xa1, 0xa5, 0x7b, 0x06, 0x69, 0xeb, 0x58, 0x33, 0x02,
- 0x00, 0x53, 0x32, 0x36, 0x89, 0x37, 0xa5, 0xf4, 0xc4, 0x71, 0x35, 0x97, 0x12, 0x93, 0x3e, 0x88,
- 0x22, 0x23, 0x2d, 0x7e, 0x20, 0xa1, 0x43, 0xd2, 0x87, 0xc0, 0x37, 0xc0, 0x02, 0xd3, 0x54, 0xad,
- 0x47, 0x76, 0xb1, 0x11, 0xd4, 0x54, 0xf8, 0x7d, 0xe0, 0x20, 0xea, 0x42, 0x71, 0x1c, 0x3c, 0x02,
- 0x2b, 0xb6, 0xd5, 0xef, 0x60, 0x13, 0x0f, 0x08, 0x3b, 0xff, 0xf7, 0xf9, 0xff, 0x42, 0xf0, 0x7b,
- 0x87, 0xf9, 0xd6, 0x9b, 0xc1, 0x0b, 0xe9, 0x7e, 0x16, 0xc2, 0x3c, 0xbb, 0xa4, 0x99, 0xef, 0x67,
- 0x19, 0x25, 0x34, 0x32, 0x9f, 0xb3, 0xe6, 0x32, 0xff, 0x03, 0x20, 0x2b, 0xae, 0x73, 0x7e, 0xd0,
- 0xca, 0xbb, 0x51, 0xa9, 0x9c, 0xeb, 0x6b, 0xd4, 0xa7, 0x25, 0x70, 0x25, 0x73, 0x40, 0x7e, 0x81,
- 0x77, 0x1a, 0x19, 0xb7, 0x54, 0x3c, 0x83, 0x5b, 0xda, 0x02, 0xcb, 0xe2, 0x43, 0x58, 0xca, 0x6c,
- 0x85, 0x76, 0xb4, 0x9d, 0xec, 0x46, 0x69, 0xbc, 0xec, 0x4e, 0xa5, 0x7c, 0xc6, 0x3b, 0x95, 0x78,
- 0x16, 0xe2, 0xff, 0x37, 0xfc, 0xaa, 0xcb, 0x66, 0x21, 0xfe, 0x8d, 0x23, 0x8d, 0x87, 0xdf, 0x0d,
- 0x4a, 0x2a, 0x64, 0x98, 0xe3, 0x0c, 0xa9, 0x1a, 0x09, 0x09, 0x52, 0xe8, 0x67, 0xfa, 0xd8, 0xf3,
- 0xbe, 0xe4, 0x63, 0xcf, 0xc6, 0x84, 0x52, 0x9e, 0xde, 0x2a, 0xfe, 0x4d, 0x01, 0x2f, 0xe5, 0xee,
- 0x01, 0xb8, 0x95, 0xd0, 0xd9, 0xdb, 0x29, 0x9d, 0x7d, 0x39, 0x37, 0x30, 0x26, 0xb6, 0x86, 0xfc,
- 0x42, 0xe4, 0xee, 0xc4, 0x0b, 0x11, 0x89, 0x8b, 0x9a, 0x7c, 0x33, 0xd2, 0xda, 0x78, 0xf2, 0xb4,
- 0x36, 0xf3, 0xd1, 0xd3, 0xda, 0xcc, 0xc7, 0x4f, 0x6b, 0x33, 0xbf, 0x18, 0xd7, 0x94, 0x27, 0xe3,
- 0x9a, 0xf2, 0xd1, 0xb8, 0xa6, 0x7c, 0x3c, 0xae, 0x29, 0xff, 0x1c, 0xd7, 0x94, 0xdf, 0x7e, 0x52,
- 0x9b, 0x79, 0x58, 0x18, 0x6e, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x70, 0x5f, 0xbf, 0x58, 0x3d,
- 0x26, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/apps/v1/generated.proto b/vendor/k8s.io/api/apps/v1/generated.proto
deleted file mode 100644
index 46473baa8..000000000
--- a/vendor/k8s.io/api/apps/v1/generated.proto
+++ /dev/null
@@ -1,701 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.apps.v1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/api/policy/v1beta1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1";
-
-// ControllerRevision implements an immutable snapshot of state data. Clients
-// are responsible for serializing and deserializing the objects that contain
-// their internal state.
-// Once a ControllerRevision has been successfully created, it can not be updated.
-// The API Server will fail validation of all requests that attempt to mutate
-// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
-// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
-// it may be subject to name and representation changes in future releases, and clients should not
-// depend on its stability. It is primarily for internal use by controllers.
-message ControllerRevision {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Data is the serialized representation of the state.
- optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2;
-
- // Revision indicates the revision of the state represented by Data.
- optional int64 revision = 3;
-}
-
-// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
-message ControllerRevisionList {
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of ControllerRevisions
- repeated ControllerRevision items = 2;
-}
-
-// DaemonSet represents the configuration of a daemon set.
-message DaemonSet {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // The desired behavior of this daemon set.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional DaemonSetSpec spec = 2;
-
- // The current status of this daemon set. This data may be
- // out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional DaemonSetStatus status = 3;
-}
-
-// DaemonSetCondition describes the state of a DaemonSet at a certain point.
-message DaemonSetCondition {
- // Type of DaemonSet condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // Last time the condition transitioned from one status to another.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // The reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- // +optional
- optional string message = 5;
-}
-
-// DaemonSetList is a collection of daemon sets.
-message DaemonSetList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // A list of daemon sets.
- repeated DaemonSet items = 2;
-}
-
-// DaemonSetSpec is the specification of a daemon set.
-message DaemonSetSpec {
- // A label query over pods that are managed by the daemon set.
- // Must match in order to be controlled.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
-
- // An object that describes the pod that will be created.
- // The DaemonSet will create exactly one copy of this pod on every node
- // that matches the template's node selector (or on every node if no node
- // selector is specified).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- optional k8s.io.api.core.v1.PodTemplateSpec template = 2;
-
- // An update strategy to replace existing DaemonSet pods with new pods.
- // +optional
- optional DaemonSetUpdateStrategy updateStrategy = 3;
-
- // The minimum number of seconds for which a newly created DaemonSet pod should
- // be ready without any of its container crashing, for it to be considered
- // available. Defaults to 0 (pod will be considered available as soon as it
- // is ready).
- // +optional
- optional int32 minReadySeconds = 4;
-
- // The number of old history to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 10.
- // +optional
- optional int32 revisionHistoryLimit = 6;
-}
-
-// DaemonSetStatus represents the current status of a daemon set.
-message DaemonSetStatus {
- // The number of nodes that are running at least 1
- // daemon pod and are supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- optional int32 currentNumberScheduled = 1;
-
- // The number of nodes that are running the daemon pod, but are
- // not supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- optional int32 numberMisscheduled = 2;
-
- // The total number of nodes that should be running the daemon
- // pod (including nodes correctly running the daemon pod).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- optional int32 desiredNumberScheduled = 3;
-
- // The number of nodes that should be running the daemon pod and have one
- // or more of the daemon pod running and ready.
- optional int32 numberReady = 4;
-
- // The most recent generation observed by the daemon set controller.
- // +optional
- optional int64 observedGeneration = 5;
-
- // The total number of nodes that are running updated daemon pod
- // +optional
- optional int32 updatedNumberScheduled = 6;
-
- // The number of nodes that should be running the
- // daemon pod and have one or more of the daemon pod running and
- // available (ready for at least spec.minReadySeconds)
- // +optional
- optional int32 numberAvailable = 7;
-
- // The number of nodes that should be running the
- // daemon pod and have none of the daemon pod running and available
- // (ready for at least spec.minReadySeconds)
- // +optional
- optional int32 numberUnavailable = 8;
-
- // Count of hash collisions for the DaemonSet. The DaemonSet controller
- // uses this field as a collision avoidance mechanism when it needs to
- // create the name for the newest ControllerRevision.
- // +optional
- optional int32 collisionCount = 9;
-
- // Represents the latest available observations of a DaemonSet's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated DaemonSetCondition conditions = 10;
-}
-
-// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
-message DaemonSetUpdateStrategy {
- // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
- // +optional
- optional string type = 1;
-
- // Rolling update config params. Present only if type = "RollingUpdate".
- // ---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be. Same as Deployment `strategy.rollingUpdate`.
- // See https://github.com/kubernetes/kubernetes/issues/35345
- // +optional
- optional RollingUpdateDaemonSet rollingUpdate = 2;
-}
-
-// Deployment enables declarative updates for Pods and ReplicaSets.
-message Deployment {
- // Standard object metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior of the Deployment.
- // +optional
- optional DeploymentSpec spec = 2;
-
- // Most recently observed status of the Deployment.
- // +optional
- optional DeploymentStatus status = 3;
-}
-
-// DeploymentCondition describes the state of a deployment at a certain point.
-message DeploymentCondition {
- // Type of deployment condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // The last time this condition was updated.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
-
- // Last time the condition transitioned from one status to another.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
-
- // The reason for the condition's last transition.
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- optional string message = 5;
-}
-
-// DeploymentList is a list of Deployments.
-message DeploymentList {
- // Standard list metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of Deployments.
- repeated Deployment items = 2;
-}
-
-// DeploymentSpec is the specification of the desired behavior of the Deployment.
-message DeploymentSpec {
- // Number of desired pods. This is a pointer to distinguish between explicit
- // zero and not specified. Defaults to 1.
- // +optional
- optional int32 replicas = 1;
-
- // Label selector for pods. Existing ReplicaSets whose pods are
- // selected by this will be the ones affected by this deployment.
- // It must match the pod template's labels.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // Template describes the pods that will be created.
- optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
-
- // The deployment strategy to use to replace existing pods with new ones.
- // +optional
- optional DeploymentStrategy strategy = 4;
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- optional int32 minReadySeconds = 5;
-
- // The number of old ReplicaSets to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 10.
- // +optional
- optional int32 revisionHistoryLimit = 6;
-
- // Indicates that the deployment is paused.
- // +optional
- optional bool paused = 7;
-
- // The maximum time in seconds for a deployment to make progress before it
- // is considered to be failed. The deployment controller will continue to
- // process failed deployments and a condition with a ProgressDeadlineExceeded
- // reason will be surfaced in the deployment status. Note that progress will
- // not be estimated during the time a deployment is paused. Defaults to 600s.
- optional int32 progressDeadlineSeconds = 9;
-}
-
-// DeploymentStatus is the most recently observed status of the Deployment.
-message DeploymentStatus {
- // The generation observed by the deployment controller.
- // +optional
- optional int64 observedGeneration = 1;
-
- // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
- // +optional
- optional int32 replicas = 2;
-
- // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
- // +optional
- optional int32 updatedReplicas = 3;
-
- // Total number of ready pods targeted by this deployment.
- // +optional
- optional int32 readyReplicas = 7;
-
- // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
- // +optional
- optional int32 availableReplicas = 4;
-
- // Total number of unavailable pods targeted by this deployment. This is the total number of
- // pods that are still required for the deployment to have 100% available capacity. They may
- // either be pods that are running but not yet available or pods that still have not been created.
- // +optional
- optional int32 unavailableReplicas = 5;
-
- // Represents the latest available observations of a deployment's current state.
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated DeploymentCondition conditions = 6;
-
- // Count of hash collisions for the Deployment. The Deployment controller uses this
- // field as a collision avoidance mechanism when it needs to create the name for the
- // newest ReplicaSet.
- // +optional
- optional int32 collisionCount = 8;
-}
-
-// DeploymentStrategy describes how to replace existing pods with new ones.
-message DeploymentStrategy {
- // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
- // +optional
- optional string type = 1;
-
- // Rolling update config params. Present only if DeploymentStrategyType =
- // RollingUpdate.
- // ---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be.
- // +optional
- optional RollingUpdateDeployment rollingUpdate = 2;
-}
-
-// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
-message ReplicaSet {
- // If the Labels of a ReplicaSet are empty, they are defaulted to
- // be the same as the Pod(s) that the ReplicaSet manages.
- // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec defines the specification of the desired behavior of the ReplicaSet.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional ReplicaSetSpec spec = 2;
-
- // Status is the most recently observed status of the ReplicaSet.
- // This data may be out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional ReplicaSetStatus status = 3;
-}
-
-// ReplicaSetCondition describes the state of a replica set at a certain point.
-message ReplicaSetCondition {
- // Type of replica set condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // The last time the condition transitioned from one status to another.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // The reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- // +optional
- optional string message = 5;
-}
-
-// ReplicaSetList is a collection of ReplicaSets.
-message ReplicaSetList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // List of ReplicaSets.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
- repeated ReplicaSet items = 2;
-}
-
-// ReplicaSetSpec is the specification of a ReplicaSet.
-message ReplicaSetSpec {
- // Replicas is the number of desired replicas.
- // This is a pointer to distinguish between explicit zero and unspecified.
- // Defaults to 1.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- // +optional
- optional int32 replicas = 1;
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- optional int32 minReadySeconds = 4;
-
- // Selector is a label query over pods that should match the replica count.
- // Label keys and values that must match in order to be controlled by this replica set.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // Template is the object that describes the pod that will be created if
- // insufficient replicas are detected.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- // +optional
- optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
-}
-
-// ReplicaSetStatus represents the current status of a ReplicaSet.
-message ReplicaSetStatus {
- // Replicas is the most recently oberved number of replicas.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- optional int32 replicas = 1;
-
- // The number of pods that have labels matching the labels of the pod template of the replicaset.
- // +optional
- optional int32 fullyLabeledReplicas = 2;
-
- // The number of ready replicas for this replica set.
- // +optional
- optional int32 readyReplicas = 4;
-
- // The number of available replicas (ready for at least minReadySeconds) for this replica set.
- // +optional
- optional int32 availableReplicas = 5;
-
- // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
- // +optional
- optional int64 observedGeneration = 3;
-
- // Represents the latest available observations of a replica set's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated ReplicaSetCondition conditions = 6;
-}
-
-// Spec to control the desired behavior of daemon set rolling update.
-message RollingUpdateDaemonSet {
- // The maximum number of DaemonSet pods that can be unavailable during the
- // update. Value can be an absolute number (ex: 5) or a percentage of total
- // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
- // number is calculated from percentage by rounding up.
- // This cannot be 0.
- // Default value is 1.
- // Example: when this is set to 30%, at most 30% of the total number of nodes
- // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
- // can have their pods stopped for an update at any given
- // time. The update starts by stopping at most 30% of those DaemonSet pods
- // and then brings up new DaemonSet pods in their place. Once the new pods
- // are available, it then proceeds onto other DaemonSet pods, thus ensuring
- // that at least 70% of original number of DaemonSet pods are available at
- // all times during the update.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
-}
-
-// Spec to control the desired behavior of rolling update.
-message RollingUpdateDeployment {
- // The maximum number of pods that can be unavailable during the update.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // Absolute number is calculated from percentage by rounding down.
- // This can not be 0 if MaxSurge is 0.
- // Defaults to 25%.
- // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
- // immediately when the rolling update starts. Once new pods are ready, old RC
- // can be scaled down further, followed by scaling up the new RC, ensuring
- // that the total number of pods available at all times during the update is at
- // least 70% of desired pods.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
-
- // The maximum number of pods that can be scheduled above the desired number of
- // pods.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // This can not be 0 if MaxUnavailable is 0.
- // Absolute number is calculated from percentage by rounding up.
- // Defaults to 25%.
- // Example: when this is set to 30%, the new RC can be scaled up immediately when
- // the rolling update starts, such that the total number of old and new pods do not exceed
- // 130% of desired pods. Once old pods have been killed,
- // new RC can be scaled up further, ensuring that total number of pods running
- // at any time during the update is at most 130% of desired pods.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
-}
-
-// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
-message RollingUpdateStatefulSetStrategy {
- // Partition indicates the ordinal at which the StatefulSet should be
- // partitioned.
- // Default value is 0.
- // +optional
- optional int32 partition = 1;
-}
-
-// StatefulSet represents a set of pods with consistent identities.
-// Identities are defined as:
-// - Network: A single stable DNS and hostname.
-// - Storage: As many VolumeClaims as requested.
-// The StatefulSet guarantees that a given network identity will always
-// map to the same storage identity.
-message StatefulSet {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec defines the desired identities of pods in this set.
- // +optional
- optional StatefulSetSpec spec = 2;
-
- // Status is the current status of Pods in this StatefulSet. This data
- // may be out of date by some window of time.
- // +optional
- optional StatefulSetStatus status = 3;
-}
-
-// StatefulSetCondition describes the state of a statefulset at a certain point.
-message StatefulSetCondition {
- // Type of statefulset condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // Last time the condition transitioned from one status to another.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // The reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- // +optional
- optional string message = 5;
-}
-
-// StatefulSetList is a collection of StatefulSets.
-message StatefulSetList {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- repeated StatefulSet items = 2;
-}
-
-// A StatefulSetSpec is the specification of a StatefulSet.
-message StatefulSetSpec {
- // replicas is the desired number of replicas of the given Template.
- // These are replicas in the sense that they are instantiations of the
- // same Template, but individual replicas also have a consistent identity.
- // If unspecified, defaults to 1.
- // TODO: Consider a rename of this field.
- // +optional
- optional int32 replicas = 1;
-
- // selector is a label query over pods that should match the replica count.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // template is the object that describes the pod that will be created if
- // insufficient replicas are detected. Each pod stamped out by the StatefulSet
- // will fulfill this Template, but have a unique identity from the rest
- // of the StatefulSet.
- optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
-
- // volumeClaimTemplates is a list of claims that pods are allowed to reference.
- // The StatefulSet controller is responsible for mapping network identities to
- // claims in a way that maintains the identity of a pod. Every claim in
- // this list must have at least one matching (by name) volumeMount in one
- // container in the template. A claim in this list takes precedence over
- // any volumes in the template, with the same name.
- // TODO: Define the behavior if a claim already exists with the same name.
- // +optional
- repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
-
- // serviceName is the name of the service that governs this StatefulSet.
- // This service must exist before the StatefulSet, and is responsible for
- // the network identity of the set. Pods get DNS/hostnames that follow the
- // pattern: pod-specific-string.serviceName.default.svc.cluster.local
- // where "pod-specific-string" is managed by the StatefulSet controller.
- optional string serviceName = 5;
-
- // podManagementPolicy controls how pods are created during initial scale up,
- // when replacing pods on nodes, or when scaling down. The default policy is
- // `OrderedReady`, where pods are created in increasing order (pod-0, then
- // pod-1, etc) and the controller will wait until each pod is ready before
- // continuing. When scaling down, the pods are removed in the opposite order.
- // The alternative policy is `Parallel` which will create pods in parallel
- // to match the desired scale without waiting, and on scale down will delete
- // all pods at once.
- // +optional
- optional string podManagementPolicy = 6;
-
- // updateStrategy indicates the StatefulSetUpdateStrategy that will be
- // employed to update Pods in the StatefulSet when a revision is made to
- // Template.
- optional StatefulSetUpdateStrategy updateStrategy = 7;
-
- // revisionHistoryLimit is the maximum number of revisions that will
- // be maintained in the StatefulSet's revision history. The revision history
- // consists of all revisions not represented by a currently applied
- // StatefulSetSpec version. The default value is 10.
- optional int32 revisionHistoryLimit = 8;
-}
-
-// StatefulSetStatus represents the current state of a StatefulSet.
-message StatefulSetStatus {
- // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
- // StatefulSet's generation, which is updated on mutation by the API Server.
- // +optional
- optional int64 observedGeneration = 1;
-
- // replicas is the number of Pods created by the StatefulSet controller.
- optional int32 replicas = 2;
-
- // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
- optional int32 readyReplicas = 3;
-
- // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by currentRevision.
- optional int32 currentReplicas = 4;
-
- // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by updateRevision.
- optional int32 updatedReplicas = 5;
-
- // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
- // sequence [0,currentReplicas).
- optional string currentRevision = 6;
-
- // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
- // [replicas-updatedReplicas,replicas)
- optional string updateRevision = 7;
-
- // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
- // uses this field as a collision avoidance mechanism when it needs to create the name for the
- // newest ControllerRevision.
- // +optional
- optional int32 collisionCount = 9;
-
- // Represents the latest available observations of a statefulset's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated StatefulSetCondition conditions = 10;
-}
-
-// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
-// controller will use to perform updates. It includes any additional parameters
-// necessary to perform the update for the indicated strategy.
-message StatefulSetUpdateStrategy {
- // Type indicates the type of the StatefulSetUpdateStrategy.
- // Default is RollingUpdate.
- // +optional
- optional string type = 1;
-
- // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
- // +optional
- optional RollingUpdateStatefulSetStrategy rollingUpdate = 2;
-}
-
diff --git a/vendor/k8s.io/api/apps/v1/register.go b/vendor/k8s.io/api/apps/v1/register.go
deleted file mode 100644
index 027101046..000000000
--- a/vendor/k8s.io/api/apps/v1/register.go
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "apps"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Deployment{},
- &DeploymentList{},
- &StatefulSet{},
- &StatefulSetList{},
- &DaemonSet{},
- &DaemonSetList{},
- &ReplicaSet{},
- &ReplicaSetList{},
- &ControllerRevision{},
- &ControllerRevisionList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/apps/v1/types.go b/vendor/k8s.io/api/apps/v1/types.go
deleted file mode 100644
index b5df22c6f..000000000
--- a/vendor/k8s.io/api/apps/v1/types.go
+++ /dev/null
@@ -1,819 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-const (
- ControllerRevisionHashLabelKey = "controller-revision-hash"
- StatefulSetRevisionLabel = ControllerRevisionHashLabelKey
- DeprecatedRollbackTo = "deprecated.deployment.rollback.to"
- DeprecatedTemplateGeneration = "deprecated.daemonset.template.generation"
- StatefulSetPodNameLabel = "statefulset.kubernetes.io/pod-name"
-)
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// StatefulSet represents a set of pods with consistent identities.
-// Identities are defined as:
-// - Network: A single stable DNS and hostname.
-// - Storage: As many VolumeClaims as requested.
-// The StatefulSet guarantees that a given network identity will always
-// map to the same storage identity.
-type StatefulSet struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec defines the desired identities of pods in this set.
- // +optional
- Spec StatefulSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is the current status of Pods in this StatefulSet. This data
- // may be out of date by some window of time.
- // +optional
- Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// PodManagementPolicyType defines the policy for creating pods under a stateful set.
-type PodManagementPolicyType string
-
-const (
- // OrderedReadyPodManagement will create pods in strictly increasing order on
- // scale up and strictly decreasing order on scale down, progressing only when
- // the previous pod is ready or terminated. At most one pod will be changed
- // at any time.
- OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
- // ParallelPodManagement will create and delete pods as soon as the stateful set
- // replica count is changed, and will not wait for pods to be ready or complete
- // termination.
- ParallelPodManagement = "Parallel"
-)
-
-// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
-// controller will use to perform updates. It includes any additional parameters
-// necessary to perform the update for the indicated strategy.
-type StatefulSetUpdateStrategy struct {
- // Type indicates the type of the StatefulSetUpdateStrategy.
- // Default is RollingUpdate.
- // +optional
- Type StatefulSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetStrategyType"`
- // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
- // +optional
- RollingUpdate *RollingUpdateStatefulSetStrategy `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
-}
-
-// StatefulSetUpdateStrategyType is a string enumeration type that enumerates
-// all possible update strategies for the StatefulSet controller.
-type StatefulSetUpdateStrategyType string
-
-const (
- // RollingUpdateStatefulSetStrategyType indicates that update will be
- // applied to all Pods in the StatefulSet with respect to the StatefulSet
- // ordering constraints. When a scale operation is performed with this
- // strategy, new Pods will be created from the specification version indicated
- // by the StatefulSet's updateRevision.
- RollingUpdateStatefulSetStrategyType = "RollingUpdate"
- // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version
- // tracking and ordered rolling restarts are disabled. Pods are recreated
- // from the StatefulSetSpec when they are manually deleted. When a scale
- // operation is performed with this strategy,specification version indicated
- // by the StatefulSet's currentRevision.
- OnDeleteStatefulSetStrategyType = "OnDelete"
-)
-
-// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
-type RollingUpdateStatefulSetStrategy struct {
- // Partition indicates the ordinal at which the StatefulSet should be
- // partitioned.
- // Default value is 0.
- // +optional
- Partition *int32 `json:"partition,omitempty" protobuf:"varint,1,opt,name=partition"`
-}
-
-// A StatefulSetSpec is the specification of a StatefulSet.
-type StatefulSetSpec struct {
- // replicas is the desired number of replicas of the given Template.
- // These are replicas in the sense that they are instantiations of the
- // same Template, but individual replicas also have a consistent identity.
- // If unspecified, defaults to 1.
- // TODO: Consider a rename of this field.
- // +optional
- Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-
- // selector is a label query over pods that should match the replica count.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"`
-
- // template is the object that describes the pod that will be created if
- // insufficient replicas are detected. Each pod stamped out by the StatefulSet
- // will fulfill this Template, but have a unique identity from the rest
- // of the StatefulSet.
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
-
- // volumeClaimTemplates is a list of claims that pods are allowed to reference.
- // The StatefulSet controller is responsible for mapping network identities to
- // claims in a way that maintains the identity of a pod. Every claim in
- // this list must have at least one matching (by name) volumeMount in one
- // container in the template. A claim in this list takes precedence over
- // any volumes in the template, with the same name.
- // TODO: Define the behavior if a claim already exists with the same name.
- // +optional
- VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
-
- // serviceName is the name of the service that governs this StatefulSet.
- // This service must exist before the StatefulSet, and is responsible for
- // the network identity of the set. Pods get DNS/hostnames that follow the
- // pattern: pod-specific-string.serviceName.default.svc.cluster.local
- // where "pod-specific-string" is managed by the StatefulSet controller.
- ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
-
- // podManagementPolicy controls how pods are created during initial scale up,
- // when replacing pods on nodes, or when scaling down. The default policy is
- // `OrderedReady`, where pods are created in increasing order (pod-0, then
- // pod-1, etc) and the controller will wait until each pod is ready before
- // continuing. When scaling down, the pods are removed in the opposite order.
- // The alternative policy is `Parallel` which will create pods in parallel
- // to match the desired scale without waiting, and on scale down will delete
- // all pods at once.
- // +optional
- PodManagementPolicy PodManagementPolicyType `json:"podManagementPolicy,omitempty" protobuf:"bytes,6,opt,name=podManagementPolicy,casttype=PodManagementPolicyType"`
-
- // updateStrategy indicates the StatefulSetUpdateStrategy that will be
- // employed to update Pods in the StatefulSet when a revision is made to
- // Template.
- UpdateStrategy StatefulSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,7,opt,name=updateStrategy"`
-
- // revisionHistoryLimit is the maximum number of revisions that will
- // be maintained in the StatefulSet's revision history. The revision history
- // consists of all revisions not represented by a currently applied
- // StatefulSetSpec version. The default value is 10.
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,8,opt,name=revisionHistoryLimit"`
-}
-
-// StatefulSetStatus represents the current state of a StatefulSet.
-type StatefulSetStatus struct {
- // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
- // StatefulSet's generation, which is updated on mutation by the API Server.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // replicas is the number of Pods created by the StatefulSet controller.
- Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
-
- // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,3,opt,name=readyReplicas"`
-
- // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by currentRevision.
- CurrentReplicas int32 `json:"currentReplicas,omitempty" protobuf:"varint,4,opt,name=currentReplicas"`
-
- // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by updateRevision.
- UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,5,opt,name=updatedReplicas"`
-
- // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
- // sequence [0,currentReplicas).
- CurrentRevision string `json:"currentRevision,omitempty" protobuf:"bytes,6,opt,name=currentRevision"`
-
- // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
- // [replicas-updatedReplicas,replicas)
- UpdateRevision string `json:"updateRevision,omitempty" protobuf:"bytes,7,opt,name=updateRevision"`
-
- // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
- // uses this field as a collision avoidance mechanism when it needs to create the name for the
- // newest ControllerRevision.
- // +optional
- CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"`
-
- // Represents the latest available observations of a statefulset's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"`
-}
-
-type StatefulSetConditionType string
-
-// StatefulSetCondition describes the state of a statefulset at a certain point.
-type StatefulSetCondition struct {
- // Type of statefulset condition.
- Type StatefulSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // Last time the condition transitioned from one status to another.
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// StatefulSetList is a collection of StatefulSets.
-type StatefulSetList struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Deployment enables declarative updates for Pods and ReplicaSets.
-type Deployment struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior of the Deployment.
- // +optional
- Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Most recently observed status of the Deployment.
- // +optional
- Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// DeploymentSpec is the specification of the desired behavior of the Deployment.
-type DeploymentSpec struct {
- // Number of desired pods. This is a pointer to distinguish between explicit
- // zero and not specified. Defaults to 1.
- // +optional
- Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-
- // Label selector for pods. Existing ReplicaSets whose pods are
- // selected by this will be the ones affected by this deployment.
- // It must match the pod template's labels.
- Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"`
-
- // Template describes the pods that will be created.
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
-
- // The deployment strategy to use to replace existing pods with new ones.
- // +optional
- Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"`
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`
-
- // The number of old ReplicaSets to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 10.
- // +optional
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
-
- // Indicates that the deployment is paused.
- // +optional
- Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
-
- // The maximum time in seconds for a deployment to make progress before it
- // is considered to be failed. The deployment controller will continue to
- // process failed deployments and a condition with a ProgressDeadlineExceeded
- // reason will be surfaced in the deployment status. Note that progress will
- // not be estimated during the time a deployment is paused. Defaults to 600s.
- ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
-}
-
-const (
- // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
- // to existing RCs (and label key that is added to its pods) to prevent the existing RCs
- // to select new pods (and old pods being select by new RC).
- DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
-)
-
-// DeploymentStrategy describes how to replace existing pods with new ones.
-type DeploymentStrategy struct {
- // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
- // +optional
- Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
-
- // Rolling update config params. Present only if DeploymentStrategyType =
- // RollingUpdate.
- //---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be.
- // +optional
- RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
-}
-
-type DeploymentStrategyType string
-
-const (
- // Kill all existing pods before creating new ones.
- RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
-
- // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
- RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
-)
-
-// Spec to control the desired behavior of rolling update.
-type RollingUpdateDeployment struct {
- // The maximum number of pods that can be unavailable during the update.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // Absolute number is calculated from percentage by rounding down.
- // This can not be 0 if MaxSurge is 0.
- // Defaults to 25%.
- // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
- // immediately when the rolling update starts. Once new pods are ready, old RC
- // can be scaled down further, followed by scaling up the new RC, ensuring
- // that the total number of pods available at all times during the update is at
- // least 70% of desired pods.
- // +optional
- MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
-
- // The maximum number of pods that can be scheduled above the desired number of
- // pods.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // This can not be 0 if MaxUnavailable is 0.
- // Absolute number is calculated from percentage by rounding up.
- // Defaults to 25%.
- // Example: when this is set to 30%, the new RC can be scaled up immediately when
- // the rolling update starts, such that the total number of old and new pods do not exceed
- // 130% of desired pods. Once old pods have been killed,
- // new RC can be scaled up further, ensuring that total number of pods running
- // at any time during the update is at most 130% of desired pods.
- // +optional
- MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
-}
-
-// DeploymentStatus is the most recently observed status of the Deployment.
-type DeploymentStatus struct {
- // The generation observed by the deployment controller.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
- // +optional
- Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
-
- // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
- // +optional
- UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
-
- // Total number of ready pods targeted by this deployment.
- // +optional
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"`
-
- // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
- // +optional
- AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
-
- // Total number of unavailable pods targeted by this deployment. This is the total number of
- // pods that are still required for the deployment to have 100% available capacity. They may
- // either be pods that are running but not yet available or pods that still have not been created.
- // +optional
- UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
-
- // Represents the latest available observations of a deployment's current state.
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
-
- // Count of hash collisions for the Deployment. The Deployment controller uses this
- // field as a collision avoidance mechanism when it needs to create the name for the
- // newest ReplicaSet.
- // +optional
- CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,8,opt,name=collisionCount"`
-}
-
-type DeploymentConditionType string
-
-// These are valid conditions of a deployment.
-const (
- // Available means the deployment is available, ie. at least the minimum available
- // replicas required are up and running for at least minReadySeconds.
- DeploymentAvailable DeploymentConditionType = "Available"
- // Progressing means the deployment is progressing. Progress for a deployment is
- // considered when a new replica set is created or adopted, and when new pods scale
- // up or old pods scale down. Progress is not estimated for paused deployments or
- // when progressDeadlineSeconds is not specified.
- DeploymentProgressing DeploymentConditionType = "Progressing"
- // ReplicaFailure is added in a deployment when one of its pods fails to be created
- // or deleted.
- DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure"
-)
-
-// DeploymentCondition describes the state of a deployment at a certain point.
-type DeploymentCondition struct {
- // Type of deployment condition.
- Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // The last time this condition was updated.
- LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"`
- // Last time the condition transitioned from one status to another.
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DeploymentList is a list of Deployments.
-type DeploymentList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of Deployments.
- Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
-type DaemonSetUpdateStrategy struct {
- // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
- // +optional
- Type DaemonSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type"`
-
- // Rolling update config params. Present only if type = "RollingUpdate".
- //---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be. Same as Deployment `strategy.rollingUpdate`.
- // See https://github.com/kubernetes/kubernetes/issues/35345
- // +optional
- RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
-}
-
-type DaemonSetUpdateStrategyType string
-
-const (
- // Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
- RollingUpdateDaemonSetStrategyType DaemonSetUpdateStrategyType = "RollingUpdate"
-
- // Replace the old daemons only when it's killed
- OnDeleteDaemonSetStrategyType DaemonSetUpdateStrategyType = "OnDelete"
-)
-
-// Spec to control the desired behavior of daemon set rolling update.
-type RollingUpdateDaemonSet struct {
- // The maximum number of DaemonSet pods that can be unavailable during the
- // update. Value can be an absolute number (ex: 5) or a percentage of total
- // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
- // number is calculated from percentage by rounding up.
- // This cannot be 0.
- // Default value is 1.
- // Example: when this is set to 30%, at most 30% of the total number of nodes
- // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
- // can have their pods stopped for an update at any given
- // time. The update starts by stopping at most 30% of those DaemonSet pods
- // and then brings up new DaemonSet pods in their place. Once the new pods
- // are available, it then proceeds onto other DaemonSet pods, thus ensuring
- // that at least 70% of original number of DaemonSet pods are available at
- // all times during the update.
- // +optional
- MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
-}
-
-// DaemonSetSpec is the specification of a daemon set.
-type DaemonSetSpec struct {
- // A label query over pods that are managed by the daemon set.
- // Must match in order to be controlled.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,1,opt,name=selector"`
-
- // An object that describes the pod that will be created.
- // The DaemonSet will create exactly one copy of this pod on every node
- // that matches the template's node selector (or on every node if no node
- // selector is specified).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"`
-
- // An update strategy to replace existing DaemonSet pods with new pods.
- // +optional
- UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,3,opt,name=updateStrategy"`
-
- // The minimum number of seconds for which a newly created DaemonSet pod should
- // be ready without any of its container crashing, for it to be considered
- // available. Defaults to 0 (pod will be considered available as soon as it
- // is ready).
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
-
- // The number of old history to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 10.
- // +optional
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
-}
-
-// DaemonSetStatus represents the current status of a daemon set.
-type DaemonSetStatus struct {
- // The number of nodes that are running at least 1
- // daemon pod and are supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- CurrentNumberScheduled int32 `json:"currentNumberScheduled" protobuf:"varint,1,opt,name=currentNumberScheduled"`
-
- // The number of nodes that are running the daemon pod, but are
- // not supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- NumberMisscheduled int32 `json:"numberMisscheduled" protobuf:"varint,2,opt,name=numberMisscheduled"`
-
- // The total number of nodes that should be running the daemon
- // pod (including nodes correctly running the daemon pod).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- DesiredNumberScheduled int32 `json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"`
-
- // The number of nodes that should be running the daemon pod and have one
- // or more of the daemon pod running and ready.
- NumberReady int32 `json:"numberReady" protobuf:"varint,4,opt,name=numberReady"`
-
- // The most recent generation observed by the daemon set controller.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,5,opt,name=observedGeneration"`
-
- // The total number of nodes that are running updated daemon pod
- // +optional
- UpdatedNumberScheduled int32 `json:"updatedNumberScheduled,omitempty" protobuf:"varint,6,opt,name=updatedNumberScheduled"`
-
- // The number of nodes that should be running the
- // daemon pod and have one or more of the daemon pod running and
- // available (ready for at least spec.minReadySeconds)
- // +optional
- NumberAvailable int32 `json:"numberAvailable,omitempty" protobuf:"varint,7,opt,name=numberAvailable"`
-
- // The number of nodes that should be running the
- // daemon pod and have none of the daemon pod running and available
- // (ready for at least spec.minReadySeconds)
- // +optional
- NumberUnavailable int32 `json:"numberUnavailable,omitempty" protobuf:"varint,8,opt,name=numberUnavailable"`
-
- // Count of hash collisions for the DaemonSet. The DaemonSet controller
- // uses this field as a collision avoidance mechanism when it needs to
- // create the name for the newest ControllerRevision.
- // +optional
- CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"`
-
- // Represents the latest available observations of a DaemonSet's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"`
-}
-
-type DaemonSetConditionType string
-
-// TODO: Add valid condition types of a DaemonSet.
-
-// DaemonSetCondition describes the state of a DaemonSet at a certain point.
-type DaemonSetCondition struct {
- // Type of DaemonSet condition.
- Type DaemonSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DaemonSetConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // Last time the condition transitioned from one status to another.
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DaemonSet represents the configuration of a daemon set.
-type DaemonSet struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // The desired behavior of this daemon set.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // The current status of this daemon set. This data may be
- // out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-const (
- // DefaultDaemonSetUniqueLabelKey is the default label key that is added
- // to existing DaemonSet pods to distinguish between old and new
- // DaemonSet pods during DaemonSet template updates.
- DefaultDaemonSetUniqueLabelKey = ControllerRevisionHashLabelKey
-)
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DaemonSetList is a collection of daemon sets.
-type DaemonSetList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // A list of daemon sets.
- Items []DaemonSet `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
-type ReplicaSet struct {
- metav1.TypeMeta `json:",inline"`
-
- // If the Labels of a ReplicaSet are empty, they are defaulted to
- // be the same as the Pod(s) that the ReplicaSet manages.
- // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec defines the specification of the desired behavior of the ReplicaSet.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec ReplicaSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is the most recently observed status of the ReplicaSet.
- // This data may be out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ReplicaSetList is a collection of ReplicaSets.
-type ReplicaSetList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // List of ReplicaSets.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
- Items []ReplicaSet `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// ReplicaSetSpec is the specification of a ReplicaSet.
-type ReplicaSetSpec struct {
- // Replicas is the number of desired replicas.
- // This is a pointer to distinguish between explicit zero and unspecified.
- // Defaults to 1.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- // +optional
- Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
-
- // Selector is a label query over pods that should match the replica count.
- // Label keys and values that must match in order to be controlled by this replica set.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"`
-
- // Template is the object that describes the pod that will be created if
- // insufficient replicas are detected.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- // +optional
- Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
-}
-
-// ReplicaSetStatus represents the current status of a ReplicaSet.
-type ReplicaSetStatus struct {
- // Replicas is the most recently oberved number of replicas.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
-
- // The number of pods that have labels matching the labels of the pod template of the replicaset.
- // +optional
- FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
-
- // The number of ready replicas for this replica set.
- // +optional
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
-
- // The number of available replicas (ready for at least minReadySeconds) for this replica set.
- // +optional
- AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`
-
- // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
-
- // Represents the latest available observations of a replica set's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
-}
-
-type ReplicaSetConditionType string
-
-// These are valid conditions of a replica set.
-const (
- // ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created
- // due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted
- // due to kubelet being down or finalizers are failing.
- ReplicaSetReplicaFailure ReplicaSetConditionType = "ReplicaFailure"
-)
-
-// ReplicaSetCondition describes the state of a replica set at a certain point.
-type ReplicaSetCondition struct {
- // Type of replica set condition.
- Type ReplicaSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicaSetConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // The last time the condition transitioned from one status to another.
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ControllerRevision implements an immutable snapshot of state data. Clients
-// are responsible for serializing and deserializing the objects that contain
-// their internal state.
-// Once a ControllerRevision has been successfully created, it can not be updated.
-// The API Server will fail validation of all requests that attempt to mutate
-// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
-// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
-// it may be subject to name and representation changes in future releases, and clients should not
-// depend on its stability. It is primarily for internal use by controllers.
-type ControllerRevision struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Data is the serialized representation of the state.
- Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
-
- // Revision indicates the revision of the state represented by Data.
- Revision int64 `json:"revision" protobuf:"varint,3,opt,name=revision"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
-type ControllerRevisionList struct {
- metav1.TypeMeta `json:",inline"`
-
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of ControllerRevisions
- Items []ControllerRevision `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go
deleted file mode 100644
index 4dec6f2f8..000000000
--- a/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
-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 v1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_ControllerRevision = map[string]string{
- "": "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "data": "Data is the serialized representation of the state.",
- "revision": "Revision indicates the revision of the state represented by Data.",
-}
-
-func (ControllerRevision) SwaggerDoc() map[string]string {
- return map_ControllerRevision
-}
-
-var map_ControllerRevisionList = map[string]string{
- "": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.",
- "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is the list of ControllerRevisions",
-}
-
-func (ControllerRevisionList) SwaggerDoc() map[string]string {
- return map_ControllerRevisionList
-}
-
-var map_DaemonSet = map[string]string{
- "": "DaemonSet represents the configuration of a daemon set.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
- "status": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (DaemonSet) SwaggerDoc() map[string]string {
- return map_DaemonSet
-}
-
-var map_DaemonSetCondition = map[string]string{
- "": "DaemonSetCondition describes the state of a DaemonSet at a certain point.",
- "type": "Type of DaemonSet condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastTransitionTime": "Last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (DaemonSetCondition) SwaggerDoc() map[string]string {
- return map_DaemonSetCondition
-}
-
-var map_DaemonSetList = map[string]string{
- "": "DaemonSetList is a collection of daemon sets.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "A list of daemon sets.",
-}
-
-func (DaemonSetList) SwaggerDoc() map[string]string {
- return map_DaemonSetList
-}
-
-var map_DaemonSetSpec = map[string]string{
- "": "DaemonSetSpec is the specification of a daemon set.",
- "selector": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- "template": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
- "updateStrategy": "An update strategy to replace existing DaemonSet pods with new pods.",
- "minReadySeconds": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).",
- "revisionHistoryLimit": "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.",
-}
-
-func (DaemonSetSpec) SwaggerDoc() map[string]string {
- return map_DaemonSetSpec
-}
-
-var map_DaemonSetStatus = map[string]string{
- "": "DaemonSetStatus represents the current status of a daemon set.",
- "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
- "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
- "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
- "numberReady": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.",
- "observedGeneration": "The most recent generation observed by the daemon set controller.",
- "updatedNumberScheduled": "The total number of nodes that are running updated daemon pod",
- "numberAvailable": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)",
- "numberUnavailable": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)",
- "collisionCount": "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
- "conditions": "Represents the latest available observations of a DaemonSet's current state.",
-}
-
-func (DaemonSetStatus) SwaggerDoc() map[string]string {
- return map_DaemonSetStatus
-}
-
-var map_DaemonSetUpdateStrategy = map[string]string{
- "": "DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.",
- "type": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.",
- "rollingUpdate": "Rolling update config params. Present only if type = \"RollingUpdate\".",
-}
-
-func (DaemonSetUpdateStrategy) SwaggerDoc() map[string]string {
- return map_DaemonSetUpdateStrategy
-}
-
-var map_Deployment = map[string]string{
- "": "Deployment enables declarative updates for Pods and ReplicaSets.",
- "metadata": "Standard object metadata.",
- "spec": "Specification of the desired behavior of the Deployment.",
- "status": "Most recently observed status of the Deployment.",
-}
-
-func (Deployment) SwaggerDoc() map[string]string {
- return map_Deployment
-}
-
-var map_DeploymentCondition = map[string]string{
- "": "DeploymentCondition describes the state of a deployment at a certain point.",
- "type": "Type of deployment condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastUpdateTime": "The last time this condition was updated.",
- "lastTransitionTime": "Last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (DeploymentCondition) SwaggerDoc() map[string]string {
- return map_DeploymentCondition
-}
-
-var map_DeploymentList = map[string]string{
- "": "DeploymentList is a list of Deployments.",
- "metadata": "Standard list metadata.",
- "items": "Items is the list of Deployments.",
-}
-
-func (DeploymentList) SwaggerDoc() map[string]string {
- return map_DeploymentList
-}
-
-var map_DeploymentSpec = map[string]string{
- "": "DeploymentSpec is the specification of the desired behavior of the Deployment.",
- "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
- "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.",
- "template": "Template describes the pods that will be created.",
- "strategy": "The deployment strategy to use to replace existing pods with new ones.",
- "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
- "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.",
- "paused": "Indicates that the deployment is paused.",
- "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.",
-}
-
-func (DeploymentSpec) SwaggerDoc() map[string]string {
- return map_DeploymentSpec
-}
-
-var map_DeploymentStatus = map[string]string{
- "": "DeploymentStatus is the most recently observed status of the Deployment.",
- "observedGeneration": "The generation observed by the deployment controller.",
- "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).",
- "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.",
- "readyReplicas": "Total number of ready pods targeted by this deployment.",
- "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.",
- "unavailableReplicas": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.",
- "conditions": "Represents the latest available observations of a deployment's current state.",
- "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.",
-}
-
-func (DeploymentStatus) SwaggerDoc() map[string]string {
- return map_DeploymentStatus
-}
-
-var map_DeploymentStrategy = map[string]string{
- "": "DeploymentStrategy describes how to replace existing pods with new ones.",
- "type": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.",
- "rollingUpdate": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.",
-}
-
-func (DeploymentStrategy) SwaggerDoc() map[string]string {
- return map_DeploymentStrategy
-}
-
-var map_ReplicaSet = map[string]string{
- "": "ReplicaSet ensures that a specified number of pod replicas are running at any given time.",
- "metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
- "status": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (ReplicaSet) SwaggerDoc() map[string]string {
- return map_ReplicaSet
-}
-
-var map_ReplicaSetCondition = map[string]string{
- "": "ReplicaSetCondition describes the state of a replica set at a certain point.",
- "type": "Type of replica set condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastTransitionTime": "The last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (ReplicaSetCondition) SwaggerDoc() map[string]string {
- return map_ReplicaSetCondition
-}
-
-var map_ReplicaSetList = map[string]string{
- "": "ReplicaSetList is a collection of ReplicaSets.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
- "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller",
-}
-
-func (ReplicaSetList) SwaggerDoc() map[string]string {
- return map_ReplicaSetList
-}
-
-var map_ReplicaSetSpec = map[string]string{
- "": "ReplicaSetSpec is the specification of a ReplicaSet.",
- "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller",
- "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
- "selector": "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
-}
-
-func (ReplicaSetSpec) SwaggerDoc() map[string]string {
- return map_ReplicaSetSpec
-}
-
-var map_ReplicaSetStatus = map[string]string{
- "": "ReplicaSetStatus represents the current status of a ReplicaSet.",
- "replicas": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller",
- "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.",
- "readyReplicas": "The number of ready replicas for this replica set.",
- "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replica set.",
- "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.",
- "conditions": "Represents the latest available observations of a replica set's current state.",
-}
-
-func (ReplicaSetStatus) SwaggerDoc() map[string]string {
- return map_ReplicaSetStatus
-}
-
-var map_RollingUpdateDaemonSet = map[string]string{
- "": "Spec to control the desired behavior of daemon set rolling update.",
- "maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.",
-}
-
-func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string {
- return map_RollingUpdateDaemonSet
-}
-
-var map_RollingUpdateDeployment = map[string]string{
- "": "Spec to control the desired behavior of rolling update.",
- "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.",
- "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.",
-}
-
-func (RollingUpdateDeployment) SwaggerDoc() map[string]string {
- return map_RollingUpdateDeployment
-}
-
-var map_RollingUpdateStatefulSetStrategy = map[string]string{
- "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.",
- "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.",
-}
-
-func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string {
- return map_RollingUpdateStatefulSetStrategy
-}
-
-var map_StatefulSet = map[string]string{
- "": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.",
- "spec": "Spec defines the desired identities of pods in this set.",
- "status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.",
-}
-
-func (StatefulSet) SwaggerDoc() map[string]string {
- return map_StatefulSet
-}
-
-var map_StatefulSetCondition = map[string]string{
- "": "StatefulSetCondition describes the state of a statefulset at a certain point.",
- "type": "Type of statefulset condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastTransitionTime": "Last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (StatefulSetCondition) SwaggerDoc() map[string]string {
- return map_StatefulSetCondition
-}
-
-var map_StatefulSetList = map[string]string{
- "": "StatefulSetList is a collection of StatefulSets.",
-}
-
-func (StatefulSetList) SwaggerDoc() map[string]string {
- return map_StatefulSetList
-}
-
-var map_StatefulSetSpec = map[string]string{
- "": "A StatefulSetSpec is the specification of a StatefulSet.",
- "replicas": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
- "selector": "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- "template": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.",
- "volumeClaimTemplates": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
- "serviceName": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
- "podManagementPolicy": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.",
- "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.",
- "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.",
-}
-
-func (StatefulSetSpec) SwaggerDoc() map[string]string {
- return map_StatefulSetSpec
-}
-
-var map_StatefulSetStatus = map[string]string{
- "": "StatefulSetStatus represents the current state of a StatefulSet.",
- "observedGeneration": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.",
- "replicas": "replicas is the number of Pods created by the StatefulSet controller.",
- "readyReplicas": "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.",
- "currentReplicas": "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.",
- "updatedReplicas": "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.",
- "currentRevision": "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).",
- "updateRevision": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)",
- "collisionCount": "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
- "conditions": "Represents the latest available observations of a statefulset's current state.",
-}
-
-func (StatefulSetStatus) SwaggerDoc() map[string]string {
- return map_StatefulSetStatus
-}
-
-var map_StatefulSetUpdateStrategy = map[string]string{
- "": "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.",
- "type": "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.",
- "rollingUpdate": "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.",
-}
-
-func (StatefulSetUpdateStrategy) SwaggerDoc() map[string]string {
- return map_StatefulSetUpdateStrategy
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go
deleted file mode 100644
index 62984cb89..000000000
--- a/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,856 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1
-
-import (
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- intstr "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ControllerRevision) DeepCopyInto(out *ControllerRevision) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Data.DeepCopyInto(&out.Data)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevision.
-func (in *ControllerRevision) DeepCopy() *ControllerRevision {
- if in == nil {
- return nil
- }
- out := new(ControllerRevision)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ControllerRevision) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ControllerRevisionList) DeepCopyInto(out *ControllerRevisionList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ControllerRevision, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevisionList.
-func (in *ControllerRevisionList) DeepCopy() *ControllerRevisionList {
- if in == nil {
- return nil
- }
- out := new(ControllerRevisionList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ControllerRevisionList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSet) DeepCopyInto(out *DaemonSet) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSet.
-func (in *DaemonSet) DeepCopy() *DaemonSet {
- if in == nil {
- return nil
- }
- out := new(DaemonSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DaemonSet) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetCondition) DeepCopyInto(out *DaemonSetCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetCondition.
-func (in *DaemonSetCondition) DeepCopy() *DaemonSetCondition {
- if in == nil {
- return nil
- }
- out := new(DaemonSetCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetList) DeepCopyInto(out *DaemonSetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]DaemonSet, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetList.
-func (in *DaemonSetList) DeepCopy() *DaemonSetList {
- if in == nil {
- return nil
- }
- out := new(DaemonSetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DaemonSetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetSpec) DeepCopyInto(out *DaemonSetSpec) {
- *out = *in
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(meta_v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy)
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetSpec.
-func (in *DaemonSetSpec) DeepCopy() *DaemonSetSpec {
- if in == nil {
- return nil
- }
- out := new(DaemonSetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetStatus) DeepCopyInto(out *DaemonSetStatus) {
- *out = *in
- if in.CollisionCount != nil {
- in, out := &in.CollisionCount, &out.CollisionCount
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]DaemonSetCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetStatus.
-func (in *DaemonSetStatus) DeepCopy() *DaemonSetStatus {
- if in == nil {
- return nil
- }
- out := new(DaemonSetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetUpdateStrategy) DeepCopyInto(out *DaemonSetUpdateStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollingUpdateDaemonSet)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetUpdateStrategy.
-func (in *DaemonSetUpdateStrategy) DeepCopy() *DaemonSetUpdateStrategy {
- if in == nil {
- return nil
- }
- out := new(DaemonSetUpdateStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Deployment) DeepCopyInto(out *Deployment) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Deployment.
-func (in *Deployment) DeepCopy() *Deployment {
- if in == nil {
- return nil
- }
- out := new(Deployment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Deployment) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentCondition) DeepCopyInto(out *DeploymentCondition) {
- *out = *in
- in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime)
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentCondition.
-func (in *DeploymentCondition) DeepCopy() *DeploymentCondition {
- if in == nil {
- return nil
- }
- out := new(DeploymentCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentList) DeepCopyInto(out *DeploymentList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Deployment, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentList.
-func (in *DeploymentList) DeepCopy() *DeploymentList {
- if in == nil {
- return nil
- }
- out := new(DeploymentList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DeploymentList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(meta_v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- in.Strategy.DeepCopyInto(&out.Strategy)
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.ProgressDeadlineSeconds != nil {
- in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpec.
-func (in *DeploymentSpec) DeepCopy() *DeploymentSpec {
- if in == nil {
- return nil
- }
- out := new(DeploymentSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]DeploymentCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.CollisionCount != nil {
- in, out := &in.CollisionCount, &out.CollisionCount
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStatus.
-func (in *DeploymentStatus) DeepCopy() *DeploymentStatus {
- if in == nil {
- return nil
- }
- out := new(DeploymentStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollingUpdateDeployment)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStrategy.
-func (in *DeploymentStrategy) DeepCopy() *DeploymentStrategy {
- if in == nil {
- return nil
- }
- out := new(DeploymentStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSet) DeepCopyInto(out *ReplicaSet) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSet.
-func (in *ReplicaSet) DeepCopy() *ReplicaSet {
- if in == nil {
- return nil
- }
- out := new(ReplicaSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ReplicaSet) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetCondition) DeepCopyInto(out *ReplicaSetCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetCondition.
-func (in *ReplicaSetCondition) DeepCopy() *ReplicaSetCondition {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetList) DeepCopyInto(out *ReplicaSetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ReplicaSet, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetList.
-func (in *ReplicaSetList) DeepCopy() *ReplicaSetList {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ReplicaSetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetSpec) DeepCopyInto(out *ReplicaSetSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(meta_v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetSpec.
-func (in *ReplicaSetSpec) DeepCopy() *ReplicaSetSpec {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]ReplicaSetCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetStatus.
-func (in *ReplicaSetStatus) DeepCopy() *ReplicaSetStatus {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) {
- *out = *in
- if in.MaxUnavailable != nil {
- in, out := &in.MaxUnavailable, &out.MaxUnavailable
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateDaemonSet.
-func (in *RollingUpdateDaemonSet) DeepCopy() *RollingUpdateDaemonSet {
- if in == nil {
- return nil
- }
- out := new(RollingUpdateDaemonSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollingUpdateDeployment) DeepCopyInto(out *RollingUpdateDeployment) {
- *out = *in
- if in.MaxUnavailable != nil {
- in, out := &in.MaxUnavailable, &out.MaxUnavailable
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- if in.MaxSurge != nil {
- in, out := &in.MaxSurge, &out.MaxSurge
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateDeployment.
-func (in *RollingUpdateDeployment) DeepCopy() *RollingUpdateDeployment {
- if in == nil {
- return nil
- }
- out := new(RollingUpdateDeployment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateStatefulSetStrategy) {
- *out = *in
- if in.Partition != nil {
- in, out := &in.Partition, &out.Partition
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateStatefulSetStrategy.
-func (in *RollingUpdateStatefulSetStrategy) DeepCopy() *RollingUpdateStatefulSetStrategy {
- if in == nil {
- return nil
- }
- out := new(RollingUpdateStatefulSetStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSet) DeepCopyInto(out *StatefulSet) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSet.
-func (in *StatefulSet) DeepCopy() *StatefulSet {
- if in == nil {
- return nil
- }
- out := new(StatefulSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *StatefulSet) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetCondition) DeepCopyInto(out *StatefulSetCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetCondition.
-func (in *StatefulSetCondition) DeepCopy() *StatefulSetCondition {
- if in == nil {
- return nil
- }
- out := new(StatefulSetCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]StatefulSet, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetList.
-func (in *StatefulSetList) DeepCopy() *StatefulSetList {
- if in == nil {
- return nil
- }
- out := new(StatefulSetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *StatefulSetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(meta_v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- if in.VolumeClaimTemplates != nil {
- in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
- *out = make([]core_v1.PersistentVolumeClaim, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy)
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetSpec.
-func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec {
- if in == nil {
- return nil
- }
- out := new(StatefulSetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) {
- *out = *in
- if in.CollisionCount != nil {
- in, out := &in.CollisionCount, &out.CollisionCount
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]StatefulSetCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetStatus.
-func (in *StatefulSetStatus) DeepCopy() *StatefulSetStatus {
- if in == nil {
- return nil
- }
- out := new(StatefulSetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetUpdateStrategy) DeepCopyInto(out *StatefulSetUpdateStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollingUpdateStatefulSetStrategy)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetUpdateStrategy.
-func (in *StatefulSetUpdateStrategy) DeepCopy() *StatefulSetUpdateStrategy {
- if in == nil {
- return nil
- }
- out := new(StatefulSetUpdateStrategy)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/apps/v1beta1/doc.go b/vendor/k8s.io/api/apps/v1beta1/doc.go
deleted file mode 100644
index 6047ed501..000000000
--- a/vendor/k8s.io/api/apps/v1beta1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-package v1beta1 // import "k8s.io/api/apps/v1beta1"
diff --git a/vendor/k8s.io/api/apps/v1beta1/generated.pb.go b/vendor/k8s.io/api/apps/v1beta1/generated.pb.go
deleted file mode 100644
index 04183fc2d..000000000
--- a/vendor/k8s.io/api/apps/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,5291 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta1/generated.proto
-
- It has these top-level messages:
- ControllerRevision
- ControllerRevisionList
- Deployment
- DeploymentCondition
- DeploymentList
- DeploymentRollback
- DeploymentSpec
- DeploymentStatus
- DeploymentStrategy
- RollbackConfig
- RollingUpdateDeployment
- RollingUpdateStatefulSetStrategy
- Scale
- ScaleSpec
- ScaleStatus
- StatefulSet
- StatefulSetCondition
- StatefulSetList
- StatefulSetSpec
- StatefulSetStatus
- StatefulSetUpdateStrategy
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *ControllerRevision) Reset() { *m = ControllerRevision{} }
-func (*ControllerRevision) ProtoMessage() {}
-func (*ControllerRevision) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} }
-func (*ControllerRevisionList) ProtoMessage() {}
-func (*ControllerRevisionList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *Deployment) Reset() { *m = Deployment{} }
-func (*Deployment) ProtoMessage() {}
-func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} }
-func (*DeploymentCondition) ProtoMessage() {}
-func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *DeploymentList) Reset() { *m = DeploymentList{} }
-func (*DeploymentList) ProtoMessage() {}
-func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} }
-func (*DeploymentRollback) ProtoMessage() {}
-func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} }
-func (*DeploymentSpec) ProtoMessage() {}
-func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} }
-func (*DeploymentStatus) ProtoMessage() {}
-func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} }
-func (*DeploymentStrategy) ProtoMessage() {}
-func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *RollbackConfig) Reset() { *m = RollbackConfig{} }
-func (*RollbackConfig) ProtoMessage() {}
-func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
-
-func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} }
-func (*RollingUpdateDeployment) ProtoMessage() {}
-func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{10}
-}
-
-func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} }
-func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {}
-func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{11}
-}
-
-func (m *Scale) Reset() { *m = Scale{} }
-func (*Scale) ProtoMessage() {}
-func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
-
-func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
-func (*ScaleSpec) ProtoMessage() {}
-func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
-
-func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
-func (*ScaleStatus) ProtoMessage() {}
-func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
-
-func (m *StatefulSet) Reset() { *m = StatefulSet{} }
-func (*StatefulSet) ProtoMessage() {}
-func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
-
-func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} }
-func (*StatefulSetCondition) ProtoMessage() {}
-func (*StatefulSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
-
-func (m *StatefulSetList) Reset() { *m = StatefulSetList{} }
-func (*StatefulSetList) ProtoMessage() {}
-func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
-
-func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} }
-func (*StatefulSetSpec) ProtoMessage() {}
-func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
-
-func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} }
-func (*StatefulSetStatus) ProtoMessage() {}
-func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} }
-
-func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} }
-func (*StatefulSetUpdateStrategy) ProtoMessage() {}
-func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{20}
-}
-
-func init() {
- proto.RegisterType((*ControllerRevision)(nil), "k8s.io.api.apps.v1beta1.ControllerRevision")
- proto.RegisterType((*ControllerRevisionList)(nil), "k8s.io.api.apps.v1beta1.ControllerRevisionList")
- proto.RegisterType((*Deployment)(nil), "k8s.io.api.apps.v1beta1.Deployment")
- proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.api.apps.v1beta1.DeploymentCondition")
- proto.RegisterType((*DeploymentList)(nil), "k8s.io.api.apps.v1beta1.DeploymentList")
- proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.api.apps.v1beta1.DeploymentRollback")
- proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.api.apps.v1beta1.DeploymentSpec")
- proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.api.apps.v1beta1.DeploymentStatus")
- proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.api.apps.v1beta1.DeploymentStrategy")
- proto.RegisterType((*RollbackConfig)(nil), "k8s.io.api.apps.v1beta1.RollbackConfig")
- proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.api.apps.v1beta1.RollingUpdateDeployment")
- proto.RegisterType((*RollingUpdateStatefulSetStrategy)(nil), "k8s.io.api.apps.v1beta1.RollingUpdateStatefulSetStrategy")
- proto.RegisterType((*Scale)(nil), "k8s.io.api.apps.v1beta1.Scale")
- proto.RegisterType((*ScaleSpec)(nil), "k8s.io.api.apps.v1beta1.ScaleSpec")
- proto.RegisterType((*ScaleStatus)(nil), "k8s.io.api.apps.v1beta1.ScaleStatus")
- proto.RegisterType((*StatefulSet)(nil), "k8s.io.api.apps.v1beta1.StatefulSet")
- proto.RegisterType((*StatefulSetCondition)(nil), "k8s.io.api.apps.v1beta1.StatefulSetCondition")
- proto.RegisterType((*StatefulSetList)(nil), "k8s.io.api.apps.v1beta1.StatefulSetList")
- proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.api.apps.v1beta1.StatefulSetSpec")
- proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.api.apps.v1beta1.StatefulSetStatus")
- proto.RegisterType((*StatefulSetUpdateStrategy)(nil), "k8s.io.api.apps.v1beta1.StatefulSetUpdateStrategy")
-}
-func (m *ControllerRevision) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ControllerRevision) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Data.Size()))
- n2, err := m.Data.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
- return i, nil
-}
-
-func (m *ControllerRevisionList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ControllerRevisionList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n3, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *Deployment) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Deployment) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n5, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n6, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- return i, nil
-}
-
-func (m *DeploymentCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
- n7, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n8, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- return i, nil
-}
-
-func (m *DeploymentList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n9, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DeploymentRollback) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentRollback) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- if len(m.UpdatedAnnotations) > 0 {
- keysForUpdatedAnnotations := make([]string, 0, len(m.UpdatedAnnotations))
- for k := range m.UpdatedAnnotations {
- keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
- for _, k := range keysForUpdatedAnnotations {
- dAtA[i] = 0x12
- i++
- v := m.UpdatedAnnotations[string(k)]
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
- i += copy(dAtA[i:], v)
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
- n10, err := m.RollbackTo.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- return i, nil
-}
-
-func (m *DeploymentSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Replicas != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n11, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n12, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Strategy.Size()))
- n13, err := m.Strategy.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
- }
- dAtA[i] = 0x38
- i++
- if m.Paused {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if m.RollbackTo != nil {
- dAtA[i] = 0x42
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
- n14, err := m.RollbackTo.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n14
- }
- if m.ProgressDeadlineSeconds != nil {
- dAtA[i] = 0x48
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.ProgressDeadlineSeconds))
- }
- return i, nil
-}
-
-func (m *DeploymentStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UnavailableReplicas))
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x38
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
- if m.CollisionCount != nil {
- dAtA[i] = 0x40
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
- }
- return i, nil
-}
-
-func (m *DeploymentStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.RollingUpdate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
- n15, err := m.RollingUpdate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n15
- }
- return i, nil
-}
-
-func (m *RollbackConfig) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollbackConfig) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
- return i, nil
-}
-
-func (m *RollingUpdateDeployment) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollingUpdateDeployment) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
- n16, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n16
- }
- if m.MaxSurge != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxSurge.Size()))
- n17, err := m.MaxSurge.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n17
- }
- return i, nil
-}
-
-func (m *RollingUpdateStatefulSetStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollingUpdateStatefulSetStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Partition != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Partition))
- }
- return i, nil
-}
-
-func (m *Scale) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Scale) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n18, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n18
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n19, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n19
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n20, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n20
- return i, nil
-}
-
-func (m *ScaleSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ScaleSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- return i, nil
-}
-
-func (m *ScaleStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- if len(m.Selector) > 0 {
- keysForSelector := make([]string, 0, len(m.Selector))
- for k := range m.Selector {
- keysForSelector = append(keysForSelector, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
- for _, k := range keysForSelector {
- dAtA[i] = 0x12
- i++
- v := m.Selector[string(k)]
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
- i += copy(dAtA[i:], v)
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.TargetSelector)))
- i += copy(dAtA[i:], m.TargetSelector)
- return i, nil
-}
-
-func (m *StatefulSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n21, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n21
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n22, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n22
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n23, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n23
- return i, nil
-}
-
-func (m *StatefulSetCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n24, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n24
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *StatefulSetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n25, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n25
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *StatefulSetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Replicas != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n26, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n26
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n27, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n27
- if len(m.VolumeClaimTemplates) > 0 {
- for _, msg := range m.VolumeClaimTemplates {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName)))
- i += copy(dAtA[i:], m.ServiceName)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodManagementPolicy)))
- i += copy(dAtA[i:], m.PodManagementPolicy)
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size()))
- n28, err := m.UpdateStrategy.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n28
- if m.RevisionHistoryLimit != nil {
- dAtA[i] = 0x40
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
- }
- return i, nil
-}
-
-func (m *StatefulSetStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.ObservedGeneration != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
- }
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.CurrentRevision)))
- i += copy(dAtA[i:], m.CurrentRevision)
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.UpdateRevision)))
- i += copy(dAtA[i:], m.UpdateRevision)
- if m.CollisionCount != nil {
- dAtA[i] = 0x48
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x52
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *StatefulSetUpdateStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.RollingUpdate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
- n29, err := m.RollingUpdate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n29
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *ControllerRevision) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Data.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.Revision))
- return n
-}
-
-func (m *ControllerRevisionList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *Deployment) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeploymentCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastUpdateTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeploymentList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeploymentRollback) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.UpdatedAnnotations) > 0 {
- for k, v := range m.UpdatedAnnotations {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- l = m.RollbackTo.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeploymentSpec) Size() (n int) {
- var l int
- _ = l
- if m.Replicas != nil {
- n += 1 + sovGenerated(uint64(*m.Replicas))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Strategy.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
- }
- n += 2
- if m.RollbackTo != nil {
- l = m.RollbackTo.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.ProgressDeadlineSeconds != nil {
- n += 1 + sovGenerated(uint64(*m.ProgressDeadlineSeconds))
- }
- return n
-}
-
-func (m *DeploymentStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.Replicas))
- n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
- n += 1 + sovGenerated(uint64(m.AvailableReplicas))
- n += 1 + sovGenerated(uint64(m.UnavailableReplicas))
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- n += 1 + sovGenerated(uint64(m.ReadyReplicas))
- if m.CollisionCount != nil {
- n += 1 + sovGenerated(uint64(*m.CollisionCount))
- }
- return n
-}
-
-func (m *DeploymentStrategy) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.RollingUpdate != nil {
- l = m.RollingUpdate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *RollbackConfig) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Revision))
- return n
-}
-
-func (m *RollingUpdateDeployment) Size() (n int) {
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- l = m.MaxUnavailable.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.MaxSurge != nil {
- l = m.MaxSurge.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *RollingUpdateStatefulSetStrategy) Size() (n int) {
- var l int
- _ = l
- if m.Partition != nil {
- n += 1 + sovGenerated(uint64(*m.Partition))
- }
- return n
-}
-
-func (m *Scale) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ScaleSpec) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- return n
-}
-
-func (m *ScaleStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- if len(m.Selector) > 0 {
- for k, v := range m.Selector {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- l = len(m.TargetSelector)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *StatefulSet) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *StatefulSetCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *StatefulSetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *StatefulSetSpec) Size() (n int) {
- var l int
- _ = l
- if m.Replicas != nil {
- n += 1 + sovGenerated(uint64(*m.Replicas))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.VolumeClaimTemplates) > 0 {
- for _, e := range m.VolumeClaimTemplates {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = len(m.ServiceName)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.PodManagementPolicy)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.UpdateStrategy.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.RevisionHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
- }
- return n
-}
-
-func (m *StatefulSetStatus) Size() (n int) {
- var l int
- _ = l
- if m.ObservedGeneration != nil {
- n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
- }
- n += 1 + sovGenerated(uint64(m.Replicas))
- n += 1 + sovGenerated(uint64(m.ReadyReplicas))
- n += 1 + sovGenerated(uint64(m.CurrentReplicas))
- n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
- l = len(m.CurrentRevision)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.UpdateRevision)
- n += 1 + l + sovGenerated(uint64(l))
- if m.CollisionCount != nil {
- n += 1 + sovGenerated(uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *StatefulSetUpdateStrategy) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.RollingUpdate != nil {
- l = m.RollingUpdate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *ControllerRevision) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ControllerRevision{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Data:` + strings.Replace(strings.Replace(this.Data.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`,
- `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ControllerRevisionList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ControllerRevisionList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ControllerRevision", "ControllerRevision", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Deployment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Deployment{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Deployment", "Deployment", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentRollback) String() string {
- if this == nil {
- return "nil"
- }
- keysForUpdatedAnnotations := make([]string, 0, len(this.UpdatedAnnotations))
- for k := range this.UpdatedAnnotations {
- keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
- mapStringForUpdatedAnnotations := "map[string]string{"
- for _, k := range keysForUpdatedAnnotations {
- mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k])
- }
- mapStringForUpdatedAnnotations += "}"
- s := strings.Join([]string{`&DeploymentRollback{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `UpdatedAnnotations:` + mapStringForUpdatedAnnotations + `,`,
- `RollbackTo:` + strings.Replace(strings.Replace(this.RollbackTo.String(), "RollbackConfig", "RollbackConfig", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentSpec{`,
- `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`,
- `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
- `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
- `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`,
- `RollbackTo:` + strings.Replace(fmt.Sprintf("%v", this.RollbackTo), "RollbackConfig", "RollbackConfig", 1) + `,`,
- `ProgressDeadlineSeconds:` + valueToStringGenerated(this.ProgressDeadlineSeconds) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentStatus{`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
- `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
- `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + `,`,
- `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
- `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentStrategy{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDeployment", "RollingUpdateDeployment", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollbackConfig) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollbackConfig{`,
- `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollingUpdateDeployment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollingUpdateDeployment{`,
- `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollingUpdateStatefulSetStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollingUpdateStatefulSetStrategy{`,
- `Partition:` + valueToStringGenerated(this.Partition) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Scale) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Scale{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ScaleSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ScaleSpec{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ScaleStatus) String() string {
- if this == nil {
- return "nil"
- }
- keysForSelector := make([]string, 0, len(this.Selector))
- for k := range this.Selector {
- keysForSelector = append(keysForSelector, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
- mapStringForSelector := "map[string]string{"
- for _, k := range keysForSelector {
- mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
- }
- mapStringForSelector += "}"
- s := strings.Join([]string{`&ScaleStatus{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `Selector:` + mapStringForSelector + `,`,
- `TargetSelector:` + fmt.Sprintf("%v", this.TargetSelector) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSet{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StatefulSet", "StatefulSet", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetSpec{`,
- `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_api_core_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`,
- `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
- `PodManagementPolicy:` + fmt.Sprintf("%v", this.PodManagementPolicy) + `,`,
- `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "StatefulSetUpdateStrategy", "StatefulSetUpdateStrategy", 1), `&`, ``, 1) + `,`,
- `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetStatus{`,
- `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
- `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
- `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
- `CurrentRevision:` + fmt.Sprintf("%v", this.CurrentRevision) + `,`,
- `UpdateRevision:` + fmt.Sprintf("%v", this.UpdateRevision) + `,`,
- `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "StatefulSetCondition", "StatefulSetCondition", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetUpdateStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetUpdateStrategy{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateStatefulSetStrategy", "RollingUpdateStatefulSetStrategy", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *ControllerRevision) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ControllerRevision: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ControllerRevision: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
- }
- m.Revision = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Revision |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ControllerRevisionList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ControllerRevisionList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ControllerRevisionList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ControllerRevision{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Deployment) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Deployment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DeploymentConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Deployment{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentRollback) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentRollback: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentRollback: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAnnotations", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.UpdatedAnnotations == nil {
- m.UpdatedAnnotations = make(map[string]string)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapvalue uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapvalue := int(stringLenmapvalue)
- if intStringLenmapvalue < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapvalue := iNdEx + intStringLenmapvalue
- if postStringIndexmapvalue > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
- iNdEx = postStringIndexmapvalue
- m.UpdatedAnnotations[mapkey] = mapvalue
- } else {
- var mapvalue string
- m.UpdatedAnnotations[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Replicas = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
- }
- m.MinReadySeconds = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MinReadySeconds |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RevisionHistoryLimit = &v
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Paused = bool(v != 0)
- case 8:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollbackTo == nil {
- m.RollbackTo = &RollbackConfig{}
- }
- if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ProgressDeadlineSeconds", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ProgressDeadlineSeconds = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
- }
- m.UpdatedReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
- }
- m.AvailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.AvailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UnavailableReplicas", wireType)
- }
- m.UnavailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UnavailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, DeploymentCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
- }
- m.ReadyReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ReadyReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CollisionCount = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DeploymentStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollingUpdate == nil {
- m.RollingUpdate = &RollingUpdateDeployment{}
- }
- if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollbackConfig) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollbackConfig: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollbackConfig: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
- }
- m.Revision = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Revision |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollingUpdateDeployment) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollingUpdateDeployment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollingUpdateDeployment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxUnavailable == nil {
- m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxSurge", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxSurge == nil {
- m.MaxSurge = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxSurge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollingUpdateStatefulSetStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollingUpdateStatefulSetStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollingUpdateStatefulSetStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Partition = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Scale) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Scale: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ScaleSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ScaleStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.Selector == nil {
- m.Selector = make(map[string]string)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapvalue uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapvalue := int(stringLenmapvalue)
- if intStringLenmapvalue < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapvalue := iNdEx + intStringLenmapvalue
- if postStringIndexmapvalue > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
- iNdEx = postStringIndexmapvalue
- m.Selector[mapkey] = mapvalue
- } else {
- var mapvalue string
- m.Selector[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.TargetSelector = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = StatefulSetConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, StatefulSet{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Replicas = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field VolumeClaimTemplates", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.VolumeClaimTemplates = append(m.VolumeClaimTemplates, k8s_io_api_core_v1.PersistentVolumeClaim{})
- if err := m.VolumeClaimTemplates[len(m.VolumeClaimTemplates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ServiceName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PodManagementPolicy", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PodManagementPolicy = PodManagementPolicyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RevisionHistoryLimit = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ObservedGeneration = &v
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
- }
- m.ReadyReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ReadyReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
- }
- m.CurrentReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.CurrentReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
- }
- m.UpdatedReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentRevision", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CurrentRevision = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdateRevision", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UpdateRevision = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CollisionCount = &v
- case 10:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, StatefulSetCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetUpdateStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetUpdateStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = StatefulSetUpdateStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollingUpdate == nil {
- m.RollingUpdate = &RollingUpdateStatefulSetStrategy{}
- }
- if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 1871 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x1b, 0xc7,
- 0x15, 0xd7, 0x52, 0xa4, 0x44, 0x3d, 0x45, 0x94, 0x3d, 0x52, 0x2d, 0x46, 0x69, 0x29, 0x61, 0x1b,
- 0x24, 0x72, 0x12, 0x2d, 0x63, 0x25, 0x0d, 0x12, 0xbb, 0x08, 0x2a, 0xca, 0x6e, 0xe2, 0x40, 0xaa,
- 0x94, 0xa1, 0x94, 0xa2, 0x69, 0x0b, 0x64, 0xb8, 0x1c, 0xd3, 0x1b, 0xed, 0x3f, 0xec, 0x0e, 0x59,
- 0x13, 0xbd, 0xf4, 0x03, 0x14, 0x48, 0xcf, 0xfd, 0x14, 0x3d, 0x16, 0xed, 0xad, 0x27, 0x5f, 0x0a,
- 0x04, 0xbd, 0x34, 0x27, 0xa1, 0xa6, 0xaf, 0x6d, 0x6f, 0xbd, 0x18, 0x28, 0x50, 0xcc, 0xec, 0xec,
- 0xff, 0x5d, 0x89, 0x2a, 0x20, 0x1d, 0x72, 0xe3, 0xce, 0x7b, 0xef, 0xf7, 0xde, 0xcc, 0xbc, 0xf7,
- 0xe6, 0xfd, 0x08, 0x3f, 0x3a, 0x7d, 0xdf, 0xd7, 0x0c, 0xa7, 0x7d, 0x3a, 0xec, 0x51, 0xcf, 0xa6,
- 0x8c, 0xfa, 0xed, 0x11, 0xb5, 0xfb, 0x8e, 0xd7, 0x96, 0x02, 0xe2, 0x1a, 0x6d, 0xe2, 0xba, 0x7e,
- 0x7b, 0x74, 0xa7, 0x47, 0x19, 0xb9, 0xd3, 0x1e, 0x50, 0x9b, 0x7a, 0x84, 0xd1, 0xbe, 0xe6, 0x7a,
- 0x0e, 0x73, 0xd0, 0x5a, 0xa0, 0xa8, 0x11, 0xd7, 0xd0, 0xb8, 0xa2, 0x26, 0x15, 0xd7, 0xb7, 0x07,
- 0x06, 0x7b, 0x3c, 0xec, 0x69, 0xba, 0x63, 0xb5, 0x07, 0xce, 0xc0, 0x69, 0x0b, 0xfd, 0xde, 0xf0,
- 0x91, 0xf8, 0x12, 0x1f, 0xe2, 0x57, 0x80, 0xb3, 0xae, 0x26, 0x1c, 0xea, 0x8e, 0x47, 0xdb, 0xa3,
- 0x9c, 0xaf, 0xf5, 0xdb, 0x09, 0x1d, 0xd7, 0x31, 0x0d, 0x7d, 0x5c, 0x16, 0xd6, 0xfa, 0xbb, 0xb1,
- 0xaa, 0x45, 0xf4, 0xc7, 0x86, 0x4d, 0xbd, 0x71, 0xdb, 0x3d, 0x1d, 0xf0, 0x05, 0xbf, 0x6d, 0x51,
- 0x46, 0x8a, 0x1c, 0xb4, 0xcb, 0xac, 0xbc, 0xa1, 0xcd, 0x0c, 0x8b, 0xe6, 0x0c, 0xde, 0xbb, 0xc8,
- 0xc0, 0xd7, 0x1f, 0x53, 0x8b, 0xe4, 0xec, 0xde, 0x29, 0xb3, 0x1b, 0x32, 0xc3, 0x6c, 0x1b, 0x36,
- 0xf3, 0x99, 0x97, 0x35, 0x52, 0xff, 0xa3, 0x00, 0xda, 0x73, 0x6c, 0xe6, 0x39, 0xa6, 0x49, 0x3d,
- 0x4c, 0x47, 0x86, 0x6f, 0x38, 0x36, 0xfa, 0x02, 0xea, 0x7c, 0x3f, 0x7d, 0xc2, 0x48, 0x53, 0xd9,
- 0x54, 0xb6, 0x16, 0x77, 0xde, 0xd6, 0xe2, 0x4b, 0x89, 0xe0, 0x35, 0xf7, 0x74, 0xc0, 0x17, 0x7c,
- 0x8d, 0x6b, 0x6b, 0xa3, 0x3b, 0xda, 0x61, 0xef, 0x4b, 0xaa, 0xb3, 0x03, 0xca, 0x48, 0x07, 0x3d,
- 0x3d, 0xdb, 0x98, 0x99, 0x9c, 0x6d, 0x40, 0xbc, 0x86, 0x23, 0x54, 0x74, 0x08, 0x55, 0x81, 0x5e,
- 0x11, 0xe8, 0xdb, 0xa5, 0xe8, 0x72, 0xd3, 0x1a, 0x26, 0xbf, 0x7a, 0xf0, 0x84, 0x51, 0x9b, 0x87,
- 0xd7, 0x79, 0x49, 0x42, 0x57, 0xef, 0x13, 0x46, 0xb0, 0x00, 0x42, 0x6f, 0x41, 0xdd, 0x93, 0xe1,
- 0x37, 0x67, 0x37, 0x95, 0xad, 0xd9, 0xce, 0x0d, 0xa9, 0x55, 0x0f, 0xb7, 0x85, 0x23, 0x0d, 0xf5,
- 0xa9, 0x02, 0xb7, 0xf2, 0xfb, 0xde, 0x37, 0x7c, 0x86, 0x7e, 0x91, 0xdb, 0xbb, 0x36, 0xdd, 0xde,
- 0xb9, 0xb5, 0xd8, 0x79, 0xe4, 0x38, 0x5c, 0x49, 0xec, 0xfb, 0x08, 0x6a, 0x06, 0xa3, 0x96, 0xdf,
- 0xac, 0x6c, 0xce, 0x6e, 0x2d, 0xee, 0xbc, 0xa9, 0x95, 0xe4, 0xba, 0x96, 0x8f, 0xae, 0xb3, 0x24,
- 0x71, 0x6b, 0x0f, 0x39, 0x02, 0x0e, 0x80, 0xd4, 0xdf, 0x56, 0x00, 0xee, 0x53, 0xd7, 0x74, 0xc6,
- 0x16, 0xb5, 0xd9, 0x35, 0x5c, 0xdd, 0x43, 0xa8, 0xfa, 0x2e, 0xd5, 0xe5, 0xd5, 0xbd, 0x5e, 0xba,
- 0x83, 0x38, 0xa8, 0xae, 0x4b, 0xf5, 0xf8, 0xd2, 0xf8, 0x17, 0x16, 0x10, 0xe8, 0x53, 0x98, 0xf3,
- 0x19, 0x61, 0x43, 0x5f, 0x5c, 0xd9, 0xe2, 0xce, 0xed, 0x69, 0xc0, 0x84, 0x41, 0xa7, 0x21, 0xe1,
- 0xe6, 0x82, 0x6f, 0x2c, 0x81, 0xd4, 0xbf, 0xcf, 0xc2, 0x4a, 0xac, 0xbc, 0xe7, 0xd8, 0x7d, 0x83,
- 0xf1, 0x94, 0xbe, 0x07, 0x55, 0x36, 0x76, 0xa9, 0x38, 0x93, 0x85, 0xce, 0xeb, 0x61, 0x30, 0xc7,
- 0x63, 0x97, 0xbe, 0x38, 0xdb, 0x58, 0x2b, 0x30, 0xe1, 0x22, 0x2c, 0x8c, 0xd0, 0x7e, 0x14, 0x67,
- 0x45, 0x98, 0xbf, 0x9b, 0x76, 0xfe, 0xe2, 0x6c, 0xa3, 0xa0, 0xd7, 0x68, 0x11, 0x52, 0x3a, 0x44,
- 0xf4, 0x1a, 0xcc, 0x79, 0x94, 0xf8, 0x8e, 0xdd, 0xac, 0x0a, 0xb4, 0x68, 0x2b, 0x58, 0xac, 0x62,
- 0x29, 0x45, 0xb7, 0x61, 0xde, 0xa2, 0xbe, 0x4f, 0x06, 0xb4, 0x59, 0x13, 0x8a, 0xcb, 0x52, 0x71,
- 0xfe, 0x20, 0x58, 0xc6, 0xa1, 0x1c, 0x7d, 0x09, 0x0d, 0x93, 0xf8, 0xec, 0xc4, 0xed, 0x13, 0x46,
- 0x8f, 0x0d, 0x8b, 0x36, 0xe7, 0xc4, 0x81, 0xbe, 0x31, 0xdd, 0xdd, 0x73, 0x8b, 0xce, 0x2d, 0x89,
- 0xde, 0xd8, 0x4f, 0x21, 0xe1, 0x0c, 0x32, 0x1a, 0x01, 0xe2, 0x2b, 0xc7, 0x1e, 0xb1, 0xfd, 0xe0,
- 0xa0, 0xb8, 0xbf, 0xf9, 0x4b, 0xfb, 0x5b, 0x97, 0xfe, 0xd0, 0x7e, 0x0e, 0x0d, 0x17, 0x78, 0x50,
- 0xff, 0xa8, 0x40, 0x23, 0xbe, 0xa6, 0x6b, 0xa8, 0xd5, 0x8f, 0xd3, 0xb5, 0xfa, 0xfd, 0x29, 0x92,
- 0xb3, 0xa4, 0x46, 0xff, 0x59, 0x01, 0x14, 0x2b, 0x61, 0xc7, 0x34, 0x7b, 0x44, 0x3f, 0x45, 0x9b,
- 0x50, 0xb5, 0x89, 0x15, 0xe6, 0x64, 0x54, 0x20, 0x3f, 0x21, 0x16, 0xc5, 0x42, 0x82, 0xbe, 0x52,
- 0x00, 0x0d, 0xc5, 0xd1, 0xf7, 0x77, 0x6d, 0xdb, 0x61, 0x84, 0x9f, 0x46, 0x18, 0xd0, 0xde, 0x14,
- 0x01, 0x85, 0xbe, 0xb4, 0x93, 0x1c, 0xca, 0x03, 0x9b, 0x79, 0xe3, 0xf8, 0x16, 0xf2, 0x0a, 0xb8,
- 0xc0, 0x35, 0xfa, 0x39, 0x80, 0x27, 0x31, 0x8f, 0x1d, 0x59, 0xb6, 0xe5, 0x3d, 0x20, 0x74, 0xbf,
- 0xe7, 0xd8, 0x8f, 0x8c, 0x41, 0xdc, 0x58, 0x70, 0x04, 0x81, 0x13, 0x70, 0xeb, 0x0f, 0x60, 0xad,
- 0x24, 0x4e, 0x74, 0x03, 0x66, 0x4f, 0xe9, 0x38, 0x38, 0x2a, 0xcc, 0x7f, 0xa2, 0x55, 0xa8, 0x8d,
- 0x88, 0x39, 0xa4, 0x41, 0x4d, 0xe2, 0xe0, 0xe3, 0x6e, 0xe5, 0x7d, 0x45, 0xfd, 0x43, 0x2d, 0x99,
- 0x29, 0xbc, 0xdf, 0xa0, 0x2d, 0xfe, 0x3c, 0xb8, 0xa6, 0xa1, 0x13, 0x5f, 0x60, 0xd4, 0x3a, 0x2f,
- 0x05, 0x4f, 0x43, 0xb0, 0x86, 0x23, 0x29, 0xfa, 0x25, 0xd4, 0x7d, 0x6a, 0x52, 0x9d, 0x39, 0x9e,
- 0x6c, 0x71, 0xef, 0x4c, 0x99, 0x53, 0xa4, 0x47, 0xcd, 0xae, 0x34, 0x0d, 0xe0, 0xc3, 0x2f, 0x1c,
- 0x41, 0xa2, 0x4f, 0xa1, 0xce, 0xa8, 0xe5, 0x9a, 0x84, 0x51, 0x79, 0x7a, 0xa9, 0xbc, 0xe2, 0xbd,
- 0x83, 0x83, 0x1d, 0x39, 0xfd, 0x63, 0xa9, 0x26, 0xba, 0x67, 0x94, 0xa7, 0xe1, 0x2a, 0x8e, 0x60,
- 0xd0, 0xcf, 0xa0, 0xee, 0x33, 0xfe, 0xaa, 0x0f, 0xc6, 0xa2, 0xa3, 0x9c, 0xf7, 0xac, 0x24, 0xfb,
- 0x68, 0x60, 0x12, 0x43, 0x87, 0x2b, 0x38, 0x82, 0x43, 0xbb, 0xb0, 0x6c, 0x19, 0x36, 0xa6, 0xa4,
- 0x3f, 0xee, 0x52, 0xdd, 0xb1, 0xfb, 0xbe, 0x68, 0x45, 0xb5, 0xce, 0x9a, 0x34, 0x5a, 0x3e, 0x48,
- 0x8b, 0x71, 0x56, 0x1f, 0xed, 0xc3, 0x6a, 0xf8, 0xec, 0x7e, 0x6c, 0xf8, 0xcc, 0xf1, 0xc6, 0xfb,
- 0x86, 0x65, 0x30, 0xd1, 0xa0, 0x6a, 0x9d, 0xe6, 0xe4, 0x6c, 0x63, 0x15, 0x17, 0xc8, 0x71, 0xa1,
- 0x15, 0xef, 0x9d, 0x2e, 0x19, 0xfa, 0xb4, 0x2f, 0x1a, 0x4e, 0x3d, 0xee, 0x9d, 0x47, 0x62, 0x15,
- 0x4b, 0x29, 0xfa, 0x69, 0x2a, 0x4d, 0xeb, 0x97, 0x4b, 0xd3, 0x46, 0x79, 0x8a, 0xa2, 0x13, 0x58,
- 0x73, 0x3d, 0x67, 0xe0, 0x51, 0xdf, 0xbf, 0x4f, 0x49, 0xdf, 0x34, 0x6c, 0x1a, 0x9e, 0xcc, 0x82,
- 0xd8, 0xd1, 0x2b, 0x93, 0xb3, 0x8d, 0xb5, 0xa3, 0x62, 0x15, 0x5c, 0x66, 0xab, 0xfe, 0xa5, 0x0a,
- 0x37, 0xb2, 0x6f, 0x1c, 0xfa, 0x04, 0x90, 0xd3, 0xf3, 0xa9, 0x37, 0xa2, 0xfd, 0x8f, 0x82, 0xc1,
- 0x8d, 0x4f, 0x37, 0x8a, 0x98, 0x6e, 0xa2, 0xba, 0x3d, 0xcc, 0x69, 0xe0, 0x02, 0xab, 0x60, 0x3e,
- 0x92, 0x05, 0x50, 0x11, 0x81, 0x26, 0xe6, 0xa3, 0x5c, 0x11, 0xec, 0xc2, 0xb2, 0xac, 0xfd, 0x50,
- 0x28, 0x92, 0x35, 0x71, 0xef, 0x27, 0x69, 0x31, 0xce, 0xea, 0xa3, 0x8f, 0xe0, 0x26, 0x19, 0x11,
- 0xc3, 0x24, 0x3d, 0x93, 0x46, 0x20, 0x55, 0x01, 0xf2, 0xb2, 0x04, 0xb9, 0xb9, 0x9b, 0x55, 0xc0,
- 0x79, 0x1b, 0x74, 0x00, 0x2b, 0x43, 0x3b, 0x0f, 0x15, 0xe4, 0xe1, 0x2b, 0x12, 0x6a, 0xe5, 0x24,
- 0xaf, 0x82, 0x8b, 0xec, 0xd0, 0x17, 0x00, 0x7a, 0xf8, 0x30, 0xfb, 0xcd, 0x39, 0xd1, 0x49, 0xdf,
- 0x9a, 0xa2, 0x5e, 0xa2, 0xd7, 0x3c, 0xee, 0x62, 0xd1, 0x92, 0x8f, 0x13, 0x98, 0xe8, 0x1e, 0x2c,
- 0x79, 0xbc, 0x02, 0xa2, 0x50, 0xe7, 0x45, 0xa8, 0xdf, 0x91, 0x66, 0x4b, 0x38, 0x29, 0xc4, 0x69,
- 0x5d, 0x74, 0x17, 0x1a, 0xba, 0x63, 0x9a, 0x22, 0xf3, 0xf7, 0x9c, 0xa1, 0xcd, 0x44, 0xf2, 0xd6,
- 0x3a, 0x88, 0xbf, 0xcc, 0x7b, 0x29, 0x09, 0xce, 0x68, 0xaa, 0x7f, 0x56, 0x92, 0xcf, 0x4c, 0x58,
- 0xce, 0xe8, 0x6e, 0x6a, 0xf4, 0x79, 0x2d, 0x33, 0xfa, 0xdc, 0xca, 0x5b, 0x24, 0x26, 0x1f, 0x03,
- 0x96, 0x78, 0xf2, 0x1b, 0xf6, 0x20, 0xb8, 0x70, 0xd9, 0x12, 0xdf, 0x3e, 0xb7, 0x94, 0x22, 0xed,
- 0xc4, 0xc3, 0x78, 0x53, 0xec, 0x3c, 0x29, 0xc4, 0x69, 0x64, 0xf5, 0x43, 0x68, 0xa4, 0xeb, 0x30,
- 0x35, 0xd3, 0x2b, 0x17, 0xce, 0xf4, 0xcf, 0x15, 0x58, 0x2b, 0xf1, 0x8e, 0x4c, 0x68, 0x58, 0xe4,
- 0x49, 0x22, 0x47, 0x2e, 0x9c, 0x8d, 0x39, 0x6b, 0xd2, 0x02, 0xd6, 0xa4, 0x3d, 0xb4, 0xd9, 0xa1,
- 0xd7, 0x65, 0x9e, 0x61, 0x0f, 0x82, 0x7b, 0x38, 0x48, 0x61, 0xe1, 0x0c, 0x36, 0xfa, 0x1c, 0xea,
- 0x16, 0x79, 0xd2, 0x1d, 0x7a, 0x83, 0xa2, 0xf3, 0x9a, 0xce, 0x8f, 0x78, 0x3f, 0x0e, 0x24, 0x0a,
- 0x8e, 0xf0, 0xd4, 0x43, 0xd8, 0x4c, 0x6d, 0x92, 0xb7, 0x0a, 0xfa, 0x68, 0x68, 0x76, 0x69, 0x7c,
- 0xe1, 0x6f, 0xc2, 0x82, 0x4b, 0x3c, 0x66, 0x44, 0xed, 0xa2, 0xd6, 0x59, 0x9a, 0x9c, 0x6d, 0x2c,
- 0x1c, 0x85, 0x8b, 0x38, 0x96, 0xab, 0xff, 0x55, 0xa0, 0xd6, 0xd5, 0x89, 0x49, 0xaf, 0x81, 0x3a,
- 0xdc, 0x4f, 0x51, 0x07, 0xb5, 0x34, 0x89, 0x44, 0x3c, 0xa5, 0xac, 0x61, 0x3f, 0xc3, 0x1a, 0x5e,
- 0xbd, 0x00, 0xe7, 0x7c, 0xc2, 0xf0, 0x01, 0x2c, 0x44, 0xee, 0x52, 0x5d, 0x52, 0xb9, 0xa8, 0x4b,
- 0xaa, 0xbf, 0xaf, 0xc0, 0x62, 0xc2, 0xc5, 0xe5, 0xac, 0xf9, 0x71, 0x27, 0x06, 0x0d, 0xde, 0x86,
- 0x76, 0xa6, 0xd9, 0x88, 0x16, 0x0e, 0x15, 0xc1, 0xfc, 0x16, 0xbf, 0xde, 0xf9, 0x59, 0xe3, 0x43,
- 0x68, 0x30, 0xe2, 0x0d, 0x28, 0x0b, 0x65, 0xe2, 0xc0, 0x16, 0xe2, 0x49, 0xff, 0x38, 0x25, 0xc5,
- 0x19, 0xed, 0xf5, 0x7b, 0xb0, 0x94, 0x72, 0x76, 0xa9, 0x21, 0xec, 0x2b, 0x7e, 0x38, 0x71, 0x72,
- 0x5e, 0x43, 0x76, 0x7d, 0x92, 0xca, 0xae, 0xad, 0xf2, 0xc3, 0x4c, 0x94, 0x4c, 0x59, 0x8e, 0xe1,
- 0x4c, 0x8e, 0xbd, 0x31, 0x15, 0xda, 0xf9, 0x99, 0xf6, 0xaf, 0x0a, 0xac, 0x26, 0xb4, 0x63, 0x6e,
- 0xfa, 0xc3, 0x54, 0x83, 0xde, 0xca, 0x34, 0xe8, 0x66, 0x91, 0xcd, 0x95, 0x91, 0xd3, 0x62, 0x76,
- 0x37, 0x7b, 0xd5, 0xec, 0xee, 0x0a, 0x48, 0xb1, 0xfa, 0x27, 0x05, 0x96, 0x13, 0x67, 0x77, 0x0d,
- 0x8c, 0xf1, 0x61, 0x9a, 0x31, 0xbe, 0x3a, 0x4d, 0xd2, 0x94, 0x50, 0xc6, 0xbf, 0xd6, 0x52, 0xc1,
- 0x7f, 0xeb, 0x49, 0xcc, 0xaf, 0x61, 0x75, 0xe4, 0x98, 0x43, 0x8b, 0xee, 0x99, 0xc4, 0xb0, 0x42,
- 0x05, 0x3e, 0x31, 0xce, 0x66, 0xff, 0x18, 0x8a, 0xe0, 0xa9, 0xe7, 0x1b, 0x3e, 0xa3, 0x36, 0xfb,
- 0x2c, 0xb6, 0xec, 0x7c, 0x57, 0x3a, 0x59, 0xfd, 0xac, 0x00, 0x0e, 0x17, 0x3a, 0x41, 0x3f, 0x80,
- 0x45, 0x3e, 0x30, 0x1b, 0x3a, 0xe5, 0xdc, 0x5b, 0x26, 0xd6, 0x8a, 0x04, 0x5a, 0xec, 0xc6, 0x22,
- 0x9c, 0xd4, 0x43, 0x8f, 0x61, 0xc5, 0x75, 0xfa, 0x07, 0xc4, 0x26, 0x03, 0xca, 0xc7, 0x8c, 0x23,
- 0xf1, 0x07, 0xb2, 0x60, 0x36, 0x0b, 0x9d, 0xf7, 0xc2, 0xc9, 0xf4, 0x28, 0xaf, 0xf2, 0x82, 0x53,
- 0x84, 0xfc, 0xb2, 0x28, 0xea, 0x22, 0x48, 0xe4, 0x41, 0x63, 0x28, 0x9f, 0x7b, 0x49, 0xf4, 0x82,
- 0xff, 0x5b, 0x76, 0xa6, 0xc9, 0xb0, 0x93, 0x94, 0x65, 0xdc, 0xfd, 0xd3, 0xeb, 0x38, 0xe3, 0xa1,
- 0x94, 0xb8, 0xd5, 0xff, 0x1f, 0xe2, 0xa6, 0xfe, 0xbb, 0x0a, 0x37, 0x73, 0xad, 0x12, 0xfd, 0xf8,
- 0x1c, 0x86, 0x73, 0xeb, 0xca, 0xd8, 0x4d, 0x6e, 0x40, 0x9f, 0xbd, 0xc4, 0x80, 0xbe, 0x0b, 0xcb,
- 0xfa, 0xd0, 0xf3, 0xa8, 0xcd, 0x32, 0xac, 0x26, 0xa2, 0x46, 0x7b, 0x69, 0x31, 0xce, 0xea, 0x17,
- 0xb1, 0xab, 0xda, 0x25, 0xd9, 0x55, 0x32, 0x0a, 0x39, 0x21, 0x07, 0x69, 0x97, 0x8f, 0x42, 0x0e,
- 0xca, 0x59, 0x7d, 0x3e, 0x1d, 0x04, 0xa8, 0x11, 0xc2, 0x7c, 0x7a, 0x3a, 0x38, 0x49, 0x49, 0x71,
- 0x46, 0xbb, 0x80, 0xa9, 0x2c, 0x4c, 0xcb, 0x54, 0x10, 0x49, 0x91, 0x30, 0x10, 0x35, 0xbe, 0x3d,
- 0x4d, 0x2e, 0x4f, 0xcd, 0xc2, 0xd4, 0xbf, 0x29, 0xf0, 0x72, 0x69, 0x11, 0xa0, 0xdd, 0xd4, 0x93,
- 0xbb, 0x9d, 0x79, 0x72, 0xbf, 0x57, 0x6a, 0x98, 0x78, 0x77, 0xbd, 0x62, 0x6a, 0xf4, 0xc1, 0x74,
- 0xd4, 0xa8, 0x60, 0x6e, 0xbf, 0x98, 0x23, 0x75, 0xb6, 0x9f, 0x3e, 0x6b, 0xcd, 0x7c, 0xfd, 0xac,
- 0x35, 0xf3, 0xcd, 0xb3, 0xd6, 0xcc, 0x6f, 0x26, 0x2d, 0xe5, 0xe9, 0xa4, 0xa5, 0x7c, 0x3d, 0x69,
- 0x29, 0xdf, 0x4c, 0x5a, 0xca, 0x3f, 0x26, 0x2d, 0xe5, 0x77, 0xcf, 0x5b, 0x33, 0x9f, 0xcf, 0x4b,
- 0x8f, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x5d, 0x9e, 0x04, 0x8c, 0x1b, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/apps/v1beta1/generated.proto b/vendor/k8s.io/api/apps/v1beta1/generated.proto
deleted file mode 100644
index da160922d..000000000
--- a/vendor/k8s.io/api/apps/v1beta1/generated.proto
+++ /dev/null
@@ -1,484 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.apps.v1beta1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/api/policy/v1beta1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the
-// release notes for more information.
-// ControllerRevision implements an immutable snapshot of state data. Clients
-// are responsible for serializing and deserializing the objects that contain
-// their internal state.
-// Once a ControllerRevision has been successfully created, it can not be updated.
-// The API Server will fail validation of all requests that attempt to mutate
-// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
-// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
-// it may be subject to name and representation changes in future releases, and clients should not
-// depend on its stability. It is primarily for internal use by controllers.
-message ControllerRevision {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Data is the serialized representation of the state.
- optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2;
-
- // Revision indicates the revision of the state represented by Data.
- optional int64 revision = 3;
-}
-
-// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
-message ControllerRevisionList {
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of ControllerRevisions
- repeated ControllerRevision items = 2;
-}
-
-// DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for
-// more information.
-// Deployment enables declarative updates for Pods and ReplicaSets.
-message Deployment {
- // Standard object metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior of the Deployment.
- // +optional
- optional DeploymentSpec spec = 2;
-
- // Most recently observed status of the Deployment.
- // +optional
- optional DeploymentStatus status = 3;
-}
-
-// DeploymentCondition describes the state of a deployment at a certain point.
-message DeploymentCondition {
- // Type of deployment condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // The last time this condition was updated.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
-
- // Last time the condition transitioned from one status to another.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
-
- // The reason for the condition's last transition.
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- optional string message = 5;
-}
-
-// DeploymentList is a list of Deployments.
-message DeploymentList {
- // Standard list metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of Deployments.
- repeated Deployment items = 2;
-}
-
-// DEPRECATED.
-// DeploymentRollback stores the information required to rollback a deployment.
-message DeploymentRollback {
- // Required: This must match the Name of a deployment.
- optional string name = 1;
-
- // The annotations to be updated to a deployment
- // +optional
- map<string, string> updatedAnnotations = 2;
-
- // The config of this deployment rollback.
- optional RollbackConfig rollbackTo = 3;
-}
-
-// DeploymentSpec is the specification of the desired behavior of the Deployment.
-message DeploymentSpec {
- // Number of desired pods. This is a pointer to distinguish between explicit
- // zero and not specified. Defaults to 1.
- // +optional
- optional int32 replicas = 1;
-
- // Label selector for pods. Existing ReplicaSets whose pods are
- // selected by this will be the ones affected by this deployment.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // Template describes the pods that will be created.
- optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
-
- // The deployment strategy to use to replace existing pods with new ones.
- // +optional
- optional DeploymentStrategy strategy = 4;
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- optional int32 minReadySeconds = 5;
-
- // The number of old ReplicaSets to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 2.
- // +optional
- optional int32 revisionHistoryLimit = 6;
-
- // Indicates that the deployment is paused.
- // +optional
- optional bool paused = 7;
-
- // DEPRECATED.
- // The config this deployment is rolling back to. Will be cleared after rollback is done.
- // +optional
- optional RollbackConfig rollbackTo = 8;
-
- // The maximum time in seconds for a deployment to make progress before it
- // is considered to be failed. The deployment controller will continue to
- // process failed deployments and a condition with a ProgressDeadlineExceeded
- // reason will be surfaced in the deployment status. Note that progress will
- // not be estimated during the time a deployment is paused. Defaults to 600s.
- // +optional
- optional int32 progressDeadlineSeconds = 9;
-}
-
-// DeploymentStatus is the most recently observed status of the Deployment.
-message DeploymentStatus {
- // The generation observed by the deployment controller.
- // +optional
- optional int64 observedGeneration = 1;
-
- // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
- // +optional
- optional int32 replicas = 2;
-
- // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
- // +optional
- optional int32 updatedReplicas = 3;
-
- // Total number of ready pods targeted by this deployment.
- // +optional
- optional int32 readyReplicas = 7;
-
- // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
- // +optional
- optional int32 availableReplicas = 4;
-
- // Total number of unavailable pods targeted by this deployment. This is the total number of
- // pods that are still required for the deployment to have 100% available capacity. They may
- // either be pods that are running but not yet available or pods that still have not been created.
- // +optional
- optional int32 unavailableReplicas = 5;
-
- // Represents the latest available observations of a deployment's current state.
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated DeploymentCondition conditions = 6;
-
- // Count of hash collisions for the Deployment. The Deployment controller uses this
- // field as a collision avoidance mechanism when it needs to create the name for the
- // newest ReplicaSet.
- // +optional
- optional int32 collisionCount = 8;
-}
-
-// DeploymentStrategy describes how to replace existing pods with new ones.
-message DeploymentStrategy {
- // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
- // +optional
- optional string type = 1;
-
- // Rolling update config params. Present only if DeploymentStrategyType =
- // RollingUpdate.
- // ---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be.
- // +optional
- optional RollingUpdateDeployment rollingUpdate = 2;
-}
-
-// DEPRECATED.
-message RollbackConfig {
- // The revision to rollback to. If set to 0, rollback to the last revision.
- // +optional
- optional int64 revision = 1;
-}
-
-// Spec to control the desired behavior of rolling update.
-message RollingUpdateDeployment {
- // The maximum number of pods that can be unavailable during the update.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // Absolute number is calculated from percentage by rounding down.
- // This can not be 0 if MaxSurge is 0.
- // Defaults to 25%.
- // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
- // immediately when the rolling update starts. Once new pods are ready, old RC
- // can be scaled down further, followed by scaling up the new RC, ensuring
- // that the total number of pods available at all times during the update is at
- // least 70% of desired pods.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
-
- // The maximum number of pods that can be scheduled above the desired number of
- // pods.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // This can not be 0 if MaxUnavailable is 0.
- // Absolute number is calculated from percentage by rounding up.
- // Defaults to 25%.
- // Example: when this is set to 30%, the new RC can be scaled up immediately when
- // the rolling update starts, such that the total number of old and new pods do not exceed
- // 130% of desired pods. Once old pods have been killed,
- // new RC can be scaled up further, ensuring that total number of pods running
- // at any time during the update is atmost 130% of desired pods.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
-}
-
-// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
-message RollingUpdateStatefulSetStrategy {
- // Partition indicates the ordinal at which the StatefulSet should be
- // partitioned.
- optional int32 partition = 1;
-}
-
-// Scale represents a scaling request for a resource.
-message Scale {
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- optional ScaleSpec spec = 2;
-
- // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
- // +optional
- optional ScaleStatus status = 3;
-}
-
-// ScaleSpec describes the attributes of a scale subresource
-message ScaleSpec {
- // desired number of instances for the scaled object.
- // +optional
- optional int32 replicas = 1;
-}
-
-// ScaleStatus represents the current status of a scale subresource.
-message ScaleStatus {
- // actual number of observed instances of the scaled object.
- optional int32 replicas = 1;
-
- // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
- // +optional
- map<string, string> selector = 2;
-
- // label selector for pods that should match the replicas count. This is a serializated
- // version of both map-based and more expressive set-based selectors. This is done to
- // avoid introspection in the clients. The string will be in the same format as the
- // query-param syntax. If the target type only supports map-based selectors, both this
- // field and map-based selector field are populated.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- optional string targetSelector = 3;
-}
-
-// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for
-// more information.
-// StatefulSet represents a set of pods with consistent identities.
-// Identities are defined as:
-// - Network: A single stable DNS and hostname.
-// - Storage: As many VolumeClaims as requested.
-// The StatefulSet guarantees that a given network identity will always
-// map to the same storage identity.
-message StatefulSet {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec defines the desired identities of pods in this set.
- // +optional
- optional StatefulSetSpec spec = 2;
-
- // Status is the current status of Pods in this StatefulSet. This data
- // may be out of date by some window of time.
- // +optional
- optional StatefulSetStatus status = 3;
-}
-
-// StatefulSetCondition describes the state of a statefulset at a certain point.
-message StatefulSetCondition {
- // Type of statefulset condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // Last time the condition transitioned from one status to another.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // The reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- // +optional
- optional string message = 5;
-}
-
-// StatefulSetList is a collection of StatefulSets.
-message StatefulSetList {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- repeated StatefulSet items = 2;
-}
-
-// A StatefulSetSpec is the specification of a StatefulSet.
-message StatefulSetSpec {
- // replicas is the desired number of replicas of the given Template.
- // These are replicas in the sense that they are instantiations of the
- // same Template, but individual replicas also have a consistent identity.
- // If unspecified, defaults to 1.
- // TODO: Consider a rename of this field.
- // +optional
- optional int32 replicas = 1;
-
- // selector is a label query over pods that should match the replica count.
- // If empty, defaulted to labels on the pod template.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // template is the object that describes the pod that will be created if
- // insufficient replicas are detected. Each pod stamped out by the StatefulSet
- // will fulfill this Template, but have a unique identity from the rest
- // of the StatefulSet.
- optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
-
- // volumeClaimTemplates is a list of claims that pods are allowed to reference.
- // The StatefulSet controller is responsible for mapping network identities to
- // claims in a way that maintains the identity of a pod. Every claim in
- // this list must have at least one matching (by name) volumeMount in one
- // container in the template. A claim in this list takes precedence over
- // any volumes in the template, with the same name.
- // TODO: Define the behavior if a claim already exists with the same name.
- // +optional
- repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
-
- // serviceName is the name of the service that governs this StatefulSet.
- // This service must exist before the StatefulSet, and is responsible for
- // the network identity of the set. Pods get DNS/hostnames that follow the
- // pattern: pod-specific-string.serviceName.default.svc.cluster.local
- // where "pod-specific-string" is managed by the StatefulSet controller.
- optional string serviceName = 5;
-
- // podManagementPolicy controls how pods are created during initial scale up,
- // when replacing pods on nodes, or when scaling down. The default policy is
- // `OrderedReady`, where pods are created in increasing order (pod-0, then
- // pod-1, etc) and the controller will wait until each pod is ready before
- // continuing. When scaling down, the pods are removed in the opposite order.
- // The alternative policy is `Parallel` which will create pods in parallel
- // to match the desired scale without waiting, and on scale down will delete
- // all pods at once.
- // +optional
- optional string podManagementPolicy = 6;
-
- // updateStrategy indicates the StatefulSetUpdateStrategy that will be
- // employed to update Pods in the StatefulSet when a revision is made to
- // Template.
- optional StatefulSetUpdateStrategy updateStrategy = 7;
-
- // revisionHistoryLimit is the maximum number of revisions that will
- // be maintained in the StatefulSet's revision history. The revision history
- // consists of all revisions not represented by a currently applied
- // StatefulSetSpec version. The default value is 10.
- optional int32 revisionHistoryLimit = 8;
-}
-
-// StatefulSetStatus represents the current state of a StatefulSet.
-message StatefulSetStatus {
- // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
- // StatefulSet's generation, which is updated on mutation by the API Server.
- // +optional
- optional int64 observedGeneration = 1;
-
- // replicas is the number of Pods created by the StatefulSet controller.
- optional int32 replicas = 2;
-
- // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
- optional int32 readyReplicas = 3;
-
- // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by currentRevision.
- optional int32 currentReplicas = 4;
-
- // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by updateRevision.
- optional int32 updatedReplicas = 5;
-
- // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
- // sequence [0,currentReplicas).
- optional string currentRevision = 6;
-
- // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
- // [replicas-updatedReplicas,replicas)
- optional string updateRevision = 7;
-
- // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
- // uses this field as a collision avoidance mechanism when it needs to create the name for the
- // newest ControllerRevision.
- // +optional
- optional int32 collisionCount = 9;
-
- // Represents the latest available observations of a statefulset's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated StatefulSetCondition conditions = 10;
-}
-
-// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
-// controller will use to perform updates. It includes any additional parameters
-// necessary to perform the update for the indicated strategy.
-message StatefulSetUpdateStrategy {
- // Type indicates the type of the StatefulSetUpdateStrategy.
- optional string type = 1;
-
- // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
- optional RollingUpdateStatefulSetStrategy rollingUpdate = 2;
-}
-
diff --git a/vendor/k8s.io/api/apps/v1beta1/register.go b/vendor/k8s.io/api/apps/v1beta1/register.go
deleted file mode 100644
index 5b16819f2..000000000
--- a/vendor/k8s.io/api/apps/v1beta1/register.go
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "apps"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Deployment{},
- &DeploymentList{},
- &DeploymentRollback{},
- &Scale{},
- &StatefulSet{},
- &StatefulSetList{},
- &ControllerRevision{},
- &ControllerRevisionList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/apps/v1beta1/types.go b/vendor/k8s.io/api/apps/v1beta1/types.go
deleted file mode 100644
index dd9e97e10..000000000
--- a/vendor/k8s.io/api/apps/v1beta1/types.go
+++ /dev/null
@@ -1,568 +0,0 @@
-/*
-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 v1beta1
-
-import (
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-const (
- ControllerRevisionHashLabelKey = "controller-revision-hash"
- StatefulSetRevisionLabel = ControllerRevisionHashLabelKey
- StatefulSetPodNameLabel = "statefulset.kubernetes.io/pod-name"
-)
-
-// ScaleSpec describes the attributes of a scale subresource
-type ScaleSpec struct {
- // desired number of instances for the scaled object.
- // +optional
- Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-}
-
-// ScaleStatus represents the current status of a scale subresource.
-type ScaleStatus struct {
- // actual number of observed instances of the scaled object.
- Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
-
- // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
- // +optional
- Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
-
- // label selector for pods that should match the replicas count. This is a serializated
- // version of both map-based and more expressive set-based selectors. This is done to
- // avoid introspection in the clients. The string will be in the same format as the
- // query-param syntax. If the target type only supports map-based selectors, both this
- // field and map-based selector field are populated.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"`
-}
-
-// +genclient
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Scale represents a scaling request for a resource.
-type Scale struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
- // +optional
- Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for
-// more information.
-// StatefulSet represents a set of pods with consistent identities.
-// Identities are defined as:
-// - Network: A single stable DNS and hostname.
-// - Storage: As many VolumeClaims as requested.
-// The StatefulSet guarantees that a given network identity will always
-// map to the same storage identity.
-type StatefulSet struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec defines the desired identities of pods in this set.
- // +optional
- Spec StatefulSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is the current status of Pods in this StatefulSet. This data
- // may be out of date by some window of time.
- // +optional
- Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// PodManagementPolicyType defines the policy for creating pods under a stateful set.
-type PodManagementPolicyType string
-
-const (
- // OrderedReadyPodManagement will create pods in strictly increasing order on
- // scale up and strictly decreasing order on scale down, progressing only when
- // the previous pod is ready or terminated. At most one pod will be changed
- // at any time.
- OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
- // ParallelPodManagement will create and delete pods as soon as the stateful set
- // replica count is changed, and will not wait for pods to be ready or complete
- // termination.
- ParallelPodManagement = "Parallel"
-)
-
-// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
-// controller will use to perform updates. It includes any additional parameters
-// necessary to perform the update for the indicated strategy.
-type StatefulSetUpdateStrategy struct {
- // Type indicates the type of the StatefulSetUpdateStrategy.
- Type StatefulSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetStrategyType"`
- // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
- RollingUpdate *RollingUpdateStatefulSetStrategy `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
-}
-
-// StatefulSetUpdateStrategyType is a string enumeration type that enumerates
-// all possible update strategies for the StatefulSet controller.
-type StatefulSetUpdateStrategyType string
-
-const (
- // RollingUpdateStatefulSetStrategyType indicates that update will be
- // applied to all Pods in the StatefulSet with respect to the StatefulSet
- // ordering constraints. When a scale operation is performed with this
- // strategy, new Pods will be created from the specification version indicated
- // by the StatefulSet's updateRevision.
- RollingUpdateStatefulSetStrategyType = "RollingUpdate"
- // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version
- // tracking and ordered rolling restarts are disabled. Pods are recreated
- // from the StatefulSetSpec when they are manually deleted. When a scale
- // operation is performed with this strategy,specification version indicated
- // by the StatefulSet's currentRevision.
- OnDeleteStatefulSetStrategyType = "OnDelete"
-)
-
-// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
-type RollingUpdateStatefulSetStrategy struct {
- // Partition indicates the ordinal at which the StatefulSet should be
- // partitioned.
- Partition *int32 `json:"partition,omitempty" protobuf:"varint,1,opt,name=partition"`
-}
-
-// A StatefulSetSpec is the specification of a StatefulSet.
-type StatefulSetSpec struct {
- // replicas is the desired number of replicas of the given Template.
- // These are replicas in the sense that they are instantiations of the
- // same Template, but individual replicas also have a consistent identity.
- // If unspecified, defaults to 1.
- // TODO: Consider a rename of this field.
- // +optional
- Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-
- // selector is a label query over pods that should match the replica count.
- // If empty, defaulted to labels on the pod template.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
-
- // template is the object that describes the pod that will be created if
- // insufficient replicas are detected. Each pod stamped out by the StatefulSet
- // will fulfill this Template, but have a unique identity from the rest
- // of the StatefulSet.
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
-
- // volumeClaimTemplates is a list of claims that pods are allowed to reference.
- // The StatefulSet controller is responsible for mapping network identities to
- // claims in a way that maintains the identity of a pod. Every claim in
- // this list must have at least one matching (by name) volumeMount in one
- // container in the template. A claim in this list takes precedence over
- // any volumes in the template, with the same name.
- // TODO: Define the behavior if a claim already exists with the same name.
- // +optional
- VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
-
- // serviceName is the name of the service that governs this StatefulSet.
- // This service must exist before the StatefulSet, and is responsible for
- // the network identity of the set. Pods get DNS/hostnames that follow the
- // pattern: pod-specific-string.serviceName.default.svc.cluster.local
- // where "pod-specific-string" is managed by the StatefulSet controller.
- ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
-
- // podManagementPolicy controls how pods are created during initial scale up,
- // when replacing pods on nodes, or when scaling down. The default policy is
- // `OrderedReady`, where pods are created in increasing order (pod-0, then
- // pod-1, etc) and the controller will wait until each pod is ready before
- // continuing. When scaling down, the pods are removed in the opposite order.
- // The alternative policy is `Parallel` which will create pods in parallel
- // to match the desired scale without waiting, and on scale down will delete
- // all pods at once.
- // +optional
- PodManagementPolicy PodManagementPolicyType `json:"podManagementPolicy,omitempty" protobuf:"bytes,6,opt,name=podManagementPolicy,casttype=PodManagementPolicyType"`
-
- // updateStrategy indicates the StatefulSetUpdateStrategy that will be
- // employed to update Pods in the StatefulSet when a revision is made to
- // Template.
- UpdateStrategy StatefulSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,7,opt,name=updateStrategy"`
-
- // revisionHistoryLimit is the maximum number of revisions that will
- // be maintained in the StatefulSet's revision history. The revision history
- // consists of all revisions not represented by a currently applied
- // StatefulSetSpec version. The default value is 10.
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,8,opt,name=revisionHistoryLimit"`
-}
-
-// StatefulSetStatus represents the current state of a StatefulSet.
-type StatefulSetStatus struct {
- // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
- // StatefulSet's generation, which is updated on mutation by the API Server.
- // +optional
- ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // replicas is the number of Pods created by the StatefulSet controller.
- Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
-
- // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,3,opt,name=readyReplicas"`
-
- // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by currentRevision.
- CurrentReplicas int32 `json:"currentReplicas,omitempty" protobuf:"varint,4,opt,name=currentReplicas"`
-
- // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by updateRevision.
- UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,5,opt,name=updatedReplicas"`
-
- // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
- // sequence [0,currentReplicas).
- CurrentRevision string `json:"currentRevision,omitempty" protobuf:"bytes,6,opt,name=currentRevision"`
-
- // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
- // [replicas-updatedReplicas,replicas)
- UpdateRevision string `json:"updateRevision,omitempty" protobuf:"bytes,7,opt,name=updateRevision"`
-
- // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
- // uses this field as a collision avoidance mechanism when it needs to create the name for the
- // newest ControllerRevision.
- // +optional
- CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"`
-
- // Represents the latest available observations of a statefulset's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"`
-}
-
-type StatefulSetConditionType string
-
-// StatefulSetCondition describes the state of a statefulset at a certain point.
-type StatefulSetCondition struct {
- // Type of statefulset condition.
- Type StatefulSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // Last time the condition transitioned from one status to another.
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// StatefulSetList is a collection of StatefulSets.
-type StatefulSetList struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for
-// more information.
-// Deployment enables declarative updates for Pods and ReplicaSets.
-type Deployment struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior of the Deployment.
- // +optional
- Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Most recently observed status of the Deployment.
- // +optional
- Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// DeploymentSpec is the specification of the desired behavior of the Deployment.
-type DeploymentSpec struct {
- // Number of desired pods. This is a pointer to distinguish between explicit
- // zero and not specified. Defaults to 1.
- // +optional
- Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-
- // Label selector for pods. Existing ReplicaSets whose pods are
- // selected by this will be the ones affected by this deployment.
- // +optional
- Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
-
- // Template describes the pods that will be created.
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
-
- // The deployment strategy to use to replace existing pods with new ones.
- // +optional
- Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"`
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`
-
- // The number of old ReplicaSets to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 2.
- // +optional
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
-
- // Indicates that the deployment is paused.
- // +optional
- Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
-
- // DEPRECATED.
- // The config this deployment is rolling back to. Will be cleared after rollback is done.
- // +optional
- RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
-
- // The maximum time in seconds for a deployment to make progress before it
- // is considered to be failed. The deployment controller will continue to
- // process failed deployments and a condition with a ProgressDeadlineExceeded
- // reason will be surfaced in the deployment status. Note that progress will
- // not be estimated during the time a deployment is paused. Defaults to 600s.
- // +optional
- ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED.
-// DeploymentRollback stores the information required to rollback a deployment.
-type DeploymentRollback struct {
- metav1.TypeMeta `json:",inline"`
- // Required: This must match the Name of a deployment.
- Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
- // The annotations to be updated to a deployment
- // +optional
- UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"`
- // The config of this deployment rollback.
- RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
-}
-
-// DEPRECATED.
-type RollbackConfig struct {
- // The revision to rollback to. If set to 0, rollback to the last revision.
- // +optional
- Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"`
-}
-
-const (
- // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
- // to existing RCs (and label key that is added to its pods) to prevent the existing RCs
- // to select new pods (and old pods being select by new RC).
- DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
-)
-
-// DeploymentStrategy describes how to replace existing pods with new ones.
-type DeploymentStrategy struct {
- // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
- // +optional
- Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
-
- // Rolling update config params. Present only if DeploymentStrategyType =
- // RollingUpdate.
- //---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be.
- // +optional
- RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
-}
-
-type DeploymentStrategyType string
-
-const (
- // Kill all existing pods before creating new ones.
- RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
-
- // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
- RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
-)
-
-// Spec to control the desired behavior of rolling update.
-type RollingUpdateDeployment struct {
- // The maximum number of pods that can be unavailable during the update.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // Absolute number is calculated from percentage by rounding down.
- // This can not be 0 if MaxSurge is 0.
- // Defaults to 25%.
- // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
- // immediately when the rolling update starts. Once new pods are ready, old RC
- // can be scaled down further, followed by scaling up the new RC, ensuring
- // that the total number of pods available at all times during the update is at
- // least 70% of desired pods.
- // +optional
- MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
-
- // The maximum number of pods that can be scheduled above the desired number of
- // pods.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // This can not be 0 if MaxUnavailable is 0.
- // Absolute number is calculated from percentage by rounding up.
- // Defaults to 25%.
- // Example: when this is set to 30%, the new RC can be scaled up immediately when
- // the rolling update starts, such that the total number of old and new pods do not exceed
- // 130% of desired pods. Once old pods have been killed,
- // new RC can be scaled up further, ensuring that total number of pods running
- // at any time during the update is atmost 130% of desired pods.
- // +optional
- MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
-}
-
-// DeploymentStatus is the most recently observed status of the Deployment.
-type DeploymentStatus struct {
- // The generation observed by the deployment controller.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
- // +optional
- Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
-
- // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
- // +optional
- UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
-
- // Total number of ready pods targeted by this deployment.
- // +optional
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"`
-
- // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
- // +optional
- AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
-
- // Total number of unavailable pods targeted by this deployment. This is the total number of
- // pods that are still required for the deployment to have 100% available capacity. They may
- // either be pods that are running but not yet available or pods that still have not been created.
- // +optional
- UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
-
- // Represents the latest available observations of a deployment's current state.
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
-
- // Count of hash collisions for the Deployment. The Deployment controller uses this
- // field as a collision avoidance mechanism when it needs to create the name for the
- // newest ReplicaSet.
- // +optional
- CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,8,opt,name=collisionCount"`
-}
-
-type DeploymentConditionType string
-
-// These are valid conditions of a deployment.
-const (
- // Available means the deployment is available, ie. at least the minimum available
- // replicas required are up and running for at least minReadySeconds.
- DeploymentAvailable DeploymentConditionType = "Available"
- // Progressing means the deployment is progressing. Progress for a deployment is
- // considered when a new replica set is created or adopted, and when new pods scale
- // up or old pods scale down. Progress is not estimated for paused deployments or
- // when progressDeadlineSeconds is not specified.
- DeploymentProgressing DeploymentConditionType = "Progressing"
- // ReplicaFailure is added in a deployment when one of its pods fails to be created
- // or deleted.
- DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure"
-)
-
-// DeploymentCondition describes the state of a deployment at a certain point.
-type DeploymentCondition struct {
- // Type of deployment condition.
- Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // The last time this condition was updated.
- LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"`
- // Last time the condition transitioned from one status to another.
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DeploymentList is a list of Deployments.
-type DeploymentList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of Deployments.
- Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the
-// release notes for more information.
-// ControllerRevision implements an immutable snapshot of state data. Clients
-// are responsible for serializing and deserializing the objects that contain
-// their internal state.
-// Once a ControllerRevision has been successfully created, it can not be updated.
-// The API Server will fail validation of all requests that attempt to mutate
-// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
-// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
-// it may be subject to name and representation changes in future releases, and clients should not
-// depend on its stability. It is primarily for internal use by controllers.
-type ControllerRevision struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Data is the serialized representation of the state.
- Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
-
- // Revision indicates the revision of the state represented by Data.
- Revision int64 `json:"revision" protobuf:"varint,3,opt,name=revision"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
-type ControllerRevisionList struct {
- metav1.TypeMeta `json:",inline"`
-
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of ControllerRevisions
- Items []ControllerRevision `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index d12baf39f..000000000
--- a/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_ControllerRevision = map[string]string{
- "": "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "data": "Data is the serialized representation of the state.",
- "revision": "Revision indicates the revision of the state represented by Data.",
-}
-
-func (ControllerRevision) SwaggerDoc() map[string]string {
- return map_ControllerRevision
-}
-
-var map_ControllerRevisionList = map[string]string{
- "": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.",
- "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is the list of ControllerRevisions",
-}
-
-func (ControllerRevisionList) SwaggerDoc() map[string]string {
- return map_ControllerRevisionList
-}
-
-var map_Deployment = map[string]string{
- "": "DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.",
- "metadata": "Standard object metadata.",
- "spec": "Specification of the desired behavior of the Deployment.",
- "status": "Most recently observed status of the Deployment.",
-}
-
-func (Deployment) SwaggerDoc() map[string]string {
- return map_Deployment
-}
-
-var map_DeploymentCondition = map[string]string{
- "": "DeploymentCondition describes the state of a deployment at a certain point.",
- "type": "Type of deployment condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastUpdateTime": "The last time this condition was updated.",
- "lastTransitionTime": "Last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (DeploymentCondition) SwaggerDoc() map[string]string {
- return map_DeploymentCondition
-}
-
-var map_DeploymentList = map[string]string{
- "": "DeploymentList is a list of Deployments.",
- "metadata": "Standard list metadata.",
- "items": "Items is the list of Deployments.",
-}
-
-func (DeploymentList) SwaggerDoc() map[string]string {
- return map_DeploymentList
-}
-
-var map_DeploymentRollback = map[string]string{
- "": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.",
- "name": "Required: This must match the Name of a deployment.",
- "updatedAnnotations": "The annotations to be updated to a deployment",
- "rollbackTo": "The config of this deployment rollback.",
-}
-
-func (DeploymentRollback) SwaggerDoc() map[string]string {
- return map_DeploymentRollback
-}
-
-var map_DeploymentSpec = map[string]string{
- "": "DeploymentSpec is the specification of the desired behavior of the Deployment.",
- "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
- "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.",
- "template": "Template describes the pods that will be created.",
- "strategy": "The deployment strategy to use to replace existing pods with new ones.",
- "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
- "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.",
- "paused": "Indicates that the deployment is paused.",
- "rollbackTo": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.",
- "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.",
-}
-
-func (DeploymentSpec) SwaggerDoc() map[string]string {
- return map_DeploymentSpec
-}
-
-var map_DeploymentStatus = map[string]string{
- "": "DeploymentStatus is the most recently observed status of the Deployment.",
- "observedGeneration": "The generation observed by the deployment controller.",
- "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).",
- "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.",
- "readyReplicas": "Total number of ready pods targeted by this deployment.",
- "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.",
- "unavailableReplicas": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.",
- "conditions": "Represents the latest available observations of a deployment's current state.",
- "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.",
-}
-
-func (DeploymentStatus) SwaggerDoc() map[string]string {
- return map_DeploymentStatus
-}
-
-var map_DeploymentStrategy = map[string]string{
- "": "DeploymentStrategy describes how to replace existing pods with new ones.",
- "type": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.",
- "rollingUpdate": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.",
-}
-
-func (DeploymentStrategy) SwaggerDoc() map[string]string {
- return map_DeploymentStrategy
-}
-
-var map_RollbackConfig = map[string]string{
- "": "DEPRECATED.",
- "revision": "The revision to rollback to. If set to 0, rollback to the last revision.",
-}
-
-func (RollbackConfig) SwaggerDoc() map[string]string {
- return map_RollbackConfig
-}
-
-var map_RollingUpdateDeployment = map[string]string{
- "": "Spec to control the desired behavior of rolling update.",
- "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.",
- "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.",
-}
-
-func (RollingUpdateDeployment) SwaggerDoc() map[string]string {
- return map_RollingUpdateDeployment
-}
-
-var map_RollingUpdateStatefulSetStrategy = map[string]string{
- "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.",
- "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned.",
-}
-
-func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string {
- return map_RollingUpdateStatefulSetStrategy
-}
-
-var map_Scale = map[string]string{
- "": "Scale represents a scaling request for a resource.",
- "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
- "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
- "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.",
-}
-
-func (Scale) SwaggerDoc() map[string]string {
- return map_Scale
-}
-
-var map_ScaleSpec = map[string]string{
- "": "ScaleSpec describes the attributes of a scale subresource",
- "replicas": "desired number of instances for the scaled object.",
-}
-
-func (ScaleSpec) SwaggerDoc() map[string]string {
- return map_ScaleSpec
-}
-
-var map_ScaleStatus = map[string]string{
- "": "ScaleStatus represents the current status of a scale subresource.",
- "replicas": "actual number of observed instances of the scaled object.",
- "selector": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors",
- "targetSelector": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
-}
-
-func (ScaleStatus) SwaggerDoc() map[string]string {
- return map_ScaleStatus
-}
-
-var map_StatefulSet = map[string]string{
- "": "DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.",
- "spec": "Spec defines the desired identities of pods in this set.",
- "status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.",
-}
-
-func (StatefulSet) SwaggerDoc() map[string]string {
- return map_StatefulSet
-}
-
-var map_StatefulSetCondition = map[string]string{
- "": "StatefulSetCondition describes the state of a statefulset at a certain point.",
- "type": "Type of statefulset condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastTransitionTime": "Last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (StatefulSetCondition) SwaggerDoc() map[string]string {
- return map_StatefulSetCondition
-}
-
-var map_StatefulSetList = map[string]string{
- "": "StatefulSetList is a collection of StatefulSets.",
-}
-
-func (StatefulSetList) SwaggerDoc() map[string]string {
- return map_StatefulSetList
-}
-
-var map_StatefulSetSpec = map[string]string{
- "": "A StatefulSetSpec is the specification of a StatefulSet.",
- "replicas": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
- "selector": "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- "template": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.",
- "volumeClaimTemplates": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
- "serviceName": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
- "podManagementPolicy": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.",
- "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.",
- "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.",
-}
-
-func (StatefulSetSpec) SwaggerDoc() map[string]string {
- return map_StatefulSetSpec
-}
-
-var map_StatefulSetStatus = map[string]string{
- "": "StatefulSetStatus represents the current state of a StatefulSet.",
- "observedGeneration": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.",
- "replicas": "replicas is the number of Pods created by the StatefulSet controller.",
- "readyReplicas": "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.",
- "currentReplicas": "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.",
- "updatedReplicas": "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.",
- "currentRevision": "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).",
- "updateRevision": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)",
- "collisionCount": "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
- "conditions": "Represents the latest available observations of a statefulset's current state.",
-}
-
-func (StatefulSetStatus) SwaggerDoc() map[string]string {
- return map_StatefulSetStatus
-}
-
-var map_StatefulSetUpdateStrategy = map[string]string{
- "": "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.",
- "type": "Type indicates the type of the StatefulSetUpdateStrategy.",
- "rollingUpdate": "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.",
-}
-
-func (StatefulSetUpdateStrategy) SwaggerDoc() map[string]string {
- return map_StatefulSetUpdateStrategy
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index b06032e1e..000000000
--- a/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,658 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- core_v1 "k8s.io/api/core/v1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- intstr "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ControllerRevision) DeepCopyInto(out *ControllerRevision) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Data.DeepCopyInto(&out.Data)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevision.
-func (in *ControllerRevision) DeepCopy() *ControllerRevision {
- if in == nil {
- return nil
- }
- out := new(ControllerRevision)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ControllerRevision) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ControllerRevisionList) DeepCopyInto(out *ControllerRevisionList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ControllerRevision, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevisionList.
-func (in *ControllerRevisionList) DeepCopy() *ControllerRevisionList {
- if in == nil {
- return nil
- }
- out := new(ControllerRevisionList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ControllerRevisionList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Deployment) DeepCopyInto(out *Deployment) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Deployment.
-func (in *Deployment) DeepCopy() *Deployment {
- if in == nil {
- return nil
- }
- out := new(Deployment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Deployment) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentCondition) DeepCopyInto(out *DeploymentCondition) {
- *out = *in
- in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime)
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentCondition.
-func (in *DeploymentCondition) DeepCopy() *DeploymentCondition {
- if in == nil {
- return nil
- }
- out := new(DeploymentCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentList) DeepCopyInto(out *DeploymentList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Deployment, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentList.
-func (in *DeploymentList) DeepCopy() *DeploymentList {
- if in == nil {
- return nil
- }
- out := new(DeploymentList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DeploymentList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentRollback) DeepCopyInto(out *DeploymentRollback) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- if in.UpdatedAnnotations != nil {
- in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- }
- out.RollbackTo = in.RollbackTo
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentRollback.
-func (in *DeploymentRollback) DeepCopy() *DeploymentRollback {
- if in == nil {
- return nil
- }
- out := new(DeploymentRollback)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DeploymentRollback) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- in.Strategy.DeepCopyInto(&out.Strategy)
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.RollbackTo != nil {
- in, out := &in.RollbackTo, &out.RollbackTo
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollbackConfig)
- **out = **in
- }
- }
- if in.ProgressDeadlineSeconds != nil {
- in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpec.
-func (in *DeploymentSpec) DeepCopy() *DeploymentSpec {
- if in == nil {
- return nil
- }
- out := new(DeploymentSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]DeploymentCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.CollisionCount != nil {
- in, out := &in.CollisionCount, &out.CollisionCount
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStatus.
-func (in *DeploymentStatus) DeepCopy() *DeploymentStatus {
- if in == nil {
- return nil
- }
- out := new(DeploymentStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollingUpdateDeployment)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStrategy.
-func (in *DeploymentStrategy) DeepCopy() *DeploymentStrategy {
- if in == nil {
- return nil
- }
- out := new(DeploymentStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollbackConfig) DeepCopyInto(out *RollbackConfig) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollbackConfig.
-func (in *RollbackConfig) DeepCopy() *RollbackConfig {
- if in == nil {
- return nil
- }
- out := new(RollbackConfig)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollingUpdateDeployment) DeepCopyInto(out *RollingUpdateDeployment) {
- *out = *in
- if in.MaxUnavailable != nil {
- in, out := &in.MaxUnavailable, &out.MaxUnavailable
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- if in.MaxSurge != nil {
- in, out := &in.MaxSurge, &out.MaxSurge
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateDeployment.
-func (in *RollingUpdateDeployment) DeepCopy() *RollingUpdateDeployment {
- if in == nil {
- return nil
- }
- out := new(RollingUpdateDeployment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateStatefulSetStrategy) {
- *out = *in
- if in.Partition != nil {
- in, out := &in.Partition, &out.Partition
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateStatefulSetStrategy.
-func (in *RollingUpdateStatefulSetStrategy) DeepCopy() *RollingUpdateStatefulSetStrategy {
- if in == nil {
- return nil
- }
- out := new(RollingUpdateStatefulSetStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Scale) DeepCopyInto(out *Scale) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- out.Spec = in.Spec
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scale.
-func (in *Scale) DeepCopy() *Scale {
- if in == nil {
- return nil
- }
- out := new(Scale)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Scale) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ScaleSpec) DeepCopyInto(out *ScaleSpec) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleSpec.
-func (in *ScaleSpec) DeepCopy() *ScaleSpec {
- if in == nil {
- return nil
- }
- out := new(ScaleSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ScaleStatus) DeepCopyInto(out *ScaleStatus) {
- *out = *in
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleStatus.
-func (in *ScaleStatus) DeepCopy() *ScaleStatus {
- if in == nil {
- return nil
- }
- out := new(ScaleStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSet) DeepCopyInto(out *StatefulSet) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSet.
-func (in *StatefulSet) DeepCopy() *StatefulSet {
- if in == nil {
- return nil
- }
- out := new(StatefulSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *StatefulSet) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetCondition) DeepCopyInto(out *StatefulSetCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetCondition.
-func (in *StatefulSetCondition) DeepCopy() *StatefulSetCondition {
- if in == nil {
- return nil
- }
- out := new(StatefulSetCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]StatefulSet, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetList.
-func (in *StatefulSetList) DeepCopy() *StatefulSetList {
- if in == nil {
- return nil
- }
- out := new(StatefulSetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *StatefulSetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- if in.VolumeClaimTemplates != nil {
- in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
- *out = make([]core_v1.PersistentVolumeClaim, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy)
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetSpec.
-func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec {
- if in == nil {
- return nil
- }
- out := new(StatefulSetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) {
- *out = *in
- if in.ObservedGeneration != nil {
- in, out := &in.ObservedGeneration, &out.ObservedGeneration
- if *in == nil {
- *out = nil
- } else {
- *out = new(int64)
- **out = **in
- }
- }
- if in.CollisionCount != nil {
- in, out := &in.CollisionCount, &out.CollisionCount
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]StatefulSetCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetStatus.
-func (in *StatefulSetStatus) DeepCopy() *StatefulSetStatus {
- if in == nil {
- return nil
- }
- out := new(StatefulSetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetUpdateStrategy) DeepCopyInto(out *StatefulSetUpdateStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollingUpdateStatefulSetStrategy)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetUpdateStrategy.
-func (in *StatefulSetUpdateStrategy) DeepCopy() *StatefulSetUpdateStrategy {
- if in == nil {
- return nil
- }
- out := new(StatefulSetUpdateStrategy)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/apps/v1beta2/doc.go b/vendor/k8s.io/api/apps/v1beta2/doc.go
deleted file mode 100644
index e93e164e1..000000000
--- a/vendor/k8s.io/api/apps/v1beta2/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-package v1beta2 // import "k8s.io/api/apps/v1beta2"
diff --git a/vendor/k8s.io/api/apps/v1beta2/generated.pb.go b/vendor/k8s.io/api/apps/v1beta2/generated.pb.go
deleted file mode 100644
index cfd422edb..000000000
--- a/vendor/k8s.io/api/apps/v1beta2/generated.pb.go
+++ /dev/null
@@ -1,7586 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta2/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta2 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta2/generated.proto
-
- It has these top-level messages:
- ControllerRevision
- ControllerRevisionList
- DaemonSet
- DaemonSetCondition
- DaemonSetList
- DaemonSetSpec
- DaemonSetStatus
- DaemonSetUpdateStrategy
- Deployment
- DeploymentCondition
- DeploymentList
- DeploymentSpec
- DeploymentStatus
- DeploymentStrategy
- ReplicaSet
- ReplicaSetCondition
- ReplicaSetList
- ReplicaSetSpec
- ReplicaSetStatus
- RollingUpdateDaemonSet
- RollingUpdateDeployment
- RollingUpdateStatefulSetStrategy
- Scale
- ScaleSpec
- ScaleStatus
- StatefulSet
- StatefulSetCondition
- StatefulSetList
- StatefulSetSpec
- StatefulSetStatus
- StatefulSetUpdateStrategy
-*/
-package v1beta2
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *ControllerRevision) Reset() { *m = ControllerRevision{} }
-func (*ControllerRevision) ProtoMessage() {}
-func (*ControllerRevision) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} }
-func (*ControllerRevisionList) ProtoMessage() {}
-func (*ControllerRevisionList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *DaemonSet) Reset() { *m = DaemonSet{} }
-func (*DaemonSet) ProtoMessage() {}
-func (*DaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} }
-func (*DaemonSetCondition) ProtoMessage() {}
-func (*DaemonSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *DaemonSetList) Reset() { *m = DaemonSetList{} }
-func (*DaemonSetList) ProtoMessage() {}
-func (*DaemonSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} }
-func (*DaemonSetSpec) ProtoMessage() {}
-func (*DaemonSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} }
-func (*DaemonSetStatus) ProtoMessage() {}
-func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} }
-func (*DaemonSetUpdateStrategy) ProtoMessage() {}
-func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func (m *Deployment) Reset() { *m = Deployment{} }
-func (*Deployment) ProtoMessage() {}
-func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} }
-func (*DeploymentCondition) ProtoMessage() {}
-func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
-
-func (m *DeploymentList) Reset() { *m = DeploymentList{} }
-func (*DeploymentList) ProtoMessage() {}
-func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} }
-func (*DeploymentSpec) ProtoMessage() {}
-func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
-
-func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} }
-func (*DeploymentStatus) ProtoMessage() {}
-func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
-
-func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} }
-func (*DeploymentStrategy) ProtoMessage() {}
-func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
-
-func (m *ReplicaSet) Reset() { *m = ReplicaSet{} }
-func (*ReplicaSet) ProtoMessage() {}
-func (*ReplicaSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
-
-func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} }
-func (*ReplicaSetCondition) ProtoMessage() {}
-func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
-
-func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} }
-func (*ReplicaSetList) ProtoMessage() {}
-func (*ReplicaSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
-
-func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} }
-func (*ReplicaSetSpec) ProtoMessage() {}
-func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
-
-func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} }
-func (*ReplicaSetStatus) ProtoMessage() {}
-func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
-
-func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} }
-func (*RollingUpdateDaemonSet) ProtoMessage() {}
-func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} }
-
-func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} }
-func (*RollingUpdateDeployment) ProtoMessage() {}
-func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{20}
-}
-
-func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} }
-func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {}
-func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{21}
-}
-
-func (m *Scale) Reset() { *m = Scale{} }
-func (*Scale) ProtoMessage() {}
-func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} }
-
-func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
-func (*ScaleSpec) ProtoMessage() {}
-func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} }
-
-func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
-func (*ScaleStatus) ProtoMessage() {}
-func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} }
-
-func (m *StatefulSet) Reset() { *m = StatefulSet{} }
-func (*StatefulSet) ProtoMessage() {}
-func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} }
-
-func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} }
-func (*StatefulSetCondition) ProtoMessage() {}
-func (*StatefulSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} }
-
-func (m *StatefulSetList) Reset() { *m = StatefulSetList{} }
-func (*StatefulSetList) ProtoMessage() {}
-func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} }
-
-func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} }
-func (*StatefulSetSpec) ProtoMessage() {}
-func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} }
-
-func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} }
-func (*StatefulSetStatus) ProtoMessage() {}
-func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} }
-
-func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} }
-func (*StatefulSetUpdateStrategy) ProtoMessage() {}
-func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{30}
-}
-
-func init() {
- proto.RegisterType((*ControllerRevision)(nil), "k8s.io.api.apps.v1beta2.ControllerRevision")
- proto.RegisterType((*ControllerRevisionList)(nil), "k8s.io.api.apps.v1beta2.ControllerRevisionList")
- proto.RegisterType((*DaemonSet)(nil), "k8s.io.api.apps.v1beta2.DaemonSet")
- proto.RegisterType((*DaemonSetCondition)(nil), "k8s.io.api.apps.v1beta2.DaemonSetCondition")
- proto.RegisterType((*DaemonSetList)(nil), "k8s.io.api.apps.v1beta2.DaemonSetList")
- proto.RegisterType((*DaemonSetSpec)(nil), "k8s.io.api.apps.v1beta2.DaemonSetSpec")
- proto.RegisterType((*DaemonSetStatus)(nil), "k8s.io.api.apps.v1beta2.DaemonSetStatus")
- proto.RegisterType((*DaemonSetUpdateStrategy)(nil), "k8s.io.api.apps.v1beta2.DaemonSetUpdateStrategy")
- proto.RegisterType((*Deployment)(nil), "k8s.io.api.apps.v1beta2.Deployment")
- proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.api.apps.v1beta2.DeploymentCondition")
- proto.RegisterType((*DeploymentList)(nil), "k8s.io.api.apps.v1beta2.DeploymentList")
- proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.api.apps.v1beta2.DeploymentSpec")
- proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.api.apps.v1beta2.DeploymentStatus")
- proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.api.apps.v1beta2.DeploymentStrategy")
- proto.RegisterType((*ReplicaSet)(nil), "k8s.io.api.apps.v1beta2.ReplicaSet")
- proto.RegisterType((*ReplicaSetCondition)(nil), "k8s.io.api.apps.v1beta2.ReplicaSetCondition")
- proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.api.apps.v1beta2.ReplicaSetList")
- proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.api.apps.v1beta2.ReplicaSetSpec")
- proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.api.apps.v1beta2.ReplicaSetStatus")
- proto.RegisterType((*RollingUpdateDaemonSet)(nil), "k8s.io.api.apps.v1beta2.RollingUpdateDaemonSet")
- proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.api.apps.v1beta2.RollingUpdateDeployment")
- proto.RegisterType((*RollingUpdateStatefulSetStrategy)(nil), "k8s.io.api.apps.v1beta2.RollingUpdateStatefulSetStrategy")
- proto.RegisterType((*Scale)(nil), "k8s.io.api.apps.v1beta2.Scale")
- proto.RegisterType((*ScaleSpec)(nil), "k8s.io.api.apps.v1beta2.ScaleSpec")
- proto.RegisterType((*ScaleStatus)(nil), "k8s.io.api.apps.v1beta2.ScaleStatus")
- proto.RegisterType((*StatefulSet)(nil), "k8s.io.api.apps.v1beta2.StatefulSet")
- proto.RegisterType((*StatefulSetCondition)(nil), "k8s.io.api.apps.v1beta2.StatefulSetCondition")
- proto.RegisterType((*StatefulSetList)(nil), "k8s.io.api.apps.v1beta2.StatefulSetList")
- proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.api.apps.v1beta2.StatefulSetSpec")
- proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.api.apps.v1beta2.StatefulSetStatus")
- proto.RegisterType((*StatefulSetUpdateStrategy)(nil), "k8s.io.api.apps.v1beta2.StatefulSetUpdateStrategy")
-}
-func (m *ControllerRevision) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ControllerRevision) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Data.Size()))
- n2, err := m.Data.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
- return i, nil
-}
-
-func (m *ControllerRevisionList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ControllerRevisionList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n3, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DaemonSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n5, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n6, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- return i, nil
-}
-
-func (m *DaemonSetCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n7, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *DaemonSetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n8, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DaemonSetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Selector != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n9, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- }
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n10, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size()))
- n11, err := m.UpdateStrategy.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
- }
- return i, nil
-}
-
-func (m *DaemonSetStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentNumberScheduled))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberMisscheduled))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredNumberScheduled))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberReady))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedNumberScheduled))
- dAtA[i] = 0x38
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberAvailable))
- dAtA[i] = 0x40
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberUnavailable))
- if m.CollisionCount != nil {
- dAtA[i] = 0x48
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x52
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DaemonSetUpdateStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.RollingUpdate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
- n12, err := m.RollingUpdate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- }
- return i, nil
-}
-
-func (m *Deployment) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Deployment) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n13, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n14, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n14
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n15, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n15
- return i, nil
-}
-
-func (m *DeploymentCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
- n16, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n16
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n17, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n17
- return i, nil
-}
-
-func (m *DeploymentList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n18, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n18
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DeploymentSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Replicas != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n19, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n19
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n20, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n20
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Strategy.Size()))
- n21, err := m.Strategy.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n21
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
- }
- dAtA[i] = 0x38
- i++
- if m.Paused {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if m.ProgressDeadlineSeconds != nil {
- dAtA[i] = 0x48
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.ProgressDeadlineSeconds))
- }
- return i, nil
-}
-
-func (m *DeploymentStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UnavailableReplicas))
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x38
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
- if m.CollisionCount != nil {
- dAtA[i] = 0x40
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
- }
- return i, nil
-}
-
-func (m *DeploymentStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.RollingUpdate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
- n22, err := m.RollingUpdate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n22
- }
- return i, nil
-}
-
-func (m *ReplicaSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n23, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n23
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n24, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n24
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n25, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n25
- return i, nil
-}
-
-func (m *ReplicaSetCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n26, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n26
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *ReplicaSetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n27, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n27
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ReplicaSetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Replicas != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n28, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n28
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n29, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n29
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
- return i, nil
-}
-
-func (m *ReplicaSetStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.FullyLabeledReplicas))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RollingUpdateDaemonSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollingUpdateDaemonSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
- n30, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n30
- }
- return i, nil
-}
-
-func (m *RollingUpdateDeployment) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollingUpdateDeployment) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
- n31, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n31
- }
- if m.MaxSurge != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxSurge.Size()))
- n32, err := m.MaxSurge.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n32
- }
- return i, nil
-}
-
-func (m *RollingUpdateStatefulSetStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollingUpdateStatefulSetStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Partition != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Partition))
- }
- return i, nil
-}
-
-func (m *Scale) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Scale) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n33, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n33
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n34, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n34
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n35, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n35
- return i, nil
-}
-
-func (m *ScaleSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ScaleSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- return i, nil
-}
-
-func (m *ScaleStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- if len(m.Selector) > 0 {
- keysForSelector := make([]string, 0, len(m.Selector))
- for k := range m.Selector {
- keysForSelector = append(keysForSelector, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
- for _, k := range keysForSelector {
- dAtA[i] = 0x12
- i++
- v := m.Selector[string(k)]
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
- i += copy(dAtA[i:], v)
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.TargetSelector)))
- i += copy(dAtA[i:], m.TargetSelector)
- return i, nil
-}
-
-func (m *StatefulSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n36, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n36
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n37, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n37
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n38, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n38
- return i, nil
-}
-
-func (m *StatefulSetCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n39, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n39
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *StatefulSetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n40, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n40
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *StatefulSetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Replicas != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n41, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n41
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n42, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n42
- if len(m.VolumeClaimTemplates) > 0 {
- for _, msg := range m.VolumeClaimTemplates {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName)))
- i += copy(dAtA[i:], m.ServiceName)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodManagementPolicy)))
- i += copy(dAtA[i:], m.PodManagementPolicy)
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size()))
- n43, err := m.UpdateStrategy.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n43
- if m.RevisionHistoryLimit != nil {
- dAtA[i] = 0x40
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
- }
- return i, nil
-}
-
-func (m *StatefulSetStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.CurrentRevision)))
- i += copy(dAtA[i:], m.CurrentRevision)
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.UpdateRevision)))
- i += copy(dAtA[i:], m.UpdateRevision)
- if m.CollisionCount != nil {
- dAtA[i] = 0x48
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x52
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *StatefulSetUpdateStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StatefulSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.RollingUpdate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
- n44, err := m.RollingUpdate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n44
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *ControllerRevision) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Data.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.Revision))
- return n
-}
-
-func (m *ControllerRevisionList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DaemonSet) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DaemonSetCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DaemonSetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DaemonSetSpec) Size() (n int) {
- var l int
- _ = l
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.UpdateStrategy.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
- }
- return n
-}
-
-func (m *DaemonSetStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.CurrentNumberScheduled))
- n += 1 + sovGenerated(uint64(m.NumberMisscheduled))
- n += 1 + sovGenerated(uint64(m.DesiredNumberScheduled))
- n += 1 + sovGenerated(uint64(m.NumberReady))
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.UpdatedNumberScheduled))
- n += 1 + sovGenerated(uint64(m.NumberAvailable))
- n += 1 + sovGenerated(uint64(m.NumberUnavailable))
- if m.CollisionCount != nil {
- n += 1 + sovGenerated(uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DaemonSetUpdateStrategy) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.RollingUpdate != nil {
- l = m.RollingUpdate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *Deployment) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeploymentCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastUpdateTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeploymentList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeploymentSpec) Size() (n int) {
- var l int
- _ = l
- if m.Replicas != nil {
- n += 1 + sovGenerated(uint64(*m.Replicas))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Strategy.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
- }
- n += 2
- if m.ProgressDeadlineSeconds != nil {
- n += 1 + sovGenerated(uint64(*m.ProgressDeadlineSeconds))
- }
- return n
-}
-
-func (m *DeploymentStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.Replicas))
- n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
- n += 1 + sovGenerated(uint64(m.AvailableReplicas))
- n += 1 + sovGenerated(uint64(m.UnavailableReplicas))
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- n += 1 + sovGenerated(uint64(m.ReadyReplicas))
- if m.CollisionCount != nil {
- n += 1 + sovGenerated(uint64(*m.CollisionCount))
- }
- return n
-}
-
-func (m *DeploymentStrategy) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.RollingUpdate != nil {
- l = m.RollingUpdate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ReplicaSet) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ReplicaSetCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ReplicaSetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ReplicaSetSpec) Size() (n int) {
- var l int
- _ = l
- if m.Replicas != nil {
- n += 1 + sovGenerated(uint64(*m.Replicas))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.MinReadySeconds))
- return n
-}
-
-func (m *ReplicaSetStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- n += 1 + sovGenerated(uint64(m.FullyLabeledReplicas))
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.ReadyReplicas))
- n += 1 + sovGenerated(uint64(m.AvailableReplicas))
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RollingUpdateDaemonSet) Size() (n int) {
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- l = m.MaxUnavailable.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *RollingUpdateDeployment) Size() (n int) {
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- l = m.MaxUnavailable.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.MaxSurge != nil {
- l = m.MaxSurge.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *RollingUpdateStatefulSetStrategy) Size() (n int) {
- var l int
- _ = l
- if m.Partition != nil {
- n += 1 + sovGenerated(uint64(*m.Partition))
- }
- return n
-}
-
-func (m *Scale) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ScaleSpec) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- return n
-}
-
-func (m *ScaleStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- if len(m.Selector) > 0 {
- for k, v := range m.Selector {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- l = len(m.TargetSelector)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *StatefulSet) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *StatefulSetCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *StatefulSetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *StatefulSetSpec) Size() (n int) {
- var l int
- _ = l
- if m.Replicas != nil {
- n += 1 + sovGenerated(uint64(*m.Replicas))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.VolumeClaimTemplates) > 0 {
- for _, e := range m.VolumeClaimTemplates {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = len(m.ServiceName)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.PodManagementPolicy)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.UpdateStrategy.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.RevisionHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
- }
- return n
-}
-
-func (m *StatefulSetStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.Replicas))
- n += 1 + sovGenerated(uint64(m.ReadyReplicas))
- n += 1 + sovGenerated(uint64(m.CurrentReplicas))
- n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
- l = len(m.CurrentRevision)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.UpdateRevision)
- n += 1 + l + sovGenerated(uint64(l))
- if m.CollisionCount != nil {
- n += 1 + sovGenerated(uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *StatefulSetUpdateStrategy) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.RollingUpdate != nil {
- l = m.RollingUpdate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *ControllerRevision) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ControllerRevision{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Data:` + strings.Replace(strings.Replace(this.Data.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`,
- `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ControllerRevisionList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ControllerRevisionList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ControllerRevision", "ControllerRevision", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSet{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DaemonSet", "DaemonSet", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetSpec{`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "DaemonSetUpdateStrategy", "DaemonSetUpdateStrategy", 1), `&`, ``, 1) + `,`,
- `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
- `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetStatus{`,
- `CurrentNumberScheduled:` + fmt.Sprintf("%v", this.CurrentNumberScheduled) + `,`,
- `NumberMisscheduled:` + fmt.Sprintf("%v", this.NumberMisscheduled) + `,`,
- `DesiredNumberScheduled:` + fmt.Sprintf("%v", this.DesiredNumberScheduled) + `,`,
- `NumberReady:` + fmt.Sprintf("%v", this.NumberReady) + `,`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `UpdatedNumberScheduled:` + fmt.Sprintf("%v", this.UpdatedNumberScheduled) + `,`,
- `NumberAvailable:` + fmt.Sprintf("%v", this.NumberAvailable) + `,`,
- `NumberUnavailable:` + fmt.Sprintf("%v", this.NumberUnavailable) + `,`,
- `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DaemonSetCondition", "DaemonSetCondition", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetUpdateStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetUpdateStrategy{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDaemonSet", "RollingUpdateDaemonSet", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Deployment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Deployment{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Deployment", "Deployment", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentSpec{`,
- `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`,
- `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
- `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
- `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`,
- `ProgressDeadlineSeconds:` + valueToStringGenerated(this.ProgressDeadlineSeconds) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentStatus{`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
- `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
- `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + `,`,
- `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
- `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentStrategy{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDeployment", "RollingUpdateDeployment", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSet{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicaSetSpec", "ReplicaSetSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicaSetStatus", "ReplicaSetStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ReplicaSet", "ReplicaSet", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetSpec{`,
- `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetStatus{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `FullyLabeledReplicas:` + fmt.Sprintf("%v", this.FullyLabeledReplicas) + `,`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
- `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ReplicaSetCondition", "ReplicaSetCondition", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollingUpdateDaemonSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollingUpdateDaemonSet{`,
- `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollingUpdateDeployment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollingUpdateDeployment{`,
- `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollingUpdateStatefulSetStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollingUpdateStatefulSetStrategy{`,
- `Partition:` + valueToStringGenerated(this.Partition) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Scale) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Scale{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ScaleSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ScaleSpec{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ScaleStatus) String() string {
- if this == nil {
- return "nil"
- }
- keysForSelector := make([]string, 0, len(this.Selector))
- for k := range this.Selector {
- keysForSelector = append(keysForSelector, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
- mapStringForSelector := "map[string]string{"
- for _, k := range keysForSelector {
- mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
- }
- mapStringForSelector += "}"
- s := strings.Join([]string{`&ScaleStatus{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `Selector:` + mapStringForSelector + `,`,
- `TargetSelector:` + fmt.Sprintf("%v", this.TargetSelector) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSet{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StatefulSet", "StatefulSet", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetSpec{`,
- `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_api_core_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`,
- `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
- `PodManagementPolicy:` + fmt.Sprintf("%v", this.PodManagementPolicy) + `,`,
- `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "StatefulSetUpdateStrategy", "StatefulSetUpdateStrategy", 1), `&`, ``, 1) + `,`,
- `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetStatus{`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
- `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
- `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
- `CurrentRevision:` + fmt.Sprintf("%v", this.CurrentRevision) + `,`,
- `UpdateRevision:` + fmt.Sprintf("%v", this.UpdateRevision) + `,`,
- `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "StatefulSetCondition", "StatefulSetCondition", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StatefulSetUpdateStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StatefulSetUpdateStrategy{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateStatefulSetStrategy", "RollingUpdateStatefulSetStrategy", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *ControllerRevision) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ControllerRevision: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ControllerRevision: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
- }
- m.Revision = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Revision |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ControllerRevisionList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ControllerRevisionList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ControllerRevisionList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ControllerRevision{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DaemonSetConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, DaemonSet{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
- }
- m.MinReadySeconds = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MinReadySeconds |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RevisionHistoryLimit = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentNumberScheduled", wireType)
- }
- m.CurrentNumberScheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.CurrentNumberScheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberMisscheduled", wireType)
- }
- m.NumberMisscheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberMisscheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DesiredNumberScheduled", wireType)
- }
- m.DesiredNumberScheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.DesiredNumberScheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberReady", wireType)
- }
- m.NumberReady = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberReady |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedNumberScheduled", wireType)
- }
- m.UpdatedNumberScheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UpdatedNumberScheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberAvailable", wireType)
- }
- m.NumberAvailable = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberAvailable |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberUnavailable", wireType)
- }
- m.NumberUnavailable = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberUnavailable |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CollisionCount = &v
- case 10:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, DaemonSetCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetUpdateStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetUpdateStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DaemonSetUpdateStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollingUpdate == nil {
- m.RollingUpdate = &RollingUpdateDaemonSet{}
- }
- if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Deployment) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Deployment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DeploymentConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Deployment{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Replicas = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
- }
- m.MinReadySeconds = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MinReadySeconds |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RevisionHistoryLimit = &v
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Paused = bool(v != 0)
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ProgressDeadlineSeconds", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ProgressDeadlineSeconds = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
- }
- m.UpdatedReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
- }
- m.AvailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.AvailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UnavailableReplicas", wireType)
- }
- m.UnavailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UnavailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, DeploymentCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
- }
- m.ReadyReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ReadyReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CollisionCount = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DeploymentStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollingUpdate == nil {
- m.RollingUpdate = &RollingUpdateDeployment{}
- }
- if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = ReplicaSetConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ReplicaSet{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Replicas = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
- }
- m.MinReadySeconds = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MinReadySeconds |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field FullyLabeledReplicas", wireType)
- }
- m.FullyLabeledReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.FullyLabeledReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
- }
- m.ReadyReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ReadyReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
- }
- m.AvailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.AvailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, ReplicaSetCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollingUpdateDaemonSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollingUpdateDaemonSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollingUpdateDaemonSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxUnavailable == nil {
- m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollingUpdateDeployment) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollingUpdateDeployment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollingUpdateDeployment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxUnavailable == nil {
- m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxSurge", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxSurge == nil {
- m.MaxSurge = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxSurge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollingUpdateStatefulSetStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollingUpdateStatefulSetStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollingUpdateStatefulSetStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Partition = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Scale) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Scale: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ScaleSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ScaleStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.Selector == nil {
- m.Selector = make(map[string]string)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapvalue uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapvalue := int(stringLenmapvalue)
- if intStringLenmapvalue < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapvalue := iNdEx + intStringLenmapvalue
- if postStringIndexmapvalue > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
- iNdEx = postStringIndexmapvalue
- m.Selector[mapkey] = mapvalue
- } else {
- var mapvalue string
- m.Selector[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.TargetSelector = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = StatefulSetConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, StatefulSet{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Replicas = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field VolumeClaimTemplates", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.VolumeClaimTemplates = append(m.VolumeClaimTemplates, k8s_io_api_core_v1.PersistentVolumeClaim{})
- if err := m.VolumeClaimTemplates[len(m.VolumeClaimTemplates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ServiceName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PodManagementPolicy", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PodManagementPolicy = PodManagementPolicyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RevisionHistoryLimit = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
- }
- m.ReadyReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ReadyReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
- }
- m.CurrentReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.CurrentReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
- }
- m.UpdatedReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentRevision", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CurrentRevision = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdateRevision", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UpdateRevision = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CollisionCount = &v
- case 10:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, StatefulSetCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StatefulSetUpdateStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StatefulSetUpdateStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StatefulSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = StatefulSetUpdateStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollingUpdate == nil {
- m.RollingUpdate = &RollingUpdateStatefulSetStrategy{}
- }
- if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta2/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 2186 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcb, 0x6f, 0x1c, 0xb7,
- 0x19, 0xf7, 0xec, 0x43, 0x5a, 0x51, 0x96, 0x64, 0x53, 0xaa, 0xb4, 0x91, 0xdb, 0x95, 0xb1, 0x09,
- 0x1c, 0x39, 0xb6, 0x66, 0x6d, 0xe5, 0x81, 0xc4, 0x2e, 0xda, 0x6a, 0xa5, 0xd4, 0x76, 0xa0, 0x57,
- 0x28, 0xcb, 0x40, 0x83, 0x16, 0x35, 0xb5, 0x4b, 0xaf, 0x26, 0x9a, 0x17, 0x66, 0x38, 0x5b, 0x2f,
- 0x7a, 0xe9, 0xa9, 0x40, 0x81, 0x02, 0x6d, 0xaf, 0xfd, 0x27, 0x7a, 0x2b, 0x8a, 0xf6, 0x56, 0x04,
- 0x85, 0x2f, 0x05, 0x82, 0x5e, 0x92, 0x93, 0x50, 0x6f, 0x4e, 0x45, 0xd1, 0x4b, 0x81, 0x5e, 0x02,
- 0x14, 0x28, 0xc8, 0xe1, 0x3c, 0x38, 0x0f, 0xef, 0x48, 0xb1, 0x95, 0x22, 0xc8, 0x6d, 0x87, 0xfc,
- 0x7d, 0x3f, 0x7e, 0x24, 0xbf, 0x8f, 0xdf, 0x6f, 0x38, 0x0b, 0xbe, 0x77, 0xf4, 0xb6, 0xab, 0x6a,
- 0x56, 0xeb, 0xc8, 0x3b, 0x20, 0x8e, 0x49, 0x28, 0x71, 0x5b, 0x7d, 0x62, 0x76, 0x2d, 0xa7, 0x25,
- 0x3a, 0xb0, 0xad, 0xb5, 0xb0, 0x6d, 0xbb, 0xad, 0xfe, 0xcd, 0x03, 0x42, 0xf1, 0x6a, 0xab, 0x47,
- 0x4c, 0xe2, 0x60, 0x4a, 0xba, 0xaa, 0xed, 0x58, 0xd4, 0x82, 0x0b, 0x3e, 0x50, 0xc5, 0xb6, 0xa6,
- 0x32, 0xa0, 0x2a, 0x80, 0x8b, 0x2b, 0x3d, 0x8d, 0x1e, 0x7a, 0x07, 0x6a, 0xc7, 0x32, 0x5a, 0x3d,
- 0xab, 0x67, 0xb5, 0x38, 0xfe, 0xc0, 0x7b, 0xc4, 0x9f, 0xf8, 0x03, 0xff, 0xe5, 0xf3, 0x2c, 0x36,
- 0x63, 0x03, 0x76, 0x2c, 0x87, 0xb4, 0xfa, 0x37, 0x93, 0x63, 0x2d, 0x5e, 0x8d, 0x61, 0x6c, 0x4b,
- 0xd7, 0x3a, 0x03, 0xe1, 0x56, 0x1a, 0xfa, 0x46, 0x04, 0x35, 0x70, 0xe7, 0x50, 0x33, 0x89, 0x33,
- 0x68, 0xd9, 0x47, 0x3d, 0xd6, 0xe0, 0xb6, 0x0c, 0x42, 0x71, 0xd6, 0x00, 0xad, 0x3c, 0x2b, 0xc7,
- 0x33, 0xa9, 0x66, 0x90, 0x94, 0xc1, 0x5b, 0xa3, 0x0c, 0xdc, 0xce, 0x21, 0x31, 0x70, 0xca, 0xee,
- 0xf5, 0x3c, 0x3b, 0x8f, 0x6a, 0x7a, 0x4b, 0x33, 0xa9, 0x4b, 0x9d, 0xa4, 0x51, 0xf3, 0x3f, 0x0a,
- 0x80, 0xeb, 0x96, 0x49, 0x1d, 0x4b, 0xd7, 0x89, 0x83, 0x48, 0x5f, 0x73, 0x35, 0xcb, 0x84, 0x0f,
- 0x41, 0x8d, 0xcd, 0xa7, 0x8b, 0x29, 0xae, 0x2b, 0x97, 0x95, 0xe5, 0xc9, 0xd5, 0x1b, 0x6a, 0xb4,
- 0x29, 0x21, 0xbd, 0x6a, 0x1f, 0xf5, 0x58, 0x83, 0xab, 0x32, 0xb4, 0xda, 0xbf, 0xa9, 0xee, 0x1c,
- 0x7c, 0x48, 0x3a, 0x74, 0x8b, 0x50, 0xdc, 0x86, 0x4f, 0x8e, 0x97, 0xce, 0x0d, 0x8f, 0x97, 0x40,
- 0xd4, 0x86, 0x42, 0x56, 0xb8, 0x03, 0x2a, 0x9c, 0xbd, 0xc4, 0xd9, 0x57, 0x72, 0xd9, 0xc5, 0xa4,
- 0x55, 0x84, 0x7f, 0xf2, 0xee, 0x63, 0x4a, 0x4c, 0xe6, 0x5e, 0xfb, 0xbc, 0xa0, 0xae, 0x6c, 0x60,
- 0x8a, 0x11, 0x27, 0x82, 0xd7, 0x41, 0xcd, 0x11, 0xee, 0xd7, 0xcb, 0x97, 0x95, 0xe5, 0x72, 0xfb,
- 0x82, 0x40, 0xd5, 0x82, 0x69, 0xa1, 0x10, 0xd1, 0x7c, 0xa2, 0x80, 0xf9, 0xf4, 0xbc, 0x37, 0x35,
- 0x97, 0xc2, 0x1f, 0xa6, 0xe6, 0xae, 0x16, 0x9b, 0x3b, 0xb3, 0xe6, 0x33, 0x0f, 0x07, 0x0e, 0x5a,
- 0x62, 0xf3, 0xde, 0x05, 0x55, 0x8d, 0x12, 0xc3, 0xad, 0x97, 0x2e, 0x97, 0x97, 0x27, 0x57, 0xaf,
- 0xa9, 0x39, 0xb1, 0xae, 0xa6, 0xbd, 0x6b, 0x4f, 0x09, 0xde, 0xea, 0x3d, 0xc6, 0x80, 0x7c, 0xa2,
- 0xe6, 0x2f, 0x4a, 0x60, 0x62, 0x03, 0x13, 0xc3, 0x32, 0xf7, 0x08, 0x3d, 0x83, 0x9d, 0xbb, 0x0b,
- 0x2a, 0xae, 0x4d, 0x3a, 0x62, 0xe7, 0xae, 0xe4, 0x4e, 0x20, 0xf4, 0x69, 0xcf, 0x26, 0x9d, 0x68,
- 0xcb, 0xd8, 0x13, 0xe2, 0x0c, 0x70, 0x17, 0x8c, 0xb9, 0x14, 0x53, 0xcf, 0xe5, 0x1b, 0x36, 0xb9,
- 0xba, 0x5c, 0x80, 0x8b, 0xe3, 0xdb, 0xd3, 0x82, 0x6d, 0xcc, 0x7f, 0x46, 0x82, 0xa7, 0xf9, 0x8f,
- 0x12, 0x80, 0x21, 0x76, 0xdd, 0x32, 0xbb, 0x1a, 0x65, 0xe1, 0x7c, 0x0b, 0x54, 0xe8, 0xc0, 0x26,
- 0x7c, 0x41, 0x26, 0xda, 0x57, 0x02, 0x57, 0xee, 0x0f, 0x6c, 0xf2, 0xf9, 0xf1, 0xd2, 0x7c, 0xda,
- 0x82, 0xf5, 0x20, 0x6e, 0x03, 0x37, 0x43, 0x27, 0x4b, 0xdc, 0xfa, 0x0d, 0x79, 0xe8, 0xcf, 0x8f,
- 0x97, 0x32, 0x8e, 0x19, 0x35, 0x64, 0x92, 0x1d, 0x84, 0x7d, 0x00, 0x75, 0xec, 0xd2, 0xfb, 0x0e,
- 0x36, 0x5d, 0x7f, 0x24, 0xcd, 0x20, 0x62, 0xfa, 0xaf, 0x15, 0xdb, 0x28, 0x66, 0xd1, 0x5e, 0x14,
- 0x5e, 0xc0, 0xcd, 0x14, 0x1b, 0xca, 0x18, 0x01, 0x5e, 0x01, 0x63, 0x0e, 0xc1, 0xae, 0x65, 0xd6,
- 0x2b, 0x7c, 0x16, 0xe1, 0x02, 0x22, 0xde, 0x8a, 0x44, 0x2f, 0xbc, 0x0a, 0xc6, 0x0d, 0xe2, 0xba,
- 0xb8, 0x47, 0xea, 0x55, 0x0e, 0x9c, 0x11, 0xc0, 0xf1, 0x2d, 0xbf, 0x19, 0x05, 0xfd, 0xcd, 0xdf,
- 0x2b, 0x60, 0x2a, 0x5c, 0xb9, 0x33, 0xc8, 0x9c, 0x3b, 0x72, 0xe6, 0x34, 0x47, 0x07, 0x4b, 0x4e,
- 0xc2, 0x7c, 0x54, 0x8e, 0x39, 0xce, 0xc2, 0x11, 0xfe, 0x08, 0xd4, 0x5c, 0xa2, 0x93, 0x0e, 0xb5,
- 0x1c, 0xe1, 0xf8, 0xeb, 0x05, 0x1d, 0xc7, 0x07, 0x44, 0xdf, 0x13, 0xa6, 0xed, 0xf3, 0xcc, 0xf3,
- 0xe0, 0x09, 0x85, 0x94, 0xf0, 0x7d, 0x50, 0xa3, 0xc4, 0xb0, 0x75, 0x4c, 0x89, 0xc8, 0x9a, 0x97,
- 0xe3, 0xce, 0xb3, 0x98, 0x61, 0x64, 0xbb, 0x56, 0xf7, 0xbe, 0x80, 0xf1, 0x94, 0x09, 0x17, 0x23,
- 0x68, 0x45, 0x21, 0x0d, 0xb4, 0xc1, 0xb4, 0x67, 0x77, 0x19, 0x92, 0xb2, 0xe3, 0xbc, 0x37, 0x10,
- 0x31, 0x74, 0x63, 0xf4, 0xaa, 0xec, 0x4b, 0x76, 0xed, 0x79, 0x31, 0xca, 0xb4, 0xdc, 0x8e, 0x12,
- 0xfc, 0x70, 0x0d, 0xcc, 0x18, 0x9a, 0x89, 0x08, 0xee, 0x0e, 0xf6, 0x48, 0xc7, 0x32, 0xbb, 0x2e,
- 0x0f, 0xa5, 0x6a, 0x7b, 0x41, 0x10, 0xcc, 0x6c, 0xc9, 0xdd, 0x28, 0x89, 0x87, 0x9b, 0x60, 0x2e,
- 0x38, 0x80, 0xef, 0x6a, 0x2e, 0xb5, 0x9c, 0xc1, 0xa6, 0x66, 0x68, 0xb4, 0x3e, 0xc6, 0x79, 0xea,
- 0xc3, 0xe3, 0xa5, 0x39, 0x94, 0xd1, 0x8f, 0x32, 0xad, 0x9a, 0xbf, 0x19, 0x03, 0x33, 0x89, 0x73,
- 0x01, 0x3e, 0x00, 0xf3, 0x1d, 0xcf, 0x71, 0x88, 0x49, 0xb7, 0x3d, 0xe3, 0x80, 0x38, 0x7b, 0x9d,
- 0x43, 0xd2, 0xf5, 0x74, 0xd2, 0xe5, 0xdb, 0x5a, 0x6d, 0x37, 0x84, 0xaf, 0xf3, 0xeb, 0x99, 0x28,
- 0x94, 0x63, 0x0d, 0xdf, 0x03, 0xd0, 0xe4, 0x4d, 0x5b, 0x9a, 0xeb, 0x86, 0x9c, 0x25, 0xce, 0x19,
- 0xa6, 0xe2, 0x76, 0x0a, 0x81, 0x32, 0xac, 0x98, 0x8f, 0x5d, 0xe2, 0x6a, 0x0e, 0xe9, 0x26, 0x7d,
- 0x2c, 0xcb, 0x3e, 0x6e, 0x64, 0xa2, 0x50, 0x8e, 0x35, 0x7c, 0x13, 0x4c, 0xfa, 0xa3, 0xf1, 0x35,
- 0x17, 0x9b, 0x33, 0x2b, 0xc8, 0x26, 0xb7, 0xa3, 0x2e, 0x14, 0xc7, 0xb1, 0xa9, 0x59, 0x07, 0x2e,
- 0x71, 0xfa, 0xa4, 0x7b, 0xc7, 0x17, 0x07, 0xac, 0x82, 0x56, 0x79, 0x05, 0x0d, 0xa7, 0xb6, 0x93,
- 0x42, 0xa0, 0x0c, 0x2b, 0x36, 0x35, 0x3f, 0x6a, 0x52, 0x53, 0x1b, 0x93, 0xa7, 0xb6, 0x9f, 0x89,
- 0x42, 0x39, 0xd6, 0x2c, 0xf6, 0x7c, 0x97, 0xd7, 0xfa, 0x58, 0xd3, 0xf1, 0x81, 0x4e, 0xea, 0xe3,
- 0x72, 0xec, 0x6d, 0xcb, 0xdd, 0x28, 0x89, 0x87, 0x77, 0xc0, 0x45, 0xbf, 0x69, 0xdf, 0xc4, 0x21,
- 0x49, 0x8d, 0x93, 0xbc, 0x24, 0x48, 0x2e, 0x6e, 0x27, 0x01, 0x28, 0x6d, 0x03, 0x6f, 0x81, 0xe9,
- 0x8e, 0xa5, 0xeb, 0x3c, 0x1e, 0xd7, 0x2d, 0xcf, 0xa4, 0xf5, 0x09, 0xce, 0x02, 0x59, 0x0e, 0xad,
- 0x4b, 0x3d, 0x28, 0x81, 0x84, 0x3f, 0x06, 0xa0, 0x13, 0x14, 0x06, 0xb7, 0x0e, 0x46, 0x28, 0x80,
- 0x74, 0x59, 0x8a, 0x2a, 0x73, 0xd8, 0xe4, 0xa2, 0x18, 0x65, 0xf3, 0x23, 0x05, 0x2c, 0xe4, 0x24,
- 0x3a, 0xfc, 0xae, 0x54, 0x04, 0xaf, 0x25, 0x8a, 0xe0, 0xa5, 0x1c, 0xb3, 0x58, 0x25, 0x3c, 0x04,
- 0x53, 0x4c, 0x90, 0x68, 0x66, 0xcf, 0x87, 0x88, 0xb3, 0xac, 0x95, 0x3b, 0x01, 0x14, 0x47, 0x47,
- 0xa7, 0xf2, 0xc5, 0xe1, 0xf1, 0xd2, 0x94, 0xd4, 0x87, 0x64, 0xe2, 0xe6, 0x2f, 0x4b, 0x00, 0x6c,
- 0x10, 0x5b, 0xb7, 0x06, 0x06, 0x31, 0xcf, 0x42, 0xd3, 0xdc, 0x93, 0x34, 0xcd, 0xab, 0xf9, 0x5b,
- 0x12, 0x3a, 0x95, 0x2b, 0x6a, 0xde, 0x4f, 0x88, 0x9a, 0xab, 0x45, 0xc8, 0x9e, 0xad, 0x6a, 0x3e,
- 0x29, 0x83, 0xd9, 0x08, 0x1c, 0xc9, 0x9a, 0xdb, 0xd2, 0x8e, 0xbe, 0x9a, 0xd8, 0xd1, 0x85, 0x0c,
- 0x93, 0x17, 0xa6, 0x6b, 0x9e, 0xbf, 0xbe, 0x80, 0x1f, 0x82, 0x69, 0x26, 0x64, 0xfc, 0x90, 0xe0,
- 0x32, 0x69, 0xec, 0xc4, 0x32, 0x29, 0x2c, 0x6e, 0x9b, 0x12, 0x13, 0x4a, 0x30, 0xe7, 0xc8, 0xb2,
- 0xf1, 0x17, 0x2d, 0xcb, 0x9a, 0x7f, 0x50, 0xc0, 0x74, 0xb4, 0x4d, 0x67, 0x20, 0xa2, 0xee, 0xca,
- 0x22, 0xea, 0xe5, 0x02, 0xc1, 0x99, 0xa3, 0xa2, 0x3e, 0xa9, 0xc4, 0x5d, 0xe7, 0x32, 0x6a, 0x99,
- 0xbd, 0x82, 0xd9, 0xba, 0xd6, 0xc1, 0xae, 0xa8, 0xb7, 0xe7, 0xfd, 0xd7, 0x2f, 0xbf, 0x0d, 0x85,
- 0xbd, 0x92, 0xe0, 0x2a, 0xbd, 0x58, 0xc1, 0x55, 0x7e, 0x3e, 0x82, 0xeb, 0x07, 0xa0, 0xe6, 0x06,
- 0x52, 0xab, 0xc2, 0x29, 0xaf, 0x15, 0x4a, 0x6c, 0xa1, 0xb2, 0x42, 0xea, 0x50, 0x5f, 0x85, 0x74,
- 0x59, 0xca, 0xaa, 0xfa, 0x65, 0x2a, 0x2b, 0x96, 0xcc, 0x36, 0xf6, 0x5c, 0xd2, 0xe5, 0x19, 0x50,
- 0x8b, 0x92, 0x79, 0x97, 0xb7, 0x22, 0xd1, 0x0b, 0xf7, 0xc1, 0x82, 0xed, 0x58, 0x3d, 0x87, 0xb8,
- 0xee, 0x06, 0xc1, 0x5d, 0x5d, 0x33, 0x49, 0x30, 0x01, 0xbf, 0x26, 0x5e, 0x1a, 0x1e, 0x2f, 0x2d,
- 0xec, 0x66, 0x43, 0x50, 0x9e, 0x6d, 0xf3, 0xcf, 0x15, 0x70, 0x21, 0x79, 0x36, 0xe6, 0xc8, 0x14,
- 0xe5, 0x54, 0x32, 0xe5, 0x7a, 0x2c, 0x4e, 0x7d, 0x0d, 0x17, 0xbb, 0x2a, 0x48, 0xc5, 0xea, 0x1a,
- 0x98, 0x11, 0xb2, 0x24, 0xe8, 0x14, 0x42, 0x2d, 0xdc, 0x9e, 0x7d, 0xb9, 0x1b, 0x25, 0xf1, 0x4c,
- 0x7c, 0x44, 0x9a, 0x22, 0x20, 0xa9, 0xc8, 0xe2, 0x63, 0x2d, 0x09, 0x40, 0x69, 0x1b, 0xb8, 0x05,
- 0x66, 0x3d, 0x33, 0x4d, 0xe5, 0x87, 0xcb, 0x25, 0x41, 0x35, 0xbb, 0x9f, 0x86, 0xa0, 0x2c, 0x3b,
- 0xf8, 0x50, 0xd2, 0x23, 0x63, 0xfc, 0x48, 0xb8, 0x5e, 0x20, 0xac, 0x0b, 0x0b, 0x12, 0x78, 0x1b,
- 0x4c, 0x39, 0x5c, 0x73, 0x06, 0xae, 0xfa, 0xba, 0xed, 0x1b, 0xc2, 0x6c, 0x0a, 0xc5, 0x3b, 0x91,
- 0x8c, 0xcd, 0x90, 0x5a, 0xb5, 0xa2, 0x52, 0xab, 0xf9, 0x27, 0x05, 0xc0, 0x74, 0x1e, 0x8e, 0xbc,
- 0x09, 0x48, 0x59, 0xc4, 0x2a, 0xa6, 0x96, 0xad, 0x7f, 0x6e, 0x14, 0xd4, 0x3f, 0xd1, 0x81, 0x5a,
- 0x4c, 0x00, 0x89, 0x65, 0x38, 0x9b, 0x4b, 0x9d, 0xa2, 0x02, 0x28, 0x72, 0xea, 0x39, 0x08, 0xa0,
- 0x18, 0xd9, 0xb3, 0x05, 0xd0, 0x3f, 0x4b, 0x60, 0x36, 0x02, 0x17, 0x16, 0x40, 0x19, 0x26, 0x5f,
- 0x5f, 0xec, 0x8c, 0xbe, 0xd8, 0x61, 0xa2, 0x24, 0x5a, 0xba, 0xff, 0x27, 0x51, 0x12, 0x79, 0x95,
- 0x23, 0x4a, 0x7e, 0x57, 0x8a, 0xbb, 0xfe, 0x95, 0x17, 0x25, 0x5f, 0xfc, 0x4e, 0xa6, 0xf9, 0x97,
- 0x32, 0xb8, 0x90, 0xcc, 0x43, 0xa9, 0x40, 0x2a, 0x23, 0x0b, 0xe4, 0x2e, 0x98, 0x7b, 0xe4, 0xe9,
- 0xfa, 0x80, 0x2f, 0x43, 0xac, 0x4a, 0xfa, 0xa5, 0xf5, 0x9b, 0xc2, 0x72, 0xee, 0xfb, 0x19, 0x18,
- 0x94, 0x69, 0x99, 0x53, 0xec, 0xcb, 0xa7, 0x2a, 0xf6, 0xa9, 0x0a, 0x54, 0x39, 0x41, 0x05, 0xca,
- 0x2c, 0xdc, 0xd5, 0x53, 0x14, 0xee, 0x93, 0x55, 0xda, 0x8c, 0x83, 0x6b, 0xe4, 0xab, 0xff, 0xcf,
- 0x15, 0x30, 0x9f, 0xfd, 0xc2, 0x0d, 0x75, 0x30, 0x6d, 0xe0, 0xc7, 0xf1, 0x8b, 0x8f, 0x51, 0x45,
- 0xc4, 0xa3, 0x9a, 0xae, 0xfa, 0x9f, 0x8c, 0xd4, 0x7b, 0x26, 0xdd, 0x71, 0xf6, 0xa8, 0xa3, 0x99,
- 0x3d, 0xbf, 0xf2, 0x6e, 0x49, 0x5c, 0x28, 0xc1, 0xdd, 0xfc, 0x4c, 0x01, 0x0b, 0x39, 0x95, 0xef,
- 0x6c, 0x3d, 0x81, 0x1f, 0x80, 0x9a, 0x81, 0x1f, 0xef, 0x79, 0x4e, 0x2f, 0xab, 0x56, 0x17, 0x1b,
- 0x87, 0x67, 0xf3, 0x96, 0x60, 0x41, 0x21, 0x5f, 0x73, 0x07, 0x5c, 0x96, 0x26, 0xc9, 0x32, 0x87,
- 0x3c, 0xf2, 0x74, 0x9e, 0x44, 0x42, 0x6c, 0x5c, 0x03, 0x13, 0x36, 0x76, 0xa8, 0x16, 0x4a, 0xd5,
- 0x6a, 0x7b, 0x6a, 0x78, 0xbc, 0x34, 0xb1, 0x1b, 0x34, 0xa2, 0xa8, 0xbf, 0xf9, 0x5f, 0x05, 0x54,
- 0xf7, 0x3a, 0x58, 0x27, 0x67, 0x50, 0xed, 0x37, 0xa4, 0x6a, 0x9f, 0x7f, 0x93, 0xce, 0xfd, 0xc9,
- 0x2d, 0xf4, 0x9b, 0x89, 0x42, 0xff, 0xca, 0x08, 0x9e, 0x67, 0xd7, 0xf8, 0x77, 0xc0, 0x44, 0x38,
- 0xdc, 0xc9, 0x0e, 0xa0, 0xe6, 0x6f, 0x4b, 0x60, 0x32, 0x36, 0xc4, 0x09, 0x8f, 0xaf, 0x87, 0xd2,
- 0xb1, 0xcf, 0x12, 0x73, 0xb5, 0xc8, 0x44, 0xd4, 0xe0, 0x88, 0x7f, 0xd7, 0xa4, 0x4e, 0xfc, 0x05,
- 0x2f, 0x7d, 0xf2, 0x7f, 0x07, 0x4c, 0x53, 0xec, 0xf4, 0x08, 0x0d, 0xfa, 0xf8, 0x82, 0x4d, 0x44,
- 0xb7, 0x13, 0xf7, 0xa5, 0x5e, 0x94, 0x40, 0x2f, 0xde, 0x06, 0x53, 0xd2, 0x60, 0xf0, 0x02, 0x28,
- 0x1f, 0x91, 0x81, 0x2f, 0x7b, 0x10, 0xfb, 0x09, 0xe7, 0x40, 0xb5, 0x8f, 0x75, 0xcf, 0x8f, 0xf3,
- 0x09, 0xe4, 0x3f, 0xdc, 0x2a, 0xbd, 0xad, 0x34, 0x7f, 0xc5, 0x16, 0x27, 0x0a, 0xce, 0x33, 0x88,
- 0xae, 0xf7, 0xa4, 0xe8, 0xca, 0xff, 0xa8, 0x17, 0x4f, 0x99, 0xbc, 0x18, 0x43, 0x89, 0x18, 0x7b,
- 0xad, 0x10, 0xdb, 0xb3, 0x23, 0xed, 0x5f, 0x25, 0x30, 0x17, 0x43, 0x47, 0x72, 0xf2, 0xdb, 0x92,
- 0x9c, 0x5c, 0x4e, 0xc8, 0xc9, 0x7a, 0x96, 0xcd, 0xd7, 0x7a, 0x72, 0xb4, 0x9e, 0xfc, 0xa3, 0x02,
- 0x66, 0x62, 0x6b, 0x77, 0x06, 0x82, 0xf2, 0x9e, 0x2c, 0x28, 0x5f, 0x29, 0x12, 0x34, 0x39, 0x8a,
- 0xf2, 0xaf, 0x55, 0xc9, 0xf9, 0xaf, 0xbc, 0xa4, 0xfc, 0x29, 0x98, 0xeb, 0x5b, 0xba, 0x67, 0x90,
- 0x75, 0x1d, 0x6b, 0x46, 0x00, 0x60, 0xaa, 0xa9, 0x9c, 0x7c, 0x97, 0x0b, 0xe9, 0x89, 0xe3, 0x6a,
- 0x2e, 0x25, 0x26, 0x7d, 0x10, 0x59, 0x46, 0xba, 0xef, 0x41, 0x06, 0x1d, 0xca, 0x1c, 0x04, 0xbe,
- 0x09, 0x26, 0x99, 0x7e, 0xd3, 0x3a, 0x64, 0x1b, 0x1b, 0x41, 0x60, 0x85, 0x9f, 0xb0, 0xf6, 0xa2,
- 0x2e, 0x14, 0xc7, 0xc1, 0x43, 0x30, 0x6b, 0x5b, 0xdd, 0x2d, 0x6c, 0xe2, 0x1e, 0x61, 0x32, 0x63,
- 0x97, 0xff, 0x8f, 0x87, 0x5f, 0x7e, 0x4d, 0xb4, 0xdf, 0x0a, 0x6e, 0x45, 0x76, 0xd3, 0x10, 0xf6,
- 0x92, 0x98, 0xd1, 0xcc, 0x93, 0x3a, 0x8b, 0x12, 0x3a, 0xa9, 0xcf, 0xae, 0xfe, 0x1d, 0xf1, 0x6a,
- 0x91, 0x08, 0x3b, 0xe5, 0x87, 0xd7, 0xbc, 0xbb, 0xbd, 0xda, 0xa9, 0xbe, 0x9a, 0xfe, 0xbb, 0x02,
- 0x2e, 0xa6, 0x8e, 0xca, 0x2f, 0xf1, 0x76, 0x2d, 0x25, 0xcf, 0xcb, 0x27, 0x90, 0xe7, 0x6b, 0x60,
- 0x46, 0x7c, 0xb0, 0x4d, 0xa8, 0xfb, 0xf0, 0xfd, 0x67, 0x5d, 0xee, 0x46, 0x49, 0x7c, 0xd6, 0xed,
- 0x5e, 0xf5, 0x84, 0xb7, 0x7b, 0x71, 0x2f, 0xc4, 0x1f, 0x90, 0xfc, 0xd0, 0x4b, 0x7b, 0x21, 0xfe,
- 0x87, 0x94, 0xc4, 0x33, 0x85, 0xe0, 0xb3, 0x86, 0x0c, 0xe3, 0xb2, 0x42, 0xd8, 0x97, 0x7a, 0x51,
- 0x02, 0xfd, 0x85, 0x3e, 0x4a, 0xe2, 0x8c, 0x8f, 0x92, 0x2b, 0x45, 0xe2, 0xb9, 0xf8, 0xbb, 0xc9,
- 0xdf, 0x14, 0xf0, 0x52, 0x6e, 0x22, 0xc0, 0x35, 0xa9, 0xec, 0xae, 0x24, 0xca, 0xee, 0xb7, 0x72,
- 0x0d, 0x63, 0xb5, 0xd7, 0xc9, 0xbe, 0x9a, 0x7b, 0xa7, 0xd8, 0xd5, 0x5c, 0x86, 0x76, 0x1f, 0x7d,
- 0x47, 0xd7, 0x5e, 0x79, 0xf2, 0xb4, 0x71, 0xee, 0xe3, 0xa7, 0x8d, 0x73, 0x9f, 0x3e, 0x6d, 0x9c,
- 0xfb, 0xd9, 0xb0, 0xa1, 0x3c, 0x19, 0x36, 0x94, 0x8f, 0x87, 0x0d, 0xe5, 0xd3, 0x61, 0x43, 0xf9,
- 0xfb, 0xb0, 0xa1, 0xfc, 0xfa, 0xb3, 0xc6, 0xb9, 0x0f, 0xc6, 0xc5, 0x88, 0xff, 0x0b, 0x00, 0x00,
- 0xff, 0xff, 0xe4, 0x8f, 0x6a, 0x57, 0x17, 0x29, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/apps/v1beta2/generated.proto b/vendor/k8s.io/api/apps/v1beta2/generated.proto
deleted file mode 100644
index 4a8b28c15..000000000
--- a/vendor/k8s.io/api/apps/v1beta2/generated.proto
+++ /dev/null
@@ -1,752 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.apps.v1beta2;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/api/policy/v1beta1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta2";
-
-// DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the
-// release notes for more information.
-// ControllerRevision implements an immutable snapshot of state data. Clients
-// are responsible for serializing and deserializing the objects that contain
-// their internal state.
-// Once a ControllerRevision has been successfully created, it can not be updated.
-// The API Server will fail validation of all requests that attempt to mutate
-// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
-// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
-// it may be subject to name and representation changes in future releases, and clients should not
-// depend on its stability. It is primarily for internal use by controllers.
-message ControllerRevision {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Data is the serialized representation of the state.
- optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2;
-
- // Revision indicates the revision of the state represented by Data.
- optional int64 revision = 3;
-}
-
-// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
-message ControllerRevisionList {
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of ControllerRevisions
- repeated ControllerRevision items = 2;
-}
-
-// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for
-// more information.
-// DaemonSet represents the configuration of a daemon set.
-message DaemonSet {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // The desired behavior of this daemon set.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional DaemonSetSpec spec = 2;
-
- // The current status of this daemon set. This data may be
- // out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional DaemonSetStatus status = 3;
-}
-
-// DaemonSetCondition describes the state of a DaemonSet at a certain point.
-message DaemonSetCondition {
- // Type of DaemonSet condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // Last time the condition transitioned from one status to another.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // The reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- // +optional
- optional string message = 5;
-}
-
-// DaemonSetList is a collection of daemon sets.
-message DaemonSetList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // A list of daemon sets.
- repeated DaemonSet items = 2;
-}
-
-// DaemonSetSpec is the specification of a daemon set.
-message DaemonSetSpec {
- // A label query over pods that are managed by the daemon set.
- // Must match in order to be controlled.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
-
- // An object that describes the pod that will be created.
- // The DaemonSet will create exactly one copy of this pod on every node
- // that matches the template's node selector (or on every node if no node
- // selector is specified).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- optional k8s.io.api.core.v1.PodTemplateSpec template = 2;
-
- // An update strategy to replace existing DaemonSet pods with new pods.
- // +optional
- optional DaemonSetUpdateStrategy updateStrategy = 3;
-
- // The minimum number of seconds for which a newly created DaemonSet pod should
- // be ready without any of its container crashing, for it to be considered
- // available. Defaults to 0 (pod will be considered available as soon as it
- // is ready).
- // +optional
- optional int32 minReadySeconds = 4;
-
- // The number of old history to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 10.
- // +optional
- optional int32 revisionHistoryLimit = 6;
-}
-
-// DaemonSetStatus represents the current status of a daemon set.
-message DaemonSetStatus {
- // The number of nodes that are running at least 1
- // daemon pod and are supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- optional int32 currentNumberScheduled = 1;
-
- // The number of nodes that are running the daemon pod, but are
- // not supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- optional int32 numberMisscheduled = 2;
-
- // The total number of nodes that should be running the daemon
- // pod (including nodes correctly running the daemon pod).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- optional int32 desiredNumberScheduled = 3;
-
- // The number of nodes that should be running the daemon pod and have one
- // or more of the daemon pod running and ready.
- optional int32 numberReady = 4;
-
- // The most recent generation observed by the daemon set controller.
- // +optional
- optional int64 observedGeneration = 5;
-
- // The total number of nodes that are running updated daemon pod
- // +optional
- optional int32 updatedNumberScheduled = 6;
-
- // The number of nodes that should be running the
- // daemon pod and have one or more of the daemon pod running and
- // available (ready for at least spec.minReadySeconds)
- // +optional
- optional int32 numberAvailable = 7;
-
- // The number of nodes that should be running the
- // daemon pod and have none of the daemon pod running and available
- // (ready for at least spec.minReadySeconds)
- // +optional
- optional int32 numberUnavailable = 8;
-
- // Count of hash collisions for the DaemonSet. The DaemonSet controller
- // uses this field as a collision avoidance mechanism when it needs to
- // create the name for the newest ControllerRevision.
- // +optional
- optional int32 collisionCount = 9;
-
- // Represents the latest available observations of a DaemonSet's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated DaemonSetCondition conditions = 10;
-}
-
-// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
-message DaemonSetUpdateStrategy {
- // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
- // +optional
- optional string type = 1;
-
- // Rolling update config params. Present only if type = "RollingUpdate".
- // ---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be. Same as Deployment `strategy.rollingUpdate`.
- // See https://github.com/kubernetes/kubernetes/issues/35345
- // +optional
- optional RollingUpdateDaemonSet rollingUpdate = 2;
-}
-
-// DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for
-// more information.
-// Deployment enables declarative updates for Pods and ReplicaSets.
-message Deployment {
- // Standard object metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior of the Deployment.
- // +optional
- optional DeploymentSpec spec = 2;
-
- // Most recently observed status of the Deployment.
- // +optional
- optional DeploymentStatus status = 3;
-}
-
-// DeploymentCondition describes the state of a deployment at a certain point.
-message DeploymentCondition {
- // Type of deployment condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // The last time this condition was updated.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
-
- // Last time the condition transitioned from one status to another.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
-
- // The reason for the condition's last transition.
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- optional string message = 5;
-}
-
-// DeploymentList is a list of Deployments.
-message DeploymentList {
- // Standard list metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of Deployments.
- repeated Deployment items = 2;
-}
-
-// DeploymentSpec is the specification of the desired behavior of the Deployment.
-message DeploymentSpec {
- // Number of desired pods. This is a pointer to distinguish between explicit
- // zero and not specified. Defaults to 1.
- // +optional
- optional int32 replicas = 1;
-
- // Label selector for pods. Existing ReplicaSets whose pods are
- // selected by this will be the ones affected by this deployment.
- // It must match the pod template's labels.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // Template describes the pods that will be created.
- optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
-
- // The deployment strategy to use to replace existing pods with new ones.
- // +optional
- optional DeploymentStrategy strategy = 4;
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- optional int32 minReadySeconds = 5;
-
- // The number of old ReplicaSets to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 10.
- // +optional
- optional int32 revisionHistoryLimit = 6;
-
- // Indicates that the deployment is paused.
- // +optional
- optional bool paused = 7;
-
- // The maximum time in seconds for a deployment to make progress before it
- // is considered to be failed. The deployment controller will continue to
- // process failed deployments and a condition with a ProgressDeadlineExceeded
- // reason will be surfaced in the deployment status. Note that progress will
- // not be estimated during the time a deployment is paused. Defaults to 600s.
- optional int32 progressDeadlineSeconds = 9;
-}
-
-// DeploymentStatus is the most recently observed status of the Deployment.
-message DeploymentStatus {
- // The generation observed by the deployment controller.
- // +optional
- optional int64 observedGeneration = 1;
-
- // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
- // +optional
- optional int32 replicas = 2;
-
- // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
- // +optional
- optional int32 updatedReplicas = 3;
-
- // Total number of ready pods targeted by this deployment.
- // +optional
- optional int32 readyReplicas = 7;
-
- // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
- // +optional
- optional int32 availableReplicas = 4;
-
- // Total number of unavailable pods targeted by this deployment. This is the total number of
- // pods that are still required for the deployment to have 100% available capacity. They may
- // either be pods that are running but not yet available or pods that still have not been created.
- // +optional
- optional int32 unavailableReplicas = 5;
-
- // Represents the latest available observations of a deployment's current state.
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated DeploymentCondition conditions = 6;
-
- // Count of hash collisions for the Deployment. The Deployment controller uses this
- // field as a collision avoidance mechanism when it needs to create the name for the
- // newest ReplicaSet.
- // +optional
- optional int32 collisionCount = 8;
-}
-
-// DeploymentStrategy describes how to replace existing pods with new ones.
-message DeploymentStrategy {
- // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
- // +optional
- optional string type = 1;
-
- // Rolling update config params. Present only if DeploymentStrategyType =
- // RollingUpdate.
- // ---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be.
- // +optional
- optional RollingUpdateDeployment rollingUpdate = 2;
-}
-
-// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for
-// more information.
-// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
-message ReplicaSet {
- // If the Labels of a ReplicaSet are empty, they are defaulted to
- // be the same as the Pod(s) that the ReplicaSet manages.
- // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec defines the specification of the desired behavior of the ReplicaSet.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional ReplicaSetSpec spec = 2;
-
- // Status is the most recently observed status of the ReplicaSet.
- // This data may be out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional ReplicaSetStatus status = 3;
-}
-
-// ReplicaSetCondition describes the state of a replica set at a certain point.
-message ReplicaSetCondition {
- // Type of replica set condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // The last time the condition transitioned from one status to another.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // The reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- // +optional
- optional string message = 5;
-}
-
-// ReplicaSetList is a collection of ReplicaSets.
-message ReplicaSetList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // List of ReplicaSets.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
- repeated ReplicaSet items = 2;
-}
-
-// ReplicaSetSpec is the specification of a ReplicaSet.
-message ReplicaSetSpec {
- // Replicas is the number of desired replicas.
- // This is a pointer to distinguish between explicit zero and unspecified.
- // Defaults to 1.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- // +optional
- optional int32 replicas = 1;
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- optional int32 minReadySeconds = 4;
-
- // Selector is a label query over pods that should match the replica count.
- // Label keys and values that must match in order to be controlled by this replica set.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // Template is the object that describes the pod that will be created if
- // insufficient replicas are detected.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- // +optional
- optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
-}
-
-// ReplicaSetStatus represents the current status of a ReplicaSet.
-message ReplicaSetStatus {
- // Replicas is the most recently oberved number of replicas.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- optional int32 replicas = 1;
-
- // The number of pods that have labels matching the labels of the pod template of the replicaset.
- // +optional
- optional int32 fullyLabeledReplicas = 2;
-
- // The number of ready replicas for this replica set.
- // +optional
- optional int32 readyReplicas = 4;
-
- // The number of available replicas (ready for at least minReadySeconds) for this replica set.
- // +optional
- optional int32 availableReplicas = 5;
-
- // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
- // +optional
- optional int64 observedGeneration = 3;
-
- // Represents the latest available observations of a replica set's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated ReplicaSetCondition conditions = 6;
-}
-
-// Spec to control the desired behavior of daemon set rolling update.
-message RollingUpdateDaemonSet {
- // The maximum number of DaemonSet pods that can be unavailable during the
- // update. Value can be an absolute number (ex: 5) or a percentage of total
- // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
- // number is calculated from percentage by rounding up.
- // This cannot be 0.
- // Default value is 1.
- // Example: when this is set to 30%, at most 30% of the total number of nodes
- // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
- // can have their pods stopped for an update at any given
- // time. The update starts by stopping at most 30% of those DaemonSet pods
- // and then brings up new DaemonSet pods in their place. Once the new pods
- // are available, it then proceeds onto other DaemonSet pods, thus ensuring
- // that at least 70% of original number of DaemonSet pods are available at
- // all times during the update.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
-}
-
-// Spec to control the desired behavior of rolling update.
-message RollingUpdateDeployment {
- // The maximum number of pods that can be unavailable during the update.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // Absolute number is calculated from percentage by rounding down.
- // This can not be 0 if MaxSurge is 0.
- // Defaults to 25%.
- // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
- // immediately when the rolling update starts. Once new pods are ready, old RC
- // can be scaled down further, followed by scaling up the new RC, ensuring
- // that the total number of pods available at all times during the update is at
- // least 70% of desired pods.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
-
- // The maximum number of pods that can be scheduled above the desired number of
- // pods.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // This can not be 0 if MaxUnavailable is 0.
- // Absolute number is calculated from percentage by rounding up.
- // Defaults to 25%.
- // Example: when this is set to 30%, the new RC can be scaled up immediately when
- // the rolling update starts, such that the total number of old and new pods do not exceed
- // 130% of desired pods. Once old pods have been killed,
- // new RC can be scaled up further, ensuring that total number of pods running
- // at any time during the update is atmost 130% of desired pods.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
-}
-
-// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
-message RollingUpdateStatefulSetStrategy {
- // Partition indicates the ordinal at which the StatefulSet should be
- // partitioned.
- // Default value is 0.
- // +optional
- optional int32 partition = 1;
-}
-
-// Scale represents a scaling request for a resource.
-message Scale {
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- optional ScaleSpec spec = 2;
-
- // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
- // +optional
- optional ScaleStatus status = 3;
-}
-
-// ScaleSpec describes the attributes of a scale subresource
-message ScaleSpec {
- // desired number of instances for the scaled object.
- // +optional
- optional int32 replicas = 1;
-}
-
-// ScaleStatus represents the current status of a scale subresource.
-message ScaleStatus {
- // actual number of observed instances of the scaled object.
- optional int32 replicas = 1;
-
- // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
- // +optional
- map<string, string> selector = 2;
-
- // label selector for pods that should match the replicas count. This is a serializated
- // version of both map-based and more expressive set-based selectors. This is done to
- // avoid introspection in the clients. The string will be in the same format as the
- // query-param syntax. If the target type only supports map-based selectors, both this
- // field and map-based selector field are populated.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- optional string targetSelector = 3;
-}
-
-// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for
-// more information.
-// StatefulSet represents a set of pods with consistent identities.
-// Identities are defined as:
-// - Network: A single stable DNS and hostname.
-// - Storage: As many VolumeClaims as requested.
-// The StatefulSet guarantees that a given network identity will always
-// map to the same storage identity.
-message StatefulSet {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec defines the desired identities of pods in this set.
- // +optional
- optional StatefulSetSpec spec = 2;
-
- // Status is the current status of Pods in this StatefulSet. This data
- // may be out of date by some window of time.
- // +optional
- optional StatefulSetStatus status = 3;
-}
-
-// StatefulSetCondition describes the state of a statefulset at a certain point.
-message StatefulSetCondition {
- // Type of statefulset condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // Last time the condition transitioned from one status to another.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // The reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- // +optional
- optional string message = 5;
-}
-
-// StatefulSetList is a collection of StatefulSets.
-message StatefulSetList {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- repeated StatefulSet items = 2;
-}
-
-// A StatefulSetSpec is the specification of a StatefulSet.
-message StatefulSetSpec {
- // replicas is the desired number of replicas of the given Template.
- // These are replicas in the sense that they are instantiations of the
- // same Template, but individual replicas also have a consistent identity.
- // If unspecified, defaults to 1.
- // TODO: Consider a rename of this field.
- // +optional
- optional int32 replicas = 1;
-
- // selector is a label query over pods that should match the replica count.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // template is the object that describes the pod that will be created if
- // insufficient replicas are detected. Each pod stamped out by the StatefulSet
- // will fulfill this Template, but have a unique identity from the rest
- // of the StatefulSet.
- optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
-
- // volumeClaimTemplates is a list of claims that pods are allowed to reference.
- // The StatefulSet controller is responsible for mapping network identities to
- // claims in a way that maintains the identity of a pod. Every claim in
- // this list must have at least one matching (by name) volumeMount in one
- // container in the template. A claim in this list takes precedence over
- // any volumes in the template, with the same name.
- // TODO: Define the behavior if a claim already exists with the same name.
- // +optional
- repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
-
- // serviceName is the name of the service that governs this StatefulSet.
- // This service must exist before the StatefulSet, and is responsible for
- // the network identity of the set. Pods get DNS/hostnames that follow the
- // pattern: pod-specific-string.serviceName.default.svc.cluster.local
- // where "pod-specific-string" is managed by the StatefulSet controller.
- optional string serviceName = 5;
-
- // podManagementPolicy controls how pods are created during initial scale up,
- // when replacing pods on nodes, or when scaling down. The default policy is
- // `OrderedReady`, where pods are created in increasing order (pod-0, then
- // pod-1, etc) and the controller will wait until each pod is ready before
- // continuing. When scaling down, the pods are removed in the opposite order.
- // The alternative policy is `Parallel` which will create pods in parallel
- // to match the desired scale without waiting, and on scale down will delete
- // all pods at once.
- // +optional
- optional string podManagementPolicy = 6;
-
- // updateStrategy indicates the StatefulSetUpdateStrategy that will be
- // employed to update Pods in the StatefulSet when a revision is made to
- // Template.
- optional StatefulSetUpdateStrategy updateStrategy = 7;
-
- // revisionHistoryLimit is the maximum number of revisions that will
- // be maintained in the StatefulSet's revision history. The revision history
- // consists of all revisions not represented by a currently applied
- // StatefulSetSpec version. The default value is 10.
- optional int32 revisionHistoryLimit = 8;
-}
-
-// StatefulSetStatus represents the current state of a StatefulSet.
-message StatefulSetStatus {
- // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
- // StatefulSet's generation, which is updated on mutation by the API Server.
- // +optional
- optional int64 observedGeneration = 1;
-
- // replicas is the number of Pods created by the StatefulSet controller.
- optional int32 replicas = 2;
-
- // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
- optional int32 readyReplicas = 3;
-
- // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by currentRevision.
- optional int32 currentReplicas = 4;
-
- // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by updateRevision.
- optional int32 updatedReplicas = 5;
-
- // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
- // sequence [0,currentReplicas).
- optional string currentRevision = 6;
-
- // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
- // [replicas-updatedReplicas,replicas)
- optional string updateRevision = 7;
-
- // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
- // uses this field as a collision avoidance mechanism when it needs to create the name for the
- // newest ControllerRevision.
- // +optional
- optional int32 collisionCount = 9;
-
- // Represents the latest available observations of a statefulset's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated StatefulSetCondition conditions = 10;
-}
-
-// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
-// controller will use to perform updates. It includes any additional parameters
-// necessary to perform the update for the indicated strategy.
-message StatefulSetUpdateStrategy {
- // Type indicates the type of the StatefulSetUpdateStrategy.
- // Default is RollingUpdate.
- // +optional
- optional string type = 1;
-
- // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
- // +optional
- optional RollingUpdateStatefulSetStrategy rollingUpdate = 2;
-}
-
diff --git a/vendor/k8s.io/api/apps/v1beta2/register.go b/vendor/k8s.io/api/apps/v1beta2/register.go
deleted file mode 100644
index 2784ee377..000000000
--- a/vendor/k8s.io/api/apps/v1beta2/register.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-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 v1beta2
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "apps"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta2"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Deployment{},
- &DeploymentList{},
- &Scale{},
- &StatefulSet{},
- &StatefulSetList{},
- &DaemonSet{},
- &DaemonSetList{},
- &ReplicaSet{},
- &ReplicaSetList{},
- &ControllerRevision{},
- &ControllerRevisionList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/apps/v1beta2/types.go b/vendor/k8s.io/api/apps/v1beta2/types.go
deleted file mode 100644
index c8be2aaca..000000000
--- a/vendor/k8s.io/api/apps/v1beta2/types.go
+++ /dev/null
@@ -1,877 +0,0 @@
-/*
-Copyright 2017 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 v1beta2
-
-import (
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-const (
- ControllerRevisionHashLabelKey = "controller-revision-hash"
- StatefulSetRevisionLabel = ControllerRevisionHashLabelKey
- DeprecatedRollbackTo = "deprecated.deployment.rollback.to"
- DeprecatedTemplateGeneration = "deprecated.daemonset.template.generation"
- StatefulSetPodNameLabel = "statefulset.kubernetes.io/pod-name"
-)
-
-// ScaleSpec describes the attributes of a scale subresource
-type ScaleSpec struct {
- // desired number of instances for the scaled object.
- // +optional
- Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-}
-
-// ScaleStatus represents the current status of a scale subresource.
-type ScaleStatus struct {
- // actual number of observed instances of the scaled object.
- Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
-
- // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
- // +optional
- Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
-
- // label selector for pods that should match the replicas count. This is a serializated
- // version of both map-based and more expressive set-based selectors. This is done to
- // avoid introspection in the clients. The string will be in the same format as the
- // query-param syntax. If the target type only supports map-based selectors, both this
- // field and map-based selector field are populated.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"`
-}
-
-// +genclient
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Scale represents a scaling request for a resource.
-type Scale struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
- // +optional
- Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +genclient
-// +genclient:method=GetScale,verb=get,subresource=scale,result=Scale
-// +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for
-// more information.
-// StatefulSet represents a set of pods with consistent identities.
-// Identities are defined as:
-// - Network: A single stable DNS and hostname.
-// - Storage: As many VolumeClaims as requested.
-// The StatefulSet guarantees that a given network identity will always
-// map to the same storage identity.
-type StatefulSet struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec defines the desired identities of pods in this set.
- // +optional
- Spec StatefulSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is the current status of Pods in this StatefulSet. This data
- // may be out of date by some window of time.
- // +optional
- Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// PodManagementPolicyType defines the policy for creating pods under a stateful set.
-type PodManagementPolicyType string
-
-const (
- // OrderedReadyPodManagement will create pods in strictly increasing order on
- // scale up and strictly decreasing order on scale down, progressing only when
- // the previous pod is ready or terminated. At most one pod will be changed
- // at any time.
- OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
- // ParallelPodManagement will create and delete pods as soon as the stateful set
- // replica count is changed, and will not wait for pods to be ready or complete
- // termination.
- ParallelPodManagement = "Parallel"
-)
-
-// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
-// controller will use to perform updates. It includes any additional parameters
-// necessary to perform the update for the indicated strategy.
-type StatefulSetUpdateStrategy struct {
- // Type indicates the type of the StatefulSetUpdateStrategy.
- // Default is RollingUpdate.
- // +optional
- Type StatefulSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetStrategyType"`
- // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
- // +optional
- RollingUpdate *RollingUpdateStatefulSetStrategy `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
-}
-
-// StatefulSetUpdateStrategyType is a string enumeration type that enumerates
-// all possible update strategies for the StatefulSet controller.
-type StatefulSetUpdateStrategyType string
-
-const (
- // RollingUpdateStatefulSetStrategyType indicates that update will be
- // applied to all Pods in the StatefulSet with respect to the StatefulSet
- // ordering constraints. When a scale operation is performed with this
- // strategy, new Pods will be created from the specification version indicated
- // by the StatefulSet's updateRevision.
- RollingUpdateStatefulSetStrategyType = "RollingUpdate"
- // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version
- // tracking and ordered rolling restarts are disabled. Pods are recreated
- // from the StatefulSetSpec when they are manually deleted. When a scale
- // operation is performed with this strategy,specification version indicated
- // by the StatefulSet's currentRevision.
- OnDeleteStatefulSetStrategyType = "OnDelete"
-)
-
-// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
-type RollingUpdateStatefulSetStrategy struct {
- // Partition indicates the ordinal at which the StatefulSet should be
- // partitioned.
- // Default value is 0.
- // +optional
- Partition *int32 `json:"partition,omitempty" protobuf:"varint,1,opt,name=partition"`
-}
-
-// A StatefulSetSpec is the specification of a StatefulSet.
-type StatefulSetSpec struct {
- // replicas is the desired number of replicas of the given Template.
- // These are replicas in the sense that they are instantiations of the
- // same Template, but individual replicas also have a consistent identity.
- // If unspecified, defaults to 1.
- // TODO: Consider a rename of this field.
- // +optional
- Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-
- // selector is a label query over pods that should match the replica count.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"`
-
- // template is the object that describes the pod that will be created if
- // insufficient replicas are detected. Each pod stamped out by the StatefulSet
- // will fulfill this Template, but have a unique identity from the rest
- // of the StatefulSet.
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
-
- // volumeClaimTemplates is a list of claims that pods are allowed to reference.
- // The StatefulSet controller is responsible for mapping network identities to
- // claims in a way that maintains the identity of a pod. Every claim in
- // this list must have at least one matching (by name) volumeMount in one
- // container in the template. A claim in this list takes precedence over
- // any volumes in the template, with the same name.
- // TODO: Define the behavior if a claim already exists with the same name.
- // +optional
- VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
-
- // serviceName is the name of the service that governs this StatefulSet.
- // This service must exist before the StatefulSet, and is responsible for
- // the network identity of the set. Pods get DNS/hostnames that follow the
- // pattern: pod-specific-string.serviceName.default.svc.cluster.local
- // where "pod-specific-string" is managed by the StatefulSet controller.
- ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
-
- // podManagementPolicy controls how pods are created during initial scale up,
- // when replacing pods on nodes, or when scaling down. The default policy is
- // `OrderedReady`, where pods are created in increasing order (pod-0, then
- // pod-1, etc) and the controller will wait until each pod is ready before
- // continuing. When scaling down, the pods are removed in the opposite order.
- // The alternative policy is `Parallel` which will create pods in parallel
- // to match the desired scale without waiting, and on scale down will delete
- // all pods at once.
- // +optional
- PodManagementPolicy PodManagementPolicyType `json:"podManagementPolicy,omitempty" protobuf:"bytes,6,opt,name=podManagementPolicy,casttype=PodManagementPolicyType"`
-
- // updateStrategy indicates the StatefulSetUpdateStrategy that will be
- // employed to update Pods in the StatefulSet when a revision is made to
- // Template.
- UpdateStrategy StatefulSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,7,opt,name=updateStrategy"`
-
- // revisionHistoryLimit is the maximum number of revisions that will
- // be maintained in the StatefulSet's revision history. The revision history
- // consists of all revisions not represented by a currently applied
- // StatefulSetSpec version. The default value is 10.
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,8,opt,name=revisionHistoryLimit"`
-}
-
-// StatefulSetStatus represents the current state of a StatefulSet.
-type StatefulSetStatus struct {
- // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
- // StatefulSet's generation, which is updated on mutation by the API Server.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // replicas is the number of Pods created by the StatefulSet controller.
- Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
-
- // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,3,opt,name=readyReplicas"`
-
- // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by currentRevision.
- CurrentReplicas int32 `json:"currentReplicas,omitempty" protobuf:"varint,4,opt,name=currentReplicas"`
-
- // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
- // indicated by updateRevision.
- UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,5,opt,name=updatedReplicas"`
-
- // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
- // sequence [0,currentReplicas).
- CurrentRevision string `json:"currentRevision,omitempty" protobuf:"bytes,6,opt,name=currentRevision"`
-
- // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
- // [replicas-updatedReplicas,replicas)
- UpdateRevision string `json:"updateRevision,omitempty" protobuf:"bytes,7,opt,name=updateRevision"`
-
- // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
- // uses this field as a collision avoidance mechanism when it needs to create the name for the
- // newest ControllerRevision.
- // +optional
- CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"`
-
- // Represents the latest available observations of a statefulset's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"`
-}
-
-type StatefulSetConditionType string
-
-// StatefulSetCondition describes the state of a statefulset at a certain point.
-type StatefulSetCondition struct {
- // Type of statefulset condition.
- Type StatefulSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // Last time the condition transitioned from one status to another.
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// StatefulSetList is a collection of StatefulSets.
-type StatefulSetList struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for
-// more information.
-// Deployment enables declarative updates for Pods and ReplicaSets.
-type Deployment struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior of the Deployment.
- // +optional
- Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Most recently observed status of the Deployment.
- // +optional
- Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// DeploymentSpec is the specification of the desired behavior of the Deployment.
-type DeploymentSpec struct {
- // Number of desired pods. This is a pointer to distinguish between explicit
- // zero and not specified. Defaults to 1.
- // +optional
- Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-
- // Label selector for pods. Existing ReplicaSets whose pods are
- // selected by this will be the ones affected by this deployment.
- // It must match the pod template's labels.
- Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"`
-
- // Template describes the pods that will be created.
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
-
- // The deployment strategy to use to replace existing pods with new ones.
- // +optional
- Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"`
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`
-
- // The number of old ReplicaSets to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 10.
- // +optional
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
-
- // Indicates that the deployment is paused.
- // +optional
- Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
-
- // The maximum time in seconds for a deployment to make progress before it
- // is considered to be failed. The deployment controller will continue to
- // process failed deployments and a condition with a ProgressDeadlineExceeded
- // reason will be surfaced in the deployment status. Note that progress will
- // not be estimated during the time a deployment is paused. Defaults to 600s.
- ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
-}
-
-const (
- // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
- // to existing RCs (and label key that is added to its pods) to prevent the existing RCs
- // to select new pods (and old pods being select by new RC).
- DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
-)
-
-// DeploymentStrategy describes how to replace existing pods with new ones.
-type DeploymentStrategy struct {
- // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
- // +optional
- Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
-
- // Rolling update config params. Present only if DeploymentStrategyType =
- // RollingUpdate.
- //---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be.
- // +optional
- RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
-}
-
-type DeploymentStrategyType string
-
-const (
- // Kill all existing pods before creating new ones.
- RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
-
- // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
- RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
-)
-
-// Spec to control the desired behavior of rolling update.
-type RollingUpdateDeployment struct {
- // The maximum number of pods that can be unavailable during the update.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // Absolute number is calculated from percentage by rounding down.
- // This can not be 0 if MaxSurge is 0.
- // Defaults to 25%.
- // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
- // immediately when the rolling update starts. Once new pods are ready, old RC
- // can be scaled down further, followed by scaling up the new RC, ensuring
- // that the total number of pods available at all times during the update is at
- // least 70% of desired pods.
- // +optional
- MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
-
- // The maximum number of pods that can be scheduled above the desired number of
- // pods.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // This can not be 0 if MaxUnavailable is 0.
- // Absolute number is calculated from percentage by rounding up.
- // Defaults to 25%.
- // Example: when this is set to 30%, the new RC can be scaled up immediately when
- // the rolling update starts, such that the total number of old and new pods do not exceed
- // 130% of desired pods. Once old pods have been killed,
- // new RC can be scaled up further, ensuring that total number of pods running
- // at any time during the update is atmost 130% of desired pods.
- // +optional
- MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
-}
-
-// DeploymentStatus is the most recently observed status of the Deployment.
-type DeploymentStatus struct {
- // The generation observed by the deployment controller.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
- // +optional
- Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
-
- // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
- // +optional
- UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
-
- // Total number of ready pods targeted by this deployment.
- // +optional
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"`
-
- // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
- // +optional
- AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
-
- // Total number of unavailable pods targeted by this deployment. This is the total number of
- // pods that are still required for the deployment to have 100% available capacity. They may
- // either be pods that are running but not yet available or pods that still have not been created.
- // +optional
- UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
-
- // Represents the latest available observations of a deployment's current state.
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
-
- // Count of hash collisions for the Deployment. The Deployment controller uses this
- // field as a collision avoidance mechanism when it needs to create the name for the
- // newest ReplicaSet.
- // +optional
- CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,8,opt,name=collisionCount"`
-}
-
-type DeploymentConditionType string
-
-// These are valid conditions of a deployment.
-const (
- // Available means the deployment is available, ie. at least the minimum available
- // replicas required are up and running for at least minReadySeconds.
- DeploymentAvailable DeploymentConditionType = "Available"
- // Progressing means the deployment is progressing. Progress for a deployment is
- // considered when a new replica set is created or adopted, and when new pods scale
- // up or old pods scale down. Progress is not estimated for paused deployments or
- // when progressDeadlineSeconds is not specified.
- DeploymentProgressing DeploymentConditionType = "Progressing"
- // ReplicaFailure is added in a deployment when one of its pods fails to be created
- // or deleted.
- DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure"
-)
-
-// DeploymentCondition describes the state of a deployment at a certain point.
-type DeploymentCondition struct {
- // Type of deployment condition.
- Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // The last time this condition was updated.
- LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"`
- // Last time the condition transitioned from one status to another.
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DeploymentList is a list of Deployments.
-type DeploymentList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of Deployments.
- Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
-type DaemonSetUpdateStrategy struct {
- // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
- // +optional
- Type DaemonSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type"`
-
- // Rolling update config params. Present only if type = "RollingUpdate".
- //---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be. Same as Deployment `strategy.rollingUpdate`.
- // See https://github.com/kubernetes/kubernetes/issues/35345
- // +optional
- RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
-}
-
-type DaemonSetUpdateStrategyType string
-
-const (
- // Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
- RollingUpdateDaemonSetStrategyType DaemonSetUpdateStrategyType = "RollingUpdate"
-
- // Replace the old daemons only when it's killed
- OnDeleteDaemonSetStrategyType DaemonSetUpdateStrategyType = "OnDelete"
-)
-
-// Spec to control the desired behavior of daemon set rolling update.
-type RollingUpdateDaemonSet struct {
- // The maximum number of DaemonSet pods that can be unavailable during the
- // update. Value can be an absolute number (ex: 5) or a percentage of total
- // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
- // number is calculated from percentage by rounding up.
- // This cannot be 0.
- // Default value is 1.
- // Example: when this is set to 30%, at most 30% of the total number of nodes
- // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
- // can have their pods stopped for an update at any given
- // time. The update starts by stopping at most 30% of those DaemonSet pods
- // and then brings up new DaemonSet pods in their place. Once the new pods
- // are available, it then proceeds onto other DaemonSet pods, thus ensuring
- // that at least 70% of original number of DaemonSet pods are available at
- // all times during the update.
- // +optional
- MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
-}
-
-// DaemonSetSpec is the specification of a daemon set.
-type DaemonSetSpec struct {
- // A label query over pods that are managed by the daemon set.
- // Must match in order to be controlled.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,1,opt,name=selector"`
-
- // An object that describes the pod that will be created.
- // The DaemonSet will create exactly one copy of this pod on every node
- // that matches the template's node selector (or on every node if no node
- // selector is specified).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"`
-
- // An update strategy to replace existing DaemonSet pods with new pods.
- // +optional
- UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,3,opt,name=updateStrategy"`
-
- // The minimum number of seconds for which a newly created DaemonSet pod should
- // be ready without any of its container crashing, for it to be considered
- // available. Defaults to 0 (pod will be considered available as soon as it
- // is ready).
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
-
- // The number of old history to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 10.
- // +optional
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
-}
-
-// DaemonSetStatus represents the current status of a daemon set.
-type DaemonSetStatus struct {
- // The number of nodes that are running at least 1
- // daemon pod and are supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- CurrentNumberScheduled int32 `json:"currentNumberScheduled" protobuf:"varint,1,opt,name=currentNumberScheduled"`
-
- // The number of nodes that are running the daemon pod, but are
- // not supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- NumberMisscheduled int32 `json:"numberMisscheduled" protobuf:"varint,2,opt,name=numberMisscheduled"`
-
- // The total number of nodes that should be running the daemon
- // pod (including nodes correctly running the daemon pod).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- DesiredNumberScheduled int32 `json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"`
-
- // The number of nodes that should be running the daemon pod and have one
- // or more of the daemon pod running and ready.
- NumberReady int32 `json:"numberReady" protobuf:"varint,4,opt,name=numberReady"`
-
- // The most recent generation observed by the daemon set controller.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,5,opt,name=observedGeneration"`
-
- // The total number of nodes that are running updated daemon pod
- // +optional
- UpdatedNumberScheduled int32 `json:"updatedNumberScheduled,omitempty" protobuf:"varint,6,opt,name=updatedNumberScheduled"`
-
- // The number of nodes that should be running the
- // daemon pod and have one or more of the daemon pod running and
- // available (ready for at least spec.minReadySeconds)
- // +optional
- NumberAvailable int32 `json:"numberAvailable,omitempty" protobuf:"varint,7,opt,name=numberAvailable"`
-
- // The number of nodes that should be running the
- // daemon pod and have none of the daemon pod running and available
- // (ready for at least spec.minReadySeconds)
- // +optional
- NumberUnavailable int32 `json:"numberUnavailable,omitempty" protobuf:"varint,8,opt,name=numberUnavailable"`
-
- // Count of hash collisions for the DaemonSet. The DaemonSet controller
- // uses this field as a collision avoidance mechanism when it needs to
- // create the name for the newest ControllerRevision.
- // +optional
- CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"`
-
- // Represents the latest available observations of a DaemonSet's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"`
-}
-
-type DaemonSetConditionType string
-
-// TODO: Add valid condition types of a DaemonSet.
-
-// DaemonSetCondition describes the state of a DaemonSet at a certain point.
-type DaemonSetCondition struct {
- // Type of DaemonSet condition.
- Type DaemonSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DaemonSetConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // Last time the condition transitioned from one status to another.
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for
-// more information.
-// DaemonSet represents the configuration of a daemon set.
-type DaemonSet struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // The desired behavior of this daemon set.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // The current status of this daemon set. This data may be
- // out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-const (
- // DefaultDaemonSetUniqueLabelKey is the default label key that is added
- // to existing DaemonSet pods to distinguish between old and new
- // DaemonSet pods during DaemonSet template updates.
- DefaultDaemonSetUniqueLabelKey = ControllerRevisionHashLabelKey
-)
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DaemonSetList is a collection of daemon sets.
-type DaemonSetList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // A list of daemon sets.
- Items []DaemonSet `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for
-// more information.
-// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
-type ReplicaSet struct {
- metav1.TypeMeta `json:",inline"`
-
- // If the Labels of a ReplicaSet are empty, they are defaulted to
- // be the same as the Pod(s) that the ReplicaSet manages.
- // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec defines the specification of the desired behavior of the ReplicaSet.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec ReplicaSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is the most recently observed status of the ReplicaSet.
- // This data may be out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ReplicaSetList is a collection of ReplicaSets.
-type ReplicaSetList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // List of ReplicaSets.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
- Items []ReplicaSet `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// ReplicaSetSpec is the specification of a ReplicaSet.
-type ReplicaSetSpec struct {
- // Replicas is the number of desired replicas.
- // This is a pointer to distinguish between explicit zero and unspecified.
- // Defaults to 1.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- // +optional
- Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
-
- // Selector is a label query over pods that should match the replica count.
- // Label keys and values that must match in order to be controlled by this replica set.
- // It must match the pod template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"`
-
- // Template is the object that describes the pod that will be created if
- // insufficient replicas are detected.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- // +optional
- Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
-}
-
-// ReplicaSetStatus represents the current status of a ReplicaSet.
-type ReplicaSetStatus struct {
- // Replicas is the most recently oberved number of replicas.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
-
- // The number of pods that have labels matching the labels of the pod template of the replicaset.
- // +optional
- FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
-
- // The number of ready replicas for this replica set.
- // +optional
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
-
- // The number of available replicas (ready for at least minReadySeconds) for this replica set.
- // +optional
- AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`
-
- // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
-
- // Represents the latest available observations of a replica set's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
-}
-
-type ReplicaSetConditionType string
-
-// These are valid conditions of a replica set.
-const (
- // ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created
- // due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted
- // due to kubelet being down or finalizers are failing.
- ReplicaSetReplicaFailure ReplicaSetConditionType = "ReplicaFailure"
-)
-
-// ReplicaSetCondition describes the state of a replica set at a certain point.
-type ReplicaSetCondition struct {
- // Type of replica set condition.
- Type ReplicaSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicaSetConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // The last time the condition transitioned from one status to another.
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the
-// release notes for more information.
-// ControllerRevision implements an immutable snapshot of state data. Clients
-// are responsible for serializing and deserializing the objects that contain
-// their internal state.
-// Once a ControllerRevision has been successfully created, it can not be updated.
-// The API Server will fail validation of all requests that attempt to mutate
-// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
-// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
-// it may be subject to name and representation changes in future releases, and clients should not
-// depend on its stability. It is primarily for internal use by controllers.
-type ControllerRevision struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Data is the serialized representation of the state.
- Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
-
- // Revision indicates the revision of the state represented by Data.
- Revision int64 `json:"revision" protobuf:"varint,3,opt,name=revision"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
-type ControllerRevisionList struct {
- metav1.TypeMeta `json:",inline"`
-
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of ControllerRevisions
- Items []ControllerRevision `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go
deleted file mode 100644
index e2f133b51..000000000
--- a/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
-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 v1beta2
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_ControllerRevision = map[string]string{
- "": "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "data": "Data is the serialized representation of the state.",
- "revision": "Revision indicates the revision of the state represented by Data.",
-}
-
-func (ControllerRevision) SwaggerDoc() map[string]string {
- return map_ControllerRevision
-}
-
-var map_ControllerRevisionList = map[string]string{
- "": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.",
- "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is the list of ControllerRevisions",
-}
-
-func (ControllerRevisionList) SwaggerDoc() map[string]string {
- return map_ControllerRevisionList
-}
-
-var map_DaemonSet = map[string]string{
- "": "DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
- "status": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (DaemonSet) SwaggerDoc() map[string]string {
- return map_DaemonSet
-}
-
-var map_DaemonSetCondition = map[string]string{
- "": "DaemonSetCondition describes the state of a DaemonSet at a certain point.",
- "type": "Type of DaemonSet condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastTransitionTime": "Last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (DaemonSetCondition) SwaggerDoc() map[string]string {
- return map_DaemonSetCondition
-}
-
-var map_DaemonSetList = map[string]string{
- "": "DaemonSetList is a collection of daemon sets.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "A list of daemon sets.",
-}
-
-func (DaemonSetList) SwaggerDoc() map[string]string {
- return map_DaemonSetList
-}
-
-var map_DaemonSetSpec = map[string]string{
- "": "DaemonSetSpec is the specification of a daemon set.",
- "selector": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- "template": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
- "updateStrategy": "An update strategy to replace existing DaemonSet pods with new pods.",
- "minReadySeconds": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).",
- "revisionHistoryLimit": "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.",
-}
-
-func (DaemonSetSpec) SwaggerDoc() map[string]string {
- return map_DaemonSetSpec
-}
-
-var map_DaemonSetStatus = map[string]string{
- "": "DaemonSetStatus represents the current status of a daemon set.",
- "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
- "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
- "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
- "numberReady": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.",
- "observedGeneration": "The most recent generation observed by the daemon set controller.",
- "updatedNumberScheduled": "The total number of nodes that are running updated daemon pod",
- "numberAvailable": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)",
- "numberUnavailable": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)",
- "collisionCount": "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
- "conditions": "Represents the latest available observations of a DaemonSet's current state.",
-}
-
-func (DaemonSetStatus) SwaggerDoc() map[string]string {
- return map_DaemonSetStatus
-}
-
-var map_DaemonSetUpdateStrategy = map[string]string{
- "": "DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.",
- "type": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.",
- "rollingUpdate": "Rolling update config params. Present only if type = \"RollingUpdate\".",
-}
-
-func (DaemonSetUpdateStrategy) SwaggerDoc() map[string]string {
- return map_DaemonSetUpdateStrategy
-}
-
-var map_Deployment = map[string]string{
- "": "DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.",
- "metadata": "Standard object metadata.",
- "spec": "Specification of the desired behavior of the Deployment.",
- "status": "Most recently observed status of the Deployment.",
-}
-
-func (Deployment) SwaggerDoc() map[string]string {
- return map_Deployment
-}
-
-var map_DeploymentCondition = map[string]string{
- "": "DeploymentCondition describes the state of a deployment at a certain point.",
- "type": "Type of deployment condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastUpdateTime": "The last time this condition was updated.",
- "lastTransitionTime": "Last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (DeploymentCondition) SwaggerDoc() map[string]string {
- return map_DeploymentCondition
-}
-
-var map_DeploymentList = map[string]string{
- "": "DeploymentList is a list of Deployments.",
- "metadata": "Standard list metadata.",
- "items": "Items is the list of Deployments.",
-}
-
-func (DeploymentList) SwaggerDoc() map[string]string {
- return map_DeploymentList
-}
-
-var map_DeploymentSpec = map[string]string{
- "": "DeploymentSpec is the specification of the desired behavior of the Deployment.",
- "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
- "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.",
- "template": "Template describes the pods that will be created.",
- "strategy": "The deployment strategy to use to replace existing pods with new ones.",
- "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
- "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.",
- "paused": "Indicates that the deployment is paused.",
- "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.",
-}
-
-func (DeploymentSpec) SwaggerDoc() map[string]string {
- return map_DeploymentSpec
-}
-
-var map_DeploymentStatus = map[string]string{
- "": "DeploymentStatus is the most recently observed status of the Deployment.",
- "observedGeneration": "The generation observed by the deployment controller.",
- "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).",
- "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.",
- "readyReplicas": "Total number of ready pods targeted by this deployment.",
- "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.",
- "unavailableReplicas": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.",
- "conditions": "Represents the latest available observations of a deployment's current state.",
- "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.",
-}
-
-func (DeploymentStatus) SwaggerDoc() map[string]string {
- return map_DeploymentStatus
-}
-
-var map_DeploymentStrategy = map[string]string{
- "": "DeploymentStrategy describes how to replace existing pods with new ones.",
- "type": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.",
- "rollingUpdate": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.",
-}
-
-func (DeploymentStrategy) SwaggerDoc() map[string]string {
- return map_DeploymentStrategy
-}
-
-var map_ReplicaSet = map[string]string{
- "": "DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.",
- "metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
- "status": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (ReplicaSet) SwaggerDoc() map[string]string {
- return map_ReplicaSet
-}
-
-var map_ReplicaSetCondition = map[string]string{
- "": "ReplicaSetCondition describes the state of a replica set at a certain point.",
- "type": "Type of replica set condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastTransitionTime": "The last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (ReplicaSetCondition) SwaggerDoc() map[string]string {
- return map_ReplicaSetCondition
-}
-
-var map_ReplicaSetList = map[string]string{
- "": "ReplicaSetList is a collection of ReplicaSets.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
- "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller",
-}
-
-func (ReplicaSetList) SwaggerDoc() map[string]string {
- return map_ReplicaSetList
-}
-
-var map_ReplicaSetSpec = map[string]string{
- "": "ReplicaSetSpec is the specification of a ReplicaSet.",
- "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller",
- "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
- "selector": "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
-}
-
-func (ReplicaSetSpec) SwaggerDoc() map[string]string {
- return map_ReplicaSetSpec
-}
-
-var map_ReplicaSetStatus = map[string]string{
- "": "ReplicaSetStatus represents the current status of a ReplicaSet.",
- "replicas": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller",
- "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.",
- "readyReplicas": "The number of ready replicas for this replica set.",
- "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replica set.",
- "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.",
- "conditions": "Represents the latest available observations of a replica set's current state.",
-}
-
-func (ReplicaSetStatus) SwaggerDoc() map[string]string {
- return map_ReplicaSetStatus
-}
-
-var map_RollingUpdateDaemonSet = map[string]string{
- "": "Spec to control the desired behavior of daemon set rolling update.",
- "maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.",
-}
-
-func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string {
- return map_RollingUpdateDaemonSet
-}
-
-var map_RollingUpdateDeployment = map[string]string{
- "": "Spec to control the desired behavior of rolling update.",
- "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.",
- "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.",
-}
-
-func (RollingUpdateDeployment) SwaggerDoc() map[string]string {
- return map_RollingUpdateDeployment
-}
-
-var map_RollingUpdateStatefulSetStrategy = map[string]string{
- "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.",
- "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.",
-}
-
-func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string {
- return map_RollingUpdateStatefulSetStrategy
-}
-
-var map_Scale = map[string]string{
- "": "Scale represents a scaling request for a resource.",
- "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
- "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
- "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.",
-}
-
-func (Scale) SwaggerDoc() map[string]string {
- return map_Scale
-}
-
-var map_ScaleSpec = map[string]string{
- "": "ScaleSpec describes the attributes of a scale subresource",
- "replicas": "desired number of instances for the scaled object.",
-}
-
-func (ScaleSpec) SwaggerDoc() map[string]string {
- return map_ScaleSpec
-}
-
-var map_ScaleStatus = map[string]string{
- "": "ScaleStatus represents the current status of a scale subresource.",
- "replicas": "actual number of observed instances of the scaled object.",
- "selector": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors",
- "targetSelector": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
-}
-
-func (ScaleStatus) SwaggerDoc() map[string]string {
- return map_ScaleStatus
-}
-
-var map_StatefulSet = map[string]string{
- "": "DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.",
- "spec": "Spec defines the desired identities of pods in this set.",
- "status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.",
-}
-
-func (StatefulSet) SwaggerDoc() map[string]string {
- return map_StatefulSet
-}
-
-var map_StatefulSetCondition = map[string]string{
- "": "StatefulSetCondition describes the state of a statefulset at a certain point.",
- "type": "Type of statefulset condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastTransitionTime": "Last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (StatefulSetCondition) SwaggerDoc() map[string]string {
- return map_StatefulSetCondition
-}
-
-var map_StatefulSetList = map[string]string{
- "": "StatefulSetList is a collection of StatefulSets.",
-}
-
-func (StatefulSetList) SwaggerDoc() map[string]string {
- return map_StatefulSetList
-}
-
-var map_StatefulSetSpec = map[string]string{
- "": "A StatefulSetSpec is the specification of a StatefulSet.",
- "replicas": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
- "selector": "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- "template": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.",
- "volumeClaimTemplates": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
- "serviceName": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
- "podManagementPolicy": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.",
- "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.",
- "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.",
-}
-
-func (StatefulSetSpec) SwaggerDoc() map[string]string {
- return map_StatefulSetSpec
-}
-
-var map_StatefulSetStatus = map[string]string{
- "": "StatefulSetStatus represents the current state of a StatefulSet.",
- "observedGeneration": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.",
- "replicas": "replicas is the number of Pods created by the StatefulSet controller.",
- "readyReplicas": "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.",
- "currentReplicas": "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.",
- "updatedReplicas": "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.",
- "currentRevision": "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).",
- "updateRevision": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)",
- "collisionCount": "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
- "conditions": "Represents the latest available observations of a statefulset's current state.",
-}
-
-func (StatefulSetStatus) SwaggerDoc() map[string]string {
- return map_StatefulSetStatus
-}
-
-var map_StatefulSetUpdateStrategy = map[string]string{
- "": "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.",
- "type": "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.",
- "rollingUpdate": "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.",
-}
-
-func (StatefulSetUpdateStrategy) SwaggerDoc() map[string]string {
- return map_StatefulSetUpdateStrategy
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go b/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go
deleted file mode 100644
index 3db38527d..000000000
--- a/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,923 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta2
-
-import (
- core_v1 "k8s.io/api/core/v1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- intstr "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ControllerRevision) DeepCopyInto(out *ControllerRevision) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Data.DeepCopyInto(&out.Data)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevision.
-func (in *ControllerRevision) DeepCopy() *ControllerRevision {
- if in == nil {
- return nil
- }
- out := new(ControllerRevision)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ControllerRevision) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ControllerRevisionList) DeepCopyInto(out *ControllerRevisionList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ControllerRevision, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevisionList.
-func (in *ControllerRevisionList) DeepCopy() *ControllerRevisionList {
- if in == nil {
- return nil
- }
- out := new(ControllerRevisionList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ControllerRevisionList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSet) DeepCopyInto(out *DaemonSet) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSet.
-func (in *DaemonSet) DeepCopy() *DaemonSet {
- if in == nil {
- return nil
- }
- out := new(DaemonSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DaemonSet) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetCondition) DeepCopyInto(out *DaemonSetCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetCondition.
-func (in *DaemonSetCondition) DeepCopy() *DaemonSetCondition {
- if in == nil {
- return nil
- }
- out := new(DaemonSetCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetList) DeepCopyInto(out *DaemonSetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]DaemonSet, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetList.
-func (in *DaemonSetList) DeepCopy() *DaemonSetList {
- if in == nil {
- return nil
- }
- out := new(DaemonSetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DaemonSetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetSpec) DeepCopyInto(out *DaemonSetSpec) {
- *out = *in
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy)
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetSpec.
-func (in *DaemonSetSpec) DeepCopy() *DaemonSetSpec {
- if in == nil {
- return nil
- }
- out := new(DaemonSetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetStatus) DeepCopyInto(out *DaemonSetStatus) {
- *out = *in
- if in.CollisionCount != nil {
- in, out := &in.CollisionCount, &out.CollisionCount
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]DaemonSetCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetStatus.
-func (in *DaemonSetStatus) DeepCopy() *DaemonSetStatus {
- if in == nil {
- return nil
- }
- out := new(DaemonSetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetUpdateStrategy) DeepCopyInto(out *DaemonSetUpdateStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollingUpdateDaemonSet)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetUpdateStrategy.
-func (in *DaemonSetUpdateStrategy) DeepCopy() *DaemonSetUpdateStrategy {
- if in == nil {
- return nil
- }
- out := new(DaemonSetUpdateStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Deployment) DeepCopyInto(out *Deployment) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Deployment.
-func (in *Deployment) DeepCopy() *Deployment {
- if in == nil {
- return nil
- }
- out := new(Deployment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Deployment) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentCondition) DeepCopyInto(out *DeploymentCondition) {
- *out = *in
- in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime)
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentCondition.
-func (in *DeploymentCondition) DeepCopy() *DeploymentCondition {
- if in == nil {
- return nil
- }
- out := new(DeploymentCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentList) DeepCopyInto(out *DeploymentList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Deployment, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentList.
-func (in *DeploymentList) DeepCopy() *DeploymentList {
- if in == nil {
- return nil
- }
- out := new(DeploymentList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DeploymentList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- in.Strategy.DeepCopyInto(&out.Strategy)
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.ProgressDeadlineSeconds != nil {
- in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpec.
-func (in *DeploymentSpec) DeepCopy() *DeploymentSpec {
- if in == nil {
- return nil
- }
- out := new(DeploymentSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]DeploymentCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.CollisionCount != nil {
- in, out := &in.CollisionCount, &out.CollisionCount
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStatus.
-func (in *DeploymentStatus) DeepCopy() *DeploymentStatus {
- if in == nil {
- return nil
- }
- out := new(DeploymentStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollingUpdateDeployment)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStrategy.
-func (in *DeploymentStrategy) DeepCopy() *DeploymentStrategy {
- if in == nil {
- return nil
- }
- out := new(DeploymentStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSet) DeepCopyInto(out *ReplicaSet) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSet.
-func (in *ReplicaSet) DeepCopy() *ReplicaSet {
- if in == nil {
- return nil
- }
- out := new(ReplicaSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ReplicaSet) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetCondition) DeepCopyInto(out *ReplicaSetCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetCondition.
-func (in *ReplicaSetCondition) DeepCopy() *ReplicaSetCondition {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetList) DeepCopyInto(out *ReplicaSetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ReplicaSet, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetList.
-func (in *ReplicaSetList) DeepCopy() *ReplicaSetList {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ReplicaSetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetSpec) DeepCopyInto(out *ReplicaSetSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetSpec.
-func (in *ReplicaSetSpec) DeepCopy() *ReplicaSetSpec {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]ReplicaSetCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetStatus.
-func (in *ReplicaSetStatus) DeepCopy() *ReplicaSetStatus {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) {
- *out = *in
- if in.MaxUnavailable != nil {
- in, out := &in.MaxUnavailable, &out.MaxUnavailable
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateDaemonSet.
-func (in *RollingUpdateDaemonSet) DeepCopy() *RollingUpdateDaemonSet {
- if in == nil {
- return nil
- }
- out := new(RollingUpdateDaemonSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollingUpdateDeployment) DeepCopyInto(out *RollingUpdateDeployment) {
- *out = *in
- if in.MaxUnavailable != nil {
- in, out := &in.MaxUnavailable, &out.MaxUnavailable
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- if in.MaxSurge != nil {
- in, out := &in.MaxSurge, &out.MaxSurge
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateDeployment.
-func (in *RollingUpdateDeployment) DeepCopy() *RollingUpdateDeployment {
- if in == nil {
- return nil
- }
- out := new(RollingUpdateDeployment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateStatefulSetStrategy) {
- *out = *in
- if in.Partition != nil {
- in, out := &in.Partition, &out.Partition
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateStatefulSetStrategy.
-func (in *RollingUpdateStatefulSetStrategy) DeepCopy() *RollingUpdateStatefulSetStrategy {
- if in == nil {
- return nil
- }
- out := new(RollingUpdateStatefulSetStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Scale) DeepCopyInto(out *Scale) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- out.Spec = in.Spec
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scale.
-func (in *Scale) DeepCopy() *Scale {
- if in == nil {
- return nil
- }
- out := new(Scale)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Scale) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ScaleSpec) DeepCopyInto(out *ScaleSpec) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleSpec.
-func (in *ScaleSpec) DeepCopy() *ScaleSpec {
- if in == nil {
- return nil
- }
- out := new(ScaleSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ScaleStatus) DeepCopyInto(out *ScaleStatus) {
- *out = *in
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleStatus.
-func (in *ScaleStatus) DeepCopy() *ScaleStatus {
- if in == nil {
- return nil
- }
- out := new(ScaleStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSet) DeepCopyInto(out *StatefulSet) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSet.
-func (in *StatefulSet) DeepCopy() *StatefulSet {
- if in == nil {
- return nil
- }
- out := new(StatefulSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *StatefulSet) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetCondition) DeepCopyInto(out *StatefulSetCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetCondition.
-func (in *StatefulSetCondition) DeepCopy() *StatefulSetCondition {
- if in == nil {
- return nil
- }
- out := new(StatefulSetCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]StatefulSet, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetList.
-func (in *StatefulSetList) DeepCopy() *StatefulSetList {
- if in == nil {
- return nil
- }
- out := new(StatefulSetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *StatefulSetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- if in.VolumeClaimTemplates != nil {
- in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
- *out = make([]core_v1.PersistentVolumeClaim, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy)
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetSpec.
-func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec {
- if in == nil {
- return nil
- }
- out := new(StatefulSetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) {
- *out = *in
- if in.CollisionCount != nil {
- in, out := &in.CollisionCount, &out.CollisionCount
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]StatefulSetCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetStatus.
-func (in *StatefulSetStatus) DeepCopy() *StatefulSetStatus {
- if in == nil {
- return nil
- }
- out := new(StatefulSetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StatefulSetUpdateStrategy) DeepCopyInto(out *StatefulSetUpdateStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollingUpdateStatefulSetStrategy)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetUpdateStrategy.
-func (in *StatefulSetUpdateStrategy) DeepCopy() *StatefulSetUpdateStrategy {
- if in == nil {
- return nil
- }
- out := new(StatefulSetUpdateStrategy)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/authentication/v1/doc.go b/vendor/k8s.io/api/authentication/v1/doc.go
deleted file mode 100644
index 2d2ed2ee8..000000000
--- a/vendor/k8s.io/api/authentication/v1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +groupName=authentication.k8s.io
-// +k8s:openapi-gen=true
-package v1 // import "k8s.io/api/authentication/v1"
diff --git a/vendor/k8s.io/api/authentication/v1/generated.pb.go b/vendor/k8s.io/api/authentication/v1/generated.pb.go
deleted file mode 100644
index d090ce579..000000000
--- a/vendor/k8s.io/api/authentication/v1/generated.pb.go
+++ /dev/null
@@ -1,2148 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1/generated.proto
-
- It has these top-level messages:
- BoundObjectReference
- ExtraValue
- TokenRequest
- TokenRequestSpec
- TokenRequestStatus
- TokenReview
- TokenReviewSpec
- TokenReviewStatus
- UserInfo
-*/
-package v1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *BoundObjectReference) Reset() { *m = BoundObjectReference{} }
-func (*BoundObjectReference) ProtoMessage() {}
-func (*BoundObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *ExtraValue) Reset() { *m = ExtraValue{} }
-func (*ExtraValue) ProtoMessage() {}
-func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *TokenRequest) Reset() { *m = TokenRequest{} }
-func (*TokenRequest) ProtoMessage() {}
-func (*TokenRequest) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *TokenRequestSpec) Reset() { *m = TokenRequestSpec{} }
-func (*TokenRequestSpec) ProtoMessage() {}
-func (*TokenRequestSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *TokenRequestStatus) Reset() { *m = TokenRequestStatus{} }
-func (*TokenRequestStatus) ProtoMessage() {}
-func (*TokenRequestStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *TokenReview) Reset() { *m = TokenReview{} }
-func (*TokenReview) ProtoMessage() {}
-func (*TokenReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} }
-func (*TokenReviewSpec) ProtoMessage() {}
-func (*TokenReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} }
-func (*TokenReviewStatus) ProtoMessage() {}
-func (*TokenReviewStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func (m *UserInfo) Reset() { *m = UserInfo{} }
-func (*UserInfo) ProtoMessage() {}
-func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func init() {
- proto.RegisterType((*BoundObjectReference)(nil), "k8s.io.api.authentication.v1.BoundObjectReference")
- proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.authentication.v1.ExtraValue")
- proto.RegisterType((*TokenRequest)(nil), "k8s.io.api.authentication.v1.TokenRequest")
- proto.RegisterType((*TokenRequestSpec)(nil), "k8s.io.api.authentication.v1.TokenRequestSpec")
- proto.RegisterType((*TokenRequestStatus)(nil), "k8s.io.api.authentication.v1.TokenRequestStatus")
- proto.RegisterType((*TokenReview)(nil), "k8s.io.api.authentication.v1.TokenReview")
- proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.api.authentication.v1.TokenReviewSpec")
- proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.api.authentication.v1.TokenReviewStatus")
- proto.RegisterType((*UserInfo)(nil), "k8s.io.api.authentication.v1.UserInfo")
-}
-func (m *BoundObjectReference) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *BoundObjectReference) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
- i += copy(dAtA[i:], m.Kind)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
- i += copy(dAtA[i:], m.APIVersion)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
- i += copy(dAtA[i:], m.UID)
- return i, nil
-}
-
-func (m ExtraValue) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m) > 0 {
- for _, s := range m {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *TokenRequest) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *TokenRequest) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *TokenRequestSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *TokenRequestSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Audiences) > 0 {
- for _, s := range m.Audiences {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if m.BoundObjectRef != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.BoundObjectRef.Size()))
- n4, err := m.BoundObjectRef.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- }
- if m.ExpirationSeconds != nil {
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.ExpirationSeconds))
- }
- return i, nil
-}
-
-func (m *TokenRequestStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *TokenRequestStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Token)))
- i += copy(dAtA[i:], m.Token)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ExpirationTimestamp.Size()))
- n5, err := m.ExpirationTimestamp.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- return i, nil
-}
-
-func (m *TokenReview) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *TokenReview) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n6, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n7, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n8, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- return i, nil
-}
-
-func (m *TokenReviewSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *TokenReviewSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Token)))
- i += copy(dAtA[i:], m.Token)
- return i, nil
-}
-
-func (m *TokenReviewStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *TokenReviewStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- if m.Authenticated {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.User.Size()))
- n9, err := m.User.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error)))
- i += copy(dAtA[i:], m.Error)
- return i, nil
-}
-
-func (m *UserInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *UserInfo) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username)))
- i += copy(dAtA[i:], m.Username)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
- i += copy(dAtA[i:], m.UID)
- if len(m.Groups) > 0 {
- for _, s := range m.Groups {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Extra) > 0 {
- keysForExtra := make([]string, 0, len(m.Extra))
- for k := range m.Extra {
- keysForExtra = append(keysForExtra, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
- for _, k := range keysForExtra {
- dAtA[i] = 0x22
- i++
- v := m.Extra[string(k)]
- msgSize := 0
- if (&v) != nil {
- msgSize = (&v).Size()
- msgSize += 1 + sovGenerated(uint64(msgSize))
- }
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
- n10, err := (&v).MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- }
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *BoundObjectReference) Size() (n int) {
- var l int
- _ = l
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.APIVersion)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.UID)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m ExtraValue) Size() (n int) {
- var l int
- _ = l
- if len(m) > 0 {
- for _, s := range m {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *TokenRequest) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *TokenRequestSpec) Size() (n int) {
- var l int
- _ = l
- if len(m.Audiences) > 0 {
- for _, s := range m.Audiences {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.BoundObjectRef != nil {
- l = m.BoundObjectRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.ExpirationSeconds != nil {
- n += 1 + sovGenerated(uint64(*m.ExpirationSeconds))
- }
- return n
-}
-
-func (m *TokenRequestStatus) Size() (n int) {
- var l int
- _ = l
- l = len(m.Token)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.ExpirationTimestamp.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *TokenReview) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *TokenReviewSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Token)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *TokenReviewStatus) Size() (n int) {
- var l int
- _ = l
- n += 2
- l = m.User.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Error)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *UserInfo) Size() (n int) {
- var l int
- _ = l
- l = len(m.Username)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.UID)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Groups) > 0 {
- for _, s := range m.Groups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Extra) > 0 {
- for k, v := range m.Extra {
- _ = k
- _ = v
- l = v.Size()
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *BoundObjectReference) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&BoundObjectReference{`,
- `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *TokenRequest) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TokenRequest{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenRequestSpec", "TokenRequestSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenRequestStatus", "TokenRequestStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *TokenRequestSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TokenRequestSpec{`,
- `Audiences:` + fmt.Sprintf("%v", this.Audiences) + `,`,
- `BoundObjectRef:` + strings.Replace(fmt.Sprintf("%v", this.BoundObjectRef), "BoundObjectReference", "BoundObjectReference", 1) + `,`,
- `ExpirationSeconds:` + valueToStringGenerated(this.ExpirationSeconds) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *TokenRequestStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TokenRequestStatus{`,
- `Token:` + fmt.Sprintf("%v", this.Token) + `,`,
- `ExpirationTimestamp:` + strings.Replace(strings.Replace(this.ExpirationTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *TokenReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TokenReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *TokenReviewSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TokenReviewSpec{`,
- `Token:` + fmt.Sprintf("%v", this.Token) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *TokenReviewStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TokenReviewStatus{`,
- `Authenticated:` + fmt.Sprintf("%v", this.Authenticated) + `,`,
- `User:` + strings.Replace(strings.Replace(this.User.String(), "UserInfo", "UserInfo", 1), `&`, ``, 1) + `,`,
- `Error:` + fmt.Sprintf("%v", this.Error) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *UserInfo) String() string {
- if this == nil {
- return "nil"
- }
- keysForExtra := make([]string, 0, len(this.Extra))
- for k := range this.Extra {
- keysForExtra = append(keysForExtra, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
- mapStringForExtra := "map[string]ExtraValue{"
- for _, k := range keysForExtra {
- mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
- }
- mapStringForExtra += "}"
- s := strings.Join([]string{`&UserInfo{`,
- `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
- `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
- `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
- `Extra:` + mapStringForExtra + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *BoundObjectReference) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: BoundObjectReference: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: BoundObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Kind = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIVersion = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ExtraValue) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- *m = append(*m, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *TokenRequest) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: TokenRequest: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TokenRequest: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *TokenRequestSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: TokenRequestSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TokenRequestSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Audiences", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Audiences = append(m.Audiences, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field BoundObjectRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.BoundObjectRef == nil {
- m.BoundObjectRef = &BoundObjectReference{}
- }
- if err := m.BoundObjectRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ExpirationSeconds", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ExpirationSeconds = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *TokenRequestStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: TokenRequestStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TokenRequestStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Token = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTimestamp", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ExpirationTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *TokenReview) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: TokenReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TokenReview: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *TokenReviewSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: TokenReviewSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TokenReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Token = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *TokenReviewStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: TokenReviewStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TokenReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Authenticated", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Authenticated = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Error = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *UserInfo) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: UserInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: UserInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Username = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UID = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.Extra == nil {
- m.Extra = make(map[string]ExtraValue)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapmsglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postmsgIndex := iNdEx + mapmsglen
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := &ExtraValue{}
- if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- m.Extra[mapkey] = *mapvalue
- } else {
- var mapvalue ExtraValue
- m.Extra[mapkey] = mapvalue
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 905 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x6f, 0x1b, 0x45,
- 0x14, 0xf6, 0xfa, 0x47, 0x64, 0x8f, 0x9b, 0x90, 0x4c, 0xa9, 0x64, 0x05, 0xb0, 0x8d, 0x91, 0x90,
- 0x05, 0x74, 0xb7, 0x36, 0xa8, 0x54, 0x45, 0x42, 0xca, 0x12, 0x0b, 0x2c, 0x04, 0xad, 0xa6, 0x4d,
- 0x40, 0x9c, 0x18, 0xdb, 0x2f, 0xce, 0xe0, 0xee, 0xec, 0x32, 0x3b, 0x6b, 0xea, 0x5b, 0xff, 0x04,
- 0x8e, 0x20, 0x71, 0xe0, 0x8f, 0x40, 0xe2, 0xc8, 0x35, 0xc7, 0x8a, 0x53, 0x0f, 0xc8, 0x22, 0xcb,
- 0xbf, 0xc0, 0x89, 0x13, 0x9a, 0xd9, 0x89, 0xd7, 0x3f, 0x12, 0xc7, 0xa7, 0xde, 0x3c, 0xef, 0x7d,
- 0xef, 0x9b, 0xf7, 0xbe, 0xf9, 0xfc, 0x16, 0x75, 0x46, 0xf7, 0x42, 0x9b, 0xf9, 0xce, 0x28, 0xea,
- 0x81, 0xe0, 0x20, 0x21, 0x74, 0xc6, 0xc0, 0x07, 0xbe, 0x70, 0x4c, 0x82, 0x06, 0xcc, 0xa1, 0x91,
- 0x3c, 0x05, 0x2e, 0x59, 0x9f, 0x4a, 0xe6, 0x73, 0x67, 0xdc, 0x72, 0x86, 0xc0, 0x41, 0x50, 0x09,
- 0x03, 0x3b, 0x10, 0xbe, 0xf4, 0xf1, 0xeb, 0x09, 0xda, 0xa6, 0x01, 0xb3, 0x17, 0xd1, 0xf6, 0xb8,
- 0xb5, 0x7f, 0x7b, 0xc8, 0xe4, 0x69, 0xd4, 0xb3, 0xfb, 0xbe, 0xe7, 0x0c, 0xfd, 0xa1, 0xef, 0xe8,
- 0xa2, 0x5e, 0x74, 0xa2, 0x4f, 0xfa, 0xa0, 0x7f, 0x25, 0x64, 0xfb, 0x1f, 0xa4, 0x57, 0x7b, 0xb4,
- 0x7f, 0xca, 0x38, 0x88, 0x89, 0x13, 0x8c, 0x86, 0x2a, 0x10, 0x3a, 0x1e, 0x48, 0x7a, 0x49, 0x0b,
- 0xfb, 0xce, 0x55, 0x55, 0x22, 0xe2, 0x92, 0x79, 0xb0, 0x52, 0x70, 0xf7, 0xba, 0x82, 0xb0, 0x7f,
- 0x0a, 0x1e, 0x5d, 0xa9, 0x7b, 0xff, 0xaa, 0xba, 0x48, 0xb2, 0x27, 0x0e, 0xe3, 0x32, 0x94, 0x62,
- 0xb9, 0xa8, 0xf1, 0xa7, 0x85, 0x5e, 0x75, 0xfd, 0x88, 0x0f, 0x1e, 0xf4, 0xbe, 0x83, 0xbe, 0x24,
- 0x70, 0x02, 0x02, 0x78, 0x1f, 0x70, 0x1d, 0xe5, 0x47, 0x8c, 0x0f, 0x2a, 0x56, 0xdd, 0x6a, 0x96,
- 0xdc, 0x1b, 0x67, 0xd3, 0x5a, 0x26, 0x9e, 0xd6, 0xf2, 0x9f, 0x33, 0x3e, 0x20, 0x3a, 0x83, 0xdb,
- 0x08, 0xd1, 0x87, 0xdd, 0x63, 0x10, 0x21, 0xf3, 0x79, 0x25, 0xab, 0x71, 0xd8, 0xe0, 0xd0, 0xc1,
- 0x2c, 0x43, 0xe6, 0x50, 0x8a, 0x95, 0x53, 0x0f, 0x2a, 0xb9, 0x45, 0xd6, 0x2f, 0xa9, 0x07, 0x44,
- 0x67, 0xb0, 0x8b, 0x72, 0x51, 0xf7, 0xb0, 0x92, 0xd7, 0x80, 0x3b, 0x06, 0x90, 0x3b, 0xea, 0x1e,
- 0xfe, 0x37, 0xad, 0xbd, 0x79, 0xd5, 0x84, 0x72, 0x12, 0x40, 0x68, 0x1f, 0x75, 0x0f, 0x89, 0x2a,
- 0x6e, 0x7c, 0x88, 0x50, 0xe7, 0xa9, 0x14, 0xf4, 0x98, 0x3e, 0x89, 0x00, 0xd7, 0x50, 0x81, 0x49,
- 0xf0, 0xc2, 0x8a, 0x55, 0xcf, 0x35, 0x4b, 0x6e, 0x29, 0x9e, 0xd6, 0x0a, 0x5d, 0x15, 0x20, 0x49,
- 0xfc, 0x7e, 0xf1, 0xa7, 0x5f, 0x6b, 0x99, 0x67, 0x7f, 0xd5, 0x33, 0x8d, 0x5f, 0xb2, 0xe8, 0xc6,
- 0x63, 0x7f, 0x04, 0x9c, 0xc0, 0xf7, 0x11, 0x84, 0x12, 0x7f, 0x8b, 0x8a, 0xea, 0x5d, 0x07, 0x54,
- 0x52, 0xad, 0x44, 0xb9, 0x7d, 0xc7, 0x4e, 0x2d, 0x35, 0x6b, 0xc2, 0x0e, 0x46, 0x43, 0x15, 0x08,
- 0x6d, 0x85, 0xb6, 0xc7, 0x2d, 0x3b, 0x91, 0xf3, 0x0b, 0x90, 0x34, 0xd5, 0x24, 0x8d, 0x91, 0x19,
- 0x2b, 0x7e, 0x88, 0xf2, 0x61, 0x00, 0x7d, 0xad, 0x5f, 0xb9, 0x6d, 0xdb, 0xeb, 0x0c, 0x6b, 0xcf,
- 0xf7, 0xf6, 0x28, 0x80, 0x7e, 0xaa, 0xa0, 0x3a, 0x11, 0xcd, 0x84, 0xbf, 0x46, 0x5b, 0xa1, 0xa4,
- 0x32, 0x0a, 0xb5, 0xca, 0x8b, 0x1d, 0x5f, 0xc7, 0xa9, 0xeb, 0xdc, 0x1d, 0xc3, 0xba, 0x95, 0x9c,
- 0x89, 0xe1, 0x6b, 0xfc, 0x6b, 0xa1, 0xdd, 0xe5, 0x16, 0xf0, 0xbb, 0xa8, 0x44, 0xa3, 0x01, 0x53,
- 0xa6, 0xb9, 0x90, 0x78, 0x3b, 0x9e, 0xd6, 0x4a, 0x07, 0x17, 0x41, 0x92, 0xe6, 0x31, 0x47, 0x3b,
- 0xbd, 0x05, 0xb7, 0x99, 0x1e, 0xdb, 0xeb, 0x7b, 0xbc, 0xcc, 0xa1, 0x2e, 0x8e, 0xa7, 0xb5, 0x9d,
- 0xc5, 0x0c, 0x59, 0x62, 0xc7, 0x9f, 0xa0, 0x3d, 0x78, 0x1a, 0x30, 0xa1, 0x99, 0x1e, 0x41, 0xdf,
- 0xe7, 0x83, 0x50, 0x7b, 0x2b, 0xe7, 0xde, 0x8a, 0xa7, 0xb5, 0xbd, 0xce, 0x72, 0x92, 0xac, 0xe2,
- 0x1b, 0xbf, 0x59, 0x08, 0xaf, 0xaa, 0x84, 0xdf, 0x42, 0x05, 0xa9, 0xa2, 0xe6, 0x2f, 0xb2, 0x6d,
- 0x44, 0x2b, 0x24, 0xd0, 0x24, 0x87, 0x27, 0xe8, 0x66, 0x4a, 0xf8, 0x98, 0x79, 0x10, 0x4a, 0xea,
- 0x05, 0xe6, 0xb5, 0xdf, 0xd9, 0xcc, 0x4b, 0xaa, 0xcc, 0x7d, 0xcd, 0xd0, 0xdf, 0xec, 0xac, 0xd2,
- 0x91, 0xcb, 0xee, 0x68, 0xfc, 0x9c, 0x45, 0x65, 0xd3, 0xf6, 0x98, 0xc1, 0x0f, 0x2f, 0xc1, 0xcb,
- 0x0f, 0x16, 0xbc, 0x7c, 0x7b, 0x23, 0xdf, 0xa9, 0xd6, 0xae, 0xb4, 0xf2, 0x57, 0x4b, 0x56, 0x76,
- 0x36, 0xa7, 0x5c, 0xef, 0xe4, 0xbb, 0xe8, 0x95, 0xa5, 0xfb, 0x37, 0x7a, 0xce, 0xc6, 0x1f, 0x16,
- 0xda, 0x5b, 0xb9, 0x05, 0x7f, 0x84, 0xb6, 0xe7, 0x9a, 0x81, 0x64, 0x69, 0x16, 0xdd, 0x5b, 0x86,
- 0x62, 0xfb, 0x60, 0x3e, 0x49, 0x16, 0xb1, 0xf8, 0x33, 0x94, 0x8f, 0x42, 0x10, 0x46, 0xb4, 0xb7,
- 0xd7, 0x4f, 0x78, 0x14, 0x82, 0xe8, 0xf2, 0x13, 0x3f, 0x55, 0x4b, 0x45, 0x88, 0x66, 0x50, 0x13,
- 0x80, 0x10, 0xbe, 0x30, 0xdb, 0x75, 0x36, 0x41, 0x47, 0x05, 0x49, 0x92, 0x6b, 0xfc, 0x9e, 0x45,
- 0xc5, 0x0b, 0x16, 0xfc, 0x1e, 0x2a, 0xaa, 0x4a, 0xbd, 0x92, 0x93, 0xb1, 0x77, 0x4d, 0x91, 0xc6,
- 0xa8, 0x38, 0x99, 0x21, 0xf0, 0x1b, 0x28, 0x17, 0xb1, 0x81, 0xd9, 0xf4, 0xe5, 0xb9, 0xd5, 0x4c,
- 0x54, 0x1c, 0x37, 0xd0, 0xd6, 0x50, 0xf8, 0x51, 0xa0, 0x1e, 0x4b, 0x6d, 0x01, 0xa4, 0x74, 0xff,
- 0x54, 0x47, 0x88, 0xc9, 0xe0, 0x63, 0x54, 0x00, 0xb5, 0x99, 0x2b, 0xf9, 0x7a, 0xae, 0x59, 0x6e,
- 0xb7, 0x36, 0x9b, 0xd6, 0xd6, 0xdb, 0xbc, 0xc3, 0xa5, 0x98, 0xcc, 0x4d, 0xa5, 0x62, 0x24, 0xa1,
- 0xdb, 0xef, 0x99, 0x8d, 0xaf, 0x31, 0x78, 0x17, 0xe5, 0x46, 0x30, 0x49, 0x26, 0x22, 0xea, 0x27,
- 0xfe, 0x18, 0x15, 0xc6, 0xea, 0x63, 0x60, 0x54, 0x6e, 0xae, 0xbf, 0x37, 0xfd, 0x78, 0x90, 0xa4,
- 0xec, 0x7e, 0xf6, 0x9e, 0xe5, 0x36, 0xcf, 0xce, 0xab, 0x99, 0xe7, 0xe7, 0xd5, 0xcc, 0x8b, 0xf3,
- 0x6a, 0xe6, 0x59, 0x5c, 0xb5, 0xce, 0xe2, 0xaa, 0xf5, 0x3c, 0xae, 0x5a, 0x2f, 0xe2, 0xaa, 0xf5,
- 0x77, 0x5c, 0xb5, 0x7e, 0xfc, 0xa7, 0x9a, 0xf9, 0x26, 0x3b, 0x6e, 0xfd, 0x1f, 0x00, 0x00, 0xff,
- 0xff, 0x5f, 0x39, 0x60, 0xb1, 0xbd, 0x08, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/authentication/v1/generated.proto b/vendor/k8s.io/api/authentication/v1/generated.proto
deleted file mode 100644
index 1fd432a70..000000000
--- a/vendor/k8s.io/api/authentication/v1/generated.proto
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.authentication.v1;
-
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1";
-
-// BoundObjectReference is a reference to an object that a token is bound to.
-message BoundObjectReference {
- // Kind of the referent. Valid kinds are 'Pod' and 'Secret'.
- // +optional
- optional string kind = 1;
-
- // API version of the referent.
- // +optional
- optional string aPIVersion = 2;
-
- // Name of the referent.
- // +optional
- optional string name = 3;
-
- // UID of the referent.
- // +optional
- optional string uID = 4;
-}
-
-// ExtraValue masks the value so protobuf can generate
-// +protobuf.nullable=true
-// +protobuf.options.(gogoproto.goproto_stringer)=false
-message ExtraValue {
- // items, if empty, will result in an empty slice
-
- repeated string items = 1;
-}
-
-// TokenRequest requests a token for a given service account.
-message TokenRequest {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- optional TokenRequestSpec spec = 2;
-
- // +optional
- optional TokenRequestStatus status = 3;
-}
-
-// TokenRequestSpec contains client provided parameters of a token request.
-message TokenRequestSpec {
- // Audiences are the intendend audiences of the token. A recipient of a
- // token must identitfy themself with an identifier in the list of
- // audiences of the token, and otherwise should reject the token. A
- // token issued for multiple audiences may be used to authenticate
- // against any of the audiences listed but implies a high degree of
- // trust between the target audiences.
- repeated string audiences = 1;
-
- // ExpirationSeconds is the requested duration of validity of the request. The
- // token issuer may return a token with a different validity duration so a
- // client needs to check the 'expiration' field in a response.
- // +optional
- optional int64 expirationSeconds = 4;
-
- // BoundObjectRef is a reference to an object that the token will be bound to.
- // The token will only be valid for as long as the bound objet exists.
- // +optional
- optional BoundObjectReference boundObjectRef = 3;
-}
-
-// TokenRequestStatus is the result of a token request.
-message TokenRequestStatus {
- // Token is the opaque bearer token.
- optional string token = 1;
-
- // ExpirationTimestamp is the time of expiration of the returned token.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time expirationTimestamp = 2;
-}
-
-// TokenReview attempts to authenticate a token to a known user.
-// Note: TokenReview requests may be cached by the webhook token authenticator
-// plugin in the kube-apiserver.
-message TokenReview {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the request being evaluated
- optional TokenReviewSpec spec = 2;
-
- // Status is filled in by the server and indicates whether the request can be authenticated.
- // +optional
- optional TokenReviewStatus status = 3;
-}
-
-// TokenReviewSpec is a description of the token authentication request.
-message TokenReviewSpec {
- // Token is the opaque bearer token.
- // +optional
- optional string token = 1;
-}
-
-// TokenReviewStatus is the result of the token authentication request.
-message TokenReviewStatus {
- // Authenticated indicates that the token was associated with a known user.
- // +optional
- optional bool authenticated = 1;
-
- // User is the UserInfo associated with the provided token.
- // +optional
- optional UserInfo user = 2;
-
- // Error indicates that the token couldn't be checked
- // +optional
- optional string error = 3;
-}
-
-// UserInfo holds the information about the user needed to implement the
-// user.Info interface.
-message UserInfo {
- // The name that uniquely identifies this user among all active users.
- // +optional
- optional string username = 1;
-
- // A unique value that identifies this user across time. If this user is
- // deleted and another user by the same name is added, they will have
- // different UIDs.
- // +optional
- optional string uid = 2;
-
- // The names of groups this user is a part of.
- // +optional
- repeated string groups = 3;
-
- // Any additional information provided by the authenticator.
- // +optional
- map<string, ExtraValue> extra = 4;
-}
-
diff --git a/vendor/k8s.io/api/authentication/v1/register.go b/vendor/k8s.io/api/authentication/v1/register.go
deleted file mode 100644
index c522e4a46..000000000
--- a/vendor/k8s.io/api/authentication/v1/register.go
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "authentication.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &TokenReview{},
- &TokenRequest{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/authentication/v1/types.go b/vendor/k8s.io/api/authentication/v1/types.go
deleted file mode 100644
index 723457a3d..000000000
--- a/vendor/k8s.io/api/authentication/v1/types.go
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "fmt"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
-)
-
-const (
- // ImpersonateUserHeader is used to impersonate a particular user during an API server request
- ImpersonateUserHeader = "Impersonate-User"
-
- // ImpersonateGroupHeader is used to impersonate a particular group during an API server request.
- // It can be repeated multiplied times for multiple groups.
- ImpersonateGroupHeader = "Impersonate-Group"
-
- // ImpersonateUserExtraHeaderPrefix is a prefix for any header used to impersonate an entry in the
- // extra map[string][]string for user.Info. The key will be every after the prefix.
- // It can be repeated multiplied times for multiple map keys and the same key can be repeated multiple
- // times to have multiple elements in the slice under a single key
- ImpersonateUserExtraHeaderPrefix = "Impersonate-Extra-"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// TokenReview attempts to authenticate a token to a known user.
-// Note: TokenReview requests may be cached by the webhook token authenticator
-// plugin in the kube-apiserver.
-type TokenReview struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the request being evaluated
- Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the server and indicates whether the request can be authenticated.
- // +optional
- Status TokenReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// TokenReviewSpec is a description of the token authentication request.
-type TokenReviewSpec struct {
- // Token is the opaque bearer token.
- // +optional
- Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"`
-}
-
-// TokenReviewStatus is the result of the token authentication request.
-type TokenReviewStatus struct {
- // Authenticated indicates that the token was associated with a known user.
- // +optional
- Authenticated bool `json:"authenticated,omitempty" protobuf:"varint,1,opt,name=authenticated"`
- // User is the UserInfo associated with the provided token.
- // +optional
- User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
- // Error indicates that the token couldn't be checked
- // +optional
- Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"`
-}
-
-// UserInfo holds the information about the user needed to implement the
-// user.Info interface.
-type UserInfo struct {
- // The name that uniquely identifies this user among all active users.
- // +optional
- Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"`
- // A unique value that identifies this user across time. If this user is
- // deleted and another user by the same name is added, they will have
- // different UIDs.
- // +optional
- UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"`
- // The names of groups this user is a part of.
- // +optional
- Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"`
- // Any additional information provided by the authenticator.
- // +optional
- Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"`
-}
-
-// ExtraValue masks the value so protobuf can generate
-// +protobuf.nullable=true
-// +protobuf.options.(gogoproto.goproto_stringer)=false
-type ExtraValue []string
-
-func (t ExtraValue) String() string {
- return fmt.Sprintf("%v", []string(t))
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// TokenRequest requests a token for a given service account.
-type TokenRequest struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- Spec TokenRequestSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
- // +optional
- Status TokenRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// TokenRequestSpec contains client provided parameters of a token request.
-type TokenRequestSpec struct {
- // Audiences are the intendend audiences of the token. A recipient of a
- // token must identitfy themself with an identifier in the list of
- // audiences of the token, and otherwise should reject the token. A
- // token issued for multiple audiences may be used to authenticate
- // against any of the audiences listed but implies a high degree of
- // trust between the target audiences.
- Audiences []string `json:"audiences" protobuf:"bytes,1,rep,name=audiences"`
-
- // ExpirationSeconds is the requested duration of validity of the request. The
- // token issuer may return a token with a different validity duration so a
- // client needs to check the 'expiration' field in a response.
- // +optional
- ExpirationSeconds *int64 `json:"expirationSeconds" protobuf:"varint,4,opt,name=expirationSeconds"`
-
- // BoundObjectRef is a reference to an object that the token will be bound to.
- // The token will only be valid for as long as the bound objet exists.
- // +optional
- BoundObjectRef *BoundObjectReference `json:"boundObjectRef" protobuf:"bytes,3,opt,name=boundObjectRef"`
-}
-
-// TokenRequestStatus is the result of a token request.
-type TokenRequestStatus struct {
- // Token is the opaque bearer token.
- Token string `json:"token" protobuf:"bytes,1,opt,name=token"`
- // ExpirationTimestamp is the time of expiration of the returned token.
- ExpirationTimestamp metav1.Time `json:"expirationTimestamp" protobuf:"bytes,2,opt,name=expirationTimestamp"`
-}
-
-// BoundObjectReference is a reference to an object that a token is bound to.
-type BoundObjectReference struct {
- // Kind of the referent. Valid kinds are 'Pod' and 'Secret'.
- // +optional
- Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`
- // API version of the referent.
- // +optional
- APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=aPIVersion"`
-
- // Name of the referent.
- // +optional
- Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"`
- // UID of the referent.
- // +optional
- UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uID,casttype=k8s.io/apimachinery/pkg/types.UID"`
-}
diff --git a/vendor/k8s.io/api/authentication/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/authentication/v1/types_swagger_doc_generated.go
deleted file mode 100644
index 68ecea8ea..000000000
--- a/vendor/k8s.io/api/authentication/v1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-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 v1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_BoundObjectReference = map[string]string{
- "": "BoundObjectReference is a reference to an object that a token is bound to.",
- "kind": "Kind of the referent. Valid kinds are 'Pod' and 'Secret'.",
- "apiVersion": "API version of the referent.",
- "name": "Name of the referent.",
- "uid": "UID of the referent.",
-}
-
-func (BoundObjectReference) SwaggerDoc() map[string]string {
- return map_BoundObjectReference
-}
-
-var map_TokenRequest = map[string]string{
- "": "TokenRequest requests a token for a given service account.",
-}
-
-func (TokenRequest) SwaggerDoc() map[string]string {
- return map_TokenRequest
-}
-
-var map_TokenRequestSpec = map[string]string{
- "": "TokenRequestSpec contains client provided parameters of a token request.",
- "audiences": "Audiences are the intendend audiences of the token. A recipient of a token must identitfy themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.",
- "expirationSeconds": "ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response.",
- "boundObjectRef": "BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound objet exists.",
-}
-
-func (TokenRequestSpec) SwaggerDoc() map[string]string {
- return map_TokenRequestSpec
-}
-
-var map_TokenRequestStatus = map[string]string{
- "": "TokenRequestStatus is the result of a token request.",
- "token": "Token is the opaque bearer token.",
- "expirationTimestamp": "ExpirationTimestamp is the time of expiration of the returned token.",
-}
-
-func (TokenRequestStatus) SwaggerDoc() map[string]string {
- return map_TokenRequestStatus
-}
-
-var map_TokenReview = map[string]string{
- "": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.",
- "spec": "Spec holds information about the request being evaluated",
- "status": "Status is filled in by the server and indicates whether the request can be authenticated.",
-}
-
-func (TokenReview) SwaggerDoc() map[string]string {
- return map_TokenReview
-}
-
-var map_TokenReviewSpec = map[string]string{
- "": "TokenReviewSpec is a description of the token authentication request.",
- "token": "Token is the opaque bearer token.",
-}
-
-func (TokenReviewSpec) SwaggerDoc() map[string]string {
- return map_TokenReviewSpec
-}
-
-var map_TokenReviewStatus = map[string]string{
- "": "TokenReviewStatus is the result of the token authentication request.",
- "authenticated": "Authenticated indicates that the token was associated with a known user.",
- "user": "User is the UserInfo associated with the provided token.",
- "error": "Error indicates that the token couldn't be checked",
-}
-
-func (TokenReviewStatus) SwaggerDoc() map[string]string {
- return map_TokenReviewStatus
-}
-
-var map_UserInfo = map[string]string{
- "": "UserInfo holds the information about the user needed to implement the user.Info interface.",
- "username": "The name that uniquely identifies this user among all active users.",
- "uid": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.",
- "groups": "The names of groups this user is a part of.",
- "extra": "Any additional information provided by the authenticator.",
-}
-
-func (UserInfo) SwaggerDoc() map[string]string {
- return map_UserInfo
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/authentication/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/authentication/v1/zz_generated.deepcopy.go
deleted file mode 100644
index ad0df8ff4..000000000
--- a/vendor/k8s.io/api/authentication/v1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,239 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *BoundObjectReference) DeepCopyInto(out *BoundObjectReference) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BoundObjectReference.
-func (in *BoundObjectReference) DeepCopy() *BoundObjectReference {
- if in == nil {
- return nil
- }
- out := new(BoundObjectReference)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in ExtraValue) DeepCopyInto(out *ExtraValue) {
- {
- in := &in
- *out = make(ExtraValue, len(*in))
- copy(*out, *in)
- return
- }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue.
-func (in ExtraValue) DeepCopy() ExtraValue {
- if in == nil {
- return nil
- }
- out := new(ExtraValue)
- in.DeepCopyInto(out)
- return *out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TokenRequest) DeepCopyInto(out *TokenRequest) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenRequest.
-func (in *TokenRequest) DeepCopy() *TokenRequest {
- if in == nil {
- return nil
- }
- out := new(TokenRequest)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *TokenRequest) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TokenRequestSpec) DeepCopyInto(out *TokenRequestSpec) {
- *out = *in
- if in.Audiences != nil {
- in, out := &in.Audiences, &out.Audiences
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.ExpirationSeconds != nil {
- in, out := &in.ExpirationSeconds, &out.ExpirationSeconds
- if *in == nil {
- *out = nil
- } else {
- *out = new(int64)
- **out = **in
- }
- }
- if in.BoundObjectRef != nil {
- in, out := &in.BoundObjectRef, &out.BoundObjectRef
- if *in == nil {
- *out = nil
- } else {
- *out = new(BoundObjectReference)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenRequestSpec.
-func (in *TokenRequestSpec) DeepCopy() *TokenRequestSpec {
- if in == nil {
- return nil
- }
- out := new(TokenRequestSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TokenRequestStatus) DeepCopyInto(out *TokenRequestStatus) {
- *out = *in
- in.ExpirationTimestamp.DeepCopyInto(&out.ExpirationTimestamp)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenRequestStatus.
-func (in *TokenRequestStatus) DeepCopy() *TokenRequestStatus {
- if in == nil {
- return nil
- }
- out := new(TokenRequestStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TokenReview) DeepCopyInto(out *TokenReview) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- out.Spec = in.Spec
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenReview.
-func (in *TokenReview) DeepCopy() *TokenReview {
- if in == nil {
- return nil
- }
- out := new(TokenReview)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *TokenReview) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TokenReviewSpec) DeepCopyInto(out *TokenReviewSpec) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenReviewSpec.
-func (in *TokenReviewSpec) DeepCopy() *TokenReviewSpec {
- if in == nil {
- return nil
- }
- out := new(TokenReviewSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TokenReviewStatus) DeepCopyInto(out *TokenReviewStatus) {
- *out = *in
- in.User.DeepCopyInto(&out.User)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenReviewStatus.
-func (in *TokenReviewStatus) DeepCopy() *TokenReviewStatus {
- if in == nil {
- return nil
- }
- out := new(TokenReviewStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *UserInfo) DeepCopyInto(out *UserInfo) {
- *out = *in
- if in.Groups != nil {
- in, out := &in.Groups, &out.Groups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Extra != nil {
- in, out := &in.Extra, &out.Extra
- *out = make(map[string]ExtraValue, len(*in))
- for key, val := range *in {
- if val == nil {
- (*out)[key] = nil
- } else {
- (*out)[key] = make([]string, len(val))
- copy((*out)[key], val)
- }
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserInfo.
-func (in *UserInfo) DeepCopy() *UserInfo {
- if in == nil {
- return nil
- }
- out := new(UserInfo)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/authentication/v1beta1/doc.go b/vendor/k8s.io/api/authentication/v1beta1/doc.go
deleted file mode 100644
index e0de315d4..000000000
--- a/vendor/k8s.io/api/authentication/v1beta1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +groupName=authentication.k8s.io
-// +k8s:openapi-gen=true
-package v1beta1 // import "k8s.io/api/authentication/v1beta1"
diff --git a/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go b/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go
deleted file mode 100644
index 86e362b87..000000000
--- a/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,1302 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1beta1/generated.proto
-
- It has these top-level messages:
- ExtraValue
- TokenReview
- TokenReviewSpec
- TokenReviewStatus
- UserInfo
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *ExtraValue) Reset() { *m = ExtraValue{} }
-func (*ExtraValue) ProtoMessage() {}
-func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *TokenReview) Reset() { *m = TokenReview{} }
-func (*TokenReview) ProtoMessage() {}
-func (*TokenReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} }
-func (*TokenReviewSpec) ProtoMessage() {}
-func (*TokenReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} }
-func (*TokenReviewStatus) ProtoMessage() {}
-func (*TokenReviewStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *UserInfo) Reset() { *m = UserInfo{} }
-func (*UserInfo) ProtoMessage() {}
-func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func init() {
- proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.authentication.v1beta1.ExtraValue")
- proto.RegisterType((*TokenReview)(nil), "k8s.io.api.authentication.v1beta1.TokenReview")
- proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.api.authentication.v1beta1.TokenReviewSpec")
- proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.api.authentication.v1beta1.TokenReviewStatus")
- proto.RegisterType((*UserInfo)(nil), "k8s.io.api.authentication.v1beta1.UserInfo")
-}
-func (m ExtraValue) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m) > 0 {
- for _, s := range m {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *TokenReview) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *TokenReview) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *TokenReviewSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *TokenReviewSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Token)))
- i += copy(dAtA[i:], m.Token)
- return i, nil
-}
-
-func (m *TokenReviewStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *TokenReviewStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- if m.Authenticated {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.User.Size()))
- n4, err := m.User.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error)))
- i += copy(dAtA[i:], m.Error)
- return i, nil
-}
-
-func (m *UserInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *UserInfo) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username)))
- i += copy(dAtA[i:], m.Username)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
- i += copy(dAtA[i:], m.UID)
- if len(m.Groups) > 0 {
- for _, s := range m.Groups {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Extra) > 0 {
- keysForExtra := make([]string, 0, len(m.Extra))
- for k := range m.Extra {
- keysForExtra = append(keysForExtra, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
- for _, k := range keysForExtra {
- dAtA[i] = 0x22
- i++
- v := m.Extra[string(k)]
- msgSize := 0
- if (&v) != nil {
- msgSize = (&v).Size()
- msgSize += 1 + sovGenerated(uint64(msgSize))
- }
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
- n5, err := (&v).MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- }
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m ExtraValue) Size() (n int) {
- var l int
- _ = l
- if len(m) > 0 {
- for _, s := range m {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *TokenReview) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *TokenReviewSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Token)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *TokenReviewStatus) Size() (n int) {
- var l int
- _ = l
- n += 2
- l = m.User.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Error)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *UserInfo) Size() (n int) {
- var l int
- _ = l
- l = len(m.Username)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.UID)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Groups) > 0 {
- for _, s := range m.Groups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Extra) > 0 {
- for k, v := range m.Extra {
- _ = k
- _ = v
- l = v.Size()
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *TokenReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TokenReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *TokenReviewSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TokenReviewSpec{`,
- `Token:` + fmt.Sprintf("%v", this.Token) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *TokenReviewStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TokenReviewStatus{`,
- `Authenticated:` + fmt.Sprintf("%v", this.Authenticated) + `,`,
- `User:` + strings.Replace(strings.Replace(this.User.String(), "UserInfo", "UserInfo", 1), `&`, ``, 1) + `,`,
- `Error:` + fmt.Sprintf("%v", this.Error) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *UserInfo) String() string {
- if this == nil {
- return "nil"
- }
- keysForExtra := make([]string, 0, len(this.Extra))
- for k := range this.Extra {
- keysForExtra = append(keysForExtra, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
- mapStringForExtra := "map[string]ExtraValue{"
- for _, k := range keysForExtra {
- mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
- }
- mapStringForExtra += "}"
- s := strings.Join([]string{`&UserInfo{`,
- `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
- `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
- `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
- `Extra:` + mapStringForExtra + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *ExtraValue) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- *m = append(*m, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *TokenReview) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: TokenReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TokenReview: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *TokenReviewSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: TokenReviewSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TokenReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Token = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *TokenReviewStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: TokenReviewStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TokenReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Authenticated", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Authenticated = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Error = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *UserInfo) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: UserInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: UserInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Username = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UID = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.Extra == nil {
- m.Extra = make(map[string]ExtraValue)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapmsglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postmsgIndex := iNdEx + mapmsglen
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := &ExtraValue{}
- if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- m.Extra[mapkey] = *mapvalue
- } else {
- var mapvalue ExtraValue
- m.Extra[mapkey] = mapvalue
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 650 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4d, 0x4f, 0x14, 0x4d,
- 0x10, 0xc7, 0x67, 0xf6, 0x85, 0x67, 0xb7, 0xf7, 0x41, 0xb1, 0x13, 0x93, 0xcd, 0x26, 0xce, 0xae,
- 0xeb, 0x85, 0x44, 0xe9, 0x11, 0x24, 0x48, 0xf0, 0xe4, 0x28, 0x31, 0x98, 0x10, 0x93, 0x16, 0x3c,
- 0xa8, 0x07, 0x7b, 0x67, 0x8b, 0xd9, 0x76, 0x99, 0x97, 0xf4, 0xf4, 0xac, 0x72, 0xe3, 0x23, 0x78,
- 0xf4, 0x68, 0xe2, 0x27, 0x31, 0xf1, 0xc0, 0x91, 0x23, 0x07, 0x43, 0x64, 0xfc, 0x22, 0xa6, 0x7b,
- 0x5a, 0x76, 0x61, 0x43, 0x80, 0xdb, 0xf4, 0xbf, 0xea, 0xff, 0x9b, 0xaa, 0xea, 0x2e, 0xf4, 0x72,
- 0xb8, 0x9a, 0x12, 0x1e, 0xbb, 0xc3, 0xac, 0x07, 0x22, 0x02, 0x09, 0xa9, 0x3b, 0x82, 0xa8, 0x1f,
- 0x0b, 0xd7, 0x04, 0x58, 0xc2, 0x5d, 0x96, 0xc9, 0x01, 0x44, 0x92, 0xfb, 0x4c, 0xf2, 0x38, 0x72,
- 0x47, 0x8b, 0x3d, 0x90, 0x6c, 0xd1, 0x0d, 0x20, 0x02, 0xc1, 0x24, 0xf4, 0x49, 0x22, 0x62, 0x19,
- 0xe3, 0xbb, 0x85, 0x85, 0xb0, 0x84, 0x93, 0xb3, 0x16, 0x62, 0x2c, 0xad, 0x85, 0x80, 0xcb, 0x41,
- 0xd6, 0x23, 0x7e, 0x1c, 0xba, 0x41, 0x1c, 0xc4, 0xae, 0x76, 0xf6, 0xb2, 0x1d, 0x7d, 0xd2, 0x07,
- 0xfd, 0x55, 0x10, 0x5b, 0xcb, 0xe3, 0x22, 0x42, 0xe6, 0x0f, 0x78, 0x04, 0x62, 0xcf, 0x4d, 0x86,
- 0x81, 0x12, 0x52, 0x37, 0x04, 0xc9, 0xdc, 0xd1, 0x54, 0x1d, 0x2d, 0xf7, 0x22, 0x97, 0xc8, 0x22,
- 0xc9, 0x43, 0x98, 0x32, 0xac, 0x5c, 0x66, 0x48, 0xfd, 0x01, 0x84, 0x6c, 0xca, 0xf7, 0xe8, 0x22,
- 0x5f, 0x26, 0xf9, 0xae, 0xcb, 0x23, 0x99, 0x4a, 0x71, 0xde, 0xd4, 0x7d, 0x8c, 0xd0, 0xfa, 0x67,
- 0x29, 0xd8, 0x1b, 0xb6, 0x9b, 0x01, 0x6e, 0xa3, 0x2a, 0x97, 0x10, 0xa6, 0x4d, 0xbb, 0x53, 0x9e,
- 0xaf, 0x7b, 0xf5, 0xfc, 0xb8, 0x5d, 0xdd, 0x50, 0x02, 0x2d, 0xf4, 0xb5, 0xda, 0xd7, 0x6f, 0x6d,
- 0x6b, 0xff, 0x57, 0xc7, 0xea, 0x7e, 0x2f, 0xa1, 0xc6, 0x56, 0x3c, 0x84, 0x88, 0xc2, 0x88, 0xc3,
- 0x27, 0xfc, 0x01, 0xd5, 0xd4, 0x04, 0xfa, 0x4c, 0xb2, 0xa6, 0xdd, 0xb1, 0xe7, 0x1b, 0x4b, 0x0f,
- 0xc9, 0xf8, 0x06, 0x4e, 0x0b, 0x22, 0xc9, 0x30, 0x50, 0x42, 0x4a, 0x54, 0x36, 0x19, 0x2d, 0x92,
- 0x57, 0xbd, 0x8f, 0xe0, 0xcb, 0x4d, 0x90, 0xcc, 0xc3, 0x07, 0xc7, 0x6d, 0x2b, 0x3f, 0x6e, 0xa3,
- 0xb1, 0x46, 0x4f, 0xa9, 0x78, 0x0b, 0x55, 0xd2, 0x04, 0xfc, 0x66, 0x49, 0xd3, 0x97, 0xc8, 0xa5,
- 0xf7, 0x4b, 0x26, 0xea, 0x7b, 0x9d, 0x80, 0xef, 0xfd, 0x6f, 0xf8, 0x15, 0x75, 0xa2, 0x9a, 0x86,
- 0xdf, 0xa3, 0x99, 0x54, 0x32, 0x99, 0xa5, 0xcd, 0xb2, 0xe6, 0x2e, 0x5f, 0x93, 0xab, 0xbd, 0xde,
- 0x0d, 0x43, 0x9e, 0x29, 0xce, 0xd4, 0x30, 0xbb, 0x2b, 0xe8, 0xe6, 0xb9, 0x22, 0xf0, 0x3d, 0x54,
- 0x95, 0x4a, 0xd2, 0x53, 0xaa, 0x7b, 0xb3, 0xc6, 0x59, 0x2d, 0xf2, 0x8a, 0x58, 0xf7, 0xa7, 0x8d,
- 0x6e, 0x4d, 0xfd, 0x05, 0x3f, 0x41, 0xb3, 0x13, 0x15, 0x41, 0x5f, 0x23, 0x6a, 0xde, 0x6d, 0x83,
- 0x98, 0x7d, 0x3a, 0x19, 0xa4, 0x67, 0x73, 0xf1, 0x26, 0xaa, 0x64, 0x29, 0x08, 0x33, 0xbe, 0xfb,
- 0x57, 0x68, 0x73, 0x3b, 0x05, 0xb1, 0x11, 0xed, 0xc4, 0xe3, 0xb9, 0x29, 0x85, 0x6a, 0x8c, 0x6a,
- 0x03, 0x84, 0x88, 0x85, 0x1e, 0xdb, 0x44, 0x1b, 0xeb, 0x4a, 0xa4, 0x45, 0xac, 0xfb, 0xa3, 0x84,
- 0x6a, 0xff, 0x28, 0xf8, 0x01, 0xaa, 0x29, 0x67, 0xc4, 0x42, 0x30, 0xbd, 0xcf, 0x19, 0x93, 0xce,
- 0x51, 0x3a, 0x3d, 0xcd, 0xc0, 0x77, 0x50, 0x39, 0xe3, 0x7d, 0x5d, 0x6d, 0xdd, 0x6b, 0x98, 0xc4,
- 0xf2, 0xf6, 0xc6, 0x73, 0xaa, 0x74, 0xdc, 0x45, 0x33, 0x81, 0x88, 0xb3, 0x44, 0x5d, 0x9b, 0x7a,
- 0xaa, 0x48, 0x0d, 0xff, 0x85, 0x56, 0xa8, 0x89, 0xe0, 0x77, 0xa8, 0x0a, 0xea, 0x6d, 0x37, 0x2b,
- 0x9d, 0xf2, 0x7c, 0x63, 0x69, 0xe5, 0x1a, 0x2d, 0x13, 0xbd, 0x14, 0xeb, 0x91, 0x14, 0x7b, 0x13,
- 0xad, 0x29, 0x8d, 0x16, 0xcc, 0x56, 0x60, 0x16, 0x47, 0xe7, 0xe0, 0x39, 0x54, 0x1e, 0xc2, 0x5e,
- 0xd1, 0x16, 0x55, 0x9f, 0xf8, 0x19, 0xaa, 0x8e, 0xd4, 0x4e, 0x99, 0x79, 0x2f, 0x5c, 0xe1, 0xe7,
- 0xe3, 0x45, 0xa4, 0x85, 0x77, 0xad, 0xb4, 0x6a, 0x7b, 0x0b, 0x07, 0x27, 0x8e, 0x75, 0x78, 0xe2,
- 0x58, 0x47, 0x27, 0x8e, 0xb5, 0x9f, 0x3b, 0xf6, 0x41, 0xee, 0xd8, 0x87, 0xb9, 0x63, 0x1f, 0xe5,
- 0x8e, 0xfd, 0x3b, 0x77, 0xec, 0x2f, 0x7f, 0x1c, 0xeb, 0xed, 0x7f, 0x06, 0xf2, 0x37, 0x00, 0x00,
- 0xff, 0xff, 0x36, 0x0e, 0x35, 0x2a, 0x43, 0x05, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/authentication/v1beta1/generated.proto b/vendor/k8s.io/api/authentication/v1beta1/generated.proto
deleted file mode 100644
index 3d0abd15d..000000000
--- a/vendor/k8s.io/api/authentication/v1beta1/generated.proto
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.authentication.v1beta1;
-
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// ExtraValue masks the value so protobuf can generate
-// +protobuf.nullable=true
-// +protobuf.options.(gogoproto.goproto_stringer)=false
-message ExtraValue {
- // items, if empty, will result in an empty slice
-
- repeated string items = 1;
-}
-
-// TokenReview attempts to authenticate a token to a known user.
-// Note: TokenReview requests may be cached by the webhook token authenticator
-// plugin in the kube-apiserver.
-message TokenReview {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the request being evaluated
- optional TokenReviewSpec spec = 2;
-
- // Status is filled in by the server and indicates whether the request can be authenticated.
- // +optional
- optional TokenReviewStatus status = 3;
-}
-
-// TokenReviewSpec is a description of the token authentication request.
-message TokenReviewSpec {
- // Token is the opaque bearer token.
- // +optional
- optional string token = 1;
-}
-
-// TokenReviewStatus is the result of the token authentication request.
-message TokenReviewStatus {
- // Authenticated indicates that the token was associated with a known user.
- // +optional
- optional bool authenticated = 1;
-
- // User is the UserInfo associated with the provided token.
- // +optional
- optional UserInfo user = 2;
-
- // Error indicates that the token couldn't be checked
- // +optional
- optional string error = 3;
-}
-
-// UserInfo holds the information about the user needed to implement the
-// user.Info interface.
-message UserInfo {
- // The name that uniquely identifies this user among all active users.
- // +optional
- optional string username = 1;
-
- // A unique value that identifies this user across time. If this user is
- // deleted and another user by the same name is added, they will have
- // different UIDs.
- // +optional
- optional string uid = 2;
-
- // The names of groups this user is a part of.
- // +optional
- repeated string groups = 3;
-
- // Any additional information provided by the authenticator.
- // +optional
- map<string, ExtraValue> extra = 4;
-}
-
diff --git a/vendor/k8s.io/api/authentication/v1beta1/register.go b/vendor/k8s.io/api/authentication/v1beta1/register.go
deleted file mode 100644
index ed23e50f7..000000000
--- a/vendor/k8s.io/api/authentication/v1beta1/register.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright 2015 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "authentication.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &TokenReview{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/authentication/v1beta1/types.go b/vendor/k8s.io/api/authentication/v1beta1/types.go
deleted file mode 100644
index a90949dc3..000000000
--- a/vendor/k8s.io/api/authentication/v1beta1/types.go
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-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 v1beta1
-
-import (
- "fmt"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// TokenReview attempts to authenticate a token to a known user.
-// Note: TokenReview requests may be cached by the webhook token authenticator
-// plugin in the kube-apiserver.
-type TokenReview struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the request being evaluated
- Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the server and indicates whether the request can be authenticated.
- // +optional
- Status TokenReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// TokenReviewSpec is a description of the token authentication request.
-type TokenReviewSpec struct {
- // Token is the opaque bearer token.
- // +optional
- Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"`
-}
-
-// TokenReviewStatus is the result of the token authentication request.
-type TokenReviewStatus struct {
- // Authenticated indicates that the token was associated with a known user.
- // +optional
- Authenticated bool `json:"authenticated,omitempty" protobuf:"varint,1,opt,name=authenticated"`
- // User is the UserInfo associated with the provided token.
- // +optional
- User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
- // Error indicates that the token couldn't be checked
- // +optional
- Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"`
-}
-
-// UserInfo holds the information about the user needed to implement the
-// user.Info interface.
-type UserInfo struct {
- // The name that uniquely identifies this user among all active users.
- // +optional
- Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"`
- // A unique value that identifies this user across time. If this user is
- // deleted and another user by the same name is added, they will have
- // different UIDs.
- // +optional
- UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"`
- // The names of groups this user is a part of.
- // +optional
- Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"`
- // Any additional information provided by the authenticator.
- // +optional
- Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"`
-}
-
-// ExtraValue masks the value so protobuf can generate
-// +protobuf.nullable=true
-// +protobuf.options.(gogoproto.goproto_stringer)=false
-type ExtraValue []string
-
-func (t ExtraValue) String() string {
- return fmt.Sprintf("%v", []string(t))
-}
diff --git a/vendor/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index f910bea6f..000000000
--- a/vendor/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_TokenReview = map[string]string{
- "": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.",
- "spec": "Spec holds information about the request being evaluated",
- "status": "Status is filled in by the server and indicates whether the request can be authenticated.",
-}
-
-func (TokenReview) SwaggerDoc() map[string]string {
- return map_TokenReview
-}
-
-var map_TokenReviewSpec = map[string]string{
- "": "TokenReviewSpec is a description of the token authentication request.",
- "token": "Token is the opaque bearer token.",
-}
-
-func (TokenReviewSpec) SwaggerDoc() map[string]string {
- return map_TokenReviewSpec
-}
-
-var map_TokenReviewStatus = map[string]string{
- "": "TokenReviewStatus is the result of the token authentication request.",
- "authenticated": "Authenticated indicates that the token was associated with a known user.",
- "user": "User is the UserInfo associated with the provided token.",
- "error": "Error indicates that the token couldn't be checked",
-}
-
-func (TokenReviewStatus) SwaggerDoc() map[string]string {
- return map_TokenReviewStatus
-}
-
-var map_UserInfo = map[string]string{
- "": "UserInfo holds the information about the user needed to implement the user.Info interface.",
- "username": "The name that uniquely identifies this user among all active users.",
- "uid": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.",
- "groups": "The names of groups this user is a part of.",
- "extra": "Any additional information provided by the authenticator.",
-}
-
-func (UserInfo) SwaggerDoc() map[string]string {
- return map_UserInfo
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index 57d878e9a..000000000
--- a/vendor/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,139 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in ExtraValue) DeepCopyInto(out *ExtraValue) {
- {
- in := &in
- *out = make(ExtraValue, len(*in))
- copy(*out, *in)
- return
- }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue.
-func (in ExtraValue) DeepCopy() ExtraValue {
- if in == nil {
- return nil
- }
- out := new(ExtraValue)
- in.DeepCopyInto(out)
- return *out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TokenReview) DeepCopyInto(out *TokenReview) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- out.Spec = in.Spec
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenReview.
-func (in *TokenReview) DeepCopy() *TokenReview {
- if in == nil {
- return nil
- }
- out := new(TokenReview)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *TokenReview) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TokenReviewSpec) DeepCopyInto(out *TokenReviewSpec) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenReviewSpec.
-func (in *TokenReviewSpec) DeepCopy() *TokenReviewSpec {
- if in == nil {
- return nil
- }
- out := new(TokenReviewSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TokenReviewStatus) DeepCopyInto(out *TokenReviewStatus) {
- *out = *in
- in.User.DeepCopyInto(&out.User)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenReviewStatus.
-func (in *TokenReviewStatus) DeepCopy() *TokenReviewStatus {
- if in == nil {
- return nil
- }
- out := new(TokenReviewStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *UserInfo) DeepCopyInto(out *UserInfo) {
- *out = *in
- if in.Groups != nil {
- in, out := &in.Groups, &out.Groups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Extra != nil {
- in, out := &in.Extra, &out.Extra
- *out = make(map[string]ExtraValue, len(*in))
- for key, val := range *in {
- if val == nil {
- (*out)[key] = nil
- } else {
- (*out)[key] = make([]string, len(val))
- copy((*out)[key], val)
- }
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserInfo.
-func (in *UserInfo) DeepCopy() *UserInfo {
- if in == nil {
- return nil
- }
- out := new(UserInfo)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/authorization/v1/doc.go b/vendor/k8s.io/api/authorization/v1/doc.go
deleted file mode 100644
index c06b798df..000000000
--- a/vendor/k8s.io/api/authorization/v1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// +groupName=authorization.k8s.io
-package v1 // import "k8s.io/api/authorization/v1"
diff --git a/vendor/k8s.io/api/authorization/v1/generated.pb.go b/vendor/k8s.io/api/authorization/v1/generated.pb.go
deleted file mode 100644
index bdb606c0b..000000000
--- a/vendor/k8s.io/api/authorization/v1/generated.pb.go
+++ /dev/null
@@ -1,3528 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1/generated.proto
-
- It has these top-level messages:
- ExtraValue
- LocalSubjectAccessReview
- NonResourceAttributes
- NonResourceRule
- ResourceAttributes
- ResourceRule
- SelfSubjectAccessReview
- SelfSubjectAccessReviewSpec
- SelfSubjectRulesReview
- SelfSubjectRulesReviewSpec
- SubjectAccessReview
- SubjectAccessReviewSpec
- SubjectAccessReviewStatus
- SubjectRulesReviewStatus
-*/
-package v1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *ExtraValue) Reset() { *m = ExtraValue{} }
-func (*ExtraValue) ProtoMessage() {}
-func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} }
-func (*LocalSubjectAccessReview) ProtoMessage() {}
-func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{1}
-}
-
-func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} }
-func (*NonResourceAttributes) ProtoMessage() {}
-func (*NonResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *NonResourceRule) Reset() { *m = NonResourceRule{} }
-func (*NonResourceRule) ProtoMessage() {}
-func (*NonResourceRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} }
-func (*ResourceAttributes) ProtoMessage() {}
-func (*ResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *ResourceRule) Reset() { *m = ResourceRule{} }
-func (*ResourceRule) ProtoMessage() {}
-func (*ResourceRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} }
-func (*SelfSubjectAccessReview) ProtoMessage() {}
-func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} }
-func (*SelfSubjectAccessReviewSpec) ProtoMessage() {}
-func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{7}
-}
-
-func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} }
-func (*SelfSubjectRulesReview) ProtoMessage() {}
-func (*SelfSubjectRulesReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} }
-func (*SelfSubjectRulesReviewSpec) ProtoMessage() {}
-func (*SelfSubjectRulesReviewSpec) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{9}
-}
-
-func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} }
-func (*SubjectAccessReview) ProtoMessage() {}
-func (*SubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} }
-func (*SubjectAccessReviewSpec) ProtoMessage() {}
-func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{11}
-}
-
-func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} }
-func (*SubjectAccessReviewStatus) ProtoMessage() {}
-func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{12}
-}
-
-func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} }
-func (*SubjectRulesReviewStatus) ProtoMessage() {}
-func (*SubjectRulesReviewStatus) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{13}
-}
-
-func init() {
- proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.authorization.v1.ExtraValue")
- proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.api.authorization.v1.LocalSubjectAccessReview")
- proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.api.authorization.v1.NonResourceAttributes")
- proto.RegisterType((*NonResourceRule)(nil), "k8s.io.api.authorization.v1.NonResourceRule")
- proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.api.authorization.v1.ResourceAttributes")
- proto.RegisterType((*ResourceRule)(nil), "k8s.io.api.authorization.v1.ResourceRule")
- proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.api.authorization.v1.SelfSubjectAccessReview")
- proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.api.authorization.v1.SelfSubjectAccessReviewSpec")
- proto.RegisterType((*SelfSubjectRulesReview)(nil), "k8s.io.api.authorization.v1.SelfSubjectRulesReview")
- proto.RegisterType((*SelfSubjectRulesReviewSpec)(nil), "k8s.io.api.authorization.v1.SelfSubjectRulesReviewSpec")
- proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.api.authorization.v1.SubjectAccessReview")
- proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.api.authorization.v1.SubjectAccessReviewSpec")
- proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.api.authorization.v1.SubjectAccessReviewStatus")
- proto.RegisterType((*SubjectRulesReviewStatus)(nil), "k8s.io.api.authorization.v1.SubjectRulesReviewStatus")
-}
-func (m ExtraValue) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m) > 0 {
- for _, s := range m {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *LocalSubjectAccessReview) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *LocalSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *NonResourceAttributes) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NonResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
- i += copy(dAtA[i:], m.Path)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
- i += copy(dAtA[i:], m.Verb)
- return i, nil
-}
-
-func (m *NonResourceRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NonResourceRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *ResourceAttributes) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i += copy(dAtA[i:], m.Namespace)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
- i += copy(dAtA[i:], m.Verb)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
- i += copy(dAtA[i:], m.Group)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version)))
- i += copy(dAtA[i:], m.Version)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
- i += copy(dAtA[i:], m.Resource)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource)))
- i += copy(dAtA[i:], m.Subresource)
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- return i, nil
-}
-
-func (m *ResourceRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *SelfSubjectAccessReview) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SelfSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n5, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n6, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- return i, nil
-}
-
-func (m *SelfSubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SelfSubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.ResourceAttributes != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
- n7, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- }
- if m.NonResourceAttributes != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
- n8, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- }
- return i, nil
-}
-
-func (m *SelfSubjectRulesReview) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SelfSubjectRulesReview) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n10, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n11, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- return i, nil
-}
-
-func (m *SelfSubjectRulesReviewSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SelfSubjectRulesReviewSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i += copy(dAtA[i:], m.Namespace)
- return i, nil
-}
-
-func (m *SubjectAccessReview) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n12, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n13, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n14, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n14
- return i, nil
-}
-
-func (m *SubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.ResourceAttributes != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
- n15, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n15
- }
- if m.NonResourceAttributes != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
- n16, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n16
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
- i += copy(dAtA[i:], m.User)
- if len(m.Groups) > 0 {
- for _, s := range m.Groups {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Extra) > 0 {
- keysForExtra := make([]string, 0, len(m.Extra))
- for k := range m.Extra {
- keysForExtra = append(keysForExtra, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
- for _, k := range keysForExtra {
- dAtA[i] = 0x2a
- i++
- v := m.Extra[string(k)]
- msgSize := 0
- if (&v) != nil {
- msgSize = (&v).Size()
- msgSize += 1 + sovGenerated(uint64(msgSize))
- }
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
- n17, err := (&v).MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n17
- }
- }
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
- i += copy(dAtA[i:], m.UID)
- return i, nil
-}
-
-func (m *SubjectAccessReviewStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SubjectAccessReviewStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- if m.Allowed {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError)))
- i += copy(dAtA[i:], m.EvaluationError)
- dAtA[i] = 0x20
- i++
- if m.Denied {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- return i, nil
-}
-
-func (m *SubjectRulesReviewStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SubjectRulesReviewStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ResourceRules) > 0 {
- for _, msg := range m.ResourceRules {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.NonResourceRules) > 0 {
- for _, msg := range m.NonResourceRules {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x18
- i++
- if m.Incomplete {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError)))
- i += copy(dAtA[i:], m.EvaluationError)
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m ExtraValue) Size() (n int) {
- var l int
- _ = l
- if len(m) > 0 {
- for _, s := range m {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *LocalSubjectAccessReview) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *NonResourceAttributes) Size() (n int) {
- var l int
- _ = l
- l = len(m.Path)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Verb)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *NonResourceRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ResourceAttributes) Size() (n int) {
- var l int
- _ = l
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Verb)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Group)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Version)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Resource)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Subresource)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourceRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *SelfSubjectAccessReview) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SelfSubjectAccessReviewSpec) Size() (n int) {
- var l int
- _ = l
- if m.ResourceAttributes != nil {
- l = m.ResourceAttributes.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.NonResourceAttributes != nil {
- l = m.NonResourceAttributes.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *SelfSubjectRulesReview) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SelfSubjectRulesReviewSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SubjectAccessReview) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SubjectAccessReviewSpec) Size() (n int) {
- var l int
- _ = l
- if m.ResourceAttributes != nil {
- l = m.ResourceAttributes.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.NonResourceAttributes != nil {
- l = m.NonResourceAttributes.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = len(m.User)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Groups) > 0 {
- for _, s := range m.Groups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Extra) > 0 {
- for k, v := range m.Extra {
- _ = k
- _ = v
- l = v.Size()
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- l = len(m.UID)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SubjectAccessReviewStatus) Size() (n int) {
- var l int
- _ = l
- n += 2
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.EvaluationError)
- n += 1 + l + sovGenerated(uint64(l))
- n += 2
- return n
-}
-
-func (m *SubjectRulesReviewStatus) Size() (n int) {
- var l int
- _ = l
- if len(m.ResourceRules) > 0 {
- for _, e := range m.ResourceRules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.NonResourceRules) > 0 {
- for _, e := range m.NonResourceRules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- n += 2
- l = len(m.EvaluationError)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *LocalSubjectAccessReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&LocalSubjectAccessReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NonResourceAttributes) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NonResourceAttributes{`,
- `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
- `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NonResourceRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NonResourceRule{`,
- `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
- `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceAttributes) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceAttributes{`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
- `Group:` + fmt.Sprintf("%v", this.Group) + `,`,
- `Version:` + fmt.Sprintf("%v", this.Version) + `,`,
- `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
- `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceRule{`,
- `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
- `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
- `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
- `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SelfSubjectAccessReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SelfSubjectAccessReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SelfSubjectAccessReviewSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SelfSubjectAccessReviewSpec{`,
- `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
- `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SelfSubjectRulesReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SelfSubjectRulesReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectRulesReviewSpec", "SelfSubjectRulesReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectRulesReviewStatus", "SubjectRulesReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SelfSubjectRulesReviewSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SelfSubjectRulesReviewSpec{`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SubjectAccessReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SubjectAccessReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SubjectAccessReviewSpec) String() string {
- if this == nil {
- return "nil"
- }
- keysForExtra := make([]string, 0, len(this.Extra))
- for k := range this.Extra {
- keysForExtra = append(keysForExtra, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
- mapStringForExtra := "map[string]ExtraValue{"
- for _, k := range keysForExtra {
- mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
- }
- mapStringForExtra += "}"
- s := strings.Join([]string{`&SubjectAccessReviewSpec{`,
- `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
- `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
- `User:` + fmt.Sprintf("%v", this.User) + `,`,
- `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
- `Extra:` + mapStringForExtra + `,`,
- `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SubjectAccessReviewStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SubjectAccessReviewStatus{`,
- `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`,
- `Denied:` + fmt.Sprintf("%v", this.Denied) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SubjectRulesReviewStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SubjectRulesReviewStatus{`,
- `ResourceRules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResourceRules), "ResourceRule", "ResourceRule", 1), `&`, ``, 1) + `,`,
- `NonResourceRules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NonResourceRules), "NonResourceRule", "NonResourceRule", 1), `&`, ``, 1) + `,`,
- `Incomplete:` + fmt.Sprintf("%v", this.Incomplete) + `,`,
- `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *ExtraValue) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- *m = append(*m, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *LocalSubjectAccessReview) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: LocalSubjectAccessReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: LocalSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NonResourceAttributes) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NonResourceAttributes: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NonResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Path = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verb = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NonResourceRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NonResourceRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NonResourceRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceAttributes) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceAttributes: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Namespace = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verb = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Group = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Version = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resource = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Subresource = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SelfSubjectAccessReview) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SelfSubjectAccessReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SelfSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SelfSubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.ResourceAttributes == nil {
- m.ResourceAttributes = &ResourceAttributes{}
- }
- if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NonResourceAttributes == nil {
- m.NonResourceAttributes = &NonResourceAttributes{}
- }
- if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SelfSubjectRulesReview) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SelfSubjectRulesReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SelfSubjectRulesReview: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SelfSubjectRulesReviewSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SelfSubjectRulesReviewSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SelfSubjectRulesReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Namespace = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SubjectAccessReview) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SubjectAccessReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SubjectAccessReviewSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.ResourceAttributes == nil {
- m.ResourceAttributes = &ResourceAttributes{}
- }
- if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NonResourceAttributes == nil {
- m.NonResourceAttributes = &NonResourceAttributes{}
- }
- if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.User = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.Extra == nil {
- m.Extra = make(map[string]ExtraValue)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapmsglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postmsgIndex := iNdEx + mapmsglen
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := &ExtraValue{}
- if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- m.Extra[mapkey] = *mapvalue
- } else {
- var mapvalue ExtraValue
- m.Extra[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UID = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SubjectAccessReviewStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SubjectAccessReviewStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SubjectAccessReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Allowed = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.EvaluationError = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Denied", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Denied = bool(v != 0)
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SubjectRulesReviewStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SubjectRulesReviewStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SubjectRulesReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceRules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ResourceRules = append(m.ResourceRules, ResourceRule{})
- if err := m.ResourceRules[len(m.ResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceRules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NonResourceRules = append(m.NonResourceRules, NonResourceRule{})
- if err := m.NonResourceRules[len(m.NonResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Incomplete", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Incomplete = bool(v != 0)
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.EvaluationError = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 1152 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
- 0x14, 0xf7, 0xae, 0xed, 0xd4, 0x1e, 0x37, 0x24, 0x9d, 0x28, 0xcd, 0x36, 0x15, 0x76, 0xb4, 0x48,
- 0x90, 0x8a, 0xb2, 0x4b, 0x4c, 0xdb, 0x44, 0x95, 0x2a, 0x14, 0x2b, 0x11, 0x8a, 0xd4, 0x96, 0x6a,
- 0xa2, 0x44, 0xa2, 0x08, 0xc4, 0x78, 0x3d, 0xb1, 0x97, 0xd8, 0xbb, 0xcb, 0xcc, 0xac, 0x43, 0x38,
- 0x55, 0xe2, 0x0b, 0x70, 0xe4, 0xc0, 0x81, 0x6f, 0xc0, 0x05, 0x89, 0x1b, 0x07, 0x0e, 0x28, 0xc7,
- 0x1e, 0x8b, 0x84, 0x2c, 0xb2, 0x9c, 0xf9, 0x0e, 0x68, 0x66, 0xc7, 0xde, 0x75, 0xb2, 0x76, 0x13,
- 0x0e, 0xf4, 0xd2, 0xdb, 0xee, 0xfb, 0xfd, 0xde, 0x9f, 0x79, 0x7f, 0x66, 0x1e, 0xd8, 0x3a, 0xdc,
- 0x60, 0x96, 0xeb, 0xdb, 0x87, 0x61, 0x93, 0x50, 0x8f, 0x70, 0xc2, 0xec, 0x3e, 0xf1, 0x5a, 0x3e,
- 0xb5, 0x15, 0x80, 0x03, 0xd7, 0xc6, 0x21, 0xef, 0xf8, 0xd4, 0xfd, 0x06, 0x73, 0xd7, 0xf7, 0xec,
- 0xfe, 0x9a, 0xdd, 0x26, 0x1e, 0xa1, 0x98, 0x93, 0x96, 0x15, 0x50, 0x9f, 0xfb, 0xf0, 0x66, 0x4c,
- 0xb6, 0x70, 0xe0, 0x5a, 0x63, 0x64, 0xab, 0xbf, 0xb6, 0xfc, 0x5e, 0xdb, 0xe5, 0x9d, 0xb0, 0x69,
- 0x39, 0x7e, 0xcf, 0x6e, 0xfb, 0x6d, 0xdf, 0x96, 0x3a, 0xcd, 0xf0, 0x40, 0xfe, 0xc9, 0x1f, 0xf9,
- 0x15, 0xdb, 0x5a, 0xbe, 0x93, 0x38, 0xee, 0x61, 0xa7, 0xe3, 0x7a, 0x84, 0x1e, 0xdb, 0xc1, 0x61,
- 0x5b, 0x08, 0x98, 0xdd, 0x23, 0x1c, 0x67, 0x44, 0xb0, 0x6c, 0x4f, 0xd2, 0xa2, 0xa1, 0xc7, 0xdd,
- 0x1e, 0x39, 0xa7, 0x70, 0xef, 0x65, 0x0a, 0xcc, 0xe9, 0x90, 0x1e, 0x3e, 0xa7, 0xf7, 0xc1, 0x24,
- 0xbd, 0x90, 0xbb, 0x5d, 0xdb, 0xf5, 0x38, 0xe3, 0xf4, 0xac, 0x92, 0xb9, 0x0e, 0xc0, 0xf6, 0xd7,
- 0x9c, 0xe2, 0x7d, 0xdc, 0x0d, 0x09, 0xac, 0x81, 0xa2, 0xcb, 0x49, 0x8f, 0x19, 0xda, 0x4a, 0x7e,
- 0xb5, 0xdc, 0x28, 0x47, 0x83, 0x5a, 0x71, 0x47, 0x08, 0x50, 0x2c, 0xbf, 0x5f, 0xfa, 0xfe, 0xc7,
- 0x5a, 0xee, 0xd9, 0x9f, 0x2b, 0x39, 0xf3, 0x67, 0x1d, 0x18, 0x0f, 0x7d, 0x07, 0x77, 0x77, 0xc3,
- 0xe6, 0x97, 0xc4, 0xe1, 0x9b, 0x8e, 0x43, 0x18, 0x43, 0xa4, 0xef, 0x92, 0x23, 0xf8, 0x05, 0x28,
- 0x89, 0x74, 0xb4, 0x30, 0xc7, 0x86, 0xb6, 0xa2, 0xad, 0x56, 0xea, 0xef, 0x5b, 0x49, 0x21, 0x46,
- 0xd1, 0x59, 0xc1, 0x61, 0x5b, 0x08, 0x98, 0x25, 0xd8, 0x56, 0x7f, 0xcd, 0xfa, 0x58, 0xda, 0x7a,
- 0x44, 0x38, 0x6e, 0xc0, 0x93, 0x41, 0x2d, 0x17, 0x0d, 0x6a, 0x20, 0x91, 0xa1, 0x91, 0x55, 0xb8,
- 0x0f, 0x0a, 0x2c, 0x20, 0x8e, 0xa1, 0x4b, 0xeb, 0x77, 0xac, 0x29, 0x65, 0xb6, 0x32, 0x22, 0xdc,
- 0x0d, 0x88, 0xd3, 0xb8, 0xaa, 0x3c, 0x14, 0xc4, 0x1f, 0x92, 0xf6, 0xe0, 0xe7, 0x60, 0x86, 0x71,
- 0xcc, 0x43, 0x66, 0xe4, 0xa5, 0xe5, 0x7b, 0x97, 0xb6, 0x2c, 0xb5, 0x1b, 0x6f, 0x28, 0xdb, 0x33,
- 0xf1, 0x3f, 0x52, 0x56, 0xcd, 0x4f, 0xc1, 0xe2, 0x63, 0xdf, 0x43, 0x84, 0xf9, 0x21, 0x75, 0xc8,
- 0x26, 0xe7, 0xd4, 0x6d, 0x86, 0x9c, 0x30, 0xb8, 0x02, 0x0a, 0x01, 0xe6, 0x1d, 0x99, 0xae, 0x72,
- 0x12, 0xda, 0x13, 0xcc, 0x3b, 0x48, 0x22, 0x82, 0xd1, 0x27, 0xb4, 0x29, 0x8f, 0x9c, 0x62, 0xec,
- 0x13, 0xda, 0x44, 0x12, 0x31, 0xbf, 0x02, 0x73, 0x29, 0xe3, 0x28, 0xec, 0xca, 0x8a, 0x0a, 0x68,
- 0xac, 0xa2, 0x42, 0x83, 0xa1, 0x58, 0x0e, 0x1f, 0x80, 0x39, 0x2f, 0xd1, 0xd9, 0x43, 0x0f, 0x99,
- 0xa1, 0x4b, 0xea, 0x42, 0x34, 0xa8, 0xa5, 0xcd, 0x09, 0x08, 0x9d, 0xe5, 0x9a, 0xbf, 0xea, 0x00,
- 0x66, 0x9c, 0xc6, 0x06, 0x65, 0x0f, 0xf7, 0x08, 0x0b, 0xb0, 0x43, 0xd4, 0x91, 0xae, 0xa9, 0x80,
- 0xcb, 0x8f, 0x87, 0x00, 0x4a, 0x38, 0x2f, 0x3f, 0x1c, 0x7c, 0x0b, 0x14, 0xdb, 0xd4, 0x0f, 0x03,
- 0x59, 0x98, 0x72, 0x63, 0x56, 0x51, 0x8a, 0x1f, 0x09, 0x21, 0x8a, 0x31, 0x78, 0x0b, 0x5c, 0xe9,
- 0x13, 0xca, 0x5c, 0xdf, 0x33, 0x0a, 0x92, 0x36, 0xa7, 0x68, 0x57, 0xf6, 0x63, 0x31, 0x1a, 0xe2,
- 0xf0, 0x36, 0x28, 0x51, 0x15, 0xb8, 0x51, 0x94, 0xdc, 0x79, 0xc5, 0x2d, 0x8d, 0x32, 0x38, 0x62,
- 0xc0, 0xbb, 0xa0, 0xc2, 0xc2, 0xe6, 0x48, 0x61, 0x46, 0x2a, 0x2c, 0x28, 0x85, 0xca, 0x6e, 0x02,
- 0xa1, 0x34, 0x4f, 0x1c, 0x4b, 0x9c, 0xd1, 0xb8, 0x32, 0x7e, 0x2c, 0x91, 0x02, 0x24, 0x11, 0xf3,
- 0x37, 0x0d, 0x5c, 0xbd, 0x5c, 0xc5, 0xde, 0x05, 0x65, 0x1c, 0xb8, 0xf2, 0xd8, 0xc3, 0x5a, 0xcd,
- 0x8a, 0xbc, 0x6e, 0x3e, 0xd9, 0x89, 0x85, 0x28, 0xc1, 0x05, 0x79, 0x18, 0x8c, 0x68, 0xe9, 0x11,
- 0x79, 0xe8, 0x92, 0xa1, 0x04, 0x87, 0xeb, 0x60, 0x76, 0xf8, 0x23, 0x8b, 0x64, 0x14, 0xa4, 0xc2,
- 0xb5, 0x68, 0x50, 0x9b, 0x45, 0x69, 0x00, 0x8d, 0xf3, 0xcc, 0x5f, 0x74, 0xb0, 0xb4, 0x4b, 0xba,
- 0x07, 0xaf, 0xe6, 0x2e, 0x78, 0x3a, 0x76, 0x17, 0x6c, 0x4c, 0x9f, 0xd8, 0xec, 0x28, 0x5f, 0xd9,
- 0x7d, 0xf0, 0x83, 0x0e, 0x6e, 0x4e, 0x89, 0x09, 0x1e, 0x01, 0x48, 0xcf, 0x8d, 0x97, 0xca, 0xa3,
- 0x3d, 0x35, 0x96, 0xf3, 0x53, 0xd9, 0xb8, 0x1e, 0x0d, 0x6a, 0x19, 0xd3, 0x8a, 0x32, 0x5c, 0xc0,
- 0x6f, 0x35, 0xb0, 0xe8, 0x65, 0xdd, 0x54, 0x2a, 0xcd, 0xf5, 0xa9, 0xce, 0x33, 0xef, 0xb8, 0xc6,
- 0x8d, 0x68, 0x50, 0xcb, 0xbe, 0xfe, 0x50, 0xb6, 0x2f, 0xf1, 0xca, 0x5c, 0x4f, 0xa5, 0x47, 0x0c,
- 0xc8, 0xff, 0xd7, 0x57, 0x9f, 0x8c, 0xf5, 0xd5, 0xfa, 0x45, 0xfb, 0x2a, 0x15, 0xe4, 0xc4, 0xb6,
- 0xfa, 0xec, 0x4c, 0x5b, 0xdd, 0xbd, 0x48, 0x5b, 0xa5, 0x0d, 0x4f, 0xef, 0xaa, 0x47, 0x60, 0x79,
- 0x72, 0x40, 0x97, 0xbe, 0x9c, 0xcd, 0x9f, 0x74, 0xb0, 0xf0, 0xfa, 0x99, 0xbf, 0xcc, 0x58, 0xff,
- 0x5e, 0x00, 0x4b, 0xaf, 0x47, 0x7a, 0xd2, 0xa2, 0x13, 0x32, 0x42, 0xd5, 0x33, 0x3e, 0x2a, 0xce,
- 0x1e, 0x23, 0x14, 0x49, 0x04, 0x9a, 0x60, 0xa6, 0x1d, 0xbf, 0x6e, 0xf1, 0xfb, 0x03, 0x44, 0x82,
- 0xd5, 0xd3, 0xa6, 0x10, 0xd8, 0x02, 0x45, 0x22, 0xf6, 0x56, 0xa3, 0xb8, 0x92, 0x5f, 0xad, 0xd4,
- 0x3f, 0xfc, 0x2f, 0x9d, 0x61, 0xc9, 0xcd, 0x77, 0xdb, 0xe3, 0xf4, 0x38, 0x59, 0x27, 0xa4, 0x0c,
- 0xc5, 0xc6, 0xe1, 0x9b, 0x20, 0x1f, 0xba, 0x2d, 0xf5, 0xda, 0x57, 0x14, 0x25, 0xbf, 0xb7, 0xb3,
- 0x85, 0x84, 0x7c, 0x19, 0xab, 0xe5, 0x59, 0x9a, 0x80, 0xf3, 0x20, 0x7f, 0x48, 0x8e, 0xe3, 0x81,
- 0x42, 0xe2, 0x13, 0x3e, 0x00, 0xc5, 0xbe, 0xd8, 0xab, 0x55, 0x7e, 0xdf, 0x99, 0x1a, 0x64, 0xb2,
- 0x86, 0xa3, 0x58, 0xeb, 0xbe, 0xbe, 0xa1, 0x99, 0x7f, 0x68, 0xe0, 0xc6, 0xc4, 0xf6, 0x13, 0xeb,
- 0x0e, 0xee, 0x76, 0xfd, 0x23, 0xd2, 0x92, 0x6e, 0x4b, 0xc9, 0xba, 0xb3, 0x19, 0x8b, 0xd1, 0x10,
- 0x87, 0x6f, 0x83, 0x19, 0x4a, 0x30, 0xf3, 0x3d, 0xb5, 0x62, 0x8d, 0x3a, 0x17, 0x49, 0x29, 0x52,
- 0x28, 0xdc, 0x04, 0x73, 0x44, 0xb8, 0x97, 0x71, 0x6d, 0x53, 0xea, 0x0f, 0x2b, 0xb5, 0xa4, 0x14,
- 0xe6, 0xb6, 0xc7, 0x61, 0x74, 0x96, 0x2f, 0x5c, 0xb5, 0x88, 0xe7, 0x92, 0x96, 0xdc, 0xc1, 0x4a,
- 0x89, 0xab, 0x2d, 0x29, 0x45, 0x0a, 0x35, 0xff, 0xd1, 0x81, 0x31, 0xe9, 0x6a, 0x83, 0x07, 0xc9,
- 0x2e, 0x22, 0x41, 0xb9, 0x0e, 0x55, 0xea, 0xb7, 0x2e, 0x34, 0x20, 0x42, 0xa3, 0xb1, 0xa8, 0xdc,
- 0xce, 0xa6, 0xa5, 0xa9, 0xd5, 0x45, 0xfe, 0x42, 0x0a, 0xe6, 0xbd, 0xf1, 0x9d, 0x39, 0x5e, 0xaa,
- 0x2a, 0xf5, 0xdb, 0x17, 0x1d, 0x07, 0xe9, 0xcd, 0x50, 0xde, 0xe6, 0xcf, 0x00, 0x0c, 0x9d, 0xb3,
- 0x0f, 0xeb, 0x00, 0xb8, 0x9e, 0xe3, 0xf7, 0x82, 0x2e, 0xe1, 0x44, 0xa6, 0xb7, 0x94, 0xdc, 0x83,
- 0x3b, 0x23, 0x04, 0xa5, 0x58, 0x59, 0x75, 0x29, 0x5c, 0xae, 0x2e, 0x8d, 0xd5, 0x93, 0xd3, 0x6a,
- 0xee, 0xf9, 0x69, 0x35, 0xf7, 0xe2, 0xb4, 0x9a, 0x7b, 0x16, 0x55, 0xb5, 0x93, 0xa8, 0xaa, 0x3d,
- 0x8f, 0xaa, 0xda, 0x8b, 0xa8, 0xaa, 0xfd, 0x15, 0x55, 0xb5, 0xef, 0xfe, 0xae, 0xe6, 0x9e, 0xea,
- 0xfd, 0xb5, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x0e, 0xab, 0x82, 0x7c, 0x0f, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/authorization/v1/generated.proto b/vendor/k8s.io/api/authorization/v1/generated.proto
deleted file mode 100644
index 2cd4af0c0..000000000
--- a/vendor/k8s.io/api/authorization/v1/generated.proto
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.authorization.v1;
-
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1";
-
-// ExtraValue masks the value so protobuf can generate
-// +protobuf.nullable=true
-// +protobuf.options.(gogoproto.goproto_stringer)=false
-message ExtraValue {
- // items, if empty, will result in an empty slice
-
- repeated string items = 1;
-}
-
-// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
-// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
-// checking.
-message LocalSubjectAccessReview {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
- // you made the request against. If empty, it is defaulted.
- optional SubjectAccessReviewSpec spec = 2;
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- optional SubjectAccessReviewStatus status = 3;
-}
-
-// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
-message NonResourceAttributes {
- // Path is the URL path of the request
- // +optional
- optional string path = 1;
-
- // Verb is the standard HTTP verb
- // +optional
- optional string verb = 2;
-}
-
-// NonResourceRule holds information that describes a rule for the non-resource
-message NonResourceRule {
- // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all.
- repeated string verbs = 1;
-
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full,
- // final step in the path. "*" means all.
- // +optional
- repeated string nonResourceURLs = 2;
-}
-
-// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
-message ResourceAttributes {
- // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
- // "" (empty) is defaulted for LocalSubjectAccessReviews
- // "" (empty) is empty for cluster-scoped resources
- // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
- // +optional
- optional string namespace = 1;
-
- // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
- // +optional
- optional string verb = 2;
-
- // Group is the API Group of the Resource. "*" means all.
- // +optional
- optional string group = 3;
-
- // Version is the API Version of the Resource. "*" means all.
- // +optional
- optional string version = 4;
-
- // Resource is one of the existing resource types. "*" means all.
- // +optional
- optional string resource = 5;
-
- // Subresource is one of the existing resource types. "" means none.
- // +optional
- optional string subresource = 6;
-
- // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
- // +optional
- optional string name = 7;
-}
-
-// ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant,
-// may contain duplicates, and possibly be incomplete.
-message ResourceRule {
- // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.
- repeated string verbs = 1;
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed. "*" means all.
- // +optional
- repeated string apiGroups = 2;
-
- // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups.
- // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups.
- // +optional
- repeated string resources = 3;
-
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.
- // +optional
- repeated string resourceNames = 4;
-}
-
-// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
-// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
-// to check whether they can perform an action
-message SelfSubjectAccessReview {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the request being evaluated. user and groups must be empty
- optional SelfSubjectAccessReviewSpec spec = 2;
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- optional SubjectAccessReviewStatus status = 3;
-}
-
-// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
-// and NonResourceAuthorizationAttributes must be set
-message SelfSubjectAccessReviewSpec {
- // ResourceAuthorizationAttributes describes information for a resource access request
- // +optional
- optional ResourceAttributes resourceAttributes = 1;
-
- // NonResourceAttributes describes information for a non-resource access request
- // +optional
- optional NonResourceAttributes nonResourceAttributes = 2;
-}
-
-// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace.
-// The returned list of actions may be incomplete depending on the server's authorization mode,
-// and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions,
-// or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to
-// drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns.
-// SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.
-message SelfSubjectRulesReview {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the request being evaluated.
- optional SelfSubjectRulesReviewSpec spec = 2;
-
- // Status is filled in by the server and indicates the set of actions a user can perform.
- // +optional
- optional SubjectRulesReviewStatus status = 3;
-}
-
-message SelfSubjectRulesReviewSpec {
- // Namespace to evaluate rules for. Required.
- optional string namespace = 1;
-}
-
-// SubjectAccessReview checks whether or not a user or group can perform an action.
-message SubjectAccessReview {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the request being evaluated
- optional SubjectAccessReviewSpec spec = 2;
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- optional SubjectAccessReviewStatus status = 3;
-}
-
-// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
-// and NonResourceAuthorizationAttributes must be set
-message SubjectAccessReviewSpec {
- // ResourceAuthorizationAttributes describes information for a resource access request
- // +optional
- optional ResourceAttributes resourceAttributes = 1;
-
- // NonResourceAttributes describes information for a non-resource access request
- // +optional
- optional NonResourceAttributes nonResourceAttributes = 2;
-
- // User is the user you're testing for.
- // If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups
- // +optional
- optional string user = 3;
-
- // Groups is the groups you're testing for.
- // +optional
- repeated string groups = 4;
-
- // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
- // it needs a reflection here.
- // +optional
- map<string, ExtraValue> extra = 5;
-
- // UID information about the requesting user.
- // +optional
- optional string uid = 6;
-}
-
-// SubjectAccessReviewStatus
-message SubjectAccessReviewStatus {
- // Allowed is required. True if the action would be allowed, false otherwise.
- optional bool allowed = 1;
-
- // Denied is optional. True if the action would be denied, otherwise
- // false. If both allowed is false and denied is false, then the
- // authorizer has no opinion on whether to authorize the action. Denied
- // may not be true if Allowed is true.
- // +optional
- optional bool denied = 4;
-
- // Reason is optional. It indicates why a request was allowed or denied.
- // +optional
- optional string reason = 2;
-
- // EvaluationError is an indication that some error occurred during the authorization check.
- // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
- // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
- // +optional
- optional string evaluationError = 3;
-}
-
-// SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on
-// the set of authorizers the server is configured with and any errors experienced during evaluation.
-// Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission,
-// even if that list is incomplete.
-message SubjectRulesReviewStatus {
- // ResourceRules is the list of actions the subject is allowed to perform on resources.
- // The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
- repeated ResourceRule resourceRules = 1;
-
- // NonResourceRules is the list of actions the subject is allowed to perform on non-resources.
- // The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
- repeated NonResourceRule nonResourceRules = 2;
-
- // Incomplete is true when the rules returned by this call are incomplete. This is most commonly
- // encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.
- optional bool incomplete = 3;
-
- // EvaluationError can appear in combination with Rules. It indicates an error occurred during
- // rule evaluation, such as an authorizer that doesn't support rule evaluation, and that
- // ResourceRules and/or NonResourceRules may be incomplete.
- // +optional
- optional string evaluationError = 4;
-}
-
diff --git a/vendor/k8s.io/api/authorization/v1/register.go b/vendor/k8s.io/api/authorization/v1/register.go
deleted file mode 100644
index 59311981e..000000000
--- a/vendor/k8s.io/api/authorization/v1/register.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "authorization.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &SelfSubjectRulesReview{},
- &SelfSubjectAccessReview{},
- &SubjectAccessReview{},
- &LocalSubjectAccessReview{},
- )
-
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/authorization/v1/types.go b/vendor/k8s.io/api/authorization/v1/types.go
deleted file mode 100644
index 86b05c54e..000000000
--- a/vendor/k8s.io/api/authorization/v1/types.go
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "fmt"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// SubjectAccessReview checks whether or not a user or group can perform an action.
-type SubjectAccessReview struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the request being evaluated
- Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
-// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
-// to check whether they can perform an action
-type SelfSubjectAccessReview struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the request being evaluated. user and groups must be empty
- Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +genclient
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
-// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
-// checking.
-type LocalSubjectAccessReview struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
- // you made the request against. If empty, it is defaulted.
- Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
-type ResourceAttributes struct {
- // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
- // "" (empty) is defaulted for LocalSubjectAccessReviews
- // "" (empty) is empty for cluster-scoped resources
- // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
- // +optional
- Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
- // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
- // +optional
- Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
- // Group is the API Group of the Resource. "*" means all.
- // +optional
- Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
- // Version is the API Version of the Resource. "*" means all.
- // +optional
- Version string `json:"version,omitempty" protobuf:"bytes,4,opt,name=version"`
- // Resource is one of the existing resource types. "*" means all.
- // +optional
- Resource string `json:"resource,omitempty" protobuf:"bytes,5,opt,name=resource"`
- // Subresource is one of the existing resource types. "" means none.
- // +optional
- Subresource string `json:"subresource,omitempty" protobuf:"bytes,6,opt,name=subresource"`
- // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
- // +optional
- Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"`
-}
-
-// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
-type NonResourceAttributes struct {
- // Path is the URL path of the request
- // +optional
- Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
- // Verb is the standard HTTP verb
- // +optional
- Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
-}
-
-// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
-// and NonResourceAuthorizationAttributes must be set
-type SubjectAccessReviewSpec struct {
- // ResourceAuthorizationAttributes describes information for a resource access request
- // +optional
- ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
- // NonResourceAttributes describes information for a non-resource access request
- // +optional
- NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
-
- // User is the user you're testing for.
- // If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups
- // +optional
- User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"`
- // Groups is the groups you're testing for.
- // +optional
- Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"`
- // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
- // it needs a reflection here.
- // +optional
- Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"`
- // UID information about the requesting user.
- // +optional
- UID string `json:"uid,omitempty" protobuf:"bytes,6,opt,name=uid"`
-}
-
-// ExtraValue masks the value so protobuf can generate
-// +protobuf.nullable=true
-// +protobuf.options.(gogoproto.goproto_stringer)=false
-type ExtraValue []string
-
-func (t ExtraValue) String() string {
- return fmt.Sprintf("%v", []string(t))
-}
-
-// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
-// and NonResourceAuthorizationAttributes must be set
-type SelfSubjectAccessReviewSpec struct {
- // ResourceAuthorizationAttributes describes information for a resource access request
- // +optional
- ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
- // NonResourceAttributes describes information for a non-resource access request
- // +optional
- NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
-}
-
-// SubjectAccessReviewStatus
-type SubjectAccessReviewStatus struct {
- // Allowed is required. True if the action would be allowed, false otherwise.
- Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"`
- // Denied is optional. True if the action would be denied, otherwise
- // false. If both allowed is false and denied is false, then the
- // authorizer has no opinion on whether to authorize the action. Denied
- // may not be true if Allowed is true.
- // +optional
- Denied bool `json:"denied,omitempty" protobuf:"varint,4,opt,name=denied"`
- // Reason is optional. It indicates why a request was allowed or denied.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
- // EvaluationError is an indication that some error occurred during the authorization check.
- // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
- // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
- // +optional
- EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,3,opt,name=evaluationError"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace.
-// The returned list of actions may be incomplete depending on the server's authorization mode,
-// and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions,
-// or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to
-// drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns.
-// SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.
-type SelfSubjectRulesReview struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the request being evaluated.
- Spec SelfSubjectRulesReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the server and indicates the set of actions a user can perform.
- // +optional
- Status SubjectRulesReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-type SelfSubjectRulesReviewSpec struct {
- // Namespace to evaluate rules for. Required.
- Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
-}
-
-// SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on
-// the set of authorizers the server is configured with and any errors experienced during evaluation.
-// Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission,
-// even if that list is incomplete.
-type SubjectRulesReviewStatus struct {
- // ResourceRules is the list of actions the subject is allowed to perform on resources.
- // The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
- ResourceRules []ResourceRule `json:"resourceRules" protobuf:"bytes,1,rep,name=resourceRules"`
- // NonResourceRules is the list of actions the subject is allowed to perform on non-resources.
- // The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
- NonResourceRules []NonResourceRule `json:"nonResourceRules" protobuf:"bytes,2,rep,name=nonResourceRules"`
- // Incomplete is true when the rules returned by this call are incomplete. This is most commonly
- // encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.
- Incomplete bool `json:"incomplete" protobuf:"bytes,3,rep,name=incomplete"`
- // EvaluationError can appear in combination with Rules. It indicates an error occurred during
- // rule evaluation, such as an authorizer that doesn't support rule evaluation, and that
- // ResourceRules and/or NonResourceRules may be incomplete.
- // +optional
- EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,4,opt,name=evaluationError"`
-}
-
-// ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant,
-// may contain duplicates, and possibly be incomplete.
-type ResourceRule struct {
- // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.
- Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed. "*" means all.
- // +optional
- APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"`
- // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups.
- // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups.
- // +optional
- Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.
- // +optional
- ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,4,rep,name=resourceNames"`
-}
-
-// NonResourceRule holds information that describes a rule for the non-resource
-type NonResourceRule struct {
- // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all.
- Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
-
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full,
- // final step in the path. "*" means all.
- // +optional
- NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,2,rep,name=nonResourceURLs"`
-}
diff --git a/vendor/k8s.io/api/authorization/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/authorization/v1/types_swagger_doc_generated.go
deleted file mode 100644
index 85503660c..000000000
--- a/vendor/k8s.io/api/authorization/v1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-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 v1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_LocalSubjectAccessReview = map[string]string{
- "": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.",
- "spec": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.",
- "status": "Status is filled in by the server and indicates whether the request is allowed or not",
-}
-
-func (LocalSubjectAccessReview) SwaggerDoc() map[string]string {
- return map_LocalSubjectAccessReview
-}
-
-var map_NonResourceAttributes = map[string]string{
- "": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface",
- "path": "Path is the URL path of the request",
- "verb": "Verb is the standard HTTP verb",
-}
-
-func (NonResourceAttributes) SwaggerDoc() map[string]string {
- return map_NonResourceAttributes
-}
-
-var map_NonResourceRule = map[string]string{
- "": "NonResourceRule holds information that describes a rule for the non-resource",
- "verbs": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.",
- "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. \"*\" means all.",
-}
-
-func (NonResourceRule) SwaggerDoc() map[string]string {
- return map_NonResourceRule
-}
-
-var map_ResourceAttributes = map[string]string{
- "": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
- "namespace": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview",
- "verb": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
- "group": "Group is the API Group of the Resource. \"*\" means all.",
- "version": "Version is the API Version of the Resource. \"*\" means all.",
- "resource": "Resource is one of the existing resource types. \"*\" means all.",
- "subresource": "Subresource is one of the existing resource types. \"\" means none.",
- "name": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.",
-}
-
-func (ResourceAttributes) SwaggerDoc() map[string]string {
- return map_ResourceAttributes
-}
-
-var map_ResourceRule = map[string]string{
- "": "ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.",
- "verbs": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
- "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"*\" means all.",
- "resources": "Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.\n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.",
- "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.",
-}
-
-func (ResourceRule) SwaggerDoc() map[string]string {
- return map_ResourceRule
-}
-
-var map_SelfSubjectAccessReview = map[string]string{
- "": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action",
- "spec": "Spec holds information about the request being evaluated. user and groups must be empty",
- "status": "Status is filled in by the server and indicates whether the request is allowed or not",
-}
-
-func (SelfSubjectAccessReview) SwaggerDoc() map[string]string {
- return map_SelfSubjectAccessReview
-}
-
-var map_SelfSubjectAccessReviewSpec = map[string]string{
- "": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
- "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
- "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
-}
-
-func (SelfSubjectAccessReviewSpec) SwaggerDoc() map[string]string {
- return map_SelfSubjectAccessReviewSpec
-}
-
-var map_SelfSubjectRulesReview = map[string]string{
- "": "SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.",
- "spec": "Spec holds information about the request being evaluated.",
- "status": "Status is filled in by the server and indicates the set of actions a user can perform.",
-}
-
-func (SelfSubjectRulesReview) SwaggerDoc() map[string]string {
- return map_SelfSubjectRulesReview
-}
-
-var map_SelfSubjectRulesReviewSpec = map[string]string{
- "namespace": "Namespace to evaluate rules for. Required.",
-}
-
-func (SelfSubjectRulesReviewSpec) SwaggerDoc() map[string]string {
- return map_SelfSubjectRulesReviewSpec
-}
-
-var map_SubjectAccessReview = map[string]string{
- "": "SubjectAccessReview checks whether or not a user or group can perform an action.",
- "spec": "Spec holds information about the request being evaluated",
- "status": "Status is filled in by the server and indicates whether the request is allowed or not",
-}
-
-func (SubjectAccessReview) SwaggerDoc() map[string]string {
- return map_SubjectAccessReview
-}
-
-var map_SubjectAccessReviewSpec = map[string]string{
- "": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
- "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
- "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
- "user": "User is the user you're testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups",
- "groups": "Groups is the groups you're testing for.",
- "extra": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.",
- "uid": "UID information about the requesting user.",
-}
-
-func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string {
- return map_SubjectAccessReviewSpec
-}
-
-var map_SubjectAccessReviewStatus = map[string]string{
- "": "SubjectAccessReviewStatus",
- "allowed": "Allowed is required. True if the action would be allowed, false otherwise.",
- "denied": "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.",
- "reason": "Reason is optional. It indicates why a request was allowed or denied.",
- "evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.",
-}
-
-func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
- return map_SubjectAccessReviewStatus
-}
-
-var map_SubjectRulesReviewStatus = map[string]string{
- "": "SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.",
- "resourceRules": "ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.",
- "nonResourceRules": "NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.",
- "incomplete": "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.",
- "evaluationError": "EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.",
-}
-
-func (SubjectRulesReviewStatus) SwaggerDoc() map[string]string {
- return map_SubjectRulesReviewStatus
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/authorization/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/authorization/v1/zz_generated.deepcopy.go
deleted file mode 100644
index 3df85934a..000000000
--- a/vendor/k8s.io/api/authorization/v1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,398 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in ExtraValue) DeepCopyInto(out *ExtraValue) {
- {
- in := &in
- *out = make(ExtraValue, len(*in))
- copy(*out, *in)
- return
- }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue.
-func (in ExtraValue) DeepCopy() ExtraValue {
- if in == nil {
- return nil
- }
- out := new(ExtraValue)
- in.DeepCopyInto(out)
- return *out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *LocalSubjectAccessReview) DeepCopyInto(out *LocalSubjectAccessReview) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- out.Status = in.Status
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSubjectAccessReview.
-func (in *LocalSubjectAccessReview) DeepCopy() *LocalSubjectAccessReview {
- if in == nil {
- return nil
- }
- out := new(LocalSubjectAccessReview)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *LocalSubjectAccessReview) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NonResourceAttributes) DeepCopyInto(out *NonResourceAttributes) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonResourceAttributes.
-func (in *NonResourceAttributes) DeepCopy() *NonResourceAttributes {
- if in == nil {
- return nil
- }
- out := new(NonResourceAttributes)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NonResourceRule) DeepCopyInto(out *NonResourceRule) {
- *out = *in
- if in.Verbs != nil {
- in, out := &in.Verbs, &out.Verbs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.NonResourceURLs != nil {
- in, out := &in.NonResourceURLs, &out.NonResourceURLs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonResourceRule.
-func (in *NonResourceRule) DeepCopy() *NonResourceRule {
- if in == nil {
- return nil
- }
- out := new(NonResourceRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ResourceAttributes) DeepCopyInto(out *ResourceAttributes) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAttributes.
-func (in *ResourceAttributes) DeepCopy() *ResourceAttributes {
- if in == nil {
- return nil
- }
- out := new(ResourceAttributes)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ResourceRule) DeepCopyInto(out *ResourceRule) {
- *out = *in
- if in.Verbs != nil {
- in, out := &in.Verbs, &out.Verbs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.APIGroups != nil {
- in, out := &in.APIGroups, &out.APIGroups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Resources != nil {
- in, out := &in.Resources, &out.Resources
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.ResourceNames != nil {
- in, out := &in.ResourceNames, &out.ResourceNames
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRule.
-func (in *ResourceRule) DeepCopy() *ResourceRule {
- if in == nil {
- return nil
- }
- out := new(ResourceRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- out.Status = in.Status
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReview.
-func (in *SelfSubjectAccessReview) DeepCopy() *SelfSubjectAccessReview {
- if in == nil {
- return nil
- }
- out := new(SelfSubjectAccessReview)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *SelfSubjectAccessReview) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SelfSubjectAccessReviewSpec) DeepCopyInto(out *SelfSubjectAccessReviewSpec) {
- *out = *in
- if in.ResourceAttributes != nil {
- in, out := &in.ResourceAttributes, &out.ResourceAttributes
- if *in == nil {
- *out = nil
- } else {
- *out = new(ResourceAttributes)
- **out = **in
- }
- }
- if in.NonResourceAttributes != nil {
- in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
- if *in == nil {
- *out = nil
- } else {
- *out = new(NonResourceAttributes)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReviewSpec.
-func (in *SelfSubjectAccessReviewSpec) DeepCopy() *SelfSubjectAccessReviewSpec {
- if in == nil {
- return nil
- }
- out := new(SelfSubjectAccessReviewSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SelfSubjectRulesReview) DeepCopyInto(out *SelfSubjectRulesReview) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- out.Spec = in.Spec
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReview.
-func (in *SelfSubjectRulesReview) DeepCopy() *SelfSubjectRulesReview {
- if in == nil {
- return nil
- }
- out := new(SelfSubjectRulesReview)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *SelfSubjectRulesReview) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SelfSubjectRulesReviewSpec) DeepCopyInto(out *SelfSubjectRulesReviewSpec) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReviewSpec.
-func (in *SelfSubjectRulesReviewSpec) DeepCopy() *SelfSubjectRulesReviewSpec {
- if in == nil {
- return nil
- }
- out := new(SelfSubjectRulesReviewSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- out.Status = in.Status
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReview.
-func (in *SubjectAccessReview) DeepCopy() *SubjectAccessReview {
- if in == nil {
- return nil
- }
- out := new(SubjectAccessReview)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *SubjectAccessReview) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SubjectAccessReviewSpec) DeepCopyInto(out *SubjectAccessReviewSpec) {
- *out = *in
- if in.ResourceAttributes != nil {
- in, out := &in.ResourceAttributes, &out.ResourceAttributes
- if *in == nil {
- *out = nil
- } else {
- *out = new(ResourceAttributes)
- **out = **in
- }
- }
- if in.NonResourceAttributes != nil {
- in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
- if *in == nil {
- *out = nil
- } else {
- *out = new(NonResourceAttributes)
- **out = **in
- }
- }
- if in.Groups != nil {
- in, out := &in.Groups, &out.Groups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Extra != nil {
- in, out := &in.Extra, &out.Extra
- *out = make(map[string]ExtraValue, len(*in))
- for key, val := range *in {
- if val == nil {
- (*out)[key] = nil
- } else {
- (*out)[key] = make([]string, len(val))
- copy((*out)[key], val)
- }
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewSpec.
-func (in *SubjectAccessReviewSpec) DeepCopy() *SubjectAccessReviewSpec {
- if in == nil {
- return nil
- }
- out := new(SubjectAccessReviewSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SubjectAccessReviewStatus) DeepCopyInto(out *SubjectAccessReviewStatus) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewStatus.
-func (in *SubjectAccessReviewStatus) DeepCopy() *SubjectAccessReviewStatus {
- if in == nil {
- return nil
- }
- out := new(SubjectAccessReviewStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SubjectRulesReviewStatus) DeepCopyInto(out *SubjectRulesReviewStatus) {
- *out = *in
- if in.ResourceRules != nil {
- in, out := &in.ResourceRules, &out.ResourceRules
- *out = make([]ResourceRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.NonResourceRules != nil {
- in, out := &in.NonResourceRules, &out.NonResourceRules
- *out = make([]NonResourceRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectRulesReviewStatus.
-func (in *SubjectRulesReviewStatus) DeepCopy() *SubjectRulesReviewStatus {
- if in == nil {
- return nil
- }
- out := new(SubjectRulesReviewStatus)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/authorization/v1beta1/doc.go b/vendor/k8s.io/api/authorization/v1beta1/doc.go
deleted file mode 100644
index ea4f802e2..000000000
--- a/vendor/k8s.io/api/authorization/v1beta1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// +groupName=authorization.k8s.io
-package v1beta1 // import "k8s.io/api/authorization/v1beta1"
diff --git a/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go b/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go
deleted file mode 100644
index a9a8116b3..000000000
--- a/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,3529 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1beta1/generated.proto
-
- It has these top-level messages:
- ExtraValue
- LocalSubjectAccessReview
- NonResourceAttributes
- NonResourceRule
- ResourceAttributes
- ResourceRule
- SelfSubjectAccessReview
- SelfSubjectAccessReviewSpec
- SelfSubjectRulesReview
- SelfSubjectRulesReviewSpec
- SubjectAccessReview
- SubjectAccessReviewSpec
- SubjectAccessReviewStatus
- SubjectRulesReviewStatus
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *ExtraValue) Reset() { *m = ExtraValue{} }
-func (*ExtraValue) ProtoMessage() {}
-func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} }
-func (*LocalSubjectAccessReview) ProtoMessage() {}
-func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{1}
-}
-
-func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} }
-func (*NonResourceAttributes) ProtoMessage() {}
-func (*NonResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *NonResourceRule) Reset() { *m = NonResourceRule{} }
-func (*NonResourceRule) ProtoMessage() {}
-func (*NonResourceRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} }
-func (*ResourceAttributes) ProtoMessage() {}
-func (*ResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *ResourceRule) Reset() { *m = ResourceRule{} }
-func (*ResourceRule) ProtoMessage() {}
-func (*ResourceRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} }
-func (*SelfSubjectAccessReview) ProtoMessage() {}
-func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} }
-func (*SelfSubjectAccessReviewSpec) ProtoMessage() {}
-func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{7}
-}
-
-func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} }
-func (*SelfSubjectRulesReview) ProtoMessage() {}
-func (*SelfSubjectRulesReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} }
-func (*SelfSubjectRulesReviewSpec) ProtoMessage() {}
-func (*SelfSubjectRulesReviewSpec) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{9}
-}
-
-func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} }
-func (*SubjectAccessReview) ProtoMessage() {}
-func (*SubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} }
-func (*SubjectAccessReviewSpec) ProtoMessage() {}
-func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{11}
-}
-
-func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} }
-func (*SubjectAccessReviewStatus) ProtoMessage() {}
-func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{12}
-}
-
-func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} }
-func (*SubjectRulesReviewStatus) ProtoMessage() {}
-func (*SubjectRulesReviewStatus) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{13}
-}
-
-func init() {
- proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.authorization.v1beta1.ExtraValue")
- proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.api.authorization.v1beta1.LocalSubjectAccessReview")
- proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.api.authorization.v1beta1.NonResourceAttributes")
- proto.RegisterType((*NonResourceRule)(nil), "k8s.io.api.authorization.v1beta1.NonResourceRule")
- proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.api.authorization.v1beta1.ResourceAttributes")
- proto.RegisterType((*ResourceRule)(nil), "k8s.io.api.authorization.v1beta1.ResourceRule")
- proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.api.authorization.v1beta1.SelfSubjectAccessReview")
- proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.api.authorization.v1beta1.SelfSubjectAccessReviewSpec")
- proto.RegisterType((*SelfSubjectRulesReview)(nil), "k8s.io.api.authorization.v1beta1.SelfSubjectRulesReview")
- proto.RegisterType((*SelfSubjectRulesReviewSpec)(nil), "k8s.io.api.authorization.v1beta1.SelfSubjectRulesReviewSpec")
- proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.api.authorization.v1beta1.SubjectAccessReview")
- proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.api.authorization.v1beta1.SubjectAccessReviewSpec")
- proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.api.authorization.v1beta1.SubjectAccessReviewStatus")
- proto.RegisterType((*SubjectRulesReviewStatus)(nil), "k8s.io.api.authorization.v1beta1.SubjectRulesReviewStatus")
-}
-func (m ExtraValue) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m) > 0 {
- for _, s := range m {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *LocalSubjectAccessReview) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *LocalSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *NonResourceAttributes) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NonResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
- i += copy(dAtA[i:], m.Path)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
- i += copy(dAtA[i:], m.Verb)
- return i, nil
-}
-
-func (m *NonResourceRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NonResourceRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *ResourceAttributes) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i += copy(dAtA[i:], m.Namespace)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
- i += copy(dAtA[i:], m.Verb)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
- i += copy(dAtA[i:], m.Group)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version)))
- i += copy(dAtA[i:], m.Version)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
- i += copy(dAtA[i:], m.Resource)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource)))
- i += copy(dAtA[i:], m.Subresource)
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- return i, nil
-}
-
-func (m *ResourceRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *SelfSubjectAccessReview) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SelfSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n5, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n6, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- return i, nil
-}
-
-func (m *SelfSubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SelfSubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.ResourceAttributes != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
- n7, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- }
- if m.NonResourceAttributes != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
- n8, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- }
- return i, nil
-}
-
-func (m *SelfSubjectRulesReview) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SelfSubjectRulesReview) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n10, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n11, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- return i, nil
-}
-
-func (m *SelfSubjectRulesReviewSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SelfSubjectRulesReviewSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i += copy(dAtA[i:], m.Namespace)
- return i, nil
-}
-
-func (m *SubjectAccessReview) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n12, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n13, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n14, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n14
- return i, nil
-}
-
-func (m *SubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.ResourceAttributes != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
- n15, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n15
- }
- if m.NonResourceAttributes != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
- n16, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n16
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
- i += copy(dAtA[i:], m.User)
- if len(m.Groups) > 0 {
- for _, s := range m.Groups {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Extra) > 0 {
- keysForExtra := make([]string, 0, len(m.Extra))
- for k := range m.Extra {
- keysForExtra = append(keysForExtra, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
- for _, k := range keysForExtra {
- dAtA[i] = 0x2a
- i++
- v := m.Extra[string(k)]
- msgSize := 0
- if (&v) != nil {
- msgSize = (&v).Size()
- msgSize += 1 + sovGenerated(uint64(msgSize))
- }
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
- n17, err := (&v).MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n17
- }
- }
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
- i += copy(dAtA[i:], m.UID)
- return i, nil
-}
-
-func (m *SubjectAccessReviewStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SubjectAccessReviewStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- if m.Allowed {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError)))
- i += copy(dAtA[i:], m.EvaluationError)
- dAtA[i] = 0x20
- i++
- if m.Denied {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- return i, nil
-}
-
-func (m *SubjectRulesReviewStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SubjectRulesReviewStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ResourceRules) > 0 {
- for _, msg := range m.ResourceRules {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.NonResourceRules) > 0 {
- for _, msg := range m.NonResourceRules {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x18
- i++
- if m.Incomplete {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError)))
- i += copy(dAtA[i:], m.EvaluationError)
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m ExtraValue) Size() (n int) {
- var l int
- _ = l
- if len(m) > 0 {
- for _, s := range m {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *LocalSubjectAccessReview) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *NonResourceAttributes) Size() (n int) {
- var l int
- _ = l
- l = len(m.Path)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Verb)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *NonResourceRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ResourceAttributes) Size() (n int) {
- var l int
- _ = l
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Verb)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Group)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Version)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Resource)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Subresource)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourceRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *SelfSubjectAccessReview) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SelfSubjectAccessReviewSpec) Size() (n int) {
- var l int
- _ = l
- if m.ResourceAttributes != nil {
- l = m.ResourceAttributes.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.NonResourceAttributes != nil {
- l = m.NonResourceAttributes.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *SelfSubjectRulesReview) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SelfSubjectRulesReviewSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SubjectAccessReview) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SubjectAccessReviewSpec) Size() (n int) {
- var l int
- _ = l
- if m.ResourceAttributes != nil {
- l = m.ResourceAttributes.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.NonResourceAttributes != nil {
- l = m.NonResourceAttributes.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = len(m.User)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Groups) > 0 {
- for _, s := range m.Groups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Extra) > 0 {
- for k, v := range m.Extra {
- _ = k
- _ = v
- l = v.Size()
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- l = len(m.UID)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SubjectAccessReviewStatus) Size() (n int) {
- var l int
- _ = l
- n += 2
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.EvaluationError)
- n += 1 + l + sovGenerated(uint64(l))
- n += 2
- return n
-}
-
-func (m *SubjectRulesReviewStatus) Size() (n int) {
- var l int
- _ = l
- if len(m.ResourceRules) > 0 {
- for _, e := range m.ResourceRules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.NonResourceRules) > 0 {
- for _, e := range m.NonResourceRules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- n += 2
- l = len(m.EvaluationError)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *LocalSubjectAccessReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&LocalSubjectAccessReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NonResourceAttributes) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NonResourceAttributes{`,
- `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
- `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NonResourceRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NonResourceRule{`,
- `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
- `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceAttributes) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceAttributes{`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
- `Group:` + fmt.Sprintf("%v", this.Group) + `,`,
- `Version:` + fmt.Sprintf("%v", this.Version) + `,`,
- `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
- `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceRule{`,
- `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
- `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
- `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
- `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SelfSubjectAccessReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SelfSubjectAccessReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SelfSubjectAccessReviewSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SelfSubjectAccessReviewSpec{`,
- `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
- `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SelfSubjectRulesReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SelfSubjectRulesReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectRulesReviewSpec", "SelfSubjectRulesReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectRulesReviewStatus", "SubjectRulesReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SelfSubjectRulesReviewSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SelfSubjectRulesReviewSpec{`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SubjectAccessReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SubjectAccessReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SubjectAccessReviewSpec) String() string {
- if this == nil {
- return "nil"
- }
- keysForExtra := make([]string, 0, len(this.Extra))
- for k := range this.Extra {
- keysForExtra = append(keysForExtra, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
- mapStringForExtra := "map[string]ExtraValue{"
- for _, k := range keysForExtra {
- mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
- }
- mapStringForExtra += "}"
- s := strings.Join([]string{`&SubjectAccessReviewSpec{`,
- `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
- `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
- `User:` + fmt.Sprintf("%v", this.User) + `,`,
- `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
- `Extra:` + mapStringForExtra + `,`,
- `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SubjectAccessReviewStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SubjectAccessReviewStatus{`,
- `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`,
- `Denied:` + fmt.Sprintf("%v", this.Denied) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SubjectRulesReviewStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SubjectRulesReviewStatus{`,
- `ResourceRules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResourceRules), "ResourceRule", "ResourceRule", 1), `&`, ``, 1) + `,`,
- `NonResourceRules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NonResourceRules), "NonResourceRule", "NonResourceRule", 1), `&`, ``, 1) + `,`,
- `Incomplete:` + fmt.Sprintf("%v", this.Incomplete) + `,`,
- `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *ExtraValue) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- *m = append(*m, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *LocalSubjectAccessReview) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: LocalSubjectAccessReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: LocalSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NonResourceAttributes) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NonResourceAttributes: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NonResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Path = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verb = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NonResourceRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NonResourceRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NonResourceRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceAttributes) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceAttributes: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Namespace = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verb = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Group = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Version = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resource = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Subresource = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SelfSubjectAccessReview) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SelfSubjectAccessReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SelfSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SelfSubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.ResourceAttributes == nil {
- m.ResourceAttributes = &ResourceAttributes{}
- }
- if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NonResourceAttributes == nil {
- m.NonResourceAttributes = &NonResourceAttributes{}
- }
- if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SelfSubjectRulesReview) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SelfSubjectRulesReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SelfSubjectRulesReview: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SelfSubjectRulesReviewSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SelfSubjectRulesReviewSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SelfSubjectRulesReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Namespace = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SubjectAccessReview) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SubjectAccessReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SubjectAccessReviewSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.ResourceAttributes == nil {
- m.ResourceAttributes = &ResourceAttributes{}
- }
- if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NonResourceAttributes == nil {
- m.NonResourceAttributes = &NonResourceAttributes{}
- }
- if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.User = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.Extra == nil {
- m.Extra = make(map[string]ExtraValue)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapmsglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postmsgIndex := iNdEx + mapmsglen
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := &ExtraValue{}
- if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- m.Extra[mapkey] = *mapvalue
- } else {
- var mapvalue ExtraValue
- m.Extra[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UID = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SubjectAccessReviewStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SubjectAccessReviewStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SubjectAccessReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Allowed = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.EvaluationError = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Denied", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Denied = bool(v != 0)
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SubjectRulesReviewStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SubjectRulesReviewStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SubjectRulesReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceRules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ResourceRules = append(m.ResourceRules, ResourceRule{})
- if err := m.ResourceRules[len(m.ResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceRules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NonResourceRules = append(m.NonResourceRules, NonResourceRule{})
- if err := m.NonResourceRules[len(m.NonResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Incomplete", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Incomplete = bool(v != 0)
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.EvaluationError = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 1154 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x6f, 0x1b, 0xc5,
- 0x1b, 0xf7, 0xfa, 0x25, 0xb1, 0xc7, 0xcd, 0x3f, 0xe9, 0x44, 0x69, 0xb6, 0xf9, 0x0b, 0xdb, 0x32,
- 0x12, 0x0a, 0xa2, 0xdd, 0x25, 0xa1, 0x90, 0x12, 0xe8, 0x21, 0x56, 0x22, 0x14, 0xa9, 0x2d, 0xd5,
- 0x44, 0xc9, 0x81, 0x4a, 0xc0, 0x78, 0x3d, 0xb1, 0x17, 0xdb, 0xbb, 0xcb, 0xcc, 0xac, 0x43, 0x10,
- 0x87, 0x1e, 0x39, 0x72, 0xe4, 0xc8, 0x89, 0xef, 0xc0, 0x05, 0x09, 0x4e, 0x39, 0xf6, 0x18, 0x24,
- 0x64, 0x91, 0xe5, 0x43, 0x70, 0x45, 0x33, 0x3b, 0xf6, 0xae, 0xe3, 0x75, 0x1c, 0xe7, 0x40, 0x2f,
- 0xbd, 0xed, 0x3c, 0xbf, 0xe7, 0x6d, 0x9e, 0x97, 0xd9, 0x1f, 0xd8, 0x6f, 0x3f, 0x64, 0x86, 0xed,
- 0x9a, 0x6d, 0xbf, 0x4e, 0xa8, 0x43, 0x38, 0x61, 0x66, 0x8f, 0x38, 0x0d, 0x97, 0x9a, 0x0a, 0xc0,
- 0x9e, 0x6d, 0x62, 0x9f, 0xb7, 0x5c, 0x6a, 0x7f, 0x8b, 0xb9, 0xed, 0x3a, 0x66, 0x6f, 0xa3, 0x4e,
- 0x38, 0xde, 0x30, 0x9b, 0xc4, 0x21, 0x14, 0x73, 0xd2, 0x30, 0x3c, 0xea, 0x72, 0x17, 0x56, 0x42,
- 0x0b, 0x03, 0x7b, 0xb6, 0x31, 0x62, 0x61, 0x28, 0x8b, 0xb5, 0xfb, 0x4d, 0x9b, 0xb7, 0xfc, 0xba,
- 0x61, 0xb9, 0x5d, 0xb3, 0xe9, 0x36, 0x5d, 0x53, 0x1a, 0xd6, 0xfd, 0x63, 0x79, 0x92, 0x07, 0xf9,
- 0x15, 0x3a, 0x5c, 0x7b, 0x10, 0xa5, 0xd0, 0xc5, 0x56, 0xcb, 0x76, 0x08, 0x3d, 0x35, 0xbd, 0x76,
- 0x53, 0x08, 0x98, 0xd9, 0x25, 0x1c, 0x9b, 0xbd, 0xb1, 0x34, 0xd6, 0xcc, 0x49, 0x56, 0xd4, 0x77,
- 0xb8, 0xdd, 0x25, 0x63, 0x06, 0x1f, 0x4c, 0x33, 0x60, 0x56, 0x8b, 0x74, 0xf1, 0x98, 0xdd, 0x7b,
- 0x93, 0xec, 0x7c, 0x6e, 0x77, 0x4c, 0xdb, 0xe1, 0x8c, 0xd3, 0xcb, 0x46, 0xd5, 0x2d, 0x00, 0xf6,
- 0xbe, 0xe1, 0x14, 0x1f, 0xe1, 0x8e, 0x4f, 0x60, 0x19, 0xe4, 0x6c, 0x4e, 0xba, 0x4c, 0xd7, 0x2a,
- 0x99, 0xf5, 0x42, 0xad, 0x10, 0xf4, 0xcb, 0xb9, 0x7d, 0x21, 0x40, 0xa1, 0x7c, 0x3b, 0xff, 0xe3,
- 0x4f, 0xe5, 0xd4, 0x8b, 0x3f, 0x2b, 0xa9, 0xea, 0xaf, 0x69, 0xa0, 0x3f, 0x76, 0x2d, 0xdc, 0x39,
- 0xf0, 0xeb, 0x5f, 0x11, 0x8b, 0xef, 0x58, 0x16, 0x61, 0x0c, 0x91, 0x9e, 0x4d, 0x4e, 0xe0, 0x97,
- 0x20, 0x2f, 0xca, 0xd1, 0xc0, 0x1c, 0xeb, 0x5a, 0x45, 0x5b, 0x2f, 0x6e, 0xbe, 0x6b, 0x44, 0xdd,
- 0x18, 0x66, 0x67, 0x78, 0xed, 0xa6, 0x10, 0x30, 0x43, 0x68, 0x1b, 0xbd, 0x0d, 0xe3, 0x53, 0xe9,
- 0xeb, 0x09, 0xe1, 0xb8, 0x06, 0xcf, 0xfa, 0xe5, 0x54, 0xd0, 0x2f, 0x83, 0x48, 0x86, 0x86, 0x5e,
- 0xe1, 0x73, 0x90, 0x65, 0x1e, 0xb1, 0xf4, 0xb4, 0xf4, 0xfe, 0xa1, 0x31, 0xad, 0xd7, 0x46, 0x42,
- 0x9a, 0x07, 0x1e, 0xb1, 0x6a, 0xb7, 0x54, 0x98, 0xac, 0x38, 0x21, 0xe9, 0x14, 0x5a, 0x60, 0x8e,
- 0x71, 0xcc, 0x7d, 0xa6, 0x67, 0xa4, 0xfb, 0x8f, 0x6e, 0xe6, 0x5e, 0xba, 0xa8, 0xfd, 0x4f, 0x05,
- 0x98, 0x0b, 0xcf, 0x48, 0xb9, 0xae, 0x3e, 0x07, 0x2b, 0x4f, 0x5d, 0x07, 0x11, 0xe6, 0xfa, 0xd4,
- 0x22, 0x3b, 0x9c, 0x53, 0xbb, 0xee, 0x73, 0xc2, 0x60, 0x05, 0x64, 0x3d, 0xcc, 0x5b, 0xb2, 0x70,
- 0x85, 0x28, 0xbf, 0x67, 0x98, 0xb7, 0x90, 0x44, 0x84, 0x46, 0x8f, 0xd0, 0xba, 0xbc, 0x7c, 0x4c,
- 0xe3, 0x88, 0xd0, 0x3a, 0x92, 0x48, 0xf5, 0x6b, 0xb0, 0x18, 0x73, 0x8e, 0xfc, 0x8e, 0xec, 0xad,
- 0x80, 0x46, 0x7a, 0x2b, 0x2c, 0x18, 0x0a, 0xe5, 0xf0, 0x11, 0x58, 0x74, 0x22, 0x9b, 0x43, 0xf4,
- 0x98, 0xe9, 0x69, 0xa9, 0xba, 0x1c, 0xf4, 0xcb, 0x71, 0x77, 0x02, 0x42, 0x97, 0x75, 0xc5, 0x40,
- 0xc0, 0x84, 0xdb, 0x98, 0xa0, 0xe0, 0xe0, 0x2e, 0x61, 0x1e, 0xb6, 0x88, 0xba, 0xd2, 0x6d, 0x95,
- 0x70, 0xe1, 0xe9, 0x00, 0x40, 0x91, 0xce, 0xf4, 0xcb, 0xc1, 0x37, 0x41, 0xae, 0x49, 0x5d, 0xdf,
- 0x93, 0xdd, 0x29, 0xd4, 0x16, 0x94, 0x4a, 0xee, 0x13, 0x21, 0x44, 0x21, 0x06, 0xdf, 0x06, 0xf3,
- 0x3d, 0x42, 0x99, 0xed, 0x3a, 0x7a, 0x56, 0xaa, 0x2d, 0x2a, 0xb5, 0xf9, 0xa3, 0x50, 0x8c, 0x06,
- 0x38, 0xbc, 0x07, 0xf2, 0x54, 0x25, 0xae, 0xe7, 0xa4, 0xee, 0x92, 0xd2, 0xcd, 0x0f, 0x2b, 0x38,
- 0xd4, 0x80, 0xef, 0x83, 0x22, 0xf3, 0xeb, 0x43, 0x83, 0x39, 0x69, 0xb0, 0xac, 0x0c, 0x8a, 0x07,
- 0x11, 0x84, 0xe2, 0x7a, 0xe2, 0x5a, 0xe2, 0x8e, 0xfa, 0xfc, 0xe8, 0xb5, 0x44, 0x09, 0x90, 0x44,
- 0xaa, 0xbf, 0x6b, 0xe0, 0xd6, 0x6c, 0x1d, 0x7b, 0x07, 0x14, 0xb0, 0x67, 0xcb, 0x6b, 0x0f, 0x7a,
- 0xb5, 0x20, 0xea, 0xba, 0xf3, 0x6c, 0x3f, 0x14, 0xa2, 0x08, 0x17, 0xca, 0x83, 0x64, 0xc4, 0x5c,
- 0x0f, 0x95, 0x07, 0x21, 0x19, 0x8a, 0x70, 0xb8, 0x05, 0x16, 0x06, 0x07, 0xd9, 0x24, 0x3d, 0x2b,
- 0x0d, 0x6e, 0x07, 0xfd, 0xf2, 0x02, 0x8a, 0x03, 0x68, 0x54, 0xaf, 0xfa, 0x5b, 0x1a, 0xac, 0x1e,
- 0x90, 0xce, 0xf1, 0xab, 0x79, 0x15, 0xbe, 0x18, 0x79, 0x15, 0x1e, 0x5d, 0x63, 0x6d, 0x93, 0x53,
- 0x7d, 0xb5, 0x2f, 0xc3, 0xcf, 0x69, 0xf0, 0xff, 0x2b, 0x12, 0x83, 0xdf, 0x01, 0x48, 0xc7, 0x16,
- 0x4d, 0x55, 0xf4, 0xc1, 0xf4, 0x84, 0xc6, 0x97, 0xb4, 0x76, 0x27, 0xe8, 0x97, 0x13, 0x96, 0x17,
- 0x25, 0xc4, 0x81, 0xdf, 0x6b, 0x60, 0xc5, 0x49, 0x7a, 0xb8, 0x54, 0xd5, 0xb7, 0xa6, 0x67, 0x90,
- 0xf8, 0xee, 0xd5, 0xee, 0x06, 0xfd, 0x72, 0xf2, 0x93, 0x88, 0x92, 0x03, 0x8a, 0x27, 0xe7, 0x4e,
- 0xac, 0x50, 0x62, 0x69, 0xfe, 0xbb, 0x59, 0xfb, 0x7c, 0x64, 0xd6, 0x3e, 0x9e, 0x69, 0xd6, 0x62,
- 0x99, 0x4e, 0x1c, 0xb5, 0xfa, 0xa5, 0x51, 0xdb, 0xbe, 0xf6, 0xa8, 0xc5, 0xbd, 0x5f, 0x3d, 0x69,
- 0x4f, 0xc0, 0xda, 0xe4, 0xac, 0x66, 0x7e, 0xba, 0xab, 0xbf, 0xa4, 0xc1, 0xf2, 0x6b, 0x3a, 0x70,
- 0xb3, 0xa5, 0x3f, 0xcf, 0x82, 0xd5, 0xd7, 0x0b, 0x7f, 0xf5, 0xc2, 0x8b, 0x9f, 0xa8, 0xcf, 0x08,
- 0x55, 0x3f, 0xfe, 0x61, 0xaf, 0x0e, 0x19, 0xa1, 0x48, 0x22, 0xb0, 0x32, 0xe0, 0x06, 0xe1, 0x0f,
- 0x0b, 0x88, 0x4a, 0xab, 0x7f, 0xa1, 0x22, 0x06, 0x36, 0xc8, 0x11, 0xc1, 0x78, 0xf5, 0x5c, 0x25,
- 0xb3, 0x5e, 0xdc, 0xdc, 0xbd, 0xf1, 0xac, 0x18, 0x92, 0x38, 0xef, 0x39, 0x9c, 0x9e, 0x46, 0x1c,
- 0x44, 0xca, 0x50, 0x18, 0x01, 0xbe, 0x01, 0x32, 0xbe, 0xdd, 0x50, 0x14, 0xa1, 0xa8, 0x54, 0x32,
- 0x87, 0xfb, 0xbb, 0x48, 0xc8, 0xd7, 0x8e, 0x15, 0xf7, 0x96, 0x2e, 0xe0, 0x12, 0xc8, 0xb4, 0xc9,
- 0x69, 0xb8, 0x67, 0x48, 0x7c, 0xc2, 0x1a, 0xc8, 0xf5, 0x04, 0x2d, 0x57, 0x75, 0xbe, 0x37, 0x3d,
- 0xd3, 0x88, 0xca, 0xa3, 0xd0, 0x74, 0x3b, 0xfd, 0x50, 0xab, 0xfe, 0xa1, 0x81, 0xbb, 0x13, 0x07,
- 0x52, 0x10, 0x25, 0xdc, 0xe9, 0xb8, 0x27, 0xa4, 0x21, 0x63, 0xe7, 0x23, 0xa2, 0xb4, 0x13, 0x8a,
- 0xd1, 0x00, 0x87, 0x6f, 0x81, 0x39, 0x4a, 0x30, 0x73, 0x1d, 0x45, 0xce, 0x86, 0xb3, 0x8c, 0xa4,
- 0x14, 0x29, 0x14, 0xee, 0x80, 0x45, 0x22, 0xc2, 0xcb, 0xe4, 0xf6, 0x28, 0x75, 0x07, 0x1d, 0x5b,
- 0x55, 0x06, 0x8b, 0x7b, 0xa3, 0x30, 0xba, 0xac, 0x2f, 0x42, 0x35, 0x88, 0x63, 0x93, 0x86, 0x64,
- 0x6f, 0xf9, 0x28, 0xd4, 0xae, 0x94, 0x22, 0x85, 0x56, 0xff, 0x49, 0x03, 0x7d, 0xd2, 0xb3, 0x07,
- 0xdb, 0x11, 0x8b, 0x91, 0xa0, 0x24, 0x52, 0xc5, 0x4d, 0xe3, 0xfa, 0x2b, 0x23, 0xcc, 0x6a, 0x2b,
- 0x2a, 0xf6, 0x42, 0x5c, 0x1a, 0x63, 0x3e, 0xf2, 0x08, 0x4f, 0xc0, 0x92, 0x33, 0x4a, 0xb9, 0x43,
- 0x4e, 0x56, 0xdc, 0xdc, 0x98, 0x69, 0x41, 0x64, 0x48, 0x5d, 0x85, 0x5c, 0xba, 0x04, 0x30, 0x34,
- 0x16, 0x04, 0x6e, 0x02, 0x60, 0x3b, 0x96, 0xdb, 0xf5, 0x3a, 0x84, 0x13, 0x59, 0xe8, 0x7c, 0xf4,
- 0x5a, 0xee, 0x0f, 0x11, 0x14, 0xd3, 0x4a, 0xea, 0x50, 0x76, 0xb6, 0x0e, 0xd5, 0xee, 0x9f, 0x5d,
- 0x94, 0x52, 0x2f, 0x2f, 0x4a, 0xa9, 0xf3, 0x8b, 0x52, 0xea, 0x45, 0x50, 0xd2, 0xce, 0x82, 0x92,
- 0xf6, 0x32, 0x28, 0x69, 0xe7, 0x41, 0x49, 0xfb, 0x2b, 0x28, 0x69, 0x3f, 0xfc, 0x5d, 0x4a, 0x7d,
- 0x36, 0xaf, 0x6e, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, 0xb3, 0x5e, 0x05, 0xd9, 0x0f,
- 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/authorization/v1beta1/generated.proto b/vendor/k8s.io/api/authorization/v1beta1/generated.proto
deleted file mode 100644
index b64c0642c..000000000
--- a/vendor/k8s.io/api/authorization/v1beta1/generated.proto
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.authorization.v1beta1;
-
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// ExtraValue masks the value so protobuf can generate
-// +protobuf.nullable=true
-// +protobuf.options.(gogoproto.goproto_stringer)=false
-message ExtraValue {
- // items, if empty, will result in an empty slice
-
- repeated string items = 1;
-}
-
-// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
-// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
-// checking.
-message LocalSubjectAccessReview {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
- // you made the request against. If empty, it is defaulted.
- optional SubjectAccessReviewSpec spec = 2;
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- optional SubjectAccessReviewStatus status = 3;
-}
-
-// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
-message NonResourceAttributes {
- // Path is the URL path of the request
- // +optional
- optional string path = 1;
-
- // Verb is the standard HTTP verb
- // +optional
- optional string verb = 2;
-}
-
-// NonResourceRule holds information that describes a rule for the non-resource
-message NonResourceRule {
- // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all.
- repeated string verbs = 1;
-
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full,
- // final step in the path. "*" means all.
- // +optional
- repeated string nonResourceURLs = 2;
-}
-
-// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
-message ResourceAttributes {
- // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
- // "" (empty) is defaulted for LocalSubjectAccessReviews
- // "" (empty) is empty for cluster-scoped resources
- // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
- // +optional
- optional string namespace = 1;
-
- // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
- // +optional
- optional string verb = 2;
-
- // Group is the API Group of the Resource. "*" means all.
- // +optional
- optional string group = 3;
-
- // Version is the API Version of the Resource. "*" means all.
- // +optional
- optional string version = 4;
-
- // Resource is one of the existing resource types. "*" means all.
- // +optional
- optional string resource = 5;
-
- // Subresource is one of the existing resource types. "" means none.
- // +optional
- optional string subresource = 6;
-
- // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
- // +optional
- optional string name = 7;
-}
-
-// ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant,
-// may contain duplicates, and possibly be incomplete.
-message ResourceRule {
- // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.
- repeated string verbs = 1;
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed. "*" means all.
- // +optional
- repeated string apiGroups = 2;
-
- // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups.
- // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups.
- // +optional
- repeated string resources = 3;
-
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.
- // +optional
- repeated string resourceNames = 4;
-}
-
-// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
-// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
-// to check whether they can perform an action
-message SelfSubjectAccessReview {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the request being evaluated. user and groups must be empty
- optional SelfSubjectAccessReviewSpec spec = 2;
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- optional SubjectAccessReviewStatus status = 3;
-}
-
-// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
-// and NonResourceAuthorizationAttributes must be set
-message SelfSubjectAccessReviewSpec {
- // ResourceAuthorizationAttributes describes information for a resource access request
- // +optional
- optional ResourceAttributes resourceAttributes = 1;
-
- // NonResourceAttributes describes information for a non-resource access request
- // +optional
- optional NonResourceAttributes nonResourceAttributes = 2;
-}
-
-// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace.
-// The returned list of actions may be incomplete depending on the server's authorization mode,
-// and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions,
-// or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to
-// drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns.
-// SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.
-message SelfSubjectRulesReview {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the request being evaluated.
- optional SelfSubjectRulesReviewSpec spec = 2;
-
- // Status is filled in by the server and indicates the set of actions a user can perform.
- // +optional
- optional SubjectRulesReviewStatus status = 3;
-}
-
-message SelfSubjectRulesReviewSpec {
- // Namespace to evaluate rules for. Required.
- optional string namespace = 1;
-}
-
-// SubjectAccessReview checks whether or not a user or group can perform an action.
-message SubjectAccessReview {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the request being evaluated
- optional SubjectAccessReviewSpec spec = 2;
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- optional SubjectAccessReviewStatus status = 3;
-}
-
-// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
-// and NonResourceAuthorizationAttributes must be set
-message SubjectAccessReviewSpec {
- // ResourceAuthorizationAttributes describes information for a resource access request
- // +optional
- optional ResourceAttributes resourceAttributes = 1;
-
- // NonResourceAttributes describes information for a non-resource access request
- // +optional
- optional NonResourceAttributes nonResourceAttributes = 2;
-
- // User is the user you're testing for.
- // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
- // +optional
- optional string user = 3;
-
- // Groups is the groups you're testing for.
- // +optional
- repeated string group = 4;
-
- // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
- // it needs a reflection here.
- // +optional
- map<string, ExtraValue> extra = 5;
-
- // UID information about the requesting user.
- // +optional
- optional string uid = 6;
-}
-
-// SubjectAccessReviewStatus
-message SubjectAccessReviewStatus {
- // Allowed is required. True if the action would be allowed, false otherwise.
- optional bool allowed = 1;
-
- // Denied is optional. True if the action would be denied, otherwise
- // false. If both allowed is false and denied is false, then the
- // authorizer has no opinion on whether to authorize the action. Denied
- // may not be true if Allowed is true.
- // +optional
- optional bool denied = 4;
-
- // Reason is optional. It indicates why a request was allowed or denied.
- // +optional
- optional string reason = 2;
-
- // EvaluationError is an indication that some error occurred during the authorization check.
- // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
- // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
- // +optional
- optional string evaluationError = 3;
-}
-
-// SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on
-// the set of authorizers the server is configured with and any errors experienced during evaluation.
-// Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission,
-// even if that list is incomplete.
-message SubjectRulesReviewStatus {
- // ResourceRules is the list of actions the subject is allowed to perform on resources.
- // The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
- repeated ResourceRule resourceRules = 1;
-
- // NonResourceRules is the list of actions the subject is allowed to perform on non-resources.
- // The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
- repeated NonResourceRule nonResourceRules = 2;
-
- // Incomplete is true when the rules returned by this call are incomplete. This is most commonly
- // encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.
- optional bool incomplete = 3;
-
- // EvaluationError can appear in combination with Rules. It indicates an error occurred during
- // rule evaluation, such as an authorizer that doesn't support rule evaluation, and that
- // ResourceRules and/or NonResourceRules may be incomplete.
- // +optional
- optional string evaluationError = 4;
-}
-
diff --git a/vendor/k8s.io/api/authorization/v1beta1/register.go b/vendor/k8s.io/api/authorization/v1beta1/register.go
deleted file mode 100644
index 84255dd6c..000000000
--- a/vendor/k8s.io/api/authorization/v1beta1/register.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Copyright 2015 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "authorization.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &SelfSubjectRulesReview{},
- &SelfSubjectAccessReview{},
- &SubjectAccessReview{},
- &LocalSubjectAccessReview{},
- )
-
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/authorization/v1beta1/types.go b/vendor/k8s.io/api/authorization/v1beta1/types.go
deleted file mode 100644
index 618ff8c0f..000000000
--- a/vendor/k8s.io/api/authorization/v1beta1/types.go
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
-Copyright 2015 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 v1beta1
-
-import (
- "fmt"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// SubjectAccessReview checks whether or not a user or group can perform an action.
-type SubjectAccessReview struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the request being evaluated
- Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
-// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
-// to check whether they can perform an action
-type SelfSubjectAccessReview struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the request being evaluated. user and groups must be empty
- Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +genclient
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
-// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
-// checking.
-type LocalSubjectAccessReview struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
- // you made the request against. If empty, it is defaulted.
- Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the server and indicates whether the request is allowed or not
- // +optional
- Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
-type ResourceAttributes struct {
- // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
- // "" (empty) is defaulted for LocalSubjectAccessReviews
- // "" (empty) is empty for cluster-scoped resources
- // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
- // +optional
- Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
- // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
- // +optional
- Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
- // Group is the API Group of the Resource. "*" means all.
- // +optional
- Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
- // Version is the API Version of the Resource. "*" means all.
- // +optional
- Version string `json:"version,omitempty" protobuf:"bytes,4,opt,name=version"`
- // Resource is one of the existing resource types. "*" means all.
- // +optional
- Resource string `json:"resource,omitempty" protobuf:"bytes,5,opt,name=resource"`
- // Subresource is one of the existing resource types. "" means none.
- // +optional
- Subresource string `json:"subresource,omitempty" protobuf:"bytes,6,opt,name=subresource"`
- // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
- // +optional
- Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"`
-}
-
-// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
-type NonResourceAttributes struct {
- // Path is the URL path of the request
- // +optional
- Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
- // Verb is the standard HTTP verb
- // +optional
- Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
-}
-
-// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
-// and NonResourceAuthorizationAttributes must be set
-type SubjectAccessReviewSpec struct {
- // ResourceAuthorizationAttributes describes information for a resource access request
- // +optional
- ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
- // NonResourceAttributes describes information for a non-resource access request
- // +optional
- NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
-
- // User is the user you're testing for.
- // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
- // +optional
- User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"`
- // Groups is the groups you're testing for.
- // +optional
- Groups []string `json:"group,omitempty" protobuf:"bytes,4,rep,name=group"`
- // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
- // it needs a reflection here.
- // +optional
- Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"`
- // UID information about the requesting user.
- // +optional
- UID string `json:"uid,omitempty" protobuf:"bytes,6,opt,name=uid"`
-}
-
-// ExtraValue masks the value so protobuf can generate
-// +protobuf.nullable=true
-// +protobuf.options.(gogoproto.goproto_stringer)=false
-type ExtraValue []string
-
-func (t ExtraValue) String() string {
- return fmt.Sprintf("%v", []string(t))
-}
-
-// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
-// and NonResourceAuthorizationAttributes must be set
-type SelfSubjectAccessReviewSpec struct {
- // ResourceAuthorizationAttributes describes information for a resource access request
- // +optional
- ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
- // NonResourceAttributes describes information for a non-resource access request
- // +optional
- NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
-}
-
-// SubjectAccessReviewStatus
-type SubjectAccessReviewStatus struct {
- // Allowed is required. True if the action would be allowed, false otherwise.
- Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"`
- // Denied is optional. True if the action would be denied, otherwise
- // false. If both allowed is false and denied is false, then the
- // authorizer has no opinion on whether to authorize the action. Denied
- // may not be true if Allowed is true.
- // +optional
- Denied bool `json:"denied,omitempty" protobuf:"varint,4,opt,name=denied"`
- // Reason is optional. It indicates why a request was allowed or denied.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
- // EvaluationError is an indication that some error occurred during the authorization check.
- // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
- // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
- // +optional
- EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,3,opt,name=evaluationError"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace.
-// The returned list of actions may be incomplete depending on the server's authorization mode,
-// and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions,
-// or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to
-// drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns.
-// SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.
-type SelfSubjectRulesReview struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the request being evaluated.
- Spec SelfSubjectRulesReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the server and indicates the set of actions a user can perform.
- // +optional
- Status SubjectRulesReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-type SelfSubjectRulesReviewSpec struct {
- // Namespace to evaluate rules for. Required.
- Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
-}
-
-// SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on
-// the set of authorizers the server is configured with and any errors experienced during evaluation.
-// Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission,
-// even if that list is incomplete.
-type SubjectRulesReviewStatus struct {
- // ResourceRules is the list of actions the subject is allowed to perform on resources.
- // The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
- ResourceRules []ResourceRule `json:"resourceRules" protobuf:"bytes,1,rep,name=resourceRules"`
- // NonResourceRules is the list of actions the subject is allowed to perform on non-resources.
- // The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
- NonResourceRules []NonResourceRule `json:"nonResourceRules" protobuf:"bytes,2,rep,name=nonResourceRules"`
- // Incomplete is true when the rules returned by this call are incomplete. This is most commonly
- // encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.
- Incomplete bool `json:"incomplete" protobuf:"bytes,3,rep,name=incomplete"`
- // EvaluationError can appear in combination with Rules. It indicates an error occurred during
- // rule evaluation, such as an authorizer that doesn't support rule evaluation, and that
- // ResourceRules and/or NonResourceRules may be incomplete.
- // +optional
- EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,4,opt,name=evaluationError"`
-}
-
-// ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant,
-// may contain duplicates, and possibly be incomplete.
-type ResourceRule struct {
- // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.
- Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed. "*" means all.
- // +optional
- APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"`
- // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups.
- // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups.
- // +optional
- Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.
- // +optional
- ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,4,rep,name=resourceNames"`
-}
-
-// NonResourceRule holds information that describes a rule for the non-resource
-type NonResourceRule struct {
- // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all.
- Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
-
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full,
- // final step in the path. "*" means all.
- // +optional
- NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,2,rep,name=nonResourceURLs"`
-}
diff --git a/vendor/k8s.io/api/authorization/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/authorization/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 2371b21c6..000000000
--- a/vendor/k8s.io/api/authorization/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_LocalSubjectAccessReview = map[string]string{
- "": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.",
- "spec": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.",
- "status": "Status is filled in by the server and indicates whether the request is allowed or not",
-}
-
-func (LocalSubjectAccessReview) SwaggerDoc() map[string]string {
- return map_LocalSubjectAccessReview
-}
-
-var map_NonResourceAttributes = map[string]string{
- "": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface",
- "path": "Path is the URL path of the request",
- "verb": "Verb is the standard HTTP verb",
-}
-
-func (NonResourceAttributes) SwaggerDoc() map[string]string {
- return map_NonResourceAttributes
-}
-
-var map_NonResourceRule = map[string]string{
- "": "NonResourceRule holds information that describes a rule for the non-resource",
- "verbs": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.",
- "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. \"*\" means all.",
-}
-
-func (NonResourceRule) SwaggerDoc() map[string]string {
- return map_NonResourceRule
-}
-
-var map_ResourceAttributes = map[string]string{
- "": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
- "namespace": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview",
- "verb": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
- "group": "Group is the API Group of the Resource. \"*\" means all.",
- "version": "Version is the API Version of the Resource. \"*\" means all.",
- "resource": "Resource is one of the existing resource types. \"*\" means all.",
- "subresource": "Subresource is one of the existing resource types. \"\" means none.",
- "name": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.",
-}
-
-func (ResourceAttributes) SwaggerDoc() map[string]string {
- return map_ResourceAttributes
-}
-
-var map_ResourceRule = map[string]string{
- "": "ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.",
- "verbs": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
- "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"*\" means all.",
- "resources": "Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.\n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.",
- "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.",
-}
-
-func (ResourceRule) SwaggerDoc() map[string]string {
- return map_ResourceRule
-}
-
-var map_SelfSubjectAccessReview = map[string]string{
- "": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action",
- "spec": "Spec holds information about the request being evaluated. user and groups must be empty",
- "status": "Status is filled in by the server and indicates whether the request is allowed or not",
-}
-
-func (SelfSubjectAccessReview) SwaggerDoc() map[string]string {
- return map_SelfSubjectAccessReview
-}
-
-var map_SelfSubjectAccessReviewSpec = map[string]string{
- "": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
- "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
- "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
-}
-
-func (SelfSubjectAccessReviewSpec) SwaggerDoc() map[string]string {
- return map_SelfSubjectAccessReviewSpec
-}
-
-var map_SelfSubjectRulesReview = map[string]string{
- "": "SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.",
- "spec": "Spec holds information about the request being evaluated.",
- "status": "Status is filled in by the server and indicates the set of actions a user can perform.",
-}
-
-func (SelfSubjectRulesReview) SwaggerDoc() map[string]string {
- return map_SelfSubjectRulesReview
-}
-
-var map_SelfSubjectRulesReviewSpec = map[string]string{
- "namespace": "Namespace to evaluate rules for. Required.",
-}
-
-func (SelfSubjectRulesReviewSpec) SwaggerDoc() map[string]string {
- return map_SelfSubjectRulesReviewSpec
-}
-
-var map_SubjectAccessReview = map[string]string{
- "": "SubjectAccessReview checks whether or not a user or group can perform an action.",
- "spec": "Spec holds information about the request being evaluated",
- "status": "Status is filled in by the server and indicates whether the request is allowed or not",
-}
-
-func (SubjectAccessReview) SwaggerDoc() map[string]string {
- return map_SubjectAccessReview
-}
-
-var map_SubjectAccessReviewSpec = map[string]string{
- "": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
- "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
- "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
- "user": "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups",
- "group": "Groups is the groups you're testing for.",
- "extra": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.",
- "uid": "UID information about the requesting user.",
-}
-
-func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string {
- return map_SubjectAccessReviewSpec
-}
-
-var map_SubjectAccessReviewStatus = map[string]string{
- "": "SubjectAccessReviewStatus",
- "allowed": "Allowed is required. True if the action would be allowed, false otherwise.",
- "denied": "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.",
- "reason": "Reason is optional. It indicates why a request was allowed or denied.",
- "evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.",
-}
-
-func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
- return map_SubjectAccessReviewStatus
-}
-
-var map_SubjectRulesReviewStatus = map[string]string{
- "": "SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.",
- "resourceRules": "ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.",
- "nonResourceRules": "NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.",
- "incomplete": "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.",
- "evaluationError": "EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.",
-}
-
-func (SubjectRulesReviewStatus) SwaggerDoc() map[string]string {
- return map_SubjectRulesReviewStatus
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index 7c76b183b..000000000
--- a/vendor/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,398 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in ExtraValue) DeepCopyInto(out *ExtraValue) {
- {
- in := &in
- *out = make(ExtraValue, len(*in))
- copy(*out, *in)
- return
- }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue.
-func (in ExtraValue) DeepCopy() ExtraValue {
- if in == nil {
- return nil
- }
- out := new(ExtraValue)
- in.DeepCopyInto(out)
- return *out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *LocalSubjectAccessReview) DeepCopyInto(out *LocalSubjectAccessReview) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- out.Status = in.Status
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSubjectAccessReview.
-func (in *LocalSubjectAccessReview) DeepCopy() *LocalSubjectAccessReview {
- if in == nil {
- return nil
- }
- out := new(LocalSubjectAccessReview)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *LocalSubjectAccessReview) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NonResourceAttributes) DeepCopyInto(out *NonResourceAttributes) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonResourceAttributes.
-func (in *NonResourceAttributes) DeepCopy() *NonResourceAttributes {
- if in == nil {
- return nil
- }
- out := new(NonResourceAttributes)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NonResourceRule) DeepCopyInto(out *NonResourceRule) {
- *out = *in
- if in.Verbs != nil {
- in, out := &in.Verbs, &out.Verbs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.NonResourceURLs != nil {
- in, out := &in.NonResourceURLs, &out.NonResourceURLs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonResourceRule.
-func (in *NonResourceRule) DeepCopy() *NonResourceRule {
- if in == nil {
- return nil
- }
- out := new(NonResourceRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ResourceAttributes) DeepCopyInto(out *ResourceAttributes) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAttributes.
-func (in *ResourceAttributes) DeepCopy() *ResourceAttributes {
- if in == nil {
- return nil
- }
- out := new(ResourceAttributes)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ResourceRule) DeepCopyInto(out *ResourceRule) {
- *out = *in
- if in.Verbs != nil {
- in, out := &in.Verbs, &out.Verbs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.APIGroups != nil {
- in, out := &in.APIGroups, &out.APIGroups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Resources != nil {
- in, out := &in.Resources, &out.Resources
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.ResourceNames != nil {
- in, out := &in.ResourceNames, &out.ResourceNames
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRule.
-func (in *ResourceRule) DeepCopy() *ResourceRule {
- if in == nil {
- return nil
- }
- out := new(ResourceRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- out.Status = in.Status
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReview.
-func (in *SelfSubjectAccessReview) DeepCopy() *SelfSubjectAccessReview {
- if in == nil {
- return nil
- }
- out := new(SelfSubjectAccessReview)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *SelfSubjectAccessReview) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SelfSubjectAccessReviewSpec) DeepCopyInto(out *SelfSubjectAccessReviewSpec) {
- *out = *in
- if in.ResourceAttributes != nil {
- in, out := &in.ResourceAttributes, &out.ResourceAttributes
- if *in == nil {
- *out = nil
- } else {
- *out = new(ResourceAttributes)
- **out = **in
- }
- }
- if in.NonResourceAttributes != nil {
- in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
- if *in == nil {
- *out = nil
- } else {
- *out = new(NonResourceAttributes)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReviewSpec.
-func (in *SelfSubjectAccessReviewSpec) DeepCopy() *SelfSubjectAccessReviewSpec {
- if in == nil {
- return nil
- }
- out := new(SelfSubjectAccessReviewSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SelfSubjectRulesReview) DeepCopyInto(out *SelfSubjectRulesReview) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- out.Spec = in.Spec
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReview.
-func (in *SelfSubjectRulesReview) DeepCopy() *SelfSubjectRulesReview {
- if in == nil {
- return nil
- }
- out := new(SelfSubjectRulesReview)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *SelfSubjectRulesReview) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SelfSubjectRulesReviewSpec) DeepCopyInto(out *SelfSubjectRulesReviewSpec) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReviewSpec.
-func (in *SelfSubjectRulesReviewSpec) DeepCopy() *SelfSubjectRulesReviewSpec {
- if in == nil {
- return nil
- }
- out := new(SelfSubjectRulesReviewSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- out.Status = in.Status
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReview.
-func (in *SubjectAccessReview) DeepCopy() *SubjectAccessReview {
- if in == nil {
- return nil
- }
- out := new(SubjectAccessReview)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *SubjectAccessReview) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SubjectAccessReviewSpec) DeepCopyInto(out *SubjectAccessReviewSpec) {
- *out = *in
- if in.ResourceAttributes != nil {
- in, out := &in.ResourceAttributes, &out.ResourceAttributes
- if *in == nil {
- *out = nil
- } else {
- *out = new(ResourceAttributes)
- **out = **in
- }
- }
- if in.NonResourceAttributes != nil {
- in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
- if *in == nil {
- *out = nil
- } else {
- *out = new(NonResourceAttributes)
- **out = **in
- }
- }
- if in.Groups != nil {
- in, out := &in.Groups, &out.Groups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Extra != nil {
- in, out := &in.Extra, &out.Extra
- *out = make(map[string]ExtraValue, len(*in))
- for key, val := range *in {
- if val == nil {
- (*out)[key] = nil
- } else {
- (*out)[key] = make([]string, len(val))
- copy((*out)[key], val)
- }
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewSpec.
-func (in *SubjectAccessReviewSpec) DeepCopy() *SubjectAccessReviewSpec {
- if in == nil {
- return nil
- }
- out := new(SubjectAccessReviewSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SubjectAccessReviewStatus) DeepCopyInto(out *SubjectAccessReviewStatus) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewStatus.
-func (in *SubjectAccessReviewStatus) DeepCopy() *SubjectAccessReviewStatus {
- if in == nil {
- return nil
- }
- out := new(SubjectAccessReviewStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SubjectRulesReviewStatus) DeepCopyInto(out *SubjectRulesReviewStatus) {
- *out = *in
- if in.ResourceRules != nil {
- in, out := &in.ResourceRules, &out.ResourceRules
- *out = make([]ResourceRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.NonResourceRules != nil {
- in, out := &in.NonResourceRules, &out.NonResourceRules
- *out = make([]NonResourceRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectRulesReviewStatus.
-func (in *SubjectRulesReviewStatus) DeepCopy() *SubjectRulesReviewStatus {
- if in == nil {
- return nil
- }
- out := new(SubjectRulesReviewStatus)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/autoscaling/v1/doc.go b/vendor/k8s.io/api/autoscaling/v1/doc.go
deleted file mode 100644
index 9c3be845f..000000000
--- a/vendor/k8s.io/api/autoscaling/v1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-package v1 // import "k8s.io/api/autoscaling/v1"
diff --git a/vendor/k8s.io/api/autoscaling/v1/generated.pb.go b/vendor/k8s.io/api/autoscaling/v1/generated.pb.go
deleted file mode 100644
index 9e2b235eb..000000000
--- a/vendor/k8s.io/api/autoscaling/v1/generated.pb.go
+++ /dev/null
@@ -1,4420 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v1/generated.proto
-
- It has these top-level messages:
- CrossVersionObjectReference
- ExternalMetricSource
- ExternalMetricStatus
- HorizontalPodAutoscaler
- HorizontalPodAutoscalerCondition
- HorizontalPodAutoscalerList
- HorizontalPodAutoscalerSpec
- HorizontalPodAutoscalerStatus
- MetricSpec
- MetricStatus
- ObjectMetricSource
- ObjectMetricStatus
- PodsMetricSource
- PodsMetricStatus
- ResourceMetricSource
- ResourceMetricStatus
- Scale
- ScaleSpec
- ScaleStatus
-*/
-package v1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
-func (*CrossVersionObjectReference) ProtoMessage() {}
-func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{0}
-}
-
-func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} }
-func (*ExternalMetricSource) ProtoMessage() {}
-func (*ExternalMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} }
-func (*ExternalMetricStatus) ProtoMessage() {}
-func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
-func (*HorizontalPodAutoscaler) ProtoMessage() {}
-func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} }
-func (*HorizontalPodAutoscalerCondition) ProtoMessage() {}
-func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{4}
-}
-
-func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
-func (*HorizontalPodAutoscalerList) ProtoMessage() {}
-func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{5}
-}
-
-func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
-func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
-func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{6}
-}
-
-func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
-func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
-func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{7}
-}
-
-func (m *MetricSpec) Reset() { *m = MetricSpec{} }
-func (*MetricSpec) ProtoMessage() {}
-func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *MetricStatus) Reset() { *m = MetricStatus{} }
-func (*MetricStatus) ProtoMessage() {}
-func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
-
-func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} }
-func (*ObjectMetricSource) ProtoMessage() {}
-func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} }
-func (*ObjectMetricStatus) ProtoMessage() {}
-func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
-
-func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} }
-func (*PodsMetricSource) ProtoMessage() {}
-func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
-
-func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} }
-func (*PodsMetricStatus) ProtoMessage() {}
-func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
-
-func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} }
-func (*ResourceMetricSource) ProtoMessage() {}
-func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
-
-func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} }
-func (*ResourceMetricStatus) ProtoMessage() {}
-func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
-
-func (m *Scale) Reset() { *m = Scale{} }
-func (*Scale) ProtoMessage() {}
-func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
-
-func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
-func (*ScaleSpec) ProtoMessage() {}
-func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
-
-func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
-func (*ScaleStatus) ProtoMessage() {}
-func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
-
-func init() {
- proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v1.CrossVersionObjectReference")
- proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v1.ExternalMetricSource")
- proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v1.ExternalMetricStatus")
- proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler")
- proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerCondition")
- proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerList")
- proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec")
- proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus")
- proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v1.MetricSpec")
- proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v1.MetricStatus")
- proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v1.ObjectMetricSource")
- proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v1.ObjectMetricStatus")
- proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v1.PodsMetricSource")
- proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v1.PodsMetricStatus")
- proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v1.ResourceMetricSource")
- proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v1.ResourceMetricStatus")
- proto.RegisterType((*Scale)(nil), "k8s.io.api.autoscaling.v1.Scale")
- proto.RegisterType((*ScaleSpec)(nil), "k8s.io.api.autoscaling.v1.ScaleSpec")
- proto.RegisterType((*ScaleStatus)(nil), "k8s.io.api.autoscaling.v1.ScaleStatus")
-}
-func (m *CrossVersionObjectReference) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
- i += copy(dAtA[i:], m.Kind)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
- i += copy(dAtA[i:], m.APIVersion)
- return i, nil
-}
-
-func (m *ExternalMetricSource) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ExternalMetricSource) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- if m.MetricSelector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MetricSelector.Size()))
- n1, err := m.MetricSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- }
- if m.TargetValue != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
- n2, err := m.TargetValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- }
- if m.TargetAverageValue != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
- n3, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- }
- return i, nil
-}
-
-func (m *ExternalMetricStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ExternalMetricStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- if m.MetricSelector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MetricSelector.Size()))
- n4, err := m.MetricSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
- n5, err := m.CurrentValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if m.CurrentAverageValue != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
- n6, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- }
- return i, nil
-}
-
-func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n8, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n9, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- return i, nil
-}
-
-func (m *HorizontalPodAutoscalerCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n10, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *HorizontalPodAutoscalerList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n11, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *HorizontalPodAutoscalerSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleTargetRef.Size()))
- n12, err := m.ScaleTargetRef.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- if m.MinReplicas != nil {
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.MinReplicas))
- }
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxReplicas))
- if m.TargetCPUUtilizationPercentage != nil {
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetCPUUtilizationPercentage))
- }
- return i, nil
-}
-
-func (m *HorizontalPodAutoscalerStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.ObservedGeneration != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
- }
- if m.LastScaleTime != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastScaleTime.Size()))
- n13, err := m.LastScaleTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- }
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredReplicas))
- if m.CurrentCPUUtilizationPercentage != nil {
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentCPUUtilizationPercentage))
- }
- return i, nil
-}
-
-func (m *MetricSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.Object != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
- n14, err := m.Object.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n14
- }
- if m.Pods != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
- n15, err := m.Pods.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n15
- }
- if m.Resource != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
- n16, err := m.Resource.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n16
- }
- if m.External != nil {
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.External.Size()))
- n17, err := m.External.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n17
- }
- return i, nil
-}
-
-func (m *MetricStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.Object != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
- n18, err := m.Object.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n18
- }
- if m.Pods != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
- n19, err := m.Pods.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n19
- }
- if m.Resource != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
- n20, err := m.Resource.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n20
- }
- if m.External != nil {
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.External.Size()))
- n21, err := m.External.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n21
- }
- return i, nil
-}
-
-func (m *ObjectMetricSource) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
- n22, err := m.Target.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n22
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
- n23, err := m.TargetValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n23
- return i, nil
-}
-
-func (m *ObjectMetricStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
- n24, err := m.Target.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n24
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
- n25, err := m.CurrentValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n25
- return i, nil
-}
-
-func (m *PodsMetricSource) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
- n26, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n26
- return i, nil
-}
-
-func (m *PodsMetricStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
- n27, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n27
- return i, nil
-}
-
-func (m *ResourceMetricSource) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- if m.TargetAverageUtilization != nil {
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetAverageUtilization))
- }
- if m.TargetAverageValue != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
- n28, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n28
- }
- return i, nil
-}
-
-func (m *ResourceMetricStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- if m.CurrentAverageUtilization != nil {
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentAverageUtilization))
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
- n29, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n29
- return i, nil
-}
-
-func (m *Scale) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Scale) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n30, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n30
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n31, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n31
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n32, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n32
- return i, nil
-}
-
-func (m *ScaleSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ScaleSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- return i, nil
-}
-
-func (m *ScaleStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Selector)))
- i += copy(dAtA[i:], m.Selector)
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *CrossVersionObjectReference) Size() (n int) {
- var l int
- _ = l
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.APIVersion)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ExternalMetricSource) Size() (n int) {
- var l int
- _ = l
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- if m.MetricSelector != nil {
- l = m.MetricSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.TargetValue != nil {
- l = m.TargetValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.TargetAverageValue != nil {
- l = m.TargetAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ExternalMetricStatus) Size() (n int) {
- var l int
- _ = l
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- if m.MetricSelector != nil {
- l = m.MetricSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.CurrentValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.CurrentAverageValue != nil {
- l = m.CurrentAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *HorizontalPodAutoscaler) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *HorizontalPodAutoscalerCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *HorizontalPodAutoscalerList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *HorizontalPodAutoscalerSpec) Size() (n int) {
- var l int
- _ = l
- l = m.ScaleTargetRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.MinReplicas != nil {
- n += 1 + sovGenerated(uint64(*m.MinReplicas))
- }
- n += 1 + sovGenerated(uint64(m.MaxReplicas))
- if m.TargetCPUUtilizationPercentage != nil {
- n += 1 + sovGenerated(uint64(*m.TargetCPUUtilizationPercentage))
- }
- return n
-}
-
-func (m *HorizontalPodAutoscalerStatus) Size() (n int) {
- var l int
- _ = l
- if m.ObservedGeneration != nil {
- n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
- }
- if m.LastScaleTime != nil {
- l = m.LastScaleTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- n += 1 + sovGenerated(uint64(m.CurrentReplicas))
- n += 1 + sovGenerated(uint64(m.DesiredReplicas))
- if m.CurrentCPUUtilizationPercentage != nil {
- n += 1 + sovGenerated(uint64(*m.CurrentCPUUtilizationPercentage))
- }
- return n
-}
-
-func (m *MetricSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.Object != nil {
- l = m.Object.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Pods != nil {
- l = m.Pods.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Resource != nil {
- l = m.Resource.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.External != nil {
- l = m.External.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *MetricStatus) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.Object != nil {
- l = m.Object.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Pods != nil {
- l = m.Pods.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Resource != nil {
- l = m.Resource.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.External != nil {
- l = m.External.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ObjectMetricSource) Size() (n int) {
- var l int
- _ = l
- l = m.Target.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.TargetValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ObjectMetricStatus) Size() (n int) {
- var l int
- _ = l
- l = m.Target.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.CurrentValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *PodsMetricSource) Size() (n int) {
- var l int
- _ = l
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.TargetAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *PodsMetricStatus) Size() (n int) {
- var l int
- _ = l
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.CurrentAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourceMetricSource) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if m.TargetAverageUtilization != nil {
- n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization))
- }
- if m.TargetAverageValue != nil {
- l = m.TargetAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ResourceMetricStatus) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if m.CurrentAverageUtilization != nil {
- n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization))
- }
- l = m.CurrentAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *Scale) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ScaleSpec) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- return n
-}
-
-func (m *ScaleStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- l = len(m.Selector)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *CrossVersionObjectReference) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CrossVersionObjectReference{`,
- `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ExternalMetricSource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ExternalMetricSource{`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `TargetValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
- `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ExternalMetricStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ExternalMetricStatus{`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `CurrentAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.CurrentAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HorizontalPodAutoscaler) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HorizontalPodAutoscaler{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HorizontalPodAutoscalerCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HorizontalPodAutoscalerList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HorizontalPodAutoscalerList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HorizontalPodAutoscalerSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`,
- `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
- `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`,
- `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`,
- `TargetCPUUtilizationPercentage:` + valueToStringGenerated(this.TargetCPUUtilizationPercentage) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HorizontalPodAutoscalerStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`,
- `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
- `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
- `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
- `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`,
- `CurrentCPUUtilizationPercentage:` + valueToStringGenerated(this.CurrentCPUUtilizationPercentage) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *MetricSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&MetricSpec{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`,
- `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`,
- `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`,
- `External:` + strings.Replace(fmt.Sprintf("%v", this.External), "ExternalMetricSource", "ExternalMetricSource", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *MetricStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&MetricStatus{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`,
- `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`,
- `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`,
- `External:` + strings.Replace(fmt.Sprintf("%v", this.External), "ExternalMetricStatus", "ExternalMetricStatus", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ObjectMetricSource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ObjectMetricSource{`,
- `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ObjectMetricStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ObjectMetricStatus{`,
- `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodsMetricSource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodsMetricSource{`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `TargetAverageValue:` + strings.Replace(strings.Replace(this.TargetAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodsMetricStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodsMetricStatus{`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceMetricSource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceMetricSource{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`,
- `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceMetricStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceMetricStatus{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`,
- `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Scale) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Scale{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ScaleSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ScaleSpec{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ScaleStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ScaleStatus{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Kind = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIVersion = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ExternalMetricSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ExternalMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MetricSelector == nil {
- m.MetricSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.TargetValue == nil {
- m.TargetValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
- }
- if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.TargetAverageValue == nil {
- m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
- }
- if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ExternalMetricStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ExternalMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MetricSelector == nil {
- m.MetricSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.CurrentAverageValue == nil {
- m.CurrentAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
- }
- if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HorizontalPodAutoscalerList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, HorizontalPodAutoscaler{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HorizontalPodAutoscalerSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ScaleTargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.MinReplicas = &v
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType)
- }
- m.MaxReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MaxReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetCPUUtilizationPercentage", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.TargetCPUUtilizationPercentage = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HorizontalPodAutoscalerStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ObservedGeneration = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.LastScaleTime == nil {
- m.LastScaleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
- }
- if err := m.LastScaleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
- }
- m.CurrentReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.CurrentReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType)
- }
- m.DesiredReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.DesiredReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentCPUUtilizationPercentage", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CurrentCPUUtilizationPercentage = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *MetricSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Object == nil {
- m.Object = &ObjectMetricSource{}
- }
- if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Pods == nil {
- m.Pods = &PodsMetricSource{}
- }
- if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Resource == nil {
- m.Resource = &ResourceMetricSource{}
- }
- if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field External", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.External == nil {
- m.External = &ExternalMetricSource{}
- }
- if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *MetricStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Object == nil {
- m.Object = &ObjectMetricStatus{}
- }
- if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Pods == nil {
- m.Pods = &PodsMetricStatus{}
- }
- if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Resource == nil {
- m.Resource = &ResourceMetricStatus{}
- }
- if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field External", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.External == nil {
- m.External = &ExternalMetricStatus{}
- }
- if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ObjectMetricSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ObjectMetricStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodsMetricSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodsMetricStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceMetricSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.TargetAverageUtilization = &v
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.TargetAverageValue == nil {
- m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
- }
- if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CurrentAverageUtilization = &v
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Scale) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Scale: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ScaleSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ScaleStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Selector = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 1485 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcb, 0x6f, 0x14, 0x47,
- 0x13, 0xf7, 0x3e, 0x6c, 0xec, 0x5e, 0x63, 0xf3, 0x35, 0x08, 0x8c, 0xf9, 0xd8, 0xb1, 0xe6, 0x43,
- 0x88, 0x2f, 0x09, 0x33, 0xb1, 0x21, 0x88, 0x1c, 0xbd, 0x9b, 0x10, 0x50, 0xbc, 0x60, 0xda, 0x86,
- 0x90, 0x87, 0x22, 0xda, 0xb3, 0xcd, 0xba, 0xf1, 0xce, 0xcc, 0xaa, 0xa7, 0x77, 0x85, 0x91, 0x22,
- 0x25, 0x87, 0x9c, 0x13, 0x45, 0x4a, 0x94, 0x63, 0xfe, 0x81, 0x9c, 0x39, 0x27, 0x52, 0x24, 0x8e,
- 0x1c, 0x72, 0xe0, 0x34, 0x0a, 0x93, 0x63, 0xfe, 0x03, 0x4e, 0x51, 0x3f, 0x76, 0x76, 0x66, 0x77,
- 0x67, 0xfd, 0xc0, 0x58, 0xc9, 0x6d, 0x7a, 0xaa, 0xea, 0x57, 0xdd, 0x55, 0xd5, 0xf5, 0x68, 0x50,
- 0xd9, 0xba, 0x1a, 0x58, 0xd4, 0xb7, 0xb7, 0xda, 0x1b, 0x84, 0x79, 0x84, 0x93, 0xc0, 0xee, 0x10,
- 0xaf, 0xee, 0x33, 0x5b, 0x13, 0x70, 0x8b, 0xda, 0xb8, 0xcd, 0xfd, 0xc0, 0xc1, 0x4d, 0xea, 0x35,
- 0xec, 0xce, 0xa2, 0xdd, 0x20, 0x1e, 0x61, 0x98, 0x93, 0xba, 0xd5, 0x62, 0x3e, 0xf7, 0xe1, 0x69,
- 0xc5, 0x6a, 0xe1, 0x16, 0xb5, 0x12, 0xac, 0x56, 0x67, 0x71, 0xfe, 0x62, 0x83, 0xf2, 0xcd, 0xf6,
- 0x86, 0xe5, 0xf8, 0xae, 0xdd, 0xf0, 0x1b, 0xbe, 0x2d, 0x25, 0x36, 0xda, 0x0f, 0xe4, 0x4a, 0x2e,
- 0xe4, 0x97, 0x42, 0x9a, 0x37, 0x13, 0x4a, 0x1d, 0x9f, 0x91, 0x21, 0xda, 0xe6, 0x2f, 0xf7, 0x78,
- 0x5c, 0xec, 0x6c, 0x52, 0x8f, 0xb0, 0x6d, 0xbb, 0xb5, 0xd5, 0x90, 0x42, 0x8c, 0x04, 0x7e, 0x9b,
- 0x39, 0x64, 0x4f, 0x52, 0x81, 0xed, 0x12, 0x8e, 0x87, 0xe9, 0xb2, 0xb3, 0xa4, 0x58, 0xdb, 0xe3,
- 0xd4, 0x1d, 0x54, 0x73, 0x65, 0x27, 0x81, 0xc0, 0xd9, 0x24, 0x2e, 0x1e, 0x90, 0xbb, 0x94, 0x25,
- 0xd7, 0xe6, 0xb4, 0x69, 0x53, 0x8f, 0x07, 0x9c, 0xf5, 0x0b, 0x99, 0xdf, 0xe7, 0xc0, 0x99, 0x2a,
- 0xf3, 0x83, 0xe0, 0x2e, 0x61, 0x01, 0xf5, 0xbd, 0x5b, 0x1b, 0x0f, 0x89, 0xc3, 0x11, 0x79, 0x40,
- 0x18, 0xf1, 0x1c, 0x02, 0x17, 0x40, 0x71, 0x8b, 0x7a, 0xf5, 0xb9, 0xdc, 0x42, 0xee, 0xc2, 0x54,
- 0x65, 0xfa, 0x69, 0x68, 0x8c, 0x45, 0xa1, 0x51, 0xfc, 0x90, 0x7a, 0x75, 0x24, 0x29, 0x82, 0xc3,
- 0xc3, 0x2e, 0x99, 0xcb, 0xa7, 0x39, 0x6e, 0x62, 0x97, 0x20, 0x49, 0x81, 0x4b, 0x00, 0xe0, 0x16,
- 0xd5, 0x0a, 0xe6, 0x0a, 0x92, 0x0f, 0x6a, 0x3e, 0xb0, 0xbc, 0x7a, 0x43, 0x53, 0x50, 0x82, 0xcb,
- 0xfc, 0xa1, 0x00, 0x4e, 0xbc, 0xff, 0x88, 0x13, 0xe6, 0xe1, 0x66, 0x8d, 0x70, 0x46, 0x9d, 0x35,
- 0xe9, 0x14, 0x01, 0xe6, 0xca, 0xb5, 0x50, 0xa0, 0xb7, 0x15, 0x83, 0xd5, 0x62, 0x0a, 0x4a, 0x70,
- 0x41, 0x1f, 0xcc, 0xa8, 0xd5, 0x1a, 0x69, 0x12, 0x87, 0xfb, 0x4c, 0x6e, 0xb6, 0xb4, 0x74, 0xc9,
- 0xea, 0x45, 0x5d, 0x6c, 0x32, 0xab, 0xb5, 0xd5, 0x10, 0x3f, 0x02, 0x4b, 0x78, 0xd4, 0xea, 0x2c,
- 0x5a, 0x2b, 0x78, 0x83, 0x34, 0xbb, 0xa2, 0x15, 0x18, 0x85, 0xc6, 0x4c, 0x2d, 0x05, 0x87, 0xfa,
- 0xe0, 0x21, 0x06, 0x25, 0x8e, 0x59, 0x83, 0xf0, 0xbb, 0xb8, 0xd9, 0x26, 0xf2, 0xc8, 0xa5, 0x25,
- 0x6b, 0x94, 0x36, 0xab, 0x1b, 0x75, 0xd6, 0xed, 0x36, 0xf6, 0x38, 0xe5, 0xdb, 0x95, 0xd9, 0x28,
- 0x34, 0x4a, 0xeb, 0x3d, 0x18, 0x94, 0xc4, 0x84, 0x1d, 0x00, 0xd5, 0x72, 0xb9, 0x43, 0x18, 0x6e,
- 0x10, 0xa5, 0xa9, 0xb8, 0x2f, 0x4d, 0x27, 0xa3, 0xd0, 0x80, 0xeb, 0x03, 0x68, 0x68, 0x88, 0x06,
- 0xf3, 0xa7, 0x41, 0xc7, 0x70, 0xcc, 0xdb, 0xc1, 0xbf, 0xc3, 0x31, 0x9b, 0x60, 0xda, 0x69, 0x33,
- 0x46, 0xbc, 0x57, 0xf2, 0xcc, 0x09, 0x7d, 0xac, 0xe9, 0x6a, 0x02, 0x0b, 0xa5, 0x90, 0xe1, 0x36,
- 0x38, 0xae, 0xd7, 0x07, 0xe0, 0xa0, 0x53, 0x51, 0x68, 0x1c, 0xaf, 0x0e, 0xc2, 0xa1, 0x61, 0x3a,
- 0xcc, 0x27, 0x79, 0x70, 0xea, 0xba, 0xcf, 0xe8, 0x63, 0xdf, 0xe3, 0xb8, 0xb9, 0xea, 0xd7, 0x97,
- 0x75, 0x42, 0x25, 0x0c, 0xde, 0x07, 0x93, 0xc2, 0x7a, 0x75, 0xcc, 0xb1, 0xf4, 0x51, 0x69, 0xe9,
- 0xed, 0xdd, 0xd9, 0x5a, 0x25, 0x86, 0x1a, 0xe1, 0xb8, 0xe7, 0xd5, 0xde, 0x3f, 0x14, 0xa3, 0xc2,
- 0x7b, 0xa0, 0x18, 0xb4, 0x88, 0xa3, 0x3d, 0x79, 0xc5, 0xca, 0x4c, 0xec, 0x56, 0xc6, 0x1e, 0xd7,
- 0x5a, 0xc4, 0xe9, 0xe5, 0x11, 0xb1, 0x42, 0x12, 0x11, 0xde, 0x07, 0x13, 0x81, 0x8c, 0x35, 0xed,
- 0xb6, 0xab, 0xfb, 0xc0, 0x96, 0xf2, 0x95, 0x19, 0x8d, 0x3e, 0xa1, 0xd6, 0x48, 0xe3, 0x9a, 0x5f,
- 0x17, 0xc0, 0x42, 0x86, 0x64, 0xd5, 0xf7, 0xea, 0x94, 0x53, 0xdf, 0x83, 0xd7, 0x41, 0x91, 0x6f,
- 0xb7, 0xba, 0x21, 0x7e, 0xb9, 0xbb, 0xd1, 0xf5, 0xed, 0x16, 0x79, 0x19, 0x1a, 0xe7, 0x76, 0x92,
- 0x17, 0x7c, 0x48, 0x22, 0xc0, 0x95, 0xf8, 0x40, 0xf9, 0x14, 0x96, 0xde, 0xd6, 0xcb, 0xd0, 0x18,
- 0x52, 0xcc, 0xac, 0x18, 0x29, 0xbd, 0x79, 0x91, 0x11, 0x9a, 0x38, 0xe0, 0xeb, 0x0c, 0x7b, 0x81,
- 0xd2, 0x44, 0xdd, 0x6e, 0x84, 0xbf, 0xb1, 0x3b, 0x27, 0x0b, 0x89, 0xca, 0xbc, 0xde, 0x05, 0x5c,
- 0x19, 0x40, 0x43, 0x43, 0x34, 0xc0, 0xf3, 0x60, 0x82, 0x11, 0x1c, 0xf8, 0x9e, 0x0c, 0xee, 0xa9,
- 0x9e, 0x71, 0x91, 0xfc, 0x8b, 0x34, 0x15, 0xfe, 0x1f, 0x1c, 0x71, 0x49, 0x10, 0xe0, 0x06, 0x99,
- 0x1b, 0x97, 0x8c, 0xb3, 0x9a, 0xf1, 0x48, 0x4d, 0xfd, 0x46, 0x5d, 0xba, 0xf9, 0x7b, 0x0e, 0x9c,
- 0xc9, 0xb0, 0xe3, 0x0a, 0x0d, 0x38, 0xfc, 0x6c, 0x20, 0x8a, 0xad, 0x5d, 0x66, 0x0c, 0x1a, 0xa8,
- 0x18, 0x3e, 0xa6, 0x75, 0x4f, 0x76, 0xff, 0x24, 0x22, 0xf8, 0x23, 0x30, 0x4e, 0x39, 0x71, 0x85,
- 0x57, 0x0a, 0x17, 0x4a, 0x4b, 0x4b, 0x7b, 0x0f, 0xb3, 0xca, 0x51, 0x0d, 0x3f, 0x7e, 0x43, 0x00,
- 0x21, 0x85, 0x67, 0xfe, 0x95, 0xcf, 0x3c, 0x96, 0x08, 0x73, 0xd8, 0x01, 0x33, 0x72, 0xa5, 0x52,
- 0x31, 0x22, 0x0f, 0xf4, 0xe1, 0x46, 0x5d, 0xa2, 0x11, 0xc5, 0xbb, 0x72, 0x52, 0xef, 0x62, 0x66,
- 0x2d, 0x85, 0x8a, 0xfa, 0xb4, 0xc0, 0x45, 0x50, 0x72, 0xa9, 0x87, 0x48, 0xab, 0x49, 0x1d, 0xac,
- 0x82, 0x71, 0x5c, 0x95, 0x9f, 0x5a, 0xef, 0x37, 0x4a, 0xf2, 0xc0, 0x77, 0x40, 0xc9, 0xc5, 0x8f,
- 0x62, 0x91, 0x82, 0x14, 0x39, 0xae, 0xf5, 0x95, 0x6a, 0x3d, 0x12, 0x4a, 0xf2, 0xc1, 0x87, 0xa0,
- 0xac, 0x6a, 0x4a, 0x75, 0xf5, 0xce, 0x1d, 0x4e, 0x9b, 0xf4, 0x31, 0x16, 0x71, 0xb4, 0x4a, 0x98,
- 0x43, 0x3c, 0x2e, 0x42, 0xa3, 0x28, 0x91, 0xcc, 0x28, 0x34, 0xca, 0xeb, 0x23, 0x39, 0xd1, 0x0e,
- 0x48, 0xe6, 0x2f, 0x05, 0x70, 0x76, 0x64, 0x1a, 0x80, 0xd7, 0x00, 0xf4, 0x37, 0x02, 0xc2, 0x3a,
- 0xa4, 0xfe, 0x81, 0xea, 0x8b, 0x44, 0x83, 0x22, 0x6c, 0x5e, 0x50, 0x35, 0xf1, 0xd6, 0x00, 0x15,
- 0x0d, 0x91, 0x80, 0x0e, 0x38, 0x2a, 0xee, 0x85, 0xb2, 0x32, 0xd5, 0xbd, 0xd0, 0xde, 0x2e, 0xdd,
- 0x7f, 0xa2, 0xd0, 0x38, 0xba, 0x92, 0x04, 0x41, 0x69, 0x4c, 0xb8, 0x0c, 0x66, 0x75, 0xb2, 0xef,
- 0xb3, 0xfa, 0x29, 0x6d, 0xf5, 0xd9, 0x6a, 0x9a, 0x8c, 0xfa, 0xf9, 0x05, 0x44, 0x9d, 0x04, 0x94,
- 0x91, 0x7a, 0x0c, 0x51, 0x4c, 0x43, 0xbc, 0x97, 0x26, 0xa3, 0x7e, 0x7e, 0xe8, 0x02, 0x43, 0xa3,
- 0x66, 0x7a, 0x70, 0x5c, 0x42, 0xfe, 0x2f, 0x0a, 0x0d, 0xa3, 0x3a, 0x9a, 0x15, 0xed, 0x84, 0x25,
- 0xda, 0x40, 0xdd, 0x3b, 0xc8, 0x0b, 0x72, 0x39, 0x95, 0x7a, 0x17, 0xfa, 0x52, 0xef, 0xb1, 0x64,
- 0xa3, 0x98, 0x48, 0xb3, 0xb7, 0xc1, 0x84, 0x2f, 0x6f, 0x86, 0xf6, 0xcb, 0xc5, 0x11, 0xd7, 0x29,
- 0x2e, 0x69, 0x31, 0x50, 0x05, 0x88, 0x5c, 0xa6, 0xaf, 0x96, 0x06, 0x82, 0x37, 0x40, 0xb1, 0xe5,
- 0xd7, 0xbb, 0x85, 0xe8, 0xcd, 0x11, 0x80, 0xab, 0x7e, 0x3d, 0x48, 0xc1, 0x4d, 0x8a, 0x1d, 0x8b,
- 0xbf, 0x48, 0x42, 0xc0, 0x8f, 0xc1, 0x64, 0xb7, 0xe0, 0xeb, 0xee, 0xc0, 0x1e, 0x01, 0x87, 0x34,
- 0x6b, 0x0a, 0x72, 0x5a, 0x24, 0xb2, 0x2e, 0x05, 0xc5, 0x70, 0x02, 0x9a, 0xe8, 0x56, 0x4d, 0x7a,
- 0x65, 0x34, 0xf4, 0xb0, 0x76, 0x5b, 0x41, 0x77, 0x29, 0x28, 0x86, 0x33, 0x7f, 0x2c, 0x80, 0xe9,
- 0x54, 0xfb, 0x77, 0xc8, 0xae, 0x51, 0x75, 0xfc, 0xc0, 0x5c, 0xa3, 0xe0, 0x0e, 0xd4, 0x35, 0x0a,
- 0xf2, 0xb5, 0xb8, 0x26, 0x01, 0x3d, 0xc4, 0x35, 0xdf, 0xe4, 0x01, 0x1c, 0x0c, 0x63, 0xf8, 0x39,
- 0x98, 0x50, 0x09, 0xf3, 0x15, 0x8b, 0x4a, 0x5c, 0xde, 0x75, 0xfd, 0xd0, 0xa8, 0x7d, 0xfd, 0x7f,
- 0x7e, 0x57, 0xfd, 0x3f, 0x39, 0x88, 0x39, 0x29, 0xae, 0x3a, 0x59, 0xb3, 0x92, 0xf9, 0x5d, 0xbf,
- 0x45, 0x54, 0xc8, 0xfe, 0x13, 0x2d, 0x72, 0x68, 0x03, 0x8a, 0xf9, 0x6b, 0x0e, 0x1c, 0xeb, 0x4f,
- 0x4e, 0xfb, 0x1a, 0xe2, 0x1e, 0x0f, 0x9d, 0x44, 0xf3, 0xfb, 0xda, 0x78, 0xdc, 0x7b, 0xee, 0x72,
- 0x1a, 0xfd, 0x2d, 0x7d, 0x88, 0xfd, 0x4f, 0xa2, 0x5f, 0x0c, 0x1f, 0xd7, 0xf6, 0x77, 0x8a, 0x33,
- 0x5a, 0xd9, 0xee, 0x47, 0xb6, 0x9f, 0xf3, 0xe0, 0xc4, 0xb0, 0xd4, 0x0e, 0xab, 0xfa, 0x75, 0x45,
- 0x9d, 0xc2, 0x4e, 0xbe, 0xae, 0xbc, 0x0c, 0x0d, 0x63, 0xc8, 0x78, 0xd0, 0x85, 0x49, 0x3c, 0xc0,
- 0xdc, 0x03, 0x73, 0x29, 0xdb, 0x25, 0x6a, 0xad, 0x6e, 0xf6, 0xfe, 0x1b, 0x85, 0xc6, 0xdc, 0x7a,
- 0x06, 0x0f, 0xca, 0x94, 0xce, 0x78, 0x85, 0x28, 0xbc, 0xf6, 0x57, 0x88, 0x27, 0x83, 0xf6, 0x52,
- 0xbe, 0x3f, 0x10, 0x7b, 0x7d, 0x0a, 0x4e, 0xa7, 0x9d, 0x34, 0x68, 0xb0, 0xb3, 0x51, 0x68, 0x9c,
- 0xae, 0x66, 0x31, 0xa1, 0x6c, 0xf9, 0xac, 0x48, 0x2b, 0x1c, 0x52, 0xa4, 0x7d, 0x95, 0x07, 0xe3,
- 0xb2, 0xa9, 0x3c, 0x84, 0xa7, 0x80, 0x6b, 0xa9, 0xa7, 0x80, 0x73, 0x23, 0xd2, 0xab, 0xdc, 0x51,
- 0xe6, 0xe0, 0x7f, 0xb3, 0x6f, 0xf0, 0x3f, 0xbf, 0x23, 0xd2, 0xe8, 0x31, 0xff, 0x5d, 0x30, 0x15,
- 0x2b, 0x84, 0x6f, 0x89, 0x22, 0xaf, 0xbb, 0xe1, 0x9c, 0xf4, 0x6d, 0x3c, 0x1b, 0xc6, 0x6d, 0x70,
- 0xcc, 0x61, 0x52, 0x50, 0x4a, 0x68, 0xd8, 0x9b, 0xb0, 0xe0, 0x0e, 0x92, 0x0f, 0x5d, 0x53, 0x3d,
- 0xee, 0xf8, 0xc5, 0x2a, 0xe6, 0xa8, 0x5c, 0x78, 0xfa, 0xa2, 0x3c, 0xf6, 0xec, 0x45, 0x79, 0xec,
- 0xf9, 0x8b, 0xf2, 0xd8, 0x97, 0x51, 0x39, 0xf7, 0x34, 0x2a, 0xe7, 0x9e, 0x45, 0xe5, 0xdc, 0xf3,
- 0xa8, 0x9c, 0xfb, 0x23, 0x2a, 0xe7, 0xbe, 0xfd, 0xb3, 0x3c, 0xf6, 0x49, 0xbe, 0xb3, 0xf8, 0x77,
- 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0x55, 0xfd, 0xeb, 0x81, 0x17, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/autoscaling/v1/generated.proto b/vendor/k8s.io/api/autoscaling/v1/generated.proto
deleted file mode 100644
index 64f01f477..000000000
--- a/vendor/k8s.io/api/autoscaling/v1/generated.proto
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.autoscaling.v1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1";
-
-// CrossVersionObjectReference contains enough information to let you identify the referred resource.
-message CrossVersionObjectReference {
- // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
- optional string kind = 1;
-
- // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
- optional string name = 2;
-
- // API version of the referent
- // +optional
- optional string apiVersion = 3;
-}
-
-// ExternalMetricSource indicates how to scale on a metric not associated with
-// any Kubernetes object (for example length of queue in cloud
-// messaging service, or QPS from loadbalancer running outside of cluster).
-message ExternalMetricSource {
- // metricName is the name of the metric in question.
- optional string metricName = 1;
-
- // metricSelector is used to identify a specific time series
- // within a given metric.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
-
- // targetValue is the target value of the metric (as a quantity).
- // Mutually exclusive with TargetAverageValue.
- // +optional
- optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
-
- // targetAverageValue is the target per-pod value of global metric (as a quantity).
- // Mutually exclusive with TargetValue.
- // +optional
- optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
-}
-
-// ExternalMetricStatus indicates the current value of a global metric
-// not associated with any Kubernetes object.
-message ExternalMetricStatus {
- // metricName is the name of a metric used for autoscaling in
- // metric system.
- optional string metricName = 1;
-
- // metricSelector is used to identify a specific time series
- // within a given metric.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
-
- // currentValue is the current value of the metric (as a quantity)
- optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
-
- // currentAverageValue is the current value of metric averaged over autoscaled pods.
- // +optional
- optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
-}
-
-// configuration of a horizontal pod autoscaler.
-message HorizontalPodAutoscaler {
- // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- optional HorizontalPodAutoscalerSpec spec = 2;
-
- // current information about the autoscaler.
- // +optional
- optional HorizontalPodAutoscalerStatus status = 3;
-}
-
-// HorizontalPodAutoscalerCondition describes the state of
-// a HorizontalPodAutoscaler at a certain point.
-message HorizontalPodAutoscalerCondition {
- // type describes the current condition
- optional string type = 1;
-
- // status is the status of the condition (True, False, Unknown)
- optional string status = 2;
-
- // lastTransitionTime is the last time the condition transitioned from
- // one status to another
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // reason is the reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // message is a human-readable explanation containing details about
- // the transition
- // +optional
- optional string message = 5;
-}
-
-// list of horizontal pod autoscaler objects.
-message HorizontalPodAutoscalerList {
- // Standard list metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // list of horizontal pod autoscaler objects.
- repeated HorizontalPodAutoscaler items = 2;
-}
-
-// specification of a horizontal pod autoscaler.
-message HorizontalPodAutoscalerSpec {
- // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
- // and will set the desired number of pods by using its Scale subresource.
- optional CrossVersionObjectReference scaleTargetRef = 1;
-
- // lower limit for the number of pods that can be set by the autoscaler, default 1.
- // +optional
- optional int32 minReplicas = 2;
-
- // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
- optional int32 maxReplicas = 3;
-
- // target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
- // if not specified the default autoscaling policy will be used.
- // +optional
- optional int32 targetCPUUtilizationPercentage = 4;
-}
-
-// current status of a horizontal pod autoscaler
-message HorizontalPodAutoscalerStatus {
- // most recent generation observed by this autoscaler.
- // +optional
- optional int64 observedGeneration = 1;
-
- // last time the HorizontalPodAutoscaler scaled the number of pods;
- // used by the autoscaler to control how often the number of pods is changed.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
-
- // current number of replicas of pods managed by this autoscaler.
- optional int32 currentReplicas = 3;
-
- // desired number of replicas of pods managed by this autoscaler.
- optional int32 desiredReplicas = 4;
-
- // current average CPU utilization over all pods, represented as a percentage of requested CPU,
- // e.g. 70 means that an average pod is using now 70% of its requested CPU.
- // +optional
- optional int32 currentCPUUtilizationPercentage = 5;
-}
-
-// MetricSpec specifies how to scale based on a single metric
-// (only `type` and one other matching field should be set at once).
-message MetricSpec {
- // type is the type of metric source. It should be one of "Object",
- // "Pods" or "Resource", each mapping to a matching field in the object.
- optional string type = 1;
-
- // object refers to a metric describing a single kubernetes object
- // (for example, hits-per-second on an Ingress object).
- // +optional
- optional ObjectMetricSource object = 2;
-
- // pods refers to a metric describing each pod in the current scale target
- // (for example, transactions-processed-per-second). The values will be
- // averaged together before being compared to the target value.
- // +optional
- optional PodsMetricSource pods = 3;
-
- // resource refers to a resource metric (such as those specified in
- // requests and limits) known to Kubernetes describing each pod in the
- // current scale target (e.g. CPU or memory). Such metrics are built in to
- // Kubernetes, and have special scaling options on top of those available
- // to normal per-pod metrics using the "pods" source.
- // +optional
- optional ResourceMetricSource resource = 4;
-
- // external refers to a global metric that is not associated
- // with any Kubernetes object. It allows autoscaling based on information
- // coming from components running outside of cluster
- // (for example length of queue in cloud messaging service, or
- // QPS from loadbalancer running outside of cluster).
- // +optional
- optional ExternalMetricSource external = 5;
-}
-
-// MetricStatus describes the last-read state of a single metric.
-message MetricStatus {
- // type is the type of metric source. It will be one of "Object",
- // "Pods" or "Resource", each corresponds to a matching field in the object.
- optional string type = 1;
-
- // object refers to a metric describing a single kubernetes object
- // (for example, hits-per-second on an Ingress object).
- // +optional
- optional ObjectMetricStatus object = 2;
-
- // pods refers to a metric describing each pod in the current scale target
- // (for example, transactions-processed-per-second). The values will be
- // averaged together before being compared to the target value.
- // +optional
- optional PodsMetricStatus pods = 3;
-
- // resource refers to a resource metric (such as those specified in
- // requests and limits) known to Kubernetes describing each pod in the
- // current scale target (e.g. CPU or memory). Such metrics are built in to
- // Kubernetes, and have special scaling options on top of those available
- // to normal per-pod metrics using the "pods" source.
- // +optional
- optional ResourceMetricStatus resource = 4;
-
- // external refers to a global metric that is not associated
- // with any Kubernetes object. It allows autoscaling based on information
- // coming from components running outside of cluster
- // (for example length of queue in cloud messaging service, or
- // QPS from loadbalancer running outside of cluster).
- // +optional
- optional ExternalMetricStatus external = 5;
-}
-
-// ObjectMetricSource indicates how to scale on a metric describing a
-// kubernetes object (for example, hits-per-second on an Ingress object).
-message ObjectMetricSource {
- // target is the described Kubernetes object.
- optional CrossVersionObjectReference target = 1;
-
- // metricName is the name of the metric in question.
- optional string metricName = 2;
-
- // targetValue is the target value of the metric (as a quantity).
- optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
-}
-
-// ObjectMetricStatus indicates the current value of a metric describing a
-// kubernetes object (for example, hits-per-second on an Ingress object).
-message ObjectMetricStatus {
- // target is the described Kubernetes object.
- optional CrossVersionObjectReference target = 1;
-
- // metricName is the name of the metric in question.
- optional string metricName = 2;
-
- // currentValue is the current value of the metric (as a quantity).
- optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
-}
-
-// PodsMetricSource indicates how to scale on a metric describing each pod in
-// the current scale target (for example, transactions-processed-per-second).
-// The values will be averaged together before being compared to the target
-// value.
-message PodsMetricSource {
- // metricName is the name of the metric in question
- optional string metricName = 1;
-
- // targetAverageValue is the target value of the average of the
- // metric across all relevant pods (as a quantity)
- optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
-}
-
-// PodsMetricStatus indicates the current value of a metric describing each pod in
-// the current scale target (for example, transactions-processed-per-second).
-message PodsMetricStatus {
- // metricName is the name of the metric in question
- optional string metricName = 1;
-
- // currentAverageValue is the current value of the average of the
- // metric across all relevant pods (as a quantity)
- optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
-}
-
-// ResourceMetricSource indicates how to scale on a resource metric known to
-// Kubernetes, as specified in requests and limits, describing each pod in the
-// current scale target (e.g. CPU or memory). The values will be averaged
-// together before being compared to the target. Such metrics are built in to
-// Kubernetes, and have special scaling options on top of those available to
-// normal per-pod metrics using the "pods" source. Only one "target" type
-// should be set.
-message ResourceMetricSource {
- // name is the name of the resource in question.
- optional string name = 1;
-
- // targetAverageUtilization is the target value of the average of the
- // resource metric across all relevant pods, represented as a percentage of
- // the requested value of the resource for the pods.
- // +optional
- optional int32 targetAverageUtilization = 2;
-
- // targetAverageValue is the target value of the average of the
- // resource metric across all relevant pods, as a raw value (instead of as
- // a percentage of the request), similar to the "pods" metric source type.
- // +optional
- optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
-}
-
-// ResourceMetricStatus indicates the current value of a resource metric known to
-// Kubernetes, as specified in requests and limits, describing each pod in the
-// current scale target (e.g. CPU or memory). Such metrics are built in to
-// Kubernetes, and have special scaling options on top of those available to
-// normal per-pod metrics using the "pods" source.
-message ResourceMetricStatus {
- // name is the name of the resource in question.
- optional string name = 1;
-
- // currentAverageUtilization is the current value of the average of the
- // resource metric across all relevant pods, represented as a percentage of
- // the requested value of the resource for the pods. It will only be
- // present if `targetAverageValue` was set in the corresponding metric
- // specification.
- // +optional
- optional int32 currentAverageUtilization = 2;
-
- // currentAverageValue is the current value of the average of the
- // resource metric across all relevant pods, as a raw value (instead of as
- // a percentage of the request), similar to the "pods" metric source type.
- // It will always be set, regardless of the corresponding metric specification.
- optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
-}
-
-// Scale represents a scaling request for a resource.
-message Scale {
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- optional ScaleSpec spec = 2;
-
- // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
- // +optional
- optional ScaleStatus status = 3;
-}
-
-// ScaleSpec describes the attributes of a scale subresource.
-message ScaleSpec {
- // desired number of instances for the scaled object.
- // +optional
- optional int32 replicas = 1;
-}
-
-// ScaleStatus represents the current status of a scale subresource.
-message ScaleStatus {
- // actual number of observed instances of the scaled object.
- optional int32 replicas = 1;
-
- // label query over pods that should match the replicas count. This is same
- // as the label selector but in the string format to avoid introspection
- // by clients. The string will be in the same format as the query-param syntax.
- // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
- // +optional
- optional string selector = 2;
-}
-
diff --git a/vendor/k8s.io/api/autoscaling/v1/register.go b/vendor/k8s.io/api/autoscaling/v1/register.go
deleted file mode 100644
index 8dfe361ed..000000000
--- a/vendor/k8s.io/api/autoscaling/v1/register.go
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-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 v1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "autoscaling"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &HorizontalPodAutoscaler{},
- &HorizontalPodAutoscalerList{},
- &Scale{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/autoscaling/v1/types.go b/vendor/k8s.io/api/autoscaling/v1/types.go
deleted file mode 100644
index 344af774f..000000000
--- a/vendor/k8s.io/api/autoscaling/v1/types.go
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
-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 v1
-
-import (
- "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/resource"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// CrossVersionObjectReference contains enough information to let you identify the referred resource.
-type CrossVersionObjectReference struct {
- // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
- Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
- // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
- Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
- // API version of the referent
- // +optional
- APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
-}
-
-// specification of a horizontal pod autoscaler.
-type HorizontalPodAutoscalerSpec struct {
- // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
- // and will set the desired number of pods by using its Scale subresource.
- ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"`
- // lower limit for the number of pods that can be set by the autoscaler, default 1.
- // +optional
- MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
- // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
- MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
- // target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
- // if not specified the default autoscaling policy will be used.
- // +optional
- TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty" protobuf:"varint,4,opt,name=targetCPUUtilizationPercentage"`
-}
-
-// current status of a horizontal pod autoscaler
-type HorizontalPodAutoscalerStatus struct {
- // most recent generation observed by this autoscaler.
- // +optional
- ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // last time the HorizontalPodAutoscaler scaled the number of pods;
- // used by the autoscaler to control how often the number of pods is changed.
- // +optional
- LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
-
- // current number of replicas of pods managed by this autoscaler.
- CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"`
-
- // desired number of replicas of pods managed by this autoscaler.
- DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"`
-
- // current average CPU utilization over all pods, represented as a percentage of requested CPU,
- // e.g. 70 means that an average pod is using now 70% of its requested CPU.
- // +optional
- CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// configuration of a horizontal pod autoscaler.
-type HorizontalPodAutoscaler struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // current information about the autoscaler.
- // +optional
- Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// list of horizontal pod autoscaler objects.
-type HorizontalPodAutoscalerList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // list of horizontal pod autoscaler objects.
- Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Scale represents a scaling request for a resource.
-type Scale struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
- // +optional
- Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// ScaleSpec describes the attributes of a scale subresource.
-type ScaleSpec struct {
- // desired number of instances for the scaled object.
- // +optional
- Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-}
-
-// ScaleStatus represents the current status of a scale subresource.
-type ScaleStatus struct {
- // actual number of observed instances of the scaled object.
- Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
-
- // label query over pods that should match the replicas count. This is same
- // as the label selector but in the string format to avoid introspection
- // by clients. The string will be in the same format as the query-param syntax.
- // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
- // +optional
- Selector string `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
-}
-
-// the types below are used in the alpha metrics annotation
-
-// MetricSourceType indicates the type of metric.
-type MetricSourceType string
-
-var (
- // ObjectMetricSourceType is a metric describing a kubernetes object
- // (for example, hits-per-second on an Ingress object).
- ObjectMetricSourceType MetricSourceType = "Object"
- // PodsMetricSourceType is a metric describing each pod in the current scale
- // target (for example, transactions-processed-per-second). The values
- // will be averaged together before being compared to the target value.
- PodsMetricSourceType MetricSourceType = "Pods"
- // ResourceMetricSourceType is a resource metric known to Kubernetes, as
- // specified in requests and limits, describing each pod in the current
- // scale target (e.g. CPU or memory). Such metrics are built in to
- // Kubernetes, and have special scaling options on top of those available
- // to normal per-pod metrics (the "pods" source).
- ResourceMetricSourceType MetricSourceType = "Resource"
- // ExternalMetricSourceType is a global metric that is not associated
- // with any Kubernetes object. It allows autoscaling based on information
- // coming from components running outside of cluster
- // (for example length of queue in cloud messaging service, or
- // QPS from loadbalancer running outside of cluster).
- ExternalMetricSourceType MetricSourceType = "External"
-)
-
-// MetricSpec specifies how to scale based on a single metric
-// (only `type` and one other matching field should be set at once).
-type MetricSpec struct {
- // type is the type of metric source. It should be one of "Object",
- // "Pods" or "Resource", each mapping to a matching field in the object.
- Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
-
- // object refers to a metric describing a single kubernetes object
- // (for example, hits-per-second on an Ingress object).
- // +optional
- Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
- // pods refers to a metric describing each pod in the current scale target
- // (for example, transactions-processed-per-second). The values will be
- // averaged together before being compared to the target value.
- // +optional
- Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
- // resource refers to a resource metric (such as those specified in
- // requests and limits) known to Kubernetes describing each pod in the
- // current scale target (e.g. CPU or memory). Such metrics are built in to
- // Kubernetes, and have special scaling options on top of those available
- // to normal per-pod metrics using the "pods" source.
- // +optional
- Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
- // external refers to a global metric that is not associated
- // with any Kubernetes object. It allows autoscaling based on information
- // coming from components running outside of cluster
- // (for example length of queue in cloud messaging service, or
- // QPS from loadbalancer running outside of cluster).
- // +optional
- External *ExternalMetricSource `json:"external,omitempty" protobuf:"bytes,5,opt,name=external"`
-}
-
-// ObjectMetricSource indicates how to scale on a metric describing a
-// kubernetes object (for example, hits-per-second on an Ingress object).
-type ObjectMetricSource struct {
- // target is the described Kubernetes object.
- Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
-
- // metricName is the name of the metric in question.
- MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
- // targetValue is the target value of the metric (as a quantity).
- TargetValue resource.Quantity `json:"targetValue" protobuf:"bytes,3,name=targetValue"`
-}
-
-// PodsMetricSource indicates how to scale on a metric describing each pod in
-// the current scale target (for example, transactions-processed-per-second).
-// The values will be averaged together before being compared to the target
-// value.
-type PodsMetricSource struct {
- // metricName is the name of the metric in question
- MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
- // targetAverageValue is the target value of the average of the
- // metric across all relevant pods (as a quantity)
- TargetAverageValue resource.Quantity `json:"targetAverageValue" protobuf:"bytes,2,name=targetAverageValue"`
-}
-
-// ResourceMetricSource indicates how to scale on a resource metric known to
-// Kubernetes, as specified in requests and limits, describing each pod in the
-// current scale target (e.g. CPU or memory). The values will be averaged
-// together before being compared to the target. Such metrics are built in to
-// Kubernetes, and have special scaling options on top of those available to
-// normal per-pod metrics using the "pods" source. Only one "target" type
-// should be set.
-type ResourceMetricSource struct {
- // name is the name of the resource in question.
- Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
- // targetAverageUtilization is the target value of the average of the
- // resource metric across all relevant pods, represented as a percentage of
- // the requested value of the resource for the pods.
- // +optional
- TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"`
- // targetAverageValue is the target value of the average of the
- // resource metric across all relevant pods, as a raw value (instead of as
- // a percentage of the request), similar to the "pods" metric source type.
- // +optional
- TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"`
-}
-
-// ExternalMetricSource indicates how to scale on a metric not associated with
-// any Kubernetes object (for example length of queue in cloud
-// messaging service, or QPS from loadbalancer running outside of cluster).
-type ExternalMetricSource struct {
- // metricName is the name of the metric in question.
- MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
- // metricSelector is used to identify a specific time series
- // within a given metric.
- // +optional
- MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"`
- // targetValue is the target value of the metric (as a quantity).
- // Mutually exclusive with TargetAverageValue.
- // +optional
- TargetValue *resource.Quantity `json:"targetValue,omitempty" protobuf:"bytes,3,opt,name=targetValue"`
- // targetAverageValue is the target per-pod value of global metric (as a quantity).
- // Mutually exclusive with TargetValue.
- // +optional
- TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,4,opt,name=targetAverageValue"`
-}
-
-// MetricStatus describes the last-read state of a single metric.
-type MetricStatus struct {
- // type is the type of metric source. It will be one of "Object",
- // "Pods" or "Resource", each corresponds to a matching field in the object.
- Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
-
- // object refers to a metric describing a single kubernetes object
- // (for example, hits-per-second on an Ingress object).
- // +optional
- Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
- // pods refers to a metric describing each pod in the current scale target
- // (for example, transactions-processed-per-second). The values will be
- // averaged together before being compared to the target value.
- // +optional
- Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
- // resource refers to a resource metric (such as those specified in
- // requests and limits) known to Kubernetes describing each pod in the
- // current scale target (e.g. CPU or memory). Such metrics are built in to
- // Kubernetes, and have special scaling options on top of those available
- // to normal per-pod metrics using the "pods" source.
- // +optional
- Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
- // external refers to a global metric that is not associated
- // with any Kubernetes object. It allows autoscaling based on information
- // coming from components running outside of cluster
- // (for example length of queue in cloud messaging service, or
- // QPS from loadbalancer running outside of cluster).
- // +optional
- External *ExternalMetricStatus `json:"external,omitempty" protobuf:"bytes,5,opt,name=external"`
-}
-
-// HorizontalPodAutoscalerConditionType are the valid conditions of
-// a HorizontalPodAutoscaler.
-type HorizontalPodAutoscalerConditionType string
-
-var (
- // ScalingActive indicates that the HPA controller is able to scale if necessary:
- // it's correctly configured, can fetch the desired metrics, and isn't disabled.
- ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
- // AbleToScale indicates a lack of transient issues which prevent scaling from occurring,
- // such as being in a backoff window, or being unable to access/update the target scale.
- AbleToScale HorizontalPodAutoscalerConditionType = "AbleToScale"
- // ScalingLimited indicates that the calculated scale based on metrics would be above or
- // below the range for the HPA, and has thus been capped.
- ScalingLimited HorizontalPodAutoscalerConditionType = "ScalingLimited"
-)
-
-// HorizontalPodAutoscalerCondition describes the state of
-// a HorizontalPodAutoscaler at a certain point.
-type HorizontalPodAutoscalerCondition struct {
- // type describes the current condition
- Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
- // status is the status of the condition (True, False, Unknown)
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
- // lastTransitionTime is the last time the condition transitioned from
- // one status to another
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // reason is the reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // message is a human-readable explanation containing details about
- // the transition
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// ObjectMetricStatus indicates the current value of a metric describing a
-// kubernetes object (for example, hits-per-second on an Ingress object).
-type ObjectMetricStatus struct {
- // target is the described Kubernetes object.
- Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
-
- // metricName is the name of the metric in question.
- MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
- // currentValue is the current value of the metric (as a quantity).
- CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
-}
-
-// PodsMetricStatus indicates the current value of a metric describing each pod in
-// the current scale target (for example, transactions-processed-per-second).
-type PodsMetricStatus struct {
- // metricName is the name of the metric in question
- MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
- // currentAverageValue is the current value of the average of the
- // metric across all relevant pods (as a quantity)
- CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,2,name=currentAverageValue"`
-}
-
-// ResourceMetricStatus indicates the current value of a resource metric known to
-// Kubernetes, as specified in requests and limits, describing each pod in the
-// current scale target (e.g. CPU or memory). Such metrics are built in to
-// Kubernetes, and have special scaling options on top of those available to
-// normal per-pod metrics using the "pods" source.
-type ResourceMetricStatus struct {
- // name is the name of the resource in question.
- Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
- // currentAverageUtilization is the current value of the average of the
- // resource metric across all relevant pods, represented as a percentage of
- // the requested value of the resource for the pods. It will only be
- // present if `targetAverageValue` was set in the corresponding metric
- // specification.
- // +optional
- CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"`
- // currentAverageValue is the current value of the average of the
- // resource metric across all relevant pods, as a raw value (instead of as
- // a percentage of the request), similar to the "pods" metric source type.
- // It will always be set, regardless of the corresponding metric specification.
- CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"`
-}
-
-// ExternalMetricStatus indicates the current value of a global metric
-// not associated with any Kubernetes object.
-type ExternalMetricStatus struct {
- // metricName is the name of a metric used for autoscaling in
- // metric system.
- MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
- // metricSelector is used to identify a specific time series
- // within a given metric.
- // +optional
- MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"`
- // currentValue is the current value of the metric (as a quantity)
- CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
- // currentAverageValue is the current value of metric averaged over autoscaled pods.
- // +optional
- CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty" protobuf:"bytes,4,opt,name=currentAverageValue"`
-}
diff --git a/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go
deleted file mode 100644
index ec364f53e..000000000
--- a/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
-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 v1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_CrossVersionObjectReference = map[string]string{
- "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
- "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"",
- "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
- "apiVersion": "API version of the referent",
-}
-
-func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
- return map_CrossVersionObjectReference
-}
-
-var map_ExternalMetricSource = map[string]string{
- "": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).",
- "metricName": "metricName is the name of the metric in question.",
- "metricSelector": "metricSelector is used to identify a specific time series within a given metric.",
- "targetValue": "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.",
- "targetAverageValue": "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.",
-}
-
-func (ExternalMetricSource) SwaggerDoc() map[string]string {
- return map_ExternalMetricSource
-}
-
-var map_ExternalMetricStatus = map[string]string{
- "": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.",
- "metricName": "metricName is the name of a metric used for autoscaling in metric system.",
- "metricSelector": "metricSelector is used to identify a specific time series within a given metric.",
- "currentValue": "currentValue is the current value of the metric (as a quantity)",
- "currentAverageValue": "currentAverageValue is the current value of metric averaged over autoscaled pods.",
-}
-
-func (ExternalMetricStatus) SwaggerDoc() map[string]string {
- return map_ExternalMetricStatus
-}
-
-var map_HorizontalPodAutoscaler = map[string]string{
- "": "configuration of a horizontal pod autoscaler.",
- "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
- "status": "current information about the autoscaler.",
-}
-
-func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
- return map_HorizontalPodAutoscaler
-}
-
-var map_HorizontalPodAutoscalerCondition = map[string]string{
- "": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.",
- "type": "type describes the current condition",
- "status": "status is the status of the condition (True, False, Unknown)",
- "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another",
- "reason": "reason is the reason for the condition's last transition.",
- "message": "message is a human-readable explanation containing details about the transition",
-}
-
-func (HorizontalPodAutoscalerCondition) SwaggerDoc() map[string]string {
- return map_HorizontalPodAutoscalerCondition
-}
-
-var map_HorizontalPodAutoscalerList = map[string]string{
- "": "list of horizontal pod autoscaler objects.",
- "metadata": "Standard list metadata.",
- "items": "list of horizontal pod autoscaler objects.",
-}
-
-func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
- return map_HorizontalPodAutoscalerList
-}
-
-var map_HorizontalPodAutoscalerSpec = map[string]string{
- "": "specification of a horizontal pod autoscaler.",
- "scaleTargetRef": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.",
- "minReplicas": "lower limit for the number of pods that can be set by the autoscaler, default 1.",
- "maxReplicas": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
- "targetCPUUtilizationPercentage": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
-}
-
-func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
- return map_HorizontalPodAutoscalerSpec
-}
-
-var map_HorizontalPodAutoscalerStatus = map[string]string{
- "": "current status of a horizontal pod autoscaler",
- "observedGeneration": "most recent generation observed by this autoscaler.",
- "lastScaleTime": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.",
- "currentReplicas": "current number of replicas of pods managed by this autoscaler.",
- "desiredReplicas": "desired number of replicas of pods managed by this autoscaler.",
- "currentCPUUtilizationPercentage": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
-}
-
-func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
- return map_HorizontalPodAutoscalerStatus
-}
-
-var map_MetricSpec = map[string]string{
- "": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).",
- "type": "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.",
- "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
- "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
- "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
- "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).",
-}
-
-func (MetricSpec) SwaggerDoc() map[string]string {
- return map_MetricSpec
-}
-
-var map_MetricStatus = map[string]string{
- "": "MetricStatus describes the last-read state of a single metric.",
- "type": "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.",
- "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
- "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
- "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
- "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).",
-}
-
-func (MetricStatus) SwaggerDoc() map[string]string {
- return map_MetricStatus
-}
-
-var map_ObjectMetricSource = map[string]string{
- "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
- "target": "target is the described Kubernetes object.",
- "metricName": "metricName is the name of the metric in question.",
- "targetValue": "targetValue is the target value of the metric (as a quantity).",
-}
-
-func (ObjectMetricSource) SwaggerDoc() map[string]string {
- return map_ObjectMetricSource
-}
-
-var map_ObjectMetricStatus = map[string]string{
- "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
- "target": "target is the described Kubernetes object.",
- "metricName": "metricName is the name of the metric in question.",
- "currentValue": "currentValue is the current value of the metric (as a quantity).",
-}
-
-func (ObjectMetricStatus) SwaggerDoc() map[string]string {
- return map_ObjectMetricStatus
-}
-
-var map_PodsMetricSource = map[string]string{
- "": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
- "metricName": "metricName is the name of the metric in question",
- "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
-}
-
-func (PodsMetricSource) SwaggerDoc() map[string]string {
- return map_PodsMetricSource
-}
-
-var map_PodsMetricStatus = map[string]string{
- "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).",
- "metricName": "metricName is the name of the metric in question",
- "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
-}
-
-func (PodsMetricStatus) SwaggerDoc() map[string]string {
- return map_PodsMetricStatus
-}
-
-var map_ResourceMetricSource = map[string]string{
- "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.",
- "name": "name is the name of the resource in question.",
- "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.",
- "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.",
-}
-
-func (ResourceMetricSource) SwaggerDoc() map[string]string {
- return map_ResourceMetricSource
-}
-
-var map_ResourceMetricStatus = map[string]string{
- "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
- "name": "name is the name of the resource in question.",
- "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.",
- "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.",
-}
-
-func (ResourceMetricStatus) SwaggerDoc() map[string]string {
- return map_ResourceMetricStatus
-}
-
-var map_Scale = map[string]string{
- "": "Scale represents a scaling request for a resource.",
- "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
- "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
- "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.",
-}
-
-func (Scale) SwaggerDoc() map[string]string {
- return map_Scale
-}
-
-var map_ScaleSpec = map[string]string{
- "": "ScaleSpec describes the attributes of a scale subresource.",
- "replicas": "desired number of instances for the scaled object.",
-}
-
-func (ScaleSpec) SwaggerDoc() map[string]string {
- return map_ScaleSpec
-}
-
-var map_ScaleStatus = map[string]string{
- "": "ScaleStatus represents the current status of a scale subresource.",
- "replicas": "actual number of observed instances of the scaled object.",
- "selector": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
-}
-
-func (ScaleStatus) SwaggerDoc() map[string]string {
- return map_ScaleStatus
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/autoscaling/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/autoscaling/v1/zz_generated.deepcopy.go
deleted file mode 100644
index 011275be4..000000000
--- a/vendor/k8s.io/api/autoscaling/v1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,569 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1
-
-import (
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CrossVersionObjectReference) DeepCopyInto(out *CrossVersionObjectReference) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossVersionObjectReference.
-func (in *CrossVersionObjectReference) DeepCopy() *CrossVersionObjectReference {
- if in == nil {
- return nil
- }
- out := new(CrossVersionObjectReference)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ExternalMetricSource) DeepCopyInto(out *ExternalMetricSource) {
- *out = *in
- if in.MetricSelector != nil {
- in, out := &in.MetricSelector, &out.MetricSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(meta_v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.TargetValue != nil {
- in, out := &in.TargetValue, &out.TargetValue
- if *in == nil {
- *out = nil
- } else {
- x := (*in).DeepCopy()
- *out = &x
- }
- }
- if in.TargetAverageValue != nil {
- in, out := &in.TargetAverageValue, &out.TargetAverageValue
- if *in == nil {
- *out = nil
- } else {
- x := (*in).DeepCopy()
- *out = &x
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricSource.
-func (in *ExternalMetricSource) DeepCopy() *ExternalMetricSource {
- if in == nil {
- return nil
- }
- out := new(ExternalMetricSource)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ExternalMetricStatus) DeepCopyInto(out *ExternalMetricStatus) {
- *out = *in
- if in.MetricSelector != nil {
- in, out := &in.MetricSelector, &out.MetricSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(meta_v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- out.CurrentValue = in.CurrentValue.DeepCopy()
- if in.CurrentAverageValue != nil {
- in, out := &in.CurrentAverageValue, &out.CurrentAverageValue
- if *in == nil {
- *out = nil
- } else {
- x := (*in).DeepCopy()
- *out = &x
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricStatus.
-func (in *ExternalMetricStatus) DeepCopy() *ExternalMetricStatus {
- if in == nil {
- return nil
- }
- out := new(ExternalMetricStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HorizontalPodAutoscaler) DeepCopyInto(out *HorizontalPodAutoscaler) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscaler.
-func (in *HorizontalPodAutoscaler) DeepCopy() *HorizontalPodAutoscaler {
- if in == nil {
- return nil
- }
- out := new(HorizontalPodAutoscaler)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *HorizontalPodAutoscaler) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HorizontalPodAutoscalerCondition) DeepCopyInto(out *HorizontalPodAutoscalerCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerCondition.
-func (in *HorizontalPodAutoscalerCondition) DeepCopy() *HorizontalPodAutoscalerCondition {
- if in == nil {
- return nil
- }
- out := new(HorizontalPodAutoscalerCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HorizontalPodAutoscalerList) DeepCopyInto(out *HorizontalPodAutoscalerList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]HorizontalPodAutoscaler, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerList.
-func (in *HorizontalPodAutoscalerList) DeepCopy() *HorizontalPodAutoscalerList {
- if in == nil {
- return nil
- }
- out := new(HorizontalPodAutoscalerList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *HorizontalPodAutoscalerList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HorizontalPodAutoscalerSpec) DeepCopyInto(out *HorizontalPodAutoscalerSpec) {
- *out = *in
- out.ScaleTargetRef = in.ScaleTargetRef
- if in.MinReplicas != nil {
- in, out := &in.MinReplicas, &out.MinReplicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.TargetCPUUtilizationPercentage != nil {
- in, out := &in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerSpec.
-func (in *HorizontalPodAutoscalerSpec) DeepCopy() *HorizontalPodAutoscalerSpec {
- if in == nil {
- return nil
- }
- out := new(HorizontalPodAutoscalerSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HorizontalPodAutoscalerStatus) DeepCopyInto(out *HorizontalPodAutoscalerStatus) {
- *out = *in
- if in.ObservedGeneration != nil {
- in, out := &in.ObservedGeneration, &out.ObservedGeneration
- if *in == nil {
- *out = nil
- } else {
- *out = new(int64)
- **out = **in
- }
- }
- if in.LastScaleTime != nil {
- in, out := &in.LastScaleTime, &out.LastScaleTime
- if *in == nil {
- *out = nil
- } else {
- *out = (*in).DeepCopy()
- }
- }
- if in.CurrentCPUUtilizationPercentage != nil {
- in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerStatus.
-func (in *HorizontalPodAutoscalerStatus) DeepCopy() *HorizontalPodAutoscalerStatus {
- if in == nil {
- return nil
- }
- out := new(HorizontalPodAutoscalerStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MetricSpec) DeepCopyInto(out *MetricSpec) {
- *out = *in
- if in.Object != nil {
- in, out := &in.Object, &out.Object
- if *in == nil {
- *out = nil
- } else {
- *out = new(ObjectMetricSource)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.Pods != nil {
- in, out := &in.Pods, &out.Pods
- if *in == nil {
- *out = nil
- } else {
- *out = new(PodsMetricSource)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.Resource != nil {
- in, out := &in.Resource, &out.Resource
- if *in == nil {
- *out = nil
- } else {
- *out = new(ResourceMetricSource)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.External != nil {
- in, out := &in.External, &out.External
- if *in == nil {
- *out = nil
- } else {
- *out = new(ExternalMetricSource)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricSpec.
-func (in *MetricSpec) DeepCopy() *MetricSpec {
- if in == nil {
- return nil
- }
- out := new(MetricSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MetricStatus) DeepCopyInto(out *MetricStatus) {
- *out = *in
- if in.Object != nil {
- in, out := &in.Object, &out.Object
- if *in == nil {
- *out = nil
- } else {
- *out = new(ObjectMetricStatus)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.Pods != nil {
- in, out := &in.Pods, &out.Pods
- if *in == nil {
- *out = nil
- } else {
- *out = new(PodsMetricStatus)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.Resource != nil {
- in, out := &in.Resource, &out.Resource
- if *in == nil {
- *out = nil
- } else {
- *out = new(ResourceMetricStatus)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.External != nil {
- in, out := &in.External, &out.External
- if *in == nil {
- *out = nil
- } else {
- *out = new(ExternalMetricStatus)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricStatus.
-func (in *MetricStatus) DeepCopy() *MetricStatus {
- if in == nil {
- return nil
- }
- out := new(MetricStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) {
- *out = *in
- out.Target = in.Target
- out.TargetValue = in.TargetValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMetricSource.
-func (in *ObjectMetricSource) DeepCopy() *ObjectMetricSource {
- if in == nil {
- return nil
- }
- out := new(ObjectMetricSource)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) {
- *out = *in
- out.Target = in.Target
- out.CurrentValue = in.CurrentValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMetricStatus.
-func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus {
- if in == nil {
- return nil
- }
- out := new(ObjectMetricStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) {
- *out = *in
- out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodsMetricSource.
-func (in *PodsMetricSource) DeepCopy() *PodsMetricSource {
- if in == nil {
- return nil
- }
- out := new(PodsMetricSource)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) {
- *out = *in
- out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodsMetricStatus.
-func (in *PodsMetricStatus) DeepCopy() *PodsMetricStatus {
- if in == nil {
- return nil
- }
- out := new(PodsMetricStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ResourceMetricSource) DeepCopyInto(out *ResourceMetricSource) {
- *out = *in
- if in.TargetAverageUtilization != nil {
- in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.TargetAverageValue != nil {
- in, out := &in.TargetAverageValue, &out.TargetAverageValue
- if *in == nil {
- *out = nil
- } else {
- x := (*in).DeepCopy()
- *out = &x
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceMetricSource.
-func (in *ResourceMetricSource) DeepCopy() *ResourceMetricSource {
- if in == nil {
- return nil
- }
- out := new(ResourceMetricSource)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ResourceMetricStatus) DeepCopyInto(out *ResourceMetricStatus) {
- *out = *in
- if in.CurrentAverageUtilization != nil {
- in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceMetricStatus.
-func (in *ResourceMetricStatus) DeepCopy() *ResourceMetricStatus {
- if in == nil {
- return nil
- }
- out := new(ResourceMetricStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Scale) DeepCopyInto(out *Scale) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- out.Spec = in.Spec
- out.Status = in.Status
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scale.
-func (in *Scale) DeepCopy() *Scale {
- if in == nil {
- return nil
- }
- out := new(Scale)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Scale) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ScaleSpec) DeepCopyInto(out *ScaleSpec) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleSpec.
-func (in *ScaleSpec) DeepCopy() *ScaleSpec {
- if in == nil {
- return nil
- }
- out := new(ScaleSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ScaleStatus) DeepCopyInto(out *ScaleStatus) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleStatus.
-func (in *ScaleStatus) DeepCopy() *ScaleStatus {
- if in == nil {
- return nil
- }
- out := new(ScaleStatus)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/doc.go b/vendor/k8s.io/api/autoscaling/v2beta1/doc.go
deleted file mode 100644
index da9789e5c..000000000
--- a/vendor/k8s.io/api/autoscaling/v2beta1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-package v2beta1 // import "k8s.io/api/autoscaling/v2beta1"
diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go b/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go
deleted file mode 100644
index 784e4be2b..000000000
--- a/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go
+++ /dev/null
@@ -1,4036 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v2beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto
-
- It has these top-level messages:
- CrossVersionObjectReference
- ExternalMetricSource
- ExternalMetricStatus
- HorizontalPodAutoscaler
- HorizontalPodAutoscalerCondition
- HorizontalPodAutoscalerList
- HorizontalPodAutoscalerSpec
- HorizontalPodAutoscalerStatus
- MetricSpec
- MetricStatus
- ObjectMetricSource
- ObjectMetricStatus
- PodsMetricSource
- PodsMetricStatus
- ResourceMetricSource
- ResourceMetricStatus
-*/
-package v2beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
-func (*CrossVersionObjectReference) ProtoMessage() {}
-func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{0}
-}
-
-func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} }
-func (*ExternalMetricSource) ProtoMessage() {}
-func (*ExternalMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} }
-func (*ExternalMetricStatus) ProtoMessage() {}
-func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
-func (*HorizontalPodAutoscaler) ProtoMessage() {}
-func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} }
-func (*HorizontalPodAutoscalerCondition) ProtoMessage() {}
-func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{4}
-}
-
-func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
-func (*HorizontalPodAutoscalerList) ProtoMessage() {}
-func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{5}
-}
-
-func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
-func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
-func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{6}
-}
-
-func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
-func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
-func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{7}
-}
-
-func (m *MetricSpec) Reset() { *m = MetricSpec{} }
-func (*MetricSpec) ProtoMessage() {}
-func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *MetricStatus) Reset() { *m = MetricStatus{} }
-func (*MetricStatus) ProtoMessage() {}
-func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
-
-func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} }
-func (*ObjectMetricSource) ProtoMessage() {}
-func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} }
-func (*ObjectMetricStatus) ProtoMessage() {}
-func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
-
-func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} }
-func (*PodsMetricSource) ProtoMessage() {}
-func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
-
-func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} }
-func (*PodsMetricStatus) ProtoMessage() {}
-func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
-
-func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} }
-func (*ResourceMetricSource) ProtoMessage() {}
-func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
-
-func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} }
-func (*ResourceMetricStatus) ProtoMessage() {}
-func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
-
-func init() {
- proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference")
- proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ExternalMetricSource")
- proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ExternalMetricStatus")
- proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscaler")
- proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition")
- proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerList")
- proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec")
- proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus")
- proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v2beta1.MetricSpec")
- proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.MetricStatus")
- proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ObjectMetricSource")
- proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ObjectMetricStatus")
- proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.PodsMetricSource")
- proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.PodsMetricStatus")
- proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ResourceMetricSource")
- proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ResourceMetricStatus")
-}
-func (m *CrossVersionObjectReference) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
- i += copy(dAtA[i:], m.Kind)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
- i += copy(dAtA[i:], m.APIVersion)
- return i, nil
-}
-
-func (m *ExternalMetricSource) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ExternalMetricSource) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- if m.MetricSelector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MetricSelector.Size()))
- n1, err := m.MetricSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- }
- if m.TargetValue != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
- n2, err := m.TargetValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- }
- if m.TargetAverageValue != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
- n3, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- }
- return i, nil
-}
-
-func (m *ExternalMetricStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ExternalMetricStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- if m.MetricSelector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MetricSelector.Size()))
- n4, err := m.MetricSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
- n5, err := m.CurrentValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if m.CurrentAverageValue != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
- n6, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- }
- return i, nil
-}
-
-func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n8, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n9, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- return i, nil
-}
-
-func (m *HorizontalPodAutoscalerCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n10, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *HorizontalPodAutoscalerList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n11, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *HorizontalPodAutoscalerSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleTargetRef.Size()))
- n12, err := m.ScaleTargetRef.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- if m.MinReplicas != nil {
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.MinReplicas))
- }
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxReplicas))
- if len(m.Metrics) > 0 {
- for _, msg := range m.Metrics {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *HorizontalPodAutoscalerStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.ObservedGeneration != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
- }
- if m.LastScaleTime != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastScaleTime.Size()))
- n13, err := m.LastScaleTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- }
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredReplicas))
- if len(m.CurrentMetrics) > 0 {
- for _, msg := range m.CurrentMetrics {
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *MetricSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.Object != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
- n14, err := m.Object.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n14
- }
- if m.Pods != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
- n15, err := m.Pods.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n15
- }
- if m.Resource != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
- n16, err := m.Resource.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n16
- }
- if m.External != nil {
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.External.Size()))
- n17, err := m.External.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n17
- }
- return i, nil
-}
-
-func (m *MetricStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.Object != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
- n18, err := m.Object.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n18
- }
- if m.Pods != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
- n19, err := m.Pods.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n19
- }
- if m.Resource != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
- n20, err := m.Resource.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n20
- }
- if m.External != nil {
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.External.Size()))
- n21, err := m.External.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n21
- }
- return i, nil
-}
-
-func (m *ObjectMetricSource) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
- n22, err := m.Target.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n22
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
- n23, err := m.TargetValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n23
- return i, nil
-}
-
-func (m *ObjectMetricStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
- n24, err := m.Target.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n24
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
- n25, err := m.CurrentValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n25
- return i, nil
-}
-
-func (m *PodsMetricSource) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
- n26, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n26
- return i, nil
-}
-
-func (m *PodsMetricStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
- i += copy(dAtA[i:], m.MetricName)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
- n27, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n27
- return i, nil
-}
-
-func (m *ResourceMetricSource) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- if m.TargetAverageUtilization != nil {
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetAverageUtilization))
- }
- if m.TargetAverageValue != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
- n28, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n28
- }
- return i, nil
-}
-
-func (m *ResourceMetricStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- if m.CurrentAverageUtilization != nil {
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentAverageUtilization))
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
- n29, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n29
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *CrossVersionObjectReference) Size() (n int) {
- var l int
- _ = l
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.APIVersion)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ExternalMetricSource) Size() (n int) {
- var l int
- _ = l
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- if m.MetricSelector != nil {
- l = m.MetricSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.TargetValue != nil {
- l = m.TargetValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.TargetAverageValue != nil {
- l = m.TargetAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ExternalMetricStatus) Size() (n int) {
- var l int
- _ = l
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- if m.MetricSelector != nil {
- l = m.MetricSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.CurrentValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.CurrentAverageValue != nil {
- l = m.CurrentAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *HorizontalPodAutoscaler) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *HorizontalPodAutoscalerCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *HorizontalPodAutoscalerList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *HorizontalPodAutoscalerSpec) Size() (n int) {
- var l int
- _ = l
- l = m.ScaleTargetRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.MinReplicas != nil {
- n += 1 + sovGenerated(uint64(*m.MinReplicas))
- }
- n += 1 + sovGenerated(uint64(m.MaxReplicas))
- if len(m.Metrics) > 0 {
- for _, e := range m.Metrics {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *HorizontalPodAutoscalerStatus) Size() (n int) {
- var l int
- _ = l
- if m.ObservedGeneration != nil {
- n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
- }
- if m.LastScaleTime != nil {
- l = m.LastScaleTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- n += 1 + sovGenerated(uint64(m.CurrentReplicas))
- n += 1 + sovGenerated(uint64(m.DesiredReplicas))
- if len(m.CurrentMetrics) > 0 {
- for _, e := range m.CurrentMetrics {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *MetricSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.Object != nil {
- l = m.Object.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Pods != nil {
- l = m.Pods.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Resource != nil {
- l = m.Resource.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.External != nil {
- l = m.External.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *MetricStatus) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.Object != nil {
- l = m.Object.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Pods != nil {
- l = m.Pods.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Resource != nil {
- l = m.Resource.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.External != nil {
- l = m.External.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ObjectMetricSource) Size() (n int) {
- var l int
- _ = l
- l = m.Target.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.TargetValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ObjectMetricStatus) Size() (n int) {
- var l int
- _ = l
- l = m.Target.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.CurrentValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *PodsMetricSource) Size() (n int) {
- var l int
- _ = l
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.TargetAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *PodsMetricStatus) Size() (n int) {
- var l int
- _ = l
- l = len(m.MetricName)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.CurrentAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourceMetricSource) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if m.TargetAverageUtilization != nil {
- n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization))
- }
- if m.TargetAverageValue != nil {
- l = m.TargetAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ResourceMetricStatus) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if m.CurrentAverageUtilization != nil {
- n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization))
- }
- l = m.CurrentAverageValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *CrossVersionObjectReference) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CrossVersionObjectReference{`,
- `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ExternalMetricSource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ExternalMetricSource{`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `TargetValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
- `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ExternalMetricStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ExternalMetricStatus{`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `CurrentAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.CurrentAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HorizontalPodAutoscaler) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HorizontalPodAutoscaler{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HorizontalPodAutoscalerCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HorizontalPodAutoscalerList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HorizontalPodAutoscalerList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HorizontalPodAutoscalerSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`,
- `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
- `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`,
- `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`,
- `Metrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Metrics), "MetricSpec", "MetricSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HorizontalPodAutoscalerStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`,
- `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
- `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
- `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
- `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`,
- `CurrentMetrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentMetrics), "MetricStatus", "MetricStatus", 1), `&`, ``, 1) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "HorizontalPodAutoscalerCondition", "HorizontalPodAutoscalerCondition", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *MetricSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&MetricSpec{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`,
- `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`,
- `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`,
- `External:` + strings.Replace(fmt.Sprintf("%v", this.External), "ExternalMetricSource", "ExternalMetricSource", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *MetricStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&MetricStatus{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`,
- `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`,
- `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`,
- `External:` + strings.Replace(fmt.Sprintf("%v", this.External), "ExternalMetricStatus", "ExternalMetricStatus", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ObjectMetricSource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ObjectMetricSource{`,
- `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ObjectMetricStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ObjectMetricStatus{`,
- `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodsMetricSource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodsMetricSource{`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `TargetAverageValue:` + strings.Replace(strings.Replace(this.TargetAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodsMetricStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodsMetricStatus{`,
- `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
- `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceMetricSource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceMetricSource{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`,
- `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceMetricStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceMetricStatus{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`,
- `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Kind = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIVersion = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ExternalMetricSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ExternalMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MetricSelector == nil {
- m.MetricSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.TargetValue == nil {
- m.TargetValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
- }
- if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.TargetAverageValue == nil {
- m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
- }
- if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ExternalMetricStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ExternalMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MetricSelector == nil {
- m.MetricSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.CurrentAverageValue == nil {
- m.CurrentAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
- }
- if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HorizontalPodAutoscalerList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, HorizontalPodAutoscaler{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HorizontalPodAutoscalerSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ScaleTargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.MinReplicas = &v
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType)
- }
- m.MaxReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MaxReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Metrics = append(m.Metrics, MetricSpec{})
- if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HorizontalPodAutoscalerStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ObservedGeneration = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.LastScaleTime == nil {
- m.LastScaleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
- }
- if err := m.LastScaleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
- }
- m.CurrentReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.CurrentReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType)
- }
- m.DesiredReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.DesiredReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentMetrics", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CurrentMetrics = append(m.CurrentMetrics, MetricStatus{})
- if err := m.CurrentMetrics[len(m.CurrentMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, HorizontalPodAutoscalerCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *MetricSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Object == nil {
- m.Object = &ObjectMetricSource{}
- }
- if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Pods == nil {
- m.Pods = &PodsMetricSource{}
- }
- if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Resource == nil {
- m.Resource = &ResourceMetricSource{}
- }
- if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field External", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.External == nil {
- m.External = &ExternalMetricSource{}
- }
- if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *MetricStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Object == nil {
- m.Object = &ObjectMetricStatus{}
- }
- if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Pods == nil {
- m.Pods = &PodsMetricStatus{}
- }
- if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Resource == nil {
- m.Resource = &ResourceMetricStatus{}
- }
- if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field External", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.External == nil {
- m.External = &ExternalMetricStatus{}
- }
- if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ObjectMetricSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ObjectMetricStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodsMetricSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodsMetricStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MetricName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceMetricSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.TargetAverageUtilization = &v
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.TargetAverageValue == nil {
- m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
- }
- if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CurrentAverageUtilization = &v
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 1441 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x8f, 0x1b, 0xc5,
- 0x12, 0x5f, 0x7f, 0xec, 0x66, 0xd3, 0xde, 0xec, 0xe6, 0x75, 0xa2, 0xc4, 0xd9, 0xbc, 0xd8, 0xab,
- 0xd1, 0xd3, 0x53, 0x88, 0xc8, 0x4c, 0xe2, 0x2c, 0x1f, 0x12, 0x42, 0x62, 0x6d, 0x20, 0x89, 0x58,
- 0x27, 0xa1, 0x77, 0x13, 0x21, 0x08, 0x88, 0xf6, 0xb8, 0xe3, 0x6d, 0xd6, 0x33, 0x63, 0x75, 0xb7,
- 0xad, 0x6c, 0x10, 0x12, 0x17, 0xee, 0x1c, 0xf8, 0xb8, 0x72, 0x46, 0x70, 0x85, 0x33, 0x48, 0x48,
- 0x39, 0xe6, 0x18, 0x84, 0x64, 0x91, 0xe1, 0xbf, 0xc8, 0x09, 0x4d, 0x77, 0xcf, 0x78, 0xc6, 0xf6,
- 0xac, 0x1d, 0xb3, 0x09, 0x70, 0x9b, 0xee, 0xaa, 0xfa, 0x55, 0x75, 0x55, 0x75, 0x75, 0xd5, 0x80,
- 0xcb, 0xbb, 0x2f, 0x73, 0x93, 0x7a, 0xd6, 0x6e, 0xb7, 0x41, 0x98, 0x4b, 0x04, 0xe1, 0x56, 0x8f,
- 0xb8, 0x4d, 0x8f, 0x59, 0x9a, 0x80, 0x3b, 0xd4, 0xc2, 0x5d, 0xe1, 0x71, 0x1b, 0xb7, 0xa9, 0xdb,
- 0xb2, 0x7a, 0x95, 0x06, 0x11, 0xf8, 0xa2, 0xd5, 0x22, 0x2e, 0x61, 0x58, 0x90, 0xa6, 0xd9, 0x61,
- 0x9e, 0xf0, 0x60, 0x49, 0xf1, 0x9b, 0xb8, 0x43, 0xcd, 0x18, 0xbf, 0xa9, 0xf9, 0x57, 0xcf, 0xb7,
- 0xa8, 0xd8, 0xe9, 0x36, 0x4c, 0xdb, 0x73, 0xac, 0x96, 0xd7, 0xf2, 0x2c, 0x29, 0xd6, 0xe8, 0xde,
- 0x91, 0x2b, 0xb9, 0x90, 0x5f, 0x0a, 0x6e, 0xd5, 0x88, 0xa9, 0xb7, 0x3d, 0x46, 0xac, 0xde, 0x88,
- 0xca, 0xd5, 0xf5, 0x01, 0x8f, 0x83, 0xed, 0x1d, 0xea, 0x12, 0xb6, 0x67, 0x75, 0x76, 0x5b, 0x52,
- 0x88, 0x11, 0xee, 0x75, 0x99, 0x4d, 0x9e, 0x48, 0x8a, 0x5b, 0x0e, 0x11, 0x78, 0x9c, 0x2e, 0x2b,
- 0x4d, 0x8a, 0x75, 0x5d, 0x41, 0x9d, 0x51, 0x35, 0x2f, 0x4e, 0x12, 0xe0, 0xf6, 0x0e, 0x71, 0xf0,
- 0x88, 0xdc, 0xa5, 0x34, 0xb9, 0xae, 0xa0, 0x6d, 0x8b, 0xba, 0x82, 0x0b, 0x36, 0x2c, 0x64, 0x7c,
- 0x99, 0x01, 0xa7, 0x6b, 0xcc, 0xe3, 0xfc, 0x16, 0x61, 0x9c, 0x7a, 0xee, 0xf5, 0xc6, 0x47, 0xc4,
- 0x16, 0x88, 0xdc, 0x21, 0x8c, 0xb8, 0x36, 0x81, 0x6b, 0x20, 0xbf, 0x4b, 0xdd, 0x66, 0x31, 0xb3,
- 0x96, 0x39, 0x7b, 0xb8, 0xba, 0x74, 0xbf, 0x5f, 0x9e, 0xf3, 0xfb, 0xe5, 0xfc, 0x5b, 0xd4, 0x6d,
- 0x22, 0x49, 0x09, 0x38, 0x5c, 0xec, 0x90, 0x62, 0x36, 0xc9, 0x71, 0x0d, 0x3b, 0x04, 0x49, 0x0a,
- 0xac, 0x00, 0x80, 0x3b, 0x54, 0x2b, 0x28, 0xe6, 0x24, 0x1f, 0xd4, 0x7c, 0x60, 0xe3, 0xc6, 0x55,
- 0x4d, 0x41, 0x31, 0x2e, 0xe3, 0xab, 0x1c, 0x38, 0xfe, 0xc6, 0x5d, 0x41, 0x98, 0x8b, 0xdb, 0x75,
- 0x22, 0x18, 0xb5, 0xb7, 0x64, 0x50, 0x02, 0x30, 0x47, 0xae, 0x03, 0x05, 0xda, 0xac, 0x08, 0xac,
- 0x1e, 0x51, 0x50, 0x8c, 0x0b, 0x7a, 0x60, 0x59, 0xad, 0xb6, 0x48, 0x9b, 0xd8, 0xc2, 0x63, 0xd2,
- 0xd8, 0x42, 0xe5, 0x92, 0x39, 0x48, 0xbd, 0xc8, 0x65, 0x66, 0x67, 0xb7, 0x15, 0x6c, 0x70, 0x33,
- 0x88, 0xa8, 0xd9, 0xbb, 0x68, 0x6e, 0xe2, 0x06, 0x69, 0x87, 0xa2, 0x55, 0xe8, 0xf7, 0xcb, 0xcb,
- 0xf5, 0x04, 0x1c, 0x1a, 0x82, 0x87, 0x18, 0x14, 0x04, 0x66, 0x2d, 0x22, 0x6e, 0xe1, 0x76, 0x97,
- 0xc8, 0x23, 0x17, 0x2a, 0xe6, 0x7e, 0xda, 0xcc, 0x30, 0xeb, 0xcc, 0xb7, 0xbb, 0xd8, 0x15, 0x54,
- 0xec, 0x55, 0x57, 0xfc, 0x7e, 0xb9, 0xb0, 0x3d, 0x80, 0x41, 0x71, 0x4c, 0xd8, 0x03, 0x50, 0x2d,
- 0x37, 0x7a, 0x84, 0xe1, 0x16, 0x51, 0x9a, 0xf2, 0x33, 0x69, 0x3a, 0xe1, 0xf7, 0xcb, 0x70, 0x7b,
- 0x04, 0x0d, 0x8d, 0xd1, 0x60, 0x7c, 0x33, 0x1a, 0x18, 0x81, 0x45, 0x97, 0xff, 0x3b, 0x02, 0xb3,
- 0x03, 0x96, 0xec, 0x2e, 0x63, 0xc4, 0xfd, 0x4b, 0x91, 0x39, 0xae, 0x8f, 0xb5, 0x54, 0x8b, 0x61,
- 0xa1, 0x04, 0x32, 0xdc, 0x03, 0xc7, 0xf4, 0xfa, 0x00, 0x02, 0x74, 0xd2, 0xef, 0x97, 0x8f, 0xd5,
- 0x46, 0xe1, 0xd0, 0x38, 0x1d, 0xc6, 0x4f, 0x59, 0x70, 0xf2, 0x8a, 0xc7, 0xe8, 0x3d, 0xcf, 0x15,
- 0xb8, 0x7d, 0xc3, 0x6b, 0x6e, 0xe8, 0xaa, 0x4a, 0x18, 0xfc, 0x10, 0x2c, 0x06, 0xde, 0x6b, 0x62,
- 0x81, 0x65, 0x8c, 0x0a, 0x95, 0x0b, 0xd3, 0xf9, 0x5a, 0x15, 0x86, 0x3a, 0x11, 0x78, 0x10, 0xd5,
- 0xc1, 0x1e, 0x8a, 0x50, 0xe1, 0xfb, 0x20, 0xcf, 0x3b, 0xc4, 0xd6, 0x91, 0x7c, 0xc5, 0xdc, 0xbf,
- 0xba, 0x9b, 0x29, 0x86, 0x6e, 0x75, 0x88, 0x3d, 0x28, 0x26, 0xc1, 0x0a, 0x49, 0x58, 0x48, 0xc0,
- 0x02, 0x97, 0x09, 0xa7, 0x63, 0xf7, 0xea, 0xac, 0x0a, 0x24, 0x48, 0x75, 0x59, 0xab, 0x58, 0x50,
- 0x6b, 0xa4, 0xc1, 0x8d, 0xcf, 0x72, 0x60, 0x2d, 0x45, 0xb2, 0xe6, 0xb9, 0x4d, 0x2a, 0xa8, 0xe7,
- 0xc2, 0x2b, 0x20, 0x2f, 0xf6, 0x3a, 0x61, 0xb2, 0xaf, 0x87, 0xd6, 0x6e, 0xef, 0x75, 0xc8, 0xe3,
- 0x7e, 0xf9, 0x7f, 0x93, 0xe4, 0x03, 0x3e, 0x24, 0x11, 0xe0, 0x66, 0x74, 0xaa, 0x6c, 0x02, 0x4b,
- 0x9b, 0xf5, 0xb8, 0x5f, 0x1e, 0xf3, 0xac, 0x99, 0x11, 0x52, 0xd2, 0xf8, 0xa0, 0x36, 0xb4, 0x31,
- 0x17, 0xdb, 0x0c, 0xbb, 0x5c, 0x69, 0xa2, 0x4e, 0x98, 0xeb, 0xe7, 0xa6, 0x0b, 0x77, 0x20, 0x51,
- 0x5d, 0xd5, 0x56, 0xc0, 0xcd, 0x11, 0x34, 0x34, 0x46, 0x03, 0xfc, 0x3f, 0x58, 0x60, 0x04, 0x73,
- 0xcf, 0x95, 0x69, 0x7e, 0x78, 0xe0, 0x5c, 0x24, 0x77, 0x91, 0xa6, 0xc2, 0xe7, 0xc0, 0x21, 0x87,
- 0x70, 0x8e, 0x5b, 0xa4, 0x38, 0x2f, 0x19, 0x57, 0x34, 0xe3, 0xa1, 0xba, 0xda, 0x46, 0x21, 0xdd,
- 0xf8, 0x35, 0x03, 0x4e, 0xa7, 0xf8, 0x71, 0x93, 0x72, 0x01, 0x6f, 0x8f, 0xe4, 0xb3, 0x39, 0x65,
- 0xed, 0xa0, 0x5c, 0x65, 0xf3, 0x51, 0xad, 0x7b, 0x31, 0xdc, 0x89, 0xe5, 0xf2, 0x6d, 0x30, 0x4f,
- 0x05, 0x71, 0x82, 0xa8, 0xe4, 0xce, 0x16, 0x2a, 0x2f, 0xcd, 0x98, 0x6b, 0xd5, 0x23, 0x5a, 0xc7,
- 0xfc, 0xd5, 0x00, 0x0d, 0x29, 0x50, 0xe3, 0xb7, 0x6c, 0xea, 0xd9, 0x82, 0x84, 0x87, 0x1f, 0x83,
- 0x65, 0xb9, 0x52, 0x95, 0x19, 0x91, 0x3b, 0xfa, 0x84, 0x13, 0xef, 0xd4, 0x3e, 0x0f, 0x7a, 0xf5,
- 0x84, 0x36, 0x65, 0x79, 0x2b, 0x01, 0x8d, 0x86, 0x54, 0xc1, 0x8b, 0xa0, 0xe0, 0x50, 0x17, 0x91,
- 0x4e, 0x9b, 0xda, 0x58, 0xa5, 0xe5, 0xbc, 0x7a, 0x92, 0xea, 0x83, 0x6d, 0x14, 0xe7, 0x81, 0x2f,
- 0x80, 0x82, 0x83, 0xef, 0x46, 0x22, 0x39, 0x29, 0x72, 0x4c, 0xeb, 0x2b, 0xd4, 0x07, 0x24, 0x14,
- 0xe7, 0x83, 0x37, 0x83, 0x6c, 0x08, 0xaa, 0x34, 0x2f, 0xe6, 0xa5, 0x9b, 0xcf, 0x4d, 0x3a, 0x9f,
- 0x2e, 0xf2, 0x41, 0x89, 0x88, 0x65, 0x8e, 0x84, 0x40, 0x21, 0x96, 0xf1, 0x43, 0x1e, 0x9c, 0xd9,
- 0xf7, 0xee, 0xc3, 0x37, 0x01, 0xf4, 0x1a, 0x9c, 0xb0, 0x1e, 0x69, 0x5e, 0x56, 0x6d, 0x51, 0xd0,
- 0x9f, 0x04, 0x3e, 0xce, 0xa9, 0x27, 0xf1, 0xfa, 0x08, 0x15, 0x8d, 0x91, 0x80, 0x36, 0x38, 0x12,
- 0x5c, 0x06, 0xe5, 0x50, 0xaa, 0x5b, 0xa1, 0x27, 0xbb, 0x69, 0xff, 0xf1, 0xfb, 0xe5, 0x23, 0x9b,
- 0x71, 0x10, 0x94, 0xc4, 0x84, 0x1b, 0x60, 0x45, 0xd7, 0xfa, 0x21, 0x07, 0x9f, 0xd4, 0x1e, 0x58,
- 0xa9, 0x25, 0xc9, 0x68, 0x98, 0x3f, 0x80, 0x68, 0x12, 0x4e, 0x19, 0x69, 0x46, 0x10, 0xf9, 0x24,
- 0xc4, 0xeb, 0x49, 0x32, 0x1a, 0xe6, 0x87, 0x6d, 0xb0, 0xac, 0x51, 0xb5, 0xbf, 0x8b, 0xf3, 0x32,
- 0x64, 0xcf, 0x4f, 0x19, 0x32, 0x55, 0x74, 0xa3, 0x1c, 0xac, 0x25, 0xb0, 0xd0, 0x10, 0x36, 0x14,
- 0x00, 0xd8, 0x61, 0x89, 0xe3, 0xc5, 0x05, 0xa9, 0xe9, 0xb5, 0x19, 0xef, 0x60, 0x54, 0x2b, 0x07,
- 0xcf, 0x57, 0xb4, 0xc5, 0x51, 0x4c, 0x8f, 0xf1, 0x6d, 0x0e, 0x80, 0x41, 0x86, 0xc1, 0xf5, 0x44,
- 0x91, 0x5f, 0x1b, 0x2a, 0xf2, 0x47, 0xe3, 0xcd, 0x69, 0xac, 0xa0, 0xdf, 0x02, 0x0b, 0x9e, 0xbc,
- 0x79, 0x3a, 0x19, 0x2a, 0x93, 0xcc, 0x8e, 0xde, 0xd2, 0x08, 0xad, 0x0a, 0x82, 0xd2, 0xa9, 0xef,
- 0xaf, 0x46, 0x83, 0xd7, 0x40, 0xbe, 0xe3, 0x35, 0xc3, 0xc7, 0xef, 0xc2, 0x24, 0xd4, 0x1b, 0x5e,
- 0x93, 0x27, 0x30, 0x17, 0x03, 0xdb, 0x83, 0x5d, 0x24, 0x71, 0xe0, 0x07, 0x60, 0x31, 0x6c, 0x37,
- 0x74, 0x6f, 0xb2, 0x3e, 0x09, 0x13, 0x69, 0xfe, 0x04, 0xee, 0x52, 0x50, 0x41, 0x43, 0x0a, 0x8a,
- 0x30, 0x03, 0x7c, 0xa2, 0xbb, 0x45, 0x59, 0xeb, 0xa7, 0xc0, 0x1f, 0xd7, 0xf6, 0x2b, 0xfc, 0x90,
- 0x82, 0x22, 0x4c, 0xe3, 0xbb, 0x1c, 0x58, 0x4a, 0xb4, 0xa1, 0x7f, 0x47, 0xb8, 0x54, 0x56, 0x1f,
- 0x6c, 0xb8, 0x14, 0xe6, 0xc1, 0x87, 0x4b, 0xe1, 0x3e, 0xbd, 0x70, 0xc5, 0xf0, 0xc7, 0x84, 0xeb,
- 0x8b, 0x2c, 0x80, 0xa3, 0x99, 0x0e, 0x6d, 0xb0, 0xa0, 0x46, 0x8d, 0x83, 0x78, 0xe1, 0xa2, 0xae,
- 0x43, 0x3f, 0x66, 0x1a, 0x7a, 0x68, 0x40, 0xc9, 0x4e, 0x35, 0xa0, 0x90, 0x83, 0x18, 0xe4, 0xa2,
- 0x27, 0x30, 0x6d, 0x98, 0x33, 0xbe, 0x1e, 0x76, 0x8b, 0xca, 0xe5, 0x7f, 0xac, 0x5b, 0x9e, 0xd9,
- 0x18, 0x65, 0xfc, 0x9c, 0x01, 0x47, 0x87, 0x8b, 0xd8, 0x4c, 0xa3, 0xe6, 0xbd, 0xb1, 0xf3, 0x72,
- 0x76, 0x26, 0xc3, 0xa3, 0xbe, 0x78, 0xca, 0x99, 0xf9, 0x97, 0xe4, 0x21, 0x66, 0x9f, 0x97, 0x3f,
- 0x19, 0x3f, 0x54, 0xce, 0x76, 0x8a, 0xd3, 0x5a, 0xd9, 0xf4, 0x83, 0xe5, 0xf7, 0x59, 0x70, 0x7c,
- 0x5c, 0xf5, 0x87, 0x35, 0xfd, 0x0f, 0x48, 0x9d, 0xc2, 0x8a, 0xff, 0x03, 0x7a, 0xdc, 0x2f, 0x97,
- 0xc7, 0x8c, 0x2e, 0x21, 0x4c, 0xec, 0x37, 0xd1, 0x3b, 0xa0, 0x98, 0xf0, 0xdd, 0x4d, 0x41, 0xdb,
- 0xf4, 0x9e, 0x6a, 0xca, 0x54, 0xfb, 0xf9, 0x5f, 0xbf, 0x5f, 0x2e, 0x6e, 0xa7, 0xf0, 0xa0, 0x54,
- 0xe9, 0x94, 0x7f, 0x25, 0xb9, 0xa7, 0xfe, 0xaf, 0xe4, 0xc7, 0x51, 0x7f, 0xa9, 0xd8, 0x1f, 0x88,
- 0xbf, 0xde, 0x03, 0xa7, 0x92, 0x41, 0x1a, 0x75, 0xd8, 0x19, 0xbf, 0x5f, 0x3e, 0x55, 0x4b, 0x63,
- 0x42, 0xe9, 0xf2, 0x69, 0x99, 0x96, 0x7b, 0x36, 0x99, 0x56, 0x3d, 0x7f, 0xff, 0x51, 0x69, 0xee,
- 0xc1, 0xa3, 0xd2, 0xdc, 0xc3, 0x47, 0xa5, 0xb9, 0x4f, 0xfd, 0x52, 0xe6, 0xbe, 0x5f, 0xca, 0x3c,
- 0xf0, 0x4b, 0x99, 0x87, 0x7e, 0x29, 0xf3, 0xbb, 0x5f, 0xca, 0x7c, 0xfe, 0x47, 0x69, 0xee, 0xdd,
- 0x43, 0xba, 0xee, 0xfd, 0x19, 0x00, 0x00, 0xff, 0xff, 0x91, 0x09, 0xa9, 0x38, 0x8c, 0x16, 0x00,
- 0x00,
-}
diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto b/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto
deleted file mode 100644
index b565920c3..000000000
--- a/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.autoscaling.v2beta1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v2beta1";
-
-// CrossVersionObjectReference contains enough information to let you identify the referred resource.
-message CrossVersionObjectReference {
- // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
- optional string kind = 1;
-
- // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
- optional string name = 2;
-
- // API version of the referent
- // +optional
- optional string apiVersion = 3;
-}
-
-// ExternalMetricSource indicates how to scale on a metric not associated with
-// any Kubernetes object (for example length of queue in cloud
-// messaging service, or QPS from loadbalancer running outside of cluster).
-// Exactly one "target" type should be set.
-message ExternalMetricSource {
- // metricName is the name of the metric in question.
- optional string metricName = 1;
-
- // metricSelector is used to identify a specific time series
- // within a given metric.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
-
- // targetValue is the target value of the metric (as a quantity).
- // Mutually exclusive with TargetAverageValue.
- // +optional
- optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
-
- // targetAverageValue is the target per-pod value of global metric (as a quantity).
- // Mutually exclusive with TargetValue.
- // +optional
- optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
-}
-
-// ExternalMetricStatus indicates the current value of a global metric
-// not associated with any Kubernetes object.
-message ExternalMetricStatus {
- // metricName is the name of a metric used for autoscaling in
- // metric system.
- optional string metricName = 1;
-
- // metricSelector is used to identify a specific time series
- // within a given metric.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
-
- // currentValue is the current value of the metric (as a quantity)
- optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
-
- // currentAverageValue is the current value of metric averaged over autoscaled pods.
- // +optional
- optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
-}
-
-// HorizontalPodAutoscaler is the configuration for a horizontal pod
-// autoscaler, which automatically manages the replica count of any resource
-// implementing the scale subresource based on the metrics specified.
-message HorizontalPodAutoscaler {
- // metadata is the standard object metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // spec is the specification for the behaviour of the autoscaler.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- optional HorizontalPodAutoscalerSpec spec = 2;
-
- // status is the current information about the autoscaler.
- // +optional
- optional HorizontalPodAutoscalerStatus status = 3;
-}
-
-// HorizontalPodAutoscalerCondition describes the state of
-// a HorizontalPodAutoscaler at a certain point.
-message HorizontalPodAutoscalerCondition {
- // type describes the current condition
- optional string type = 1;
-
- // status is the status of the condition (True, False, Unknown)
- optional string status = 2;
-
- // lastTransitionTime is the last time the condition transitioned from
- // one status to another
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // reason is the reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // message is a human-readable explanation containing details about
- // the transition
- // +optional
- optional string message = 5;
-}
-
-// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
-message HorizontalPodAutoscalerList {
- // metadata is the standard list metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // items is the list of horizontal pod autoscaler objects.
- repeated HorizontalPodAutoscaler items = 2;
-}
-
-// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
-message HorizontalPodAutoscalerSpec {
- // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
- // should be collected, as well as to actually change the replica count.
- optional CrossVersionObjectReference scaleTargetRef = 1;
-
- // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
- // It defaults to 1 pod.
- // +optional
- optional int32 minReplicas = 2;
-
- // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
- // It cannot be less that minReplicas.
- optional int32 maxReplicas = 3;
-
- // metrics contains the specifications for which to use to calculate the
- // desired replica count (the maximum replica count across all metrics will
- // be used). The desired replica count is calculated multiplying the
- // ratio between the target value and the current value by the current
- // number of pods. Ergo, metrics used must decrease as the pod count is
- // increased, and vice-versa. See the individual metric source types for
- // more information about how each type of metric must respond.
- // +optional
- repeated MetricSpec metrics = 4;
-}
-
-// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
-message HorizontalPodAutoscalerStatus {
- // observedGeneration is the most recent generation observed by this autoscaler.
- // +optional
- optional int64 observedGeneration = 1;
-
- // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
- // used by the autoscaler to control how often the number of pods is changed.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
-
- // currentReplicas is current number of replicas of pods managed by this autoscaler,
- // as last seen by the autoscaler.
- optional int32 currentReplicas = 3;
-
- // desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
- // as last calculated by the autoscaler.
- optional int32 desiredReplicas = 4;
-
- // currentMetrics is the last read state of the metrics used by this autoscaler.
- repeated MetricStatus currentMetrics = 5;
-
- // conditions is the set of conditions required for this autoscaler to scale its target,
- // and indicates whether or not those conditions are met.
- repeated HorizontalPodAutoscalerCondition conditions = 6;
-}
-
-// MetricSpec specifies how to scale based on a single metric
-// (only `type` and one other matching field should be set at once).
-message MetricSpec {
- // type is the type of metric source. It should be one of "Object",
- // "Pods" or "Resource", each mapping to a matching field in the object.
- optional string type = 1;
-
- // object refers to a metric describing a single kubernetes object
- // (for example, hits-per-second on an Ingress object).
- // +optional
- optional ObjectMetricSource object = 2;
-
- // pods refers to a metric describing each pod in the current scale target
- // (for example, transactions-processed-per-second). The values will be
- // averaged together before being compared to the target value.
- // +optional
- optional PodsMetricSource pods = 3;
-
- // resource refers to a resource metric (such as those specified in
- // requests and limits) known to Kubernetes describing each pod in the
- // current scale target (e.g. CPU or memory). Such metrics are built in to
- // Kubernetes, and have special scaling options on top of those available
- // to normal per-pod metrics using the "pods" source.
- // +optional
- optional ResourceMetricSource resource = 4;
-
- // external refers to a global metric that is not associated
- // with any Kubernetes object. It allows autoscaling based on information
- // coming from components running outside of cluster
- // (for example length of queue in cloud messaging service, or
- // QPS from loadbalancer running outside of cluster).
- // +optional
- optional ExternalMetricSource external = 5;
-}
-
-// MetricStatus describes the last-read state of a single metric.
-message MetricStatus {
- // type is the type of metric source. It will be one of "Object",
- // "Pods" or "Resource", each corresponds to a matching field in the object.
- optional string type = 1;
-
- // object refers to a metric describing a single kubernetes object
- // (for example, hits-per-second on an Ingress object).
- // +optional
- optional ObjectMetricStatus object = 2;
-
- // pods refers to a metric describing each pod in the current scale target
- // (for example, transactions-processed-per-second). The values will be
- // averaged together before being compared to the target value.
- // +optional
- optional PodsMetricStatus pods = 3;
-
- // resource refers to a resource metric (such as those specified in
- // requests and limits) known to Kubernetes describing each pod in the
- // current scale target (e.g. CPU or memory). Such metrics are built in to
- // Kubernetes, and have special scaling options on top of those available
- // to normal per-pod metrics using the "pods" source.
- // +optional
- optional ResourceMetricStatus resource = 4;
-
- // external refers to a global metric that is not associated
- // with any Kubernetes object. It allows autoscaling based on information
- // coming from components running outside of cluster
- // (for example length of queue in cloud messaging service, or
- // QPS from loadbalancer running outside of cluster).
- // +optional
- optional ExternalMetricStatus external = 5;
-}
-
-// ObjectMetricSource indicates how to scale on a metric describing a
-// kubernetes object (for example, hits-per-second on an Ingress object).
-message ObjectMetricSource {
- // target is the described Kubernetes object.
- optional CrossVersionObjectReference target = 1;
-
- // metricName is the name of the metric in question.
- optional string metricName = 2;
-
- // targetValue is the target value of the metric (as a quantity).
- optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
-}
-
-// ObjectMetricStatus indicates the current value of a metric describing a
-// kubernetes object (for example, hits-per-second on an Ingress object).
-message ObjectMetricStatus {
- // target is the described Kubernetes object.
- optional CrossVersionObjectReference target = 1;
-
- // metricName is the name of the metric in question.
- optional string metricName = 2;
-
- // currentValue is the current value of the metric (as a quantity).
- optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
-}
-
-// PodsMetricSource indicates how to scale on a metric describing each pod in
-// the current scale target (for example, transactions-processed-per-second).
-// The values will be averaged together before being compared to the target
-// value.
-message PodsMetricSource {
- // metricName is the name of the metric in question
- optional string metricName = 1;
-
- // targetAverageValue is the target value of the average of the
- // metric across all relevant pods (as a quantity)
- optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
-}
-
-// PodsMetricStatus indicates the current value of a metric describing each pod in
-// the current scale target (for example, transactions-processed-per-second).
-message PodsMetricStatus {
- // metricName is the name of the metric in question
- optional string metricName = 1;
-
- // currentAverageValue is the current value of the average of the
- // metric across all relevant pods (as a quantity)
- optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
-}
-
-// ResourceMetricSource indicates how to scale on a resource metric known to
-// Kubernetes, as specified in requests and limits, describing each pod in the
-// current scale target (e.g. CPU or memory). The values will be averaged
-// together before being compared to the target. Such metrics are built in to
-// Kubernetes, and have special scaling options on top of those available to
-// normal per-pod metrics using the "pods" source. Only one "target" type
-// should be set.
-message ResourceMetricSource {
- // name is the name of the resource in question.
- optional string name = 1;
-
- // targetAverageUtilization is the target value of the average of the
- // resource metric across all relevant pods, represented as a percentage of
- // the requested value of the resource for the pods.
- // +optional
- optional int32 targetAverageUtilization = 2;
-
- // targetAverageValue is the target value of the average of the
- // resource metric across all relevant pods, as a raw value (instead of as
- // a percentage of the request), similar to the "pods" metric source type.
- // +optional
- optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
-}
-
-// ResourceMetricStatus indicates the current value of a resource metric known to
-// Kubernetes, as specified in requests and limits, describing each pod in the
-// current scale target (e.g. CPU or memory). Such metrics are built in to
-// Kubernetes, and have special scaling options on top of those available to
-// normal per-pod metrics using the "pods" source.
-message ResourceMetricStatus {
- // name is the name of the resource in question.
- optional string name = 1;
-
- // currentAverageUtilization is the current value of the average of the
- // resource metric across all relevant pods, represented as a percentage of
- // the requested value of the resource for the pods. It will only be
- // present if `targetAverageValue` was set in the corresponding metric
- // specification.
- // +optional
- optional int32 currentAverageUtilization = 2;
-
- // currentAverageValue is the current value of the average of the
- // resource metric across all relevant pods, as a raw value (instead of as
- // a percentage of the request), similar to the "pods" metric source type.
- // It will always be set, regardless of the corresponding metric specification.
- optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
-}
-
diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/register.go b/vendor/k8s.io/api/autoscaling/v2beta1/register.go
deleted file mode 100644
index 12d697f01..000000000
--- a/vendor/k8s.io/api/autoscaling/v2beta1/register.go
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-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 v2beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "autoscaling"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &HorizontalPodAutoscaler{},
- &HorizontalPodAutoscalerList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/types.go b/vendor/k8s.io/api/autoscaling/v2beta1/types.go
deleted file mode 100644
index f842cc342..000000000
--- a/vendor/k8s.io/api/autoscaling/v2beta1/types.go
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
-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 v2beta1
-
-import (
- "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/resource"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// CrossVersionObjectReference contains enough information to let you identify the referred resource.
-type CrossVersionObjectReference struct {
- // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
- Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
- // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
- Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
- // API version of the referent
- // +optional
- APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
-}
-
-// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
-type HorizontalPodAutoscalerSpec struct {
- // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
- // should be collected, as well as to actually change the replica count.
- ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"`
- // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
- // It defaults to 1 pod.
- // +optional
- MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
- // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
- // It cannot be less that minReplicas.
- MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
- // metrics contains the specifications for which to use to calculate the
- // desired replica count (the maximum replica count across all metrics will
- // be used). The desired replica count is calculated multiplying the
- // ratio between the target value and the current value by the current
- // number of pods. Ergo, metrics used must decrease as the pod count is
- // increased, and vice-versa. See the individual metric source types for
- // more information about how each type of metric must respond.
- // +optional
- Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"`
-}
-
-// MetricSourceType indicates the type of metric.
-type MetricSourceType string
-
-var (
- // ObjectMetricSourceType is a metric describing a kubernetes object
- // (for example, hits-per-second on an Ingress object).
- ObjectMetricSourceType MetricSourceType = "Object"
- // PodsMetricSourceType is a metric describing each pod in the current scale
- // target (for example, transactions-processed-per-second). The values
- // will be averaged together before being compared to the target value.
- PodsMetricSourceType MetricSourceType = "Pods"
- // ResourceMetricSourceType is a resource metric known to Kubernetes, as
- // specified in requests and limits, describing each pod in the current
- // scale target (e.g. CPU or memory). Such metrics are built in to
- // Kubernetes, and have special scaling options on top of those available
- // to normal per-pod metrics (the "pods" source).
- ResourceMetricSourceType MetricSourceType = "Resource"
- // ExternalMetricSourceType is a global metric that is not associated
- // with any Kubernetes object. It allows autoscaling based on information
- // coming from components running outside of cluster
- // (for example length of queue in cloud messaging service, or
- // QPS from loadbalancer running outside of cluster).
- ExternalMetricSourceType MetricSourceType = "External"
-)
-
-// MetricSpec specifies how to scale based on a single metric
-// (only `type` and one other matching field should be set at once).
-type MetricSpec struct {
- // type is the type of metric source. It should be one of "Object",
- // "Pods" or "Resource", each mapping to a matching field in the object.
- Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
-
- // object refers to a metric describing a single kubernetes object
- // (for example, hits-per-second on an Ingress object).
- // +optional
- Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
- // pods refers to a metric describing each pod in the current scale target
- // (for example, transactions-processed-per-second). The values will be
- // averaged together before being compared to the target value.
- // +optional
- Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
- // resource refers to a resource metric (such as those specified in
- // requests and limits) known to Kubernetes describing each pod in the
- // current scale target (e.g. CPU or memory). Such metrics are built in to
- // Kubernetes, and have special scaling options on top of those available
- // to normal per-pod metrics using the "pods" source.
- // +optional
- Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
- // external refers to a global metric that is not associated
- // with any Kubernetes object. It allows autoscaling based on information
- // coming from components running outside of cluster
- // (for example length of queue in cloud messaging service, or
- // QPS from loadbalancer running outside of cluster).
- // +optional
- External *ExternalMetricSource `json:"external,omitempty" protobuf:"bytes,5,opt,name=external"`
-}
-
-// ObjectMetricSource indicates how to scale on a metric describing a
-// kubernetes object (for example, hits-per-second on an Ingress object).
-type ObjectMetricSource struct {
- // target is the described Kubernetes object.
- Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
-
- // metricName is the name of the metric in question.
- MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
- // targetValue is the target value of the metric (as a quantity).
- TargetValue resource.Quantity `json:"targetValue" protobuf:"bytes,3,name=targetValue"`
-}
-
-// PodsMetricSource indicates how to scale on a metric describing each pod in
-// the current scale target (for example, transactions-processed-per-second).
-// The values will be averaged together before being compared to the target
-// value.
-type PodsMetricSource struct {
- // metricName is the name of the metric in question
- MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
- // targetAverageValue is the target value of the average of the
- // metric across all relevant pods (as a quantity)
- TargetAverageValue resource.Quantity `json:"targetAverageValue" protobuf:"bytes,2,name=targetAverageValue"`
-}
-
-// ResourceMetricSource indicates how to scale on a resource metric known to
-// Kubernetes, as specified in requests and limits, describing each pod in the
-// current scale target (e.g. CPU or memory). The values will be averaged
-// together before being compared to the target. Such metrics are built in to
-// Kubernetes, and have special scaling options on top of those available to
-// normal per-pod metrics using the "pods" source. Only one "target" type
-// should be set.
-type ResourceMetricSource struct {
- // name is the name of the resource in question.
- Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
- // targetAverageUtilization is the target value of the average of the
- // resource metric across all relevant pods, represented as a percentage of
- // the requested value of the resource for the pods.
- // +optional
- TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"`
- // targetAverageValue is the target value of the average of the
- // resource metric across all relevant pods, as a raw value (instead of as
- // a percentage of the request), similar to the "pods" metric source type.
- // +optional
- TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"`
-}
-
-// ExternalMetricSource indicates how to scale on a metric not associated with
-// any Kubernetes object (for example length of queue in cloud
-// messaging service, or QPS from loadbalancer running outside of cluster).
-// Exactly one "target" type should be set.
-type ExternalMetricSource struct {
- // metricName is the name of the metric in question.
- MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
- // metricSelector is used to identify a specific time series
- // within a given metric.
- // +optional
- MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"`
- // targetValue is the target value of the metric (as a quantity).
- // Mutually exclusive with TargetAverageValue.
- // +optional
- TargetValue *resource.Quantity `json:"targetValue,omitempty" protobuf:"bytes,3,opt,name=targetValue"`
- // targetAverageValue is the target per-pod value of global metric (as a quantity).
- // Mutually exclusive with TargetValue.
- // +optional
- TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,4,opt,name=targetAverageValue"`
-}
-
-// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
-type HorizontalPodAutoscalerStatus struct {
- // observedGeneration is the most recent generation observed by this autoscaler.
- // +optional
- ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
- // used by the autoscaler to control how often the number of pods is changed.
- // +optional
- LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
-
- // currentReplicas is current number of replicas of pods managed by this autoscaler,
- // as last seen by the autoscaler.
- CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"`
-
- // desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
- // as last calculated by the autoscaler.
- DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"`
-
- // currentMetrics is the last read state of the metrics used by this autoscaler.
- CurrentMetrics []MetricStatus `json:"currentMetrics" protobuf:"bytes,5,rep,name=currentMetrics"`
-
- // conditions is the set of conditions required for this autoscaler to scale its target,
- // and indicates whether or not those conditions are met.
- Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"`
-}
-
-// HorizontalPodAutoscalerConditionType are the valid conditions of
-// a HorizontalPodAutoscaler.
-type HorizontalPodAutoscalerConditionType string
-
-var (
- // ScalingActive indicates that the HPA controller is able to scale if necessary:
- // it's correctly configured, can fetch the desired metrics, and isn't disabled.
- ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
- // AbleToScale indicates a lack of transient issues which prevent scaling from occurring,
- // such as being in a backoff window, or being unable to access/update the target scale.
- AbleToScale HorizontalPodAutoscalerConditionType = "AbleToScale"
- // ScalingLimited indicates that the calculated scale based on metrics would be above or
- // below the range for the HPA, and has thus been capped.
- ScalingLimited HorizontalPodAutoscalerConditionType = "ScalingLimited"
-)
-
-// HorizontalPodAutoscalerCondition describes the state of
-// a HorizontalPodAutoscaler at a certain point.
-type HorizontalPodAutoscalerCondition struct {
- // type describes the current condition
- Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
- // status is the status of the condition (True, False, Unknown)
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
- // lastTransitionTime is the last time the condition transitioned from
- // one status to another
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // reason is the reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // message is a human-readable explanation containing details about
- // the transition
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// MetricStatus describes the last-read state of a single metric.
-type MetricStatus struct {
- // type is the type of metric source. It will be one of "Object",
- // "Pods" or "Resource", each corresponds to a matching field in the object.
- Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
-
- // object refers to a metric describing a single kubernetes object
- // (for example, hits-per-second on an Ingress object).
- // +optional
- Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
- // pods refers to a metric describing each pod in the current scale target
- // (for example, transactions-processed-per-second). The values will be
- // averaged together before being compared to the target value.
- // +optional
- Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
- // resource refers to a resource metric (such as those specified in
- // requests and limits) known to Kubernetes describing each pod in the
- // current scale target (e.g. CPU or memory). Such metrics are built in to
- // Kubernetes, and have special scaling options on top of those available
- // to normal per-pod metrics using the "pods" source.
- // +optional
- Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
- // external refers to a global metric that is not associated
- // with any Kubernetes object. It allows autoscaling based on information
- // coming from components running outside of cluster
- // (for example length of queue in cloud messaging service, or
- // QPS from loadbalancer running outside of cluster).
- // +optional
- External *ExternalMetricStatus `json:"external,omitempty" protobuf:"bytes,5,opt,name=external"`
-}
-
-// ObjectMetricStatus indicates the current value of a metric describing a
-// kubernetes object (for example, hits-per-second on an Ingress object).
-type ObjectMetricStatus struct {
- // target is the described Kubernetes object.
- Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
-
- // metricName is the name of the metric in question.
- MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
- // currentValue is the current value of the metric (as a quantity).
- CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
-}
-
-// PodsMetricStatus indicates the current value of a metric describing each pod in
-// the current scale target (for example, transactions-processed-per-second).
-type PodsMetricStatus struct {
- // metricName is the name of the metric in question
- MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
- // currentAverageValue is the current value of the average of the
- // metric across all relevant pods (as a quantity)
- CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,2,name=currentAverageValue"`
-}
-
-// ResourceMetricStatus indicates the current value of a resource metric known to
-// Kubernetes, as specified in requests and limits, describing each pod in the
-// current scale target (e.g. CPU or memory). Such metrics are built in to
-// Kubernetes, and have special scaling options on top of those available to
-// normal per-pod metrics using the "pods" source.
-type ResourceMetricStatus struct {
- // name is the name of the resource in question.
- Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
- // currentAverageUtilization is the current value of the average of the
- // resource metric across all relevant pods, represented as a percentage of
- // the requested value of the resource for the pods. It will only be
- // present if `targetAverageValue` was set in the corresponding metric
- // specification.
- // +optional
- CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"`
- // currentAverageValue is the current value of the average of the
- // resource metric across all relevant pods, as a raw value (instead of as
- // a percentage of the request), similar to the "pods" metric source type.
- // It will always be set, regardless of the corresponding metric specification.
- CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"`
-}
-
-// ExternalMetricStatus indicates the current value of a global metric
-// not associated with any Kubernetes object.
-type ExternalMetricStatus struct {
- // metricName is the name of a metric used for autoscaling in
- // metric system.
- MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
- // metricSelector is used to identify a specific time series
- // within a given metric.
- // +optional
- MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"`
- // currentValue is the current value of the metric (as a quantity)
- CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
- // currentAverageValue is the current value of metric averaged over autoscaled pods.
- // +optional
- CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty" protobuf:"bytes,4,opt,name=currentAverageValue"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// HorizontalPodAutoscaler is the configuration for a horizontal pod
-// autoscaler, which automatically manages the replica count of any resource
-// implementing the scale subresource based on the metrics specified.
-type HorizontalPodAutoscaler struct {
- metav1.TypeMeta `json:",inline"`
- // metadata is the standard object metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // spec is the specification for the behaviour of the autoscaler.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // status is the current information about the autoscaler.
- // +optional
- Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
-type HorizontalPodAutoscalerList struct {
- metav1.TypeMeta `json:",inline"`
- // metadata is the standard list metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // items is the list of horizontal pod autoscaler objects.
- Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 12cfa7649..000000000
--- a/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
-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 v2beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_CrossVersionObjectReference = map[string]string{
- "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
- "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"",
- "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
- "apiVersion": "API version of the referent",
-}
-
-func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
- return map_CrossVersionObjectReference
-}
-
-var map_ExternalMetricSource = map[string]string{
- "": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set.",
- "metricName": "metricName is the name of the metric in question.",
- "metricSelector": "metricSelector is used to identify a specific time series within a given metric.",
- "targetValue": "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.",
- "targetAverageValue": "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.",
-}
-
-func (ExternalMetricSource) SwaggerDoc() map[string]string {
- return map_ExternalMetricSource
-}
-
-var map_ExternalMetricStatus = map[string]string{
- "": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.",
- "metricName": "metricName is the name of a metric used for autoscaling in metric system.",
- "metricSelector": "metricSelector is used to identify a specific time series within a given metric.",
- "currentValue": "currentValue is the current value of the metric (as a quantity)",
- "currentAverageValue": "currentAverageValue is the current value of metric averaged over autoscaled pods.",
-}
-
-func (ExternalMetricStatus) SwaggerDoc() map[string]string {
- return map_ExternalMetricStatus
-}
-
-var map_HorizontalPodAutoscaler = map[string]string{
- "": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.",
- "metadata": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
- "status": "status is the current information about the autoscaler.",
-}
-
-func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
- return map_HorizontalPodAutoscaler
-}
-
-var map_HorizontalPodAutoscalerCondition = map[string]string{
- "": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.",
- "type": "type describes the current condition",
- "status": "status is the status of the condition (True, False, Unknown)",
- "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another",
- "reason": "reason is the reason for the condition's last transition.",
- "message": "message is a human-readable explanation containing details about the transition",
-}
-
-func (HorizontalPodAutoscalerCondition) SwaggerDoc() map[string]string {
- return map_HorizontalPodAutoscalerCondition
-}
-
-var map_HorizontalPodAutoscalerList = map[string]string{
- "": "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.",
- "metadata": "metadata is the standard list metadata.",
- "items": "items is the list of horizontal pod autoscaler objects.",
-}
-
-func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
- return map_HorizontalPodAutoscalerList
-}
-
-var map_HorizontalPodAutoscalerSpec = map[string]string{
- "": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.",
- "scaleTargetRef": "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.",
- "minReplicas": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod.",
- "maxReplicas": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.",
- "metrics": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.",
-}
-
-func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
- return map_HorizontalPodAutoscalerSpec
-}
-
-var map_HorizontalPodAutoscalerStatus = map[string]string{
- "": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.",
- "observedGeneration": "observedGeneration is the most recent generation observed by this autoscaler.",
- "lastScaleTime": "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.",
- "currentReplicas": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.",
- "desiredReplicas": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.",
- "currentMetrics": "currentMetrics is the last read state of the metrics used by this autoscaler.",
- "conditions": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.",
-}
-
-func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
- return map_HorizontalPodAutoscalerStatus
-}
-
-var map_MetricSpec = map[string]string{
- "": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).",
- "type": "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.",
- "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
- "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
- "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
- "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).",
-}
-
-func (MetricSpec) SwaggerDoc() map[string]string {
- return map_MetricSpec
-}
-
-var map_MetricStatus = map[string]string{
- "": "MetricStatus describes the last-read state of a single metric.",
- "type": "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.",
- "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
- "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
- "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
- "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).",
-}
-
-func (MetricStatus) SwaggerDoc() map[string]string {
- return map_MetricStatus
-}
-
-var map_ObjectMetricSource = map[string]string{
- "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
- "target": "target is the described Kubernetes object.",
- "metricName": "metricName is the name of the metric in question.",
- "targetValue": "targetValue is the target value of the metric (as a quantity).",
-}
-
-func (ObjectMetricSource) SwaggerDoc() map[string]string {
- return map_ObjectMetricSource
-}
-
-var map_ObjectMetricStatus = map[string]string{
- "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
- "target": "target is the described Kubernetes object.",
- "metricName": "metricName is the name of the metric in question.",
- "currentValue": "currentValue is the current value of the metric (as a quantity).",
-}
-
-func (ObjectMetricStatus) SwaggerDoc() map[string]string {
- return map_ObjectMetricStatus
-}
-
-var map_PodsMetricSource = map[string]string{
- "": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
- "metricName": "metricName is the name of the metric in question",
- "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
-}
-
-func (PodsMetricSource) SwaggerDoc() map[string]string {
- return map_PodsMetricSource
-}
-
-var map_PodsMetricStatus = map[string]string{
- "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).",
- "metricName": "metricName is the name of the metric in question",
- "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
-}
-
-func (PodsMetricStatus) SwaggerDoc() map[string]string {
- return map_PodsMetricStatus
-}
-
-var map_ResourceMetricSource = map[string]string{
- "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.",
- "name": "name is the name of the resource in question.",
- "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.",
- "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.",
-}
-
-func (ResourceMetricSource) SwaggerDoc() map[string]string {
- return map_ResourceMetricSource
-}
-
-var map_ResourceMetricStatus = map[string]string{
- "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
- "name": "name is the name of the resource in question.",
- "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.",
- "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.",
-}
-
-func (ResourceMetricStatus) SwaggerDoc() map[string]string {
- return map_ResourceMetricStatus
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.deepcopy.go
deleted file mode 100644
index dc59dc2d3..000000000
--- a/vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,512 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v2beta1
-
-import (
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CrossVersionObjectReference) DeepCopyInto(out *CrossVersionObjectReference) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossVersionObjectReference.
-func (in *CrossVersionObjectReference) DeepCopy() *CrossVersionObjectReference {
- if in == nil {
- return nil
- }
- out := new(CrossVersionObjectReference)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ExternalMetricSource) DeepCopyInto(out *ExternalMetricSource) {
- *out = *in
- if in.MetricSelector != nil {
- in, out := &in.MetricSelector, &out.MetricSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.TargetValue != nil {
- in, out := &in.TargetValue, &out.TargetValue
- if *in == nil {
- *out = nil
- } else {
- x := (*in).DeepCopy()
- *out = &x
- }
- }
- if in.TargetAverageValue != nil {
- in, out := &in.TargetAverageValue, &out.TargetAverageValue
- if *in == nil {
- *out = nil
- } else {
- x := (*in).DeepCopy()
- *out = &x
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricSource.
-func (in *ExternalMetricSource) DeepCopy() *ExternalMetricSource {
- if in == nil {
- return nil
- }
- out := new(ExternalMetricSource)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ExternalMetricStatus) DeepCopyInto(out *ExternalMetricStatus) {
- *out = *in
- if in.MetricSelector != nil {
- in, out := &in.MetricSelector, &out.MetricSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- out.CurrentValue = in.CurrentValue.DeepCopy()
- if in.CurrentAverageValue != nil {
- in, out := &in.CurrentAverageValue, &out.CurrentAverageValue
- if *in == nil {
- *out = nil
- } else {
- x := (*in).DeepCopy()
- *out = &x
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricStatus.
-func (in *ExternalMetricStatus) DeepCopy() *ExternalMetricStatus {
- if in == nil {
- return nil
- }
- out := new(ExternalMetricStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HorizontalPodAutoscaler) DeepCopyInto(out *HorizontalPodAutoscaler) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscaler.
-func (in *HorizontalPodAutoscaler) DeepCopy() *HorizontalPodAutoscaler {
- if in == nil {
- return nil
- }
- out := new(HorizontalPodAutoscaler)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *HorizontalPodAutoscaler) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HorizontalPodAutoscalerCondition) DeepCopyInto(out *HorizontalPodAutoscalerCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerCondition.
-func (in *HorizontalPodAutoscalerCondition) DeepCopy() *HorizontalPodAutoscalerCondition {
- if in == nil {
- return nil
- }
- out := new(HorizontalPodAutoscalerCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HorizontalPodAutoscalerList) DeepCopyInto(out *HorizontalPodAutoscalerList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]HorizontalPodAutoscaler, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerList.
-func (in *HorizontalPodAutoscalerList) DeepCopy() *HorizontalPodAutoscalerList {
- if in == nil {
- return nil
- }
- out := new(HorizontalPodAutoscalerList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *HorizontalPodAutoscalerList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HorizontalPodAutoscalerSpec) DeepCopyInto(out *HorizontalPodAutoscalerSpec) {
- *out = *in
- out.ScaleTargetRef = in.ScaleTargetRef
- if in.MinReplicas != nil {
- in, out := &in.MinReplicas, &out.MinReplicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Metrics != nil {
- in, out := &in.Metrics, &out.Metrics
- *out = make([]MetricSpec, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerSpec.
-func (in *HorizontalPodAutoscalerSpec) DeepCopy() *HorizontalPodAutoscalerSpec {
- if in == nil {
- return nil
- }
- out := new(HorizontalPodAutoscalerSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HorizontalPodAutoscalerStatus) DeepCopyInto(out *HorizontalPodAutoscalerStatus) {
- *out = *in
- if in.ObservedGeneration != nil {
- in, out := &in.ObservedGeneration, &out.ObservedGeneration
- if *in == nil {
- *out = nil
- } else {
- *out = new(int64)
- **out = **in
- }
- }
- if in.LastScaleTime != nil {
- in, out := &in.LastScaleTime, &out.LastScaleTime
- if *in == nil {
- *out = nil
- } else {
- *out = (*in).DeepCopy()
- }
- }
- if in.CurrentMetrics != nil {
- in, out := &in.CurrentMetrics, &out.CurrentMetrics
- *out = make([]MetricStatus, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]HorizontalPodAutoscalerCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerStatus.
-func (in *HorizontalPodAutoscalerStatus) DeepCopy() *HorizontalPodAutoscalerStatus {
- if in == nil {
- return nil
- }
- out := new(HorizontalPodAutoscalerStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MetricSpec) DeepCopyInto(out *MetricSpec) {
- *out = *in
- if in.Object != nil {
- in, out := &in.Object, &out.Object
- if *in == nil {
- *out = nil
- } else {
- *out = new(ObjectMetricSource)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.Pods != nil {
- in, out := &in.Pods, &out.Pods
- if *in == nil {
- *out = nil
- } else {
- *out = new(PodsMetricSource)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.Resource != nil {
- in, out := &in.Resource, &out.Resource
- if *in == nil {
- *out = nil
- } else {
- *out = new(ResourceMetricSource)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.External != nil {
- in, out := &in.External, &out.External
- if *in == nil {
- *out = nil
- } else {
- *out = new(ExternalMetricSource)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricSpec.
-func (in *MetricSpec) DeepCopy() *MetricSpec {
- if in == nil {
- return nil
- }
- out := new(MetricSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MetricStatus) DeepCopyInto(out *MetricStatus) {
- *out = *in
- if in.Object != nil {
- in, out := &in.Object, &out.Object
- if *in == nil {
- *out = nil
- } else {
- *out = new(ObjectMetricStatus)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.Pods != nil {
- in, out := &in.Pods, &out.Pods
- if *in == nil {
- *out = nil
- } else {
- *out = new(PodsMetricStatus)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.Resource != nil {
- in, out := &in.Resource, &out.Resource
- if *in == nil {
- *out = nil
- } else {
- *out = new(ResourceMetricStatus)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.External != nil {
- in, out := &in.External, &out.External
- if *in == nil {
- *out = nil
- } else {
- *out = new(ExternalMetricStatus)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricStatus.
-func (in *MetricStatus) DeepCopy() *MetricStatus {
- if in == nil {
- return nil
- }
- out := new(MetricStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) {
- *out = *in
- out.Target = in.Target
- out.TargetValue = in.TargetValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMetricSource.
-func (in *ObjectMetricSource) DeepCopy() *ObjectMetricSource {
- if in == nil {
- return nil
- }
- out := new(ObjectMetricSource)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) {
- *out = *in
- out.Target = in.Target
- out.CurrentValue = in.CurrentValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMetricStatus.
-func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus {
- if in == nil {
- return nil
- }
- out := new(ObjectMetricStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) {
- *out = *in
- out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodsMetricSource.
-func (in *PodsMetricSource) DeepCopy() *PodsMetricSource {
- if in == nil {
- return nil
- }
- out := new(PodsMetricSource)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) {
- *out = *in
- out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodsMetricStatus.
-func (in *PodsMetricStatus) DeepCopy() *PodsMetricStatus {
- if in == nil {
- return nil
- }
- out := new(PodsMetricStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ResourceMetricSource) DeepCopyInto(out *ResourceMetricSource) {
- *out = *in
- if in.TargetAverageUtilization != nil {
- in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.TargetAverageValue != nil {
- in, out := &in.TargetAverageValue, &out.TargetAverageValue
- if *in == nil {
- *out = nil
- } else {
- x := (*in).DeepCopy()
- *out = &x
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceMetricSource.
-func (in *ResourceMetricSource) DeepCopy() *ResourceMetricSource {
- if in == nil {
- return nil
- }
- out := new(ResourceMetricSource)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ResourceMetricStatus) DeepCopyInto(out *ResourceMetricStatus) {
- *out = *in
- if in.CurrentAverageUtilization != nil {
- in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceMetricStatus.
-func (in *ResourceMetricStatus) DeepCopy() *ResourceMetricStatus {
- if in == nil {
- return nil
- }
- out := new(ResourceMetricStatus)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/batch/v1/doc.go b/vendor/k8s.io/api/batch/v1/doc.go
deleted file mode 100644
index 04491807f..000000000
--- a/vendor/k8s.io/api/batch/v1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-package v1 // import "k8s.io/api/batch/v1"
diff --git a/vendor/k8s.io/api/batch/v1/generated.pb.go b/vendor/k8s.io/api/batch/v1/generated.pb.go
deleted file mode 100644
index 8599b6733..000000000
--- a/vendor/k8s.io/api/batch/v1/generated.pb.go
+++ /dev/null
@@ -1,1615 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/batch/v1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/batch/v1/generated.proto
-
- It has these top-level messages:
- Job
- JobCondition
- JobList
- JobSpec
- JobStatus
-*/
-package v1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *Job) Reset() { *m = Job{} }
-func (*Job) ProtoMessage() {}
-func (*Job) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *JobCondition) Reset() { *m = JobCondition{} }
-func (*JobCondition) ProtoMessage() {}
-func (*JobCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *JobList) Reset() { *m = JobList{} }
-func (*JobList) ProtoMessage() {}
-func (*JobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *JobSpec) Reset() { *m = JobSpec{} }
-func (*JobSpec) ProtoMessage() {}
-func (*JobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *JobStatus) Reset() { *m = JobStatus{} }
-func (*JobStatus) ProtoMessage() {}
-func (*JobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func init() {
- proto.RegisterType((*Job)(nil), "k8s.io.api.batch.v1.Job")
- proto.RegisterType((*JobCondition)(nil), "k8s.io.api.batch.v1.JobCondition")
- proto.RegisterType((*JobList)(nil), "k8s.io.api.batch.v1.JobList")
- proto.RegisterType((*JobSpec)(nil), "k8s.io.api.batch.v1.JobSpec")
- proto.RegisterType((*JobStatus)(nil), "k8s.io.api.batch.v1.JobStatus")
-}
-func (m *Job) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Job) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *JobCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *JobCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastProbeTime.Size()))
- n4, err := m.LastProbeTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n5, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *JobList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *JobList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n6, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *JobSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *JobSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Parallelism != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Parallelism))
- }
- if m.Completions != nil {
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Completions))
- }
- if m.ActiveDeadlineSeconds != nil {
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.ActiveDeadlineSeconds))
- }
- if m.Selector != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n7, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- }
- if m.ManualSelector != nil {
- dAtA[i] = 0x28
- i++
- if *m.ManualSelector {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n8, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- if m.BackoffLimit != nil {
- dAtA[i] = 0x38
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.BackoffLimit))
- }
- return i, nil
-}
-
-func (m *JobStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *JobStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if m.StartTime != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.StartTime.Size()))
- n9, err := m.StartTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- }
- if m.CompletionTime != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CompletionTime.Size()))
- n10, err := m.CompletionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- }
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Active))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Succeeded))
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Failed))
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *Job) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *JobCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastProbeTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *JobList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *JobSpec) Size() (n int) {
- var l int
- _ = l
- if m.Parallelism != nil {
- n += 1 + sovGenerated(uint64(*m.Parallelism))
- }
- if m.Completions != nil {
- n += 1 + sovGenerated(uint64(*m.Completions))
- }
- if m.ActiveDeadlineSeconds != nil {
- n += 1 + sovGenerated(uint64(*m.ActiveDeadlineSeconds))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.ManualSelector != nil {
- n += 2
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.BackoffLimit != nil {
- n += 1 + sovGenerated(uint64(*m.BackoffLimit))
- }
- return n
-}
-
-func (m *JobStatus) Size() (n int) {
- var l int
- _ = l
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.StartTime != nil {
- l = m.StartTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.CompletionTime != nil {
- l = m.CompletionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- n += 1 + sovGenerated(uint64(m.Active))
- n += 1 + sovGenerated(uint64(m.Succeeded))
- n += 1 + sovGenerated(uint64(m.Failed))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *Job) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Job{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *JobCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&JobCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *JobList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&JobList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Job", "Job", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *JobSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&JobSpec{`,
- `Parallelism:` + valueToStringGenerated(this.Parallelism) + `,`,
- `Completions:` + valueToStringGenerated(this.Completions) + `,`,
- `ActiveDeadlineSeconds:` + valueToStringGenerated(this.ActiveDeadlineSeconds) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `ManualSelector:` + valueToStringGenerated(this.ManualSelector) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `BackoffLimit:` + valueToStringGenerated(this.BackoffLimit) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *JobStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&JobStatus{`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "JobCondition", "JobCondition", 1), `&`, ``, 1) + `,`,
- `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
- `CompletionTime:` + strings.Replace(fmt.Sprintf("%v", this.CompletionTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
- `Active:` + fmt.Sprintf("%v", this.Active) + `,`,
- `Succeeded:` + fmt.Sprintf("%v", this.Succeeded) + `,`,
- `Failed:` + fmt.Sprintf("%v", this.Failed) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *Job) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Job: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Job: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *JobCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: JobCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: JobCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = JobConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastProbeTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastProbeTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *JobList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: JobList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: JobList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Job{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *JobSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: JobSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: JobSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Parallelism", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Parallelism = &v
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Completions", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Completions = &v
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ActiveDeadlineSeconds", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ActiveDeadlineSeconds = &v
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ManualSelector", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.ManualSelector = &b
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field BackoffLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.BackoffLimit = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *JobStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: JobStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: JobStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, JobCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.StartTime == nil {
- m.StartTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
- }
- if err := m.StartTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.CompletionTime == nil {
- m.CompletionTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
- }
- if err := m.CompletionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType)
- }
- m.Active = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Active |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Succeeded", wireType)
- }
- m.Succeeded = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Succeeded |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType)
- }
- m.Failed = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Failed |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/batch/v1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 907 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x41, 0x6f, 0xe3, 0x44,
- 0x18, 0x8d, 0x9b, 0xa6, 0x4d, 0x26, 0x69, 0x77, 0x19, 0x54, 0x29, 0x54, 0xc8, 0x59, 0x82, 0x84,
- 0x0a, 0x12, 0x36, 0xe9, 0x56, 0x08, 0x21, 0x40, 0xc2, 0x45, 0x2b, 0x51, 0xa5, 0xda, 0x32, 0x29,
- 0x42, 0x42, 0x20, 0x31, 0xb6, 0xbf, 0xa4, 0x43, 0x6c, 0x8f, 0xe5, 0x99, 0x44, 0xea, 0x8d, 0x9f,
- 0xc0, 0x8f, 0x40, 0xfc, 0x14, 0xd4, 0xe3, 0x1e, 0xf7, 0x14, 0x51, 0xc3, 0x9d, 0xfb, 0x9e, 0xd0,
- 0x8c, 0x1d, 0xdb, 0x69, 0x13, 0xd1, 0xe5, 0x66, 0xbf, 0x79, 0xef, 0x7d, 0x33, 0xf3, 0xbd, 0xf9,
- 0xd0, 0x67, 0xd3, 0x4f, 0x84, 0xc5, 0xb8, 0x3d, 0x9d, 0xb9, 0x90, 0x44, 0x20, 0x41, 0xd8, 0x73,
- 0x88, 0x7c, 0x9e, 0xd8, 0xf9, 0x02, 0x8d, 0x99, 0xed, 0x52, 0xe9, 0x5d, 0xd9, 0xf3, 0x81, 0x3d,
- 0x81, 0x08, 0x12, 0x2a, 0xc1, 0xb7, 0xe2, 0x84, 0x4b, 0x8e, 0xdf, 0xcc, 0x48, 0x16, 0x8d, 0x99,
- 0xa5, 0x49, 0xd6, 0x7c, 0x70, 0xf8, 0xe1, 0x84, 0xc9, 0xab, 0x99, 0x6b, 0x79, 0x3c, 0xb4, 0x27,
- 0x7c, 0xc2, 0x6d, 0xcd, 0x75, 0x67, 0x63, 0xfd, 0xa7, 0x7f, 0xf4, 0x57, 0xe6, 0x71, 0xd8, 0xaf,
- 0x14, 0xf2, 0x78, 0x02, 0x6b, 0xea, 0x1c, 0x9e, 0x94, 0x9c, 0x90, 0x7a, 0x57, 0x2c, 0x82, 0xe4,
- 0xda, 0x8e, 0xa7, 0x13, 0x05, 0x08, 0x3b, 0x04, 0x49, 0xd7, 0xa9, 0xec, 0x4d, 0xaa, 0x64, 0x16,
- 0x49, 0x16, 0xc2, 0x3d, 0xc1, 0xc7, 0xff, 0x25, 0x10, 0xde, 0x15, 0x84, 0xf4, 0x9e, 0xee, 0xe9,
- 0x26, 0xdd, 0x4c, 0xb2, 0xc0, 0x66, 0x91, 0x14, 0x32, 0xb9, 0x2b, 0xea, 0xff, 0x63, 0xa0, 0xfa,
- 0x19, 0x77, 0xf1, 0x4f, 0xa8, 0xa9, 0x0e, 0xe0, 0x53, 0x49, 0xbb, 0xc6, 0x13, 0xe3, 0xa8, 0x7d,
- 0xfc, 0x91, 0x55, 0x5e, 0x6b, 0xe1, 0x67, 0xc5, 0xd3, 0x89, 0x02, 0x84, 0xa5, 0xd8, 0xd6, 0x7c,
- 0x60, 0x3d, 0x77, 0x7f, 0x06, 0x4f, 0x9e, 0x83, 0xa4, 0x0e, 0xbe, 0x59, 0xf4, 0x6a, 0xe9, 0xa2,
- 0x87, 0x4a, 0x8c, 0x14, 0xae, 0xf8, 0x0b, 0xb4, 0x2d, 0x62, 0xf0, 0xba, 0x5b, 0xda, 0xfd, 0x6d,
- 0x6b, 0x4d, 0xd3, 0xac, 0x33, 0xee, 0x8e, 0x62, 0xf0, 0x9c, 0x4e, 0xee, 0xb4, 0xad, 0xfe, 0x88,
- 0xd6, 0xe1, 0x67, 0x68, 0x47, 0x48, 0x2a, 0x67, 0xa2, 0x5b, 0xd7, 0x0e, 0xe6, 0x46, 0x07, 0xcd,
- 0x72, 0xf6, 0x73, 0x8f, 0x9d, 0xec, 0x9f, 0xe4, 0xea, 0xfe, 0x1f, 0x75, 0xd4, 0x39, 0xe3, 0xee,
- 0x29, 0x8f, 0x7c, 0x26, 0x19, 0x8f, 0xf0, 0x09, 0xda, 0x96, 0xd7, 0x31, 0xe8, 0x63, 0xb7, 0x9c,
- 0x27, 0xcb, 0xd2, 0x97, 0xd7, 0x31, 0xbc, 0x5a, 0xf4, 0x1e, 0x57, 0xb9, 0x0a, 0x23, 0x9a, 0x8d,
- 0x87, 0xc5, 0x76, 0xb6, 0xb4, 0xee, 0x64, 0xb5, 0xdc, 0xab, 0x45, 0x6f, 0x4d, 0xa4, 0xac, 0xc2,
- 0x69, 0x75, 0x53, 0x78, 0x82, 0xf6, 0x02, 0x2a, 0xe4, 0x45, 0xc2, 0x5d, 0xb8, 0x64, 0x21, 0xe4,
- 0x67, 0xfc, 0xe0, 0x61, 0x3d, 0x50, 0x0a, 0xe7, 0x20, 0xdf, 0xc0, 0xde, 0xb0, 0x6a, 0x44, 0x56,
- 0x7d, 0xf1, 0x1c, 0x61, 0x05, 0x5c, 0x26, 0x34, 0x12, 0xd9, 0x91, 0x54, 0xb5, 0xed, 0xd7, 0xae,
- 0x76, 0x98, 0x57, 0xc3, 0xc3, 0x7b, 0x6e, 0x64, 0x4d, 0x05, 0xfc, 0x1e, 0xda, 0x49, 0x80, 0x0a,
- 0x1e, 0x75, 0x1b, 0xfa, 0xba, 0x8a, 0xee, 0x10, 0x8d, 0x92, 0x7c, 0x15, 0xbf, 0x8f, 0x76, 0x43,
- 0x10, 0x82, 0x4e, 0xa0, 0xbb, 0xa3, 0x89, 0x8f, 0x72, 0xe2, 0xee, 0x79, 0x06, 0x93, 0xe5, 0x7a,
- 0xff, 0x77, 0x03, 0xed, 0x9e, 0x71, 0x77, 0xc8, 0x84, 0xc4, 0x3f, 0xdc, 0x8b, 0xaf, 0xf5, 0xb0,
- 0xc3, 0x28, 0xb5, 0x0e, 0xef, 0xe3, 0xbc, 0x4e, 0x73, 0x89, 0x54, 0xa2, 0xfb, 0x39, 0x6a, 0x30,
- 0x09, 0xa1, 0x6a, 0x75, 0xfd, 0xa8, 0x7d, 0xdc, 0xdd, 0x94, 0x3c, 0x67, 0x2f, 0x37, 0x69, 0x7c,
- 0xad, 0xe8, 0x24, 0x53, 0xf5, 0xff, 0xae, 0xeb, 0x8d, 0xaa, 0x2c, 0xe3, 0x01, 0x6a, 0xc7, 0x34,
- 0xa1, 0x41, 0x00, 0x01, 0x13, 0xa1, 0xde, 0x6b, 0xc3, 0x79, 0x94, 0x2e, 0x7a, 0xed, 0x8b, 0x12,
- 0x26, 0x55, 0x8e, 0x92, 0x78, 0x3c, 0x8c, 0x03, 0x50, 0x97, 0x99, 0xc5, 0x2d, 0x97, 0x9c, 0x96,
- 0x30, 0xa9, 0x72, 0xf0, 0x73, 0x74, 0x40, 0x3d, 0xc9, 0xe6, 0xf0, 0x15, 0x50, 0x3f, 0x60, 0x11,
- 0x8c, 0xc0, 0xe3, 0x91, 0x9f, 0x3d, 0x9d, 0xba, 0xf3, 0x56, 0xba, 0xe8, 0x1d, 0x7c, 0xb9, 0x8e,
- 0x40, 0xd6, 0xeb, 0xf0, 0x8f, 0xa8, 0x29, 0x20, 0x00, 0x4f, 0xf2, 0x24, 0x0f, 0xcb, 0xd3, 0x07,
- 0xde, 0x2f, 0x75, 0x21, 0x18, 0xe5, 0x52, 0xa7, 0xa3, 0x2e, 0x78, 0xf9, 0x47, 0x0a, 0x4b, 0xfc,
- 0x29, 0xda, 0x0f, 0x69, 0x34, 0xa3, 0x05, 0x53, 0xa7, 0xa4, 0xe9, 0xe0, 0x74, 0xd1, 0xdb, 0x3f,
- 0x5f, 0x59, 0x21, 0x77, 0x98, 0xf8, 0x1b, 0xd4, 0x94, 0x10, 0xc6, 0x01, 0x95, 0x59, 0x64, 0xda,
- 0xc7, 0xef, 0x56, 0xfb, 0xa3, 0x5e, 0x9e, 0xda, 0xc8, 0x05, 0xf7, 0x2f, 0x73, 0x9a, 0x1e, 0x31,
- 0x45, 0xbf, 0x97, 0x28, 0x29, 0x6c, 0xf0, 0x09, 0xea, 0xb8, 0xd4, 0x9b, 0xf2, 0xf1, 0x78, 0xc8,
- 0x42, 0x26, 0xbb, 0xbb, 0xfa, 0xca, 0x1f, 0xa7, 0x8b, 0x5e, 0xc7, 0xa9, 0xe0, 0x64, 0x85, 0xd5,
- 0xff, 0xad, 0x8e, 0x5a, 0xc5, 0xf8, 0xc1, 0xdf, 0x22, 0xe4, 0x2d, 0x1f, 0xbb, 0xe8, 0x1a, 0x3a,
- 0x38, 0xef, 0x6c, 0x0a, 0x4e, 0x31, 0x16, 0xca, 0x19, 0x5a, 0x40, 0x82, 0x54, 0x8c, 0xf0, 0x77,
- 0xa8, 0x25, 0x24, 0x4d, 0xa4, 0x7e, 0xb6, 0x5b, 0xaf, 0xfd, 0x6c, 0xf7, 0xd2, 0x45, 0xaf, 0x35,
- 0x5a, 0x1a, 0x90, 0xd2, 0x0b, 0x8f, 0xd1, 0x7e, 0x99, 0xa0, 0xff, 0x39, 0x82, 0x74, 0xbb, 0x4e,
- 0x57, 0x5c, 0xc8, 0x1d, 0x57, 0x35, 0x08, 0xb2, 0x88, 0xe9, 0x1c, 0x35, 0xca, 0x41, 0x90, 0xe5,
- 0x91, 0xe4, 0xab, 0xd8, 0x46, 0x2d, 0x31, 0xf3, 0x3c, 0x00, 0x1f, 0x7c, 0x9d, 0x86, 0x86, 0xf3,
- 0x46, 0x4e, 0x6d, 0x8d, 0x96, 0x0b, 0xa4, 0xe4, 0x28, 0xe3, 0x31, 0x65, 0x01, 0xf8, 0x3a, 0x05,
- 0x15, 0xe3, 0x67, 0x1a, 0x25, 0xf9, 0xaa, 0x73, 0x74, 0x73, 0x6b, 0xd6, 0x5e, 0xdc, 0x9a, 0xb5,
- 0x97, 0xb7, 0x66, 0xed, 0x97, 0xd4, 0x34, 0x6e, 0x52, 0xd3, 0x78, 0x91, 0x9a, 0xc6, 0xcb, 0xd4,
- 0x34, 0xfe, 0x4c, 0x4d, 0xe3, 0xd7, 0xbf, 0xcc, 0xda, 0xf7, 0x5b, 0xf3, 0xc1, 0xbf, 0x01, 0x00,
- 0x00, 0xff, 0xff, 0xce, 0x80, 0xf2, 0xbe, 0x96, 0x08, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/batch/v1/generated.proto b/vendor/k8s.io/api/batch/v1/generated.proto
deleted file mode 100644
index b0306f3bc..000000000
--- a/vendor/k8s.io/api/batch/v1/generated.proto
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.batch.v1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1";
-
-// Job represents the configuration of a single job.
-message Job {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior of a job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional JobSpec spec = 2;
-
- // Current status of a job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional JobStatus status = 3;
-}
-
-// JobCondition describes current state of a job.
-message JobCondition {
- // Type of job condition, Complete or Failed.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // Last time the condition was checked.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
-
- // Last time the condition transit from one status to another.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
-
- // (brief) reason for the condition's last transition.
- // +optional
- optional string reason = 5;
-
- // Human readable message indicating details about last transition.
- // +optional
- optional string message = 6;
-}
-
-// JobList is a collection of jobs.
-message JobList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // items is the list of Jobs.
- repeated Job items = 2;
-}
-
-// JobSpec describes how the job execution will look like.
-message JobSpec {
- // Specifies the maximum desired number of pods the job should
- // run at any given time. The actual number of pods running in steady state will
- // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
- // i.e. when the work left to do is less than max parallelism.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
- // +optional
- optional int32 parallelism = 1;
-
- // Specifies the desired number of successfully finished pods the
- // job should be run with. Setting to nil means that the success of any
- // pod signals the success of all pods, and allows parallelism to have any positive
- // value. Setting to 1 means that parallelism is limited to 1 and the success of that
- // pod signals the success of the job.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
- // +optional
- optional int32 completions = 2;
-
- // Specifies the duration in seconds relative to the startTime that the job may be active
- // before the system tries to terminate it; value must be positive integer
- // +optional
- optional int64 activeDeadlineSeconds = 3;
-
- // Specifies the number of retries before marking this job failed.
- // Defaults to 6
- // +optional
- optional int32 backoffLimit = 7;
-
- // A label query over pods that should match the pod count.
- // Normally, the system sets this field for you.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
-
- // manualSelector controls generation of pod labels and pod selectors.
- // Leave `manualSelector` unset unless you are certain what you are doing.
- // When false or unset, the system pick labels unique to this job
- // and appends those labels to the pod template. When true,
- // the user is responsible for picking unique labels and specifying
- // the selector. Failure to pick a unique label may cause this
- // and other jobs to not function correctly. However, You may see
- // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
- // API.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector
- // +optional
- optional bool manualSelector = 5;
-
- // Describes the pod that will be created when executing a job.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
- optional k8s.io.api.core.v1.PodTemplateSpec template = 6;
-}
-
-// JobStatus represents the current state of a Job.
-message JobStatus {
- // The latest available observations of an object's current state.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated JobCondition conditions = 1;
-
- // Represents time when the job was acknowledged by the job controller.
- // It is not guaranteed to be set in happens-before order across separate operations.
- // It is represented in RFC3339 form and is in UTC.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2;
-
- // Represents time when the job was completed. It is not guaranteed to
- // be set in happens-before order across separate operations.
- // It is represented in RFC3339 form and is in UTC.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3;
-
- // The number of actively running pods.
- // +optional
- optional int32 active = 4;
-
- // The number of pods which reached phase Succeeded.
- // +optional
- optional int32 succeeded = 5;
-
- // The number of pods which reached phase Failed.
- // +optional
- optional int32 failed = 6;
-}
-
diff --git a/vendor/k8s.io/api/batch/v1/register.go b/vendor/k8s.io/api/batch/v1/register.go
deleted file mode 100644
index 32fa51f0e..000000000
--- a/vendor/k8s.io/api/batch/v1/register.go
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-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 v1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "batch"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Job{},
- &JobList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/batch/v1/types.go b/vendor/k8s.io/api/batch/v1/types.go
deleted file mode 100644
index 84abb1a90..000000000
--- a/vendor/k8s.io/api/batch/v1/types.go
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
-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 v1
-
-import (
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Job represents the configuration of a single job.
-type Job struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior of a job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Current status of a job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// JobList is a collection of jobs.
-type JobList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // items is the list of Jobs.
- Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// JobSpec describes how the job execution will look like.
-type JobSpec struct {
-
- // Specifies the maximum desired number of pods the job should
- // run at any given time. The actual number of pods running in steady state will
- // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
- // i.e. when the work left to do is less than max parallelism.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
- // +optional
- Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
-
- // Specifies the desired number of successfully finished pods the
- // job should be run with. Setting to nil means that the success of any
- // pod signals the success of all pods, and allows parallelism to have any positive
- // value. Setting to 1 means that parallelism is limited to 1 and the success of that
- // pod signals the success of the job.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
- // +optional
- Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"`
-
- // Specifies the duration in seconds relative to the startTime that the job may be active
- // before the system tries to terminate it; value must be positive integer
- // +optional
- ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
-
- // Specifies the number of retries before marking this job failed.
- // Defaults to 6
- // +optional
- BackoffLimit *int32 `json:"backoffLimit,omitempty" protobuf:"varint,7,opt,name=backoffLimit"`
-
- // TODO enabled it when https://github.com/kubernetes/kubernetes/issues/28486 has been fixed
- // Optional number of failed pods to retain.
- // +optional
- // FailedPodsLimit *int32 `json:"failedPodsLimit,omitempty" protobuf:"varint,9,opt,name=failedPodsLimit"`
-
- // A label query over pods that should match the pod count.
- // Normally, the system sets this field for you.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
-
- // manualSelector controls generation of pod labels and pod selectors.
- // Leave `manualSelector` unset unless you are certain what you are doing.
- // When false or unset, the system pick labels unique to this job
- // and appends those labels to the pod template. When true,
- // the user is responsible for picking unique labels and specifying
- // the selector. Failure to pick a unique label may cause this
- // and other jobs to not function correctly. However, You may see
- // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
- // API.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector
- // +optional
- ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"`
-
- // Describes the pod that will be created when executing a job.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"`
-}
-
-// JobStatus represents the current state of a Job.
-type JobStatus struct {
- // The latest available observations of an object's current state.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
-
- // Represents time when the job was acknowledged by the job controller.
- // It is not guaranteed to be set in happens-before order across separate operations.
- // It is represented in RFC3339 form and is in UTC.
- // +optional
- StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
-
- // Represents time when the job was completed. It is not guaranteed to
- // be set in happens-before order across separate operations.
- // It is represented in RFC3339 form and is in UTC.
- // +optional
- CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
-
- // The number of actively running pods.
- // +optional
- Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
-
- // The number of pods which reached phase Succeeded.
- // +optional
- Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
-
- // The number of pods which reached phase Failed.
- // +optional
- Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"`
-}
-
-type JobConditionType string
-
-// These are valid conditions of a job.
-const (
- // JobComplete means the job has completed its execution.
- JobComplete JobConditionType = "Complete"
- // JobFailed means the job has failed its execution.
- JobFailed JobConditionType = "Failed"
-)
-
-// JobCondition describes current state of a job.
-type JobCondition struct {
- // Type of job condition, Complete or Failed.
- Type JobConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=JobConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // Last time the condition was checked.
- // +optional
- LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
- // Last time the condition transit from one status to another.
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
- // (brief) reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
- // Human readable message indicating details about last transition.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
-}
diff --git a/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go
deleted file mode 100644
index 0ddf4b116..000000000
--- a/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-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 v1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_Job = map[string]string{
- "": "Job represents the configuration of a single job.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
- "status": "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (Job) SwaggerDoc() map[string]string {
- return map_Job
-}
-
-var map_JobCondition = map[string]string{
- "": "JobCondition describes current state of a job.",
- "type": "Type of job condition, Complete or Failed.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastProbeTime": "Last time the condition was checked.",
- "lastTransitionTime": "Last time the condition transit from one status to another.",
- "reason": "(brief) reason for the condition's last transition.",
- "message": "Human readable message indicating details about last transition.",
-}
-
-func (JobCondition) SwaggerDoc() map[string]string {
- return map_JobCondition
-}
-
-var map_JobList = map[string]string{
- "": "JobList is a collection of jobs.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "items is the list of Jobs.",
-}
-
-func (JobList) SwaggerDoc() map[string]string {
- return map_JobList
-}
-
-var map_JobSpec = map[string]string{
- "": "JobSpec describes how the job execution will look like.",
- "parallelism": "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
- "completions": "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
- "activeDeadlineSeconds": "Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer",
- "backoffLimit": "Specifies the number of retries before marking this job failed. Defaults to 6",
- "selector": "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- "manualSelector": "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector",
- "template": "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
-}
-
-func (JobSpec) SwaggerDoc() map[string]string {
- return map_JobSpec
-}
-
-var map_JobStatus = map[string]string{
- "": "JobStatus represents the current state of a Job.",
- "conditions": "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
- "startTime": "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.",
- "completionTime": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.",
- "active": "The number of actively running pods.",
- "succeeded": "The number of pods which reached phase Succeeded.",
- "failed": "The number of pods which reached phase Failed.",
-}
-
-func (JobStatus) SwaggerDoc() map[string]string {
- return map_JobStatus
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go
deleted file mode 100644
index a7179849b..000000000
--- a/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,215 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1
-
-import (
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Job) DeepCopyInto(out *Job) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Job.
-func (in *Job) DeepCopy() *Job {
- if in == nil {
- return nil
- }
- out := new(Job)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Job) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *JobCondition) DeepCopyInto(out *JobCondition) {
- *out = *in
- in.LastProbeTime.DeepCopyInto(&out.LastProbeTime)
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobCondition.
-func (in *JobCondition) DeepCopy() *JobCondition {
- if in == nil {
- return nil
- }
- out := new(JobCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *JobList) DeepCopyInto(out *JobList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Job, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobList.
-func (in *JobList) DeepCopy() *JobList {
- if in == nil {
- return nil
- }
- out := new(JobList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *JobList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *JobSpec) DeepCopyInto(out *JobSpec) {
- *out = *in
- if in.Parallelism != nil {
- in, out := &in.Parallelism, &out.Parallelism
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Completions != nil {
- in, out := &in.Completions, &out.Completions
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.ActiveDeadlineSeconds != nil {
- in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
- if *in == nil {
- *out = nil
- } else {
- *out = new(int64)
- **out = **in
- }
- }
- if in.BackoffLimit != nil {
- in, out := &in.BackoffLimit, &out.BackoffLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(meta_v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.ManualSelector != nil {
- in, out := &in.ManualSelector, &out.ManualSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(bool)
- **out = **in
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobSpec.
-func (in *JobSpec) DeepCopy() *JobSpec {
- if in == nil {
- return nil
- }
- out := new(JobSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *JobStatus) DeepCopyInto(out *JobStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]JobCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.StartTime != nil {
- in, out := &in.StartTime, &out.StartTime
- if *in == nil {
- *out = nil
- } else {
- *out = (*in).DeepCopy()
- }
- }
- if in.CompletionTime != nil {
- in, out := &in.CompletionTime, &out.CompletionTime
- if *in == nil {
- *out = nil
- } else {
- *out = (*in).DeepCopy()
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobStatus.
-func (in *JobStatus) DeepCopy() *JobStatus {
- if in == nil {
- return nil
- }
- out := new(JobStatus)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/batch/v1beta1/doc.go b/vendor/k8s.io/api/batch/v1beta1/doc.go
deleted file mode 100644
index 43020ed05..000000000
--- a/vendor/k8s.io/api/batch/v1beta1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-package v1beta1 // import "k8s.io/api/batch/v1beta1"
diff --git a/vendor/k8s.io/api/batch/v1beta1/generated.pb.go b/vendor/k8s.io/api/batch/v1beta1/generated.pb.go
deleted file mode 100644
index 6544184db..000000000
--- a/vendor/k8s.io/api/batch/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,1509 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/batch/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/batch/v1beta1/generated.proto
-
- It has these top-level messages:
- CronJob
- CronJobList
- CronJobSpec
- CronJobStatus
- JobTemplate
- JobTemplateSpec
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *CronJob) Reset() { *m = CronJob{} }
-func (*CronJob) ProtoMessage() {}
-func (*CronJob) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *CronJobList) Reset() { *m = CronJobList{} }
-func (*CronJobList) ProtoMessage() {}
-func (*CronJobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *CronJobSpec) Reset() { *m = CronJobSpec{} }
-func (*CronJobSpec) ProtoMessage() {}
-func (*CronJobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *CronJobStatus) Reset() { *m = CronJobStatus{} }
-func (*CronJobStatus) ProtoMessage() {}
-func (*CronJobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *JobTemplate) Reset() { *m = JobTemplate{} }
-func (*JobTemplate) ProtoMessage() {}
-func (*JobTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} }
-func (*JobTemplateSpec) ProtoMessage() {}
-func (*JobTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func init() {
- proto.RegisterType((*CronJob)(nil), "k8s.io.api.batch.v1beta1.CronJob")
- proto.RegisterType((*CronJobList)(nil), "k8s.io.api.batch.v1beta1.CronJobList")
- proto.RegisterType((*CronJobSpec)(nil), "k8s.io.api.batch.v1beta1.CronJobSpec")
- proto.RegisterType((*CronJobStatus)(nil), "k8s.io.api.batch.v1beta1.CronJobStatus")
- proto.RegisterType((*JobTemplate)(nil), "k8s.io.api.batch.v1beta1.JobTemplate")
- proto.RegisterType((*JobTemplateSpec)(nil), "k8s.io.api.batch.v1beta1.JobTemplateSpec")
-}
-func (m *CronJob) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CronJob) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *CronJobList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CronJobList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n4, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *CronJobSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CronJobSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Schedule)))
- i += copy(dAtA[i:], m.Schedule)
- if m.StartingDeadlineSeconds != nil {
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.StartingDeadlineSeconds))
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConcurrencyPolicy)))
- i += copy(dAtA[i:], m.ConcurrencyPolicy)
- if m.Suspend != nil {
- dAtA[i] = 0x20
- i++
- if *m.Suspend {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.JobTemplate.Size()))
- n5, err := m.JobTemplate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if m.SuccessfulJobsHistoryLimit != nil {
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.SuccessfulJobsHistoryLimit))
- }
- if m.FailedJobsHistoryLimit != nil {
- dAtA[i] = 0x38
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.FailedJobsHistoryLimit))
- }
- return i, nil
-}
-
-func (m *CronJobStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CronJobStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Active) > 0 {
- for _, msg := range m.Active {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if m.LastScheduleTime != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastScheduleTime.Size()))
- n6, err := m.LastScheduleTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- }
- return i, nil
-}
-
-func (m *JobTemplate) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *JobTemplate) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n8, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- return i, nil
-}
-
-func (m *JobTemplateSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *JobTemplateSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n10, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *CronJob) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *CronJobList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *CronJobSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Schedule)
- n += 1 + l + sovGenerated(uint64(l))
- if m.StartingDeadlineSeconds != nil {
- n += 1 + sovGenerated(uint64(*m.StartingDeadlineSeconds))
- }
- l = len(m.ConcurrencyPolicy)
- n += 1 + l + sovGenerated(uint64(l))
- if m.Suspend != nil {
- n += 2
- }
- l = m.JobTemplate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.SuccessfulJobsHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.SuccessfulJobsHistoryLimit))
- }
- if m.FailedJobsHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.FailedJobsHistoryLimit))
- }
- return n
-}
-
-func (m *CronJobStatus) Size() (n int) {
- var l int
- _ = l
- if len(m.Active) > 0 {
- for _, e := range m.Active {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.LastScheduleTime != nil {
- l = m.LastScheduleTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *JobTemplate) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *JobTemplateSpec) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *CronJob) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CronJob{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CronJobSpec", "CronJobSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CronJobStatus", "CronJobStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CronJobList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CronJobList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CronJob", "CronJob", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CronJobSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CronJobSpec{`,
- `Schedule:` + fmt.Sprintf("%v", this.Schedule) + `,`,
- `StartingDeadlineSeconds:` + valueToStringGenerated(this.StartingDeadlineSeconds) + `,`,
- `ConcurrencyPolicy:` + fmt.Sprintf("%v", this.ConcurrencyPolicy) + `,`,
- `Suspend:` + valueToStringGenerated(this.Suspend) + `,`,
- `JobTemplate:` + strings.Replace(strings.Replace(this.JobTemplate.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`,
- `SuccessfulJobsHistoryLimit:` + valueToStringGenerated(this.SuccessfulJobsHistoryLimit) + `,`,
- `FailedJobsHistoryLimit:` + valueToStringGenerated(this.FailedJobsHistoryLimit) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CronJobStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CronJobStatus{`,
- `Active:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Active), "ObjectReference", "k8s_io_api_core_v1.ObjectReference", 1), `&`, ``, 1) + `,`,
- `LastScheduleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScheduleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *JobTemplate) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&JobTemplate{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *JobTemplateSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&JobTemplateSpec{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "k8s_io_api_batch_v1.JobSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *CronJob) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CronJob: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CronJob: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CronJobList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CronJobList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CronJobList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, CronJob{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CronJobSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CronJobSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CronJobSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Schedule", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Schedule = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field StartingDeadlineSeconds", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.StartingDeadlineSeconds = &v
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ConcurrencyPolicy", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ConcurrencyPolicy = ConcurrencyPolicy(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.Suspend = &b
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field JobTemplate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.JobTemplate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field SuccessfulJobsHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.SuccessfulJobsHistoryLimit = &v
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field FailedJobsHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.FailedJobsHistoryLimit = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CronJobStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CronJobStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CronJobStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Active = append(m.Active, k8s_io_api_core_v1.ObjectReference{})
- if err := m.Active[len(m.Active)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastScheduleTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.LastScheduleTime == nil {
- m.LastScheduleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
- }
- if err := m.LastScheduleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *JobTemplate) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: JobTemplate: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: JobTemplate: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *JobTemplateSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: JobTemplateSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: JobTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/batch/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 784 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xcf, 0x6f, 0xe3, 0x44,
- 0x14, 0xc7, 0xe3, 0x34, 0xbf, 0x76, 0xc2, 0x42, 0xd7, 0xa0, 0x5d, 0x2b, 0x20, 0x27, 0x64, 0xb5,
- 0x22, 0x20, 0x76, 0x4c, 0x0b, 0x42, 0x9c, 0x90, 0xd6, 0x8b, 0x16, 0x28, 0x45, 0x8b, 0x9c, 0x22,
- 0x24, 0x54, 0xa1, 0x8e, 0xc7, 0x2f, 0xc9, 0x34, 0xb6, 0xc7, 0xf2, 0x8c, 0x23, 0xe5, 0xc6, 0x85,
- 0x3b, 0xff, 0x08, 0x27, 0xfe, 0x89, 0x88, 0x53, 0x8f, 0x3d, 0x45, 0xd4, 0xfc, 0x17, 0x9c, 0x90,
- 0x27, 0xce, 0x8f, 0xe6, 0x47, 0x5b, 0x2e, 0xbd, 0x79, 0x9e, 0xbf, 0xdf, 0xcf, 0xbc, 0x79, 0xef,
- 0xcd, 0xa0, 0x17, 0xc3, 0x2f, 0x04, 0x66, 0xdc, 0x1a, 0x26, 0x2e, 0xc4, 0x21, 0x48, 0x10, 0xd6,
- 0x08, 0x42, 0x8f, 0xc7, 0x56, 0xfe, 0x83, 0x44, 0xcc, 0x72, 0x89, 0xa4, 0x03, 0x6b, 0x74, 0xe0,
- 0x82, 0x24, 0x07, 0x56, 0x1f, 0x42, 0x88, 0x89, 0x04, 0x0f, 0x47, 0x31, 0x97, 0x5c, 0x37, 0x66,
- 0x4a, 0x4c, 0x22, 0x86, 0x95, 0x12, 0xe7, 0xca, 0xc6, 0xf3, 0x3e, 0x93, 0x83, 0xc4, 0xc5, 0x94,
- 0x07, 0x56, 0x9f, 0xf7, 0xb9, 0xa5, 0x0c, 0x6e, 0xd2, 0x53, 0x2b, 0xb5, 0x50, 0x5f, 0x33, 0x50,
- 0xe3, 0xe9, 0x96, 0x2d, 0xd7, 0x77, 0x6b, 0xb4, 0x57, 0x44, 0x94, 0xc7, 0xb0, 0x4d, 0xf3, 0xd9,
- 0x52, 0x13, 0x10, 0x3a, 0x60, 0x21, 0xc4, 0x63, 0x2b, 0x1a, 0xf6, 0xb3, 0x80, 0xb0, 0x02, 0x90,
- 0x64, 0x9b, 0xcb, 0xda, 0xe5, 0x8a, 0x93, 0x50, 0xb2, 0x00, 0x36, 0x0c, 0x9f, 0xdf, 0x66, 0x10,
- 0x74, 0x00, 0x01, 0xd9, 0xf0, 0x7d, 0xba, 0xcb, 0x97, 0x48, 0xe6, 0x5b, 0x2c, 0x94, 0x42, 0xc6,
- 0xeb, 0xa6, 0xf6, 0x6f, 0x45, 0x54, 0x7d, 0x19, 0xf3, 0xf0, 0x88, 0xbb, 0xfa, 0x19, 0xaa, 0x65,
- 0x87, 0xf0, 0x88, 0x24, 0x86, 0xd6, 0xd2, 0x3a, 0xf5, 0xc3, 0x4f, 0xf0, 0xb2, 0x09, 0x0b, 0x26,
- 0x8e, 0x86, 0xfd, 0x2c, 0x20, 0x70, 0xa6, 0xc6, 0xa3, 0x03, 0xfc, 0xda, 0x3d, 0x07, 0x2a, 0xbf,
- 0x07, 0x49, 0x6c, 0x7d, 0x32, 0x6d, 0x16, 0xd2, 0x69, 0x13, 0x2d, 0x63, 0xce, 0x82, 0xaa, 0x7f,
- 0x8d, 0x4a, 0x22, 0x02, 0x6a, 0x14, 0x15, 0xfd, 0x19, 0xde, 0xd5, 0x62, 0x9c, 0xa7, 0xd4, 0x8d,
- 0x80, 0xda, 0x6f, 0xe4, 0xc8, 0x52, 0xb6, 0x72, 0x14, 0x40, 0x7f, 0x8d, 0x2a, 0x42, 0x12, 0x99,
- 0x08, 0x63, 0x4f, 0xa1, 0x3e, 0xb8, 0x1d, 0xa5, 0xe4, 0xf6, 0x9b, 0x39, 0xac, 0x32, 0x5b, 0x3b,
- 0x39, 0xa6, 0xfd, 0xa7, 0x86, 0xea, 0xb9, 0xf2, 0x98, 0x09, 0xa9, 0x9f, 0x6e, 0xd4, 0x02, 0xdf,
- 0xad, 0x16, 0x99, 0x5b, 0x55, 0x62, 0x3f, 0xdf, 0xa9, 0x36, 0x8f, 0xac, 0xd4, 0xe1, 0x15, 0x2a,
- 0x33, 0x09, 0x81, 0x30, 0x8a, 0xad, 0xbd, 0x4e, 0xfd, 0xf0, 0xfd, 0x5b, 0xb3, 0xb7, 0x1f, 0xe6,
- 0xb4, 0xf2, 0xb7, 0x99, 0xcf, 0x99, 0xd9, 0xdb, 0x7f, 0x94, 0x16, 0x59, 0x67, 0xc5, 0xd1, 0x3f,
- 0x46, 0xb5, 0x6c, 0x38, 0xbc, 0xc4, 0x07, 0x95, 0xf5, 0x83, 0x65, 0x16, 0xdd, 0x3c, 0xee, 0x2c,
- 0x14, 0xfa, 0x8f, 0xe8, 0x89, 0x90, 0x24, 0x96, 0x2c, 0xec, 0x7f, 0x05, 0xc4, 0xf3, 0x59, 0x08,
- 0x5d, 0xa0, 0x3c, 0xf4, 0x84, 0x6a, 0xd0, 0x9e, 0xfd, 0x6e, 0x3a, 0x6d, 0x3e, 0xe9, 0x6e, 0x97,
- 0x38, 0xbb, 0xbc, 0xfa, 0x29, 0x7a, 0x44, 0x79, 0x48, 0x93, 0x38, 0x86, 0x90, 0x8e, 0x7f, 0xe0,
- 0x3e, 0xa3, 0x63, 0xd5, 0xa6, 0x07, 0x36, 0xce, 0xb3, 0x79, 0xf4, 0x72, 0x5d, 0xf0, 0xef, 0xb6,
- 0xa0, 0xb3, 0x09, 0xd2, 0x9f, 0xa1, 0xaa, 0x48, 0x44, 0x04, 0xa1, 0x67, 0x94, 0x5a, 0x5a, 0xa7,
- 0x66, 0xd7, 0xd3, 0x69, 0xb3, 0xda, 0x9d, 0x85, 0x9c, 0xf9, 0x3f, 0xfd, 0x0c, 0xd5, 0xcf, 0xb9,
- 0x7b, 0x02, 0x41, 0xe4, 0x13, 0x09, 0x46, 0x59, 0xb5, 0xf0, 0xc3, 0xdd, 0x75, 0x3e, 0x5a, 0x8a,
- 0xd5, 0xd0, 0xbd, 0x9d, 0x67, 0x5a, 0x5f, 0xf9, 0xe1, 0xac, 0x22, 0xf5, 0x5f, 0x50, 0x43, 0x24,
- 0x94, 0x82, 0x10, 0xbd, 0xc4, 0x3f, 0xe2, 0xae, 0xf8, 0x86, 0x09, 0xc9, 0xe3, 0xf1, 0x31, 0x0b,
- 0x98, 0x34, 0x2a, 0x2d, 0xad, 0x53, 0xb6, 0xcd, 0x74, 0xda, 0x6c, 0x74, 0x77, 0xaa, 0x9c, 0x1b,
- 0x08, 0xba, 0x83, 0x1e, 0xf7, 0x08, 0xf3, 0xc1, 0xdb, 0x60, 0x57, 0x15, 0xbb, 0x91, 0x4e, 0x9b,
- 0x8f, 0x5f, 0x6d, 0x55, 0x38, 0x3b, 0x9c, 0xed, 0xbf, 0x34, 0xf4, 0xf0, 0xda, 0x7d, 0xd0, 0xbf,
- 0x43, 0x15, 0x42, 0x25, 0x1b, 0x65, 0xf3, 0x92, 0x8d, 0xe2, 0xd3, 0xd5, 0x12, 0x65, 0x0f, 0xe1,
- 0xf2, 0x7e, 0x3b, 0xd0, 0x83, 0xac, 0x13, 0xb0, 0xbc, 0x44, 0x2f, 0x94, 0xd5, 0xc9, 0x11, 0xba,
- 0x8f, 0xf6, 0x7d, 0x22, 0xe4, 0x7c, 0xd4, 0x4e, 0x58, 0x00, 0xaa, 0x49, 0xf5, 0xc3, 0x8f, 0xee,
- 0x76, 0x79, 0x32, 0x87, 0xfd, 0x4e, 0x3a, 0x6d, 0xee, 0x1f, 0xaf, 0x71, 0x9c, 0x0d, 0x72, 0x7b,
- 0xa2, 0xa1, 0xd5, 0xee, 0xdc, 0xc3, 0xf3, 0xf5, 0x13, 0xaa, 0xc9, 0xf9, 0x44, 0x15, 0xff, 0xef,
- 0x44, 0x2d, 0x6e, 0xe2, 0x62, 0x9c, 0x16, 0xb0, 0xec, 0xf5, 0x79, 0x6b, 0x4d, 0x7f, 0x0f, 0xc7,
- 0xf9, 0xf2, 0xda, 0x6b, 0xfc, 0xde, 0xb6, 0xa3, 0xe0, 0x1b, 0x1e, 0x61, 0xfb, 0xf9, 0xe4, 0xca,
- 0x2c, 0x5c, 0x5c, 0x99, 0x85, 0xcb, 0x2b, 0xb3, 0xf0, 0x6b, 0x6a, 0x6a, 0x93, 0xd4, 0xd4, 0x2e,
- 0x52, 0x53, 0xbb, 0x4c, 0x4d, 0xed, 0xef, 0xd4, 0xd4, 0x7e, 0xff, 0xc7, 0x2c, 0xfc, 0x5c, 0xcd,
- 0x0b, 0xf2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x78, 0xe4, 0x62, 0x14, 0x08, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/batch/v1beta1/generated.proto b/vendor/k8s.io/api/batch/v1beta1/generated.proto
deleted file mode 100644
index 9278a3d9b..000000000
--- a/vendor/k8s.io/api/batch/v1beta1/generated.proto
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.batch.v1beta1;
-
-import "k8s.io/api/batch/v1/generated.proto";
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// CronJob represents the configuration of a single cron job.
-message CronJob {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior of a cron job, including the schedule.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional CronJobSpec spec = 2;
-
- // Current status of a cron job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional CronJobStatus status = 3;
-}
-
-// CronJobList is a collection of cron jobs.
-message CronJobList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // items is the list of CronJobs.
- repeated CronJob items = 2;
-}
-
-// CronJobSpec describes how the job execution will look like and when it will actually run.
-message CronJobSpec {
- // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
- optional string schedule = 1;
-
- // Optional deadline in seconds for starting the job if it misses scheduled
- // time for any reason. Missed jobs executions will be counted as failed ones.
- // +optional
- optional int64 startingDeadlineSeconds = 2;
-
- // Specifies how to treat concurrent executions of a Job.
- // Valid values are:
- // - "Allow" (default): allows CronJobs to run concurrently;
- // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
- // - "Replace": cancels currently running job and replaces it with a new one
- // +optional
- optional string concurrencyPolicy = 3;
-
- // This flag tells the controller to suspend subsequent executions, it does
- // not apply to already started executions. Defaults to false.
- // +optional
- optional bool suspend = 4;
-
- // Specifies the job that will be created when executing a CronJob.
- optional JobTemplateSpec jobTemplate = 5;
-
- // The number of successful finished jobs to retain.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 3.
- // +optional
- optional int32 successfulJobsHistoryLimit = 6;
-
- // The number of failed finished jobs to retain.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 1.
- // +optional
- optional int32 failedJobsHistoryLimit = 7;
-}
-
-// CronJobStatus represents the current state of a cron job.
-message CronJobStatus {
- // A list of pointers to currently running jobs.
- // +optional
- repeated k8s.io.api.core.v1.ObjectReference active = 1;
-
- // Information when was the last time the job was successfully scheduled.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4;
-}
-
-// JobTemplate describes a template for creating copies of a predefined pod.
-message JobTemplate {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Defines jobs that will be created from this template.
- // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional JobTemplateSpec template = 2;
-}
-
-// JobTemplateSpec describes the data a Job should have when created from a template
-message JobTemplateSpec {
- // Standard object's metadata of the jobs created from this template.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior of the job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional k8s.io.api.batch.v1.JobSpec spec = 2;
-}
-
diff --git a/vendor/k8s.io/api/batch/v1beta1/register.go b/vendor/k8s.io/api/batch/v1beta1/register.go
deleted file mode 100644
index 226de49f4..000000000
--- a/vendor/k8s.io/api/batch/v1beta1/register.go
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "batch"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &JobTemplate{},
- &CronJob{},
- &CronJobList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/batch/v1beta1/types.go b/vendor/k8s.io/api/batch/v1beta1/types.go
deleted file mode 100644
index cb5c9bad2..000000000
--- a/vendor/k8s.io/api/batch/v1beta1/types.go
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- batchv1 "k8s.io/api/batch/v1"
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// JobTemplate describes a template for creating copies of a predefined pod.
-type JobTemplate struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Defines jobs that will be created from this template.
- // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
-}
-
-// JobTemplateSpec describes the data a Job should have when created from a template
-type JobTemplateSpec struct {
- // Standard object's metadata of the jobs created from this template.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior of the job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec batchv1.JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// CronJob represents the configuration of a single cron job.
-type CronJob struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior of a cron job, including the schedule.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Current status of a cron job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Status CronJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// CronJobList is a collection of cron jobs.
-type CronJobList struct {
- metav1.TypeMeta `json:",inline"`
-
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // items is the list of CronJobs.
- Items []CronJob `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// CronJobSpec describes how the job execution will look like and when it will actually run.
-type CronJobSpec struct {
-
- // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
- Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`
-
- // Optional deadline in seconds for starting the job if it misses scheduled
- // time for any reason. Missed jobs executions will be counted as failed ones.
- // +optional
- StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`
-
- // Specifies how to treat concurrent executions of a Job.
- // Valid values are:
- // - "Allow" (default): allows CronJobs to run concurrently;
- // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
- // - "Replace": cancels currently running job and replaces it with a new one
- // +optional
- ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`
-
- // This flag tells the controller to suspend subsequent executions, it does
- // not apply to already started executions. Defaults to false.
- // +optional
- Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"`
-
- // Specifies the job that will be created when executing a CronJob.
- JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"`
-
- // The number of successful finished jobs to retain.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 3.
- // +optional
- SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty" protobuf:"varint,6,opt,name=successfulJobsHistoryLimit"`
-
- // The number of failed finished jobs to retain.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 1.
- // +optional
- FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty" protobuf:"varint,7,opt,name=failedJobsHistoryLimit"`
-}
-
-// ConcurrencyPolicy describes how the job will be handled.
-// Only one of the following concurrent policies may be specified.
-// If none of the following policies is specified, the default one
-// is AllowConcurrent.
-type ConcurrencyPolicy string
-
-const (
- // AllowConcurrent allows CronJobs to run concurrently.
- AllowConcurrent ConcurrencyPolicy = "Allow"
-
- // ForbidConcurrent forbids concurrent runs, skipping next run if previous
- // hasn't finished yet.
- ForbidConcurrent ConcurrencyPolicy = "Forbid"
-
- // ReplaceConcurrent cancels currently running job and replaces it with a new one.
- ReplaceConcurrent ConcurrencyPolicy = "Replace"
-)
-
-// CronJobStatus represents the current state of a cron job.
-type CronJobStatus struct {
- // A list of pointers to currently running jobs.
- // +optional
- Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
-
- // Information when was the last time the job was successfully scheduled.
- // +optional
- LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"`
-}
diff --git a/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 3b53ac08a..000000000
--- a/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_CronJob = map[string]string{
- "": "CronJob represents the configuration of a single cron job.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
- "status": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (CronJob) SwaggerDoc() map[string]string {
- return map_CronJob
-}
-
-var map_CronJobList = map[string]string{
- "": "CronJobList is a collection of cron jobs.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "items is the list of CronJobs.",
-}
-
-func (CronJobList) SwaggerDoc() map[string]string {
- return map_CronJobList
-}
-
-var map_CronJobSpec = map[string]string{
- "": "CronJobSpec describes how the job execution will look like and when it will actually run.",
- "schedule": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.",
- "startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.",
- "concurrencyPolicy": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one",
- "suspend": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.",
- "jobTemplate": "Specifies the job that will be created when executing a CronJob.",
- "successfulJobsHistoryLimit": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.",
- "failedJobsHistoryLimit": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
-}
-
-func (CronJobSpec) SwaggerDoc() map[string]string {
- return map_CronJobSpec
-}
-
-var map_CronJobStatus = map[string]string{
- "": "CronJobStatus represents the current state of a cron job.",
- "active": "A list of pointers to currently running jobs.",
- "lastScheduleTime": "Information when was the last time the job was successfully scheduled.",
-}
-
-func (CronJobStatus) SwaggerDoc() map[string]string {
- return map_CronJobStatus
-}
-
-var map_JobTemplate = map[string]string{
- "": "JobTemplate describes a template for creating copies of a predefined pod.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "template": "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (JobTemplate) SwaggerDoc() map[string]string {
- return map_JobTemplate
-}
-
-var map_JobTemplateSpec = map[string]string{
- "": "JobTemplateSpec describes the data a Job should have when created from a template",
- "metadata": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (JobTemplateSpec) SwaggerDoc() map[string]string {
- return map_JobTemplateSpec
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index 78e361aba..000000000
--- a/vendor/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,214 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- v1 "k8s.io/api/core/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CronJob) DeepCopyInto(out *CronJob) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJob.
-func (in *CronJob) DeepCopy() *CronJob {
- if in == nil {
- return nil
- }
- out := new(CronJob)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *CronJob) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CronJobList) DeepCopyInto(out *CronJobList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]CronJob, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobList.
-func (in *CronJobList) DeepCopy() *CronJobList {
- if in == nil {
- return nil
- }
- out := new(CronJobList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *CronJobList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CronJobSpec) DeepCopyInto(out *CronJobSpec) {
- *out = *in
- if in.StartingDeadlineSeconds != nil {
- in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
- if *in == nil {
- *out = nil
- } else {
- *out = new(int64)
- **out = **in
- }
- }
- if in.Suspend != nil {
- in, out := &in.Suspend, &out.Suspend
- if *in == nil {
- *out = nil
- } else {
- *out = new(bool)
- **out = **in
- }
- }
- in.JobTemplate.DeepCopyInto(&out.JobTemplate)
- if in.SuccessfulJobsHistoryLimit != nil {
- in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.FailedJobsHistoryLimit != nil {
- in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobSpec.
-func (in *CronJobSpec) DeepCopy() *CronJobSpec {
- if in == nil {
- return nil
- }
- out := new(CronJobSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CronJobStatus) DeepCopyInto(out *CronJobStatus) {
- *out = *in
- if in.Active != nil {
- in, out := &in.Active, &out.Active
- *out = make([]v1.ObjectReference, len(*in))
- copy(*out, *in)
- }
- if in.LastScheduleTime != nil {
- in, out := &in.LastScheduleTime, &out.LastScheduleTime
- if *in == nil {
- *out = nil
- } else {
- *out = (*in).DeepCopy()
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobStatus.
-func (in *CronJobStatus) DeepCopy() *CronJobStatus {
- if in == nil {
- return nil
- }
- out := new(CronJobStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *JobTemplate) DeepCopyInto(out *JobTemplate) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Template.DeepCopyInto(&out.Template)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobTemplate.
-func (in *JobTemplate) DeepCopy() *JobTemplate {
- if in == nil {
- return nil
- }
- out := new(JobTemplate)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *JobTemplate) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *JobTemplateSpec) DeepCopyInto(out *JobTemplateSpec) {
- *out = *in
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobTemplateSpec.
-func (in *JobTemplateSpec) DeepCopy() *JobTemplateSpec {
- if in == nil {
- return nil
- }
- out := new(JobTemplateSpec)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/batch/v2alpha1/doc.go b/vendor/k8s.io/api/batch/v2alpha1/doc.go
deleted file mode 100644
index f4ed01ad8..000000000
--- a/vendor/k8s.io/api/batch/v2alpha1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-package v2alpha1 // import "k8s.io/api/batch/v2alpha1"
diff --git a/vendor/k8s.io/api/batch/v2alpha1/generated.pb.go b/vendor/k8s.io/api/batch/v2alpha1/generated.pb.go
deleted file mode 100644
index 2560953eb..000000000
--- a/vendor/k8s.io/api/batch/v2alpha1/generated.pb.go
+++ /dev/null
@@ -1,1510 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/batch/v2alpha1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v2alpha1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/batch/v2alpha1/generated.proto
-
- It has these top-level messages:
- CronJob
- CronJobList
- CronJobSpec
- CronJobStatus
- JobTemplate
- JobTemplateSpec
-*/
-package v2alpha1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *CronJob) Reset() { *m = CronJob{} }
-func (*CronJob) ProtoMessage() {}
-func (*CronJob) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *CronJobList) Reset() { *m = CronJobList{} }
-func (*CronJobList) ProtoMessage() {}
-func (*CronJobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *CronJobSpec) Reset() { *m = CronJobSpec{} }
-func (*CronJobSpec) ProtoMessage() {}
-func (*CronJobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *CronJobStatus) Reset() { *m = CronJobStatus{} }
-func (*CronJobStatus) ProtoMessage() {}
-func (*CronJobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *JobTemplate) Reset() { *m = JobTemplate{} }
-func (*JobTemplate) ProtoMessage() {}
-func (*JobTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} }
-func (*JobTemplateSpec) ProtoMessage() {}
-func (*JobTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func init() {
- proto.RegisterType((*CronJob)(nil), "k8s.io.api.batch.v2alpha1.CronJob")
- proto.RegisterType((*CronJobList)(nil), "k8s.io.api.batch.v2alpha1.CronJobList")
- proto.RegisterType((*CronJobSpec)(nil), "k8s.io.api.batch.v2alpha1.CronJobSpec")
- proto.RegisterType((*CronJobStatus)(nil), "k8s.io.api.batch.v2alpha1.CronJobStatus")
- proto.RegisterType((*JobTemplate)(nil), "k8s.io.api.batch.v2alpha1.JobTemplate")
- proto.RegisterType((*JobTemplateSpec)(nil), "k8s.io.api.batch.v2alpha1.JobTemplateSpec")
-}
-func (m *CronJob) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CronJob) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *CronJobList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CronJobList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n4, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *CronJobSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CronJobSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Schedule)))
- i += copy(dAtA[i:], m.Schedule)
- if m.StartingDeadlineSeconds != nil {
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.StartingDeadlineSeconds))
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConcurrencyPolicy)))
- i += copy(dAtA[i:], m.ConcurrencyPolicy)
- if m.Suspend != nil {
- dAtA[i] = 0x20
- i++
- if *m.Suspend {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.JobTemplate.Size()))
- n5, err := m.JobTemplate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if m.SuccessfulJobsHistoryLimit != nil {
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.SuccessfulJobsHistoryLimit))
- }
- if m.FailedJobsHistoryLimit != nil {
- dAtA[i] = 0x38
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.FailedJobsHistoryLimit))
- }
- return i, nil
-}
-
-func (m *CronJobStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CronJobStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Active) > 0 {
- for _, msg := range m.Active {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if m.LastScheduleTime != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastScheduleTime.Size()))
- n6, err := m.LastScheduleTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- }
- return i, nil
-}
-
-func (m *JobTemplate) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *JobTemplate) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n8, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- return i, nil
-}
-
-func (m *JobTemplateSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *JobTemplateSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n10, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *CronJob) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *CronJobList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *CronJobSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Schedule)
- n += 1 + l + sovGenerated(uint64(l))
- if m.StartingDeadlineSeconds != nil {
- n += 1 + sovGenerated(uint64(*m.StartingDeadlineSeconds))
- }
- l = len(m.ConcurrencyPolicy)
- n += 1 + l + sovGenerated(uint64(l))
- if m.Suspend != nil {
- n += 2
- }
- l = m.JobTemplate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.SuccessfulJobsHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.SuccessfulJobsHistoryLimit))
- }
- if m.FailedJobsHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.FailedJobsHistoryLimit))
- }
- return n
-}
-
-func (m *CronJobStatus) Size() (n int) {
- var l int
- _ = l
- if len(m.Active) > 0 {
- for _, e := range m.Active {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.LastScheduleTime != nil {
- l = m.LastScheduleTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *JobTemplate) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *JobTemplateSpec) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *CronJob) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CronJob{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CronJobSpec", "CronJobSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CronJobStatus", "CronJobStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CronJobList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CronJobList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CronJob", "CronJob", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CronJobSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CronJobSpec{`,
- `Schedule:` + fmt.Sprintf("%v", this.Schedule) + `,`,
- `StartingDeadlineSeconds:` + valueToStringGenerated(this.StartingDeadlineSeconds) + `,`,
- `ConcurrencyPolicy:` + fmt.Sprintf("%v", this.ConcurrencyPolicy) + `,`,
- `Suspend:` + valueToStringGenerated(this.Suspend) + `,`,
- `JobTemplate:` + strings.Replace(strings.Replace(this.JobTemplate.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`,
- `SuccessfulJobsHistoryLimit:` + valueToStringGenerated(this.SuccessfulJobsHistoryLimit) + `,`,
- `FailedJobsHistoryLimit:` + valueToStringGenerated(this.FailedJobsHistoryLimit) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CronJobStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CronJobStatus{`,
- `Active:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Active), "ObjectReference", "k8s_io_api_core_v1.ObjectReference", 1), `&`, ``, 1) + `,`,
- `LastScheduleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScheduleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *JobTemplate) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&JobTemplate{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *JobTemplateSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&JobTemplateSpec{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "k8s_io_api_batch_v1.JobSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *CronJob) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CronJob: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CronJob: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CronJobList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CronJobList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CronJobList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, CronJob{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CronJobSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CronJobSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CronJobSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Schedule", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Schedule = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field StartingDeadlineSeconds", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.StartingDeadlineSeconds = &v
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ConcurrencyPolicy", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ConcurrencyPolicy = ConcurrencyPolicy(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.Suspend = &b
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field JobTemplate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.JobTemplate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field SuccessfulJobsHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.SuccessfulJobsHistoryLimit = &v
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field FailedJobsHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.FailedJobsHistoryLimit = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CronJobStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CronJobStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CronJobStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Active = append(m.Active, k8s_io_api_core_v1.ObjectReference{})
- if err := m.Active[len(m.Active)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastScheduleTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.LastScheduleTime == nil {
- m.LastScheduleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
- }
- if err := m.LastScheduleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *JobTemplate) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: JobTemplate: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: JobTemplate: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *JobTemplateSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: JobTemplateSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: JobTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/batch/v2alpha1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 787 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xcf, 0x6f, 0xe3, 0x44,
- 0x14, 0xc7, 0xe3, 0x34, 0xbf, 0x3a, 0xa1, 0xd0, 0x1a, 0xd4, 0x86, 0x80, 0x9c, 0xc8, 0x15, 0x28,
- 0x42, 0x30, 0xa6, 0x05, 0x21, 0x4e, 0x48, 0xb8, 0x08, 0x4a, 0x29, 0xa2, 0x72, 0x8a, 0x84, 0x50,
- 0xb5, 0xda, 0xf1, 0x78, 0x92, 0x4c, 0x63, 0x7b, 0x2c, 0xcf, 0x38, 0x52, 0x6e, 0x7b, 0xdb, 0xeb,
- 0xfe, 0x25, 0x7b, 0xd9, 0xfd, 0x23, 0xba, 0x7b, 0xea, 0xb1, 0xa7, 0x68, 0xeb, 0xfd, 0x2f, 0xf6,
- 0xb4, 0xf2, 0xc4, 0xf9, 0xd1, 0x38, 0x69, 0xbb, 0x97, 0xde, 0x3c, 0xcf, 0xdf, 0xef, 0x67, 0xde,
- 0xbc, 0xf7, 0x66, 0x80, 0xd9, 0xff, 0x99, 0x43, 0xca, 0x8c, 0x7e, 0x64, 0x93, 0xd0, 0x27, 0x82,
- 0x70, 0x63, 0x40, 0x7c, 0x87, 0x85, 0x46, 0xfa, 0x03, 0x05, 0xd4, 0xb0, 0x91, 0xc0, 0x3d, 0x63,
- 0xb0, 0x8f, 0xdc, 0xa0, 0x87, 0xf6, 0x8c, 0x2e, 0xf1, 0x49, 0x88, 0x04, 0x71, 0x60, 0x10, 0x32,
- 0xc1, 0xd4, 0xcf, 0xc7, 0x52, 0x88, 0x02, 0x0a, 0xa5, 0x14, 0x4e, 0xa4, 0xf5, 0xef, 0xba, 0x54,
- 0xf4, 0x22, 0x1b, 0x62, 0xe6, 0x19, 0x5d, 0xd6, 0x65, 0x86, 0x74, 0xd8, 0x51, 0x47, 0xae, 0xe4,
- 0x42, 0x7e, 0x8d, 0x49, 0xf5, 0xdd, 0xec, 0xa6, 0x99, 0xed, 0xea, 0xfa, 0x9c, 0x08, 0xb3, 0x90,
- 0x2c, 0xd3, 0xfc, 0x38, 0xd3, 0x78, 0x08, 0xf7, 0xa8, 0x4f, 0xc2, 0xa1, 0x11, 0xf4, 0xbb, 0x49,
- 0x80, 0x1b, 0x1e, 0x11, 0x68, 0x99, 0xcb, 0x58, 0xe5, 0x0a, 0x23, 0x5f, 0x50, 0x8f, 0x64, 0x0c,
- 0x3f, 0xdd, 0x65, 0xe0, 0xb8, 0x47, 0x3c, 0x94, 0xf1, 0xfd, 0xb0, 0xca, 0x17, 0x09, 0xea, 0x1a,
- 0xd4, 0x17, 0x5c, 0x84, 0x8b, 0x26, 0xfd, 0x69, 0x1e, 0x94, 0x0f, 0x42, 0xe6, 0x1f, 0x31, 0x5b,
- 0x7d, 0x0c, 0x2a, 0xc9, 0x21, 0x1c, 0x24, 0x50, 0x4d, 0x69, 0x2a, 0xad, 0xea, 0xfe, 0xf7, 0x70,
- 0xd6, 0x85, 0x29, 0x13, 0x06, 0xfd, 0x6e, 0x12, 0xe0, 0x30, 0x51, 0xc3, 0xc1, 0x1e, 0xfc, 0xc7,
- 0x3e, 0x27, 0x58, 0xfc, 0x4d, 0x04, 0x32, 0xd5, 0x8b, 0x51, 0x23, 0x17, 0x8f, 0x1a, 0x60, 0x16,
- 0xb3, 0xa6, 0x54, 0xf5, 0x10, 0x14, 0x78, 0x40, 0x70, 0x2d, 0x2f, 0xe9, 0x5f, 0xc3, 0x95, 0x3d,
- 0x86, 0x69, 0x4e, 0xed, 0x80, 0x60, 0xf3, 0xa3, 0x94, 0x59, 0x48, 0x56, 0x96, 0x24, 0xa8, 0x27,
- 0xa0, 0xc4, 0x05, 0x12, 0x11, 0xaf, 0xad, 0x49, 0x56, 0xeb, 0x1e, 0x2c, 0xa9, 0x37, 0x3f, 0x4e,
- 0x69, 0xa5, 0xf1, 0xda, 0x4a, 0x39, 0xfa, 0x4b, 0x05, 0x54, 0x53, 0xe5, 0x31, 0xe5, 0x42, 0x3d,
- 0xcb, 0x54, 0x03, 0xde, 0xaf, 0x1a, 0x89, 0x5b, 0xd6, 0x62, 0x33, 0xdd, 0xa9, 0x32, 0x89, 0xcc,
- 0x55, 0xe2, 0x0f, 0x50, 0xa4, 0x82, 0x78, 0xbc, 0x96, 0x6f, 0xae, 0xb5, 0xaa, 0xfb, 0xfa, 0xdd,
- 0xe9, 0x9b, 0x1b, 0x29, 0xae, 0xf8, 0x67, 0x62, 0xb4, 0xc6, 0x7e, 0xfd, 0x79, 0x61, 0x9a, 0x76,
- 0x52, 0x1e, 0xf5, 0x5b, 0x50, 0x49, 0xe6, 0xc3, 0x89, 0x5c, 0x22, 0xd3, 0x5e, 0x9f, 0xa5, 0xd1,
- 0x4e, 0xe3, 0xd6, 0x54, 0xa1, 0xfe, 0x0b, 0x76, 0xb8, 0x40, 0xa1, 0xa0, 0x7e, 0xf7, 0x37, 0x82,
- 0x1c, 0x97, 0xfa, 0xa4, 0x4d, 0x30, 0xf3, 0x1d, 0x2e, 0x7b, 0xb4, 0x66, 0x7e, 0x11, 0x8f, 0x1a,
- 0x3b, 0xed, 0xe5, 0x12, 0x6b, 0x95, 0x57, 0x3d, 0x03, 0x5b, 0x98, 0xf9, 0x38, 0x0a, 0x43, 0xe2,
- 0xe3, 0xe1, 0x09, 0x73, 0x29, 0x1e, 0xca, 0x46, 0xad, 0x9b, 0x30, 0xcd, 0x66, 0xeb, 0x60, 0x51,
- 0xf0, 0x6e, 0x59, 0xd0, 0xca, 0x82, 0xd4, 0xaf, 0x40, 0x99, 0x47, 0x3c, 0x20, 0xbe, 0x53, 0x2b,
- 0x34, 0x95, 0x56, 0xc5, 0xac, 0xc6, 0xa3, 0x46, 0xb9, 0x3d, 0x0e, 0x59, 0x93, 0x7f, 0x2a, 0x02,
- 0xd5, 0x73, 0x66, 0x9f, 0x12, 0x2f, 0x70, 0x91, 0x20, 0xb5, 0xa2, 0xec, 0xe1, 0x37, 0xb7, 0x14,
- 0xfa, 0x68, 0xa6, 0x96, 0x73, 0xf7, 0x69, 0x9a, 0x6a, 0x75, 0xee, 0x87, 0x35, 0xcf, 0x54, 0x1f,
- 0x81, 0x3a, 0x8f, 0x30, 0x26, 0x9c, 0x77, 0x22, 0xf7, 0x88, 0xd9, 0xfc, 0x90, 0x72, 0xc1, 0xc2,
- 0xe1, 0x31, 0xf5, 0xa8, 0xa8, 0x95, 0x9a, 0x4a, 0xab, 0x68, 0x6a, 0xf1, 0xa8, 0x51, 0x6f, 0xaf,
- 0x54, 0x59, 0xb7, 0x10, 0x54, 0x0b, 0x6c, 0x77, 0x10, 0x75, 0x89, 0x93, 0x61, 0x97, 0x25, 0xbb,
- 0x1e, 0x8f, 0x1a, 0xdb, 0xbf, 0x2f, 0x55, 0x58, 0x2b, 0x9c, 0xfa, 0x6b, 0x05, 0x6c, 0xdc, 0xb8,
- 0x11, 0xea, 0x5f, 0xa0, 0x84, 0xb0, 0xa0, 0x83, 0x64, 0x60, 0x92, 0x61, 0xdc, 0x9d, 0xaf, 0x51,
- 0xf2, 0x18, 0xce, 0xee, 0xb8, 0x45, 0x3a, 0x24, 0x69, 0x05, 0x99, 0x5d, 0xa3, 0x5f, 0xa5, 0xd5,
- 0x4a, 0x11, 0xaa, 0x0b, 0x36, 0x5d, 0xc4, 0xc5, 0x64, 0xd6, 0x4e, 0xa9, 0x47, 0x64, 0x97, 0x6e,
- 0x96, 0xfe, 0x96, 0xeb, 0x93, 0x38, 0xcc, 0xcf, 0xe2, 0x51, 0x63, 0xf3, 0x78, 0x81, 0x63, 0x65,
- 0xc8, 0xfa, 0x2b, 0x05, 0xcc, 0x77, 0xe7, 0x01, 0x9e, 0xb0, 0xff, 0x40, 0x45, 0x4c, 0x46, 0x2a,
- 0xff, 0xc1, 0x23, 0x35, 0xbd, 0x8b, 0xd3, 0x79, 0x9a, 0xd2, 0xf4, 0x17, 0x0a, 0xf8, 0x64, 0x41,
- 0xff, 0x00, 0xe7, 0xf9, 0xe5, 0xc6, 0x93, 0xfc, 0xe5, 0x92, 0xb3, 0xc8, 0x53, 0xac, 0x7a, 0x88,
- 0x4d, 0x78, 0x71, 0xad, 0xe5, 0x2e, 0xaf, 0xb5, 0xdc, 0xd5, 0xb5, 0x96, 0x7b, 0x12, 0x6b, 0xca,
- 0x45, 0xac, 0x29, 0x97, 0xb1, 0xa6, 0x5c, 0xc5, 0x9a, 0xf2, 0x26, 0xd6, 0x94, 0x67, 0x6f, 0xb5,
- 0xdc, 0xff, 0x95, 0x49, 0x45, 0xde, 0x07, 0x00, 0x00, 0xff, 0xff, 0x02, 0x60, 0xaa, 0x00, 0x1c,
- 0x08, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/batch/v2alpha1/generated.proto b/vendor/k8s.io/api/batch/v2alpha1/generated.proto
deleted file mode 100644
index e4de3644c..000000000
--- a/vendor/k8s.io/api/batch/v2alpha1/generated.proto
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.batch.v2alpha1;
-
-import "k8s.io/api/batch/v1/generated.proto";
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v2alpha1";
-
-// CronJob represents the configuration of a single cron job.
-message CronJob {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior of a cron job, including the schedule.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional CronJobSpec spec = 2;
-
- // Current status of a cron job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional CronJobStatus status = 3;
-}
-
-// CronJobList is a collection of cron jobs.
-message CronJobList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // items is the list of CronJobs.
- repeated CronJob items = 2;
-}
-
-// CronJobSpec describes how the job execution will look like and when it will actually run.
-message CronJobSpec {
- // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
- optional string schedule = 1;
-
- // Optional deadline in seconds for starting the job if it misses scheduled
- // time for any reason. Missed jobs executions will be counted as failed ones.
- // +optional
- optional int64 startingDeadlineSeconds = 2;
-
- // Specifies how to treat concurrent executions of a Job.
- // Valid values are:
- // - "Allow" (default): allows CronJobs to run concurrently;
- // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
- // - "Replace": cancels currently running job and replaces it with a new one
- // +optional
- optional string concurrencyPolicy = 3;
-
- // This flag tells the controller to suspend subsequent executions, it does
- // not apply to already started executions. Defaults to false.
- // +optional
- optional bool suspend = 4;
-
- // Specifies the job that will be created when executing a CronJob.
- optional JobTemplateSpec jobTemplate = 5;
-
- // The number of successful finished jobs to retain.
- // This is a pointer to distinguish between explicit zero and not specified.
- // +optional
- optional int32 successfulJobsHistoryLimit = 6;
-
- // The number of failed finished jobs to retain.
- // This is a pointer to distinguish between explicit zero and not specified.
- // +optional
- optional int32 failedJobsHistoryLimit = 7;
-}
-
-// CronJobStatus represents the current state of a cron job.
-message CronJobStatus {
- // A list of pointers to currently running jobs.
- // +optional
- repeated k8s.io.api.core.v1.ObjectReference active = 1;
-
- // Information when was the last time the job was successfully scheduled.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4;
-}
-
-// JobTemplate describes a template for creating copies of a predefined pod.
-message JobTemplate {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Defines jobs that will be created from this template.
- // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional JobTemplateSpec template = 2;
-}
-
-// JobTemplateSpec describes the data a Job should have when created from a template
-message JobTemplateSpec {
- // Standard object's metadata of the jobs created from this template.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior of the job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional k8s.io.api.batch.v1.JobSpec spec = 2;
-}
-
diff --git a/vendor/k8s.io/api/batch/v2alpha1/register.go b/vendor/k8s.io/api/batch/v2alpha1/register.go
deleted file mode 100644
index ac7fa5087..000000000
--- a/vendor/k8s.io/api/batch/v2alpha1/register.go
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-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 v2alpha1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "batch"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2alpha1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &JobTemplate{},
- &CronJob{},
- &CronJobList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/batch/v2alpha1/types.go b/vendor/k8s.io/api/batch/v2alpha1/types.go
deleted file mode 100644
index cccff94ff..000000000
--- a/vendor/k8s.io/api/batch/v2alpha1/types.go
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
-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 v2alpha1
-
-import (
- batchv1 "k8s.io/api/batch/v1"
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// JobTemplate describes a template for creating copies of a predefined pod.
-type JobTemplate struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Defines jobs that will be created from this template.
- // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
-}
-
-// JobTemplateSpec describes the data a Job should have when created from a template
-type JobTemplateSpec struct {
- // Standard object's metadata of the jobs created from this template.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior of the job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec batchv1.JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// CronJob represents the configuration of a single cron job.
-type CronJob struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior of a cron job, including the schedule.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Current status of a cron job.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Status CronJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// CronJobList is a collection of cron jobs.
-type CronJobList struct {
- metav1.TypeMeta `json:",inline"`
-
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // items is the list of CronJobs.
- Items []CronJob `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// CronJobSpec describes how the job execution will look like and when it will actually run.
-type CronJobSpec struct {
-
- // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
- Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`
-
- // Optional deadline in seconds for starting the job if it misses scheduled
- // time for any reason. Missed jobs executions will be counted as failed ones.
- // +optional
- StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`
-
- // Specifies how to treat concurrent executions of a Job.
- // Valid values are:
- // - "Allow" (default): allows CronJobs to run concurrently;
- // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
- // - "Replace": cancels currently running job and replaces it with a new one
- // +optional
- ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`
-
- // This flag tells the controller to suspend subsequent executions, it does
- // not apply to already started executions. Defaults to false.
- // +optional
- Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"`
-
- // Specifies the job that will be created when executing a CronJob.
- JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"`
-
- // The number of successful finished jobs to retain.
- // This is a pointer to distinguish between explicit zero and not specified.
- // +optional
- SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty" protobuf:"varint,6,opt,name=successfulJobsHistoryLimit"`
-
- // The number of failed finished jobs to retain.
- // This is a pointer to distinguish between explicit zero and not specified.
- // +optional
- FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty" protobuf:"varint,7,opt,name=failedJobsHistoryLimit"`
-}
-
-// ConcurrencyPolicy describes how the job will be handled.
-// Only one of the following concurrent policies may be specified.
-// If none of the following policies is specified, the default one
-// is AllowConcurrent.
-type ConcurrencyPolicy string
-
-const (
- // AllowConcurrent allows CronJobs to run concurrently.
- AllowConcurrent ConcurrencyPolicy = "Allow"
-
- // ForbidConcurrent forbids concurrent runs, skipping next run if previous
- // hasn't finished yet.
- ForbidConcurrent ConcurrencyPolicy = "Forbid"
-
- // ReplaceConcurrent cancels currently running job and replaces it with a new one.
- ReplaceConcurrent ConcurrencyPolicy = "Replace"
-)
-
-// CronJobStatus represents the current state of a cron job.
-type CronJobStatus struct {
- // A list of pointers to currently running jobs.
- // +optional
- Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
-
- // Information when was the last time the job was successfully scheduled.
- // +optional
- LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"`
-}
diff --git a/vendor/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go
deleted file mode 100644
index d166b807f..000000000
--- a/vendor/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-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 v2alpha1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_CronJob = map[string]string{
- "": "CronJob represents the configuration of a single cron job.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
- "status": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (CronJob) SwaggerDoc() map[string]string {
- return map_CronJob
-}
-
-var map_CronJobList = map[string]string{
- "": "CronJobList is a collection of cron jobs.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "items is the list of CronJobs.",
-}
-
-func (CronJobList) SwaggerDoc() map[string]string {
- return map_CronJobList
-}
-
-var map_CronJobSpec = map[string]string{
- "": "CronJobSpec describes how the job execution will look like and when it will actually run.",
- "schedule": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.",
- "startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.",
- "concurrencyPolicy": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one",
- "suspend": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.",
- "jobTemplate": "Specifies the job that will be created when executing a CronJob.",
- "successfulJobsHistoryLimit": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.",
- "failedJobsHistoryLimit": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.",
-}
-
-func (CronJobSpec) SwaggerDoc() map[string]string {
- return map_CronJobSpec
-}
-
-var map_CronJobStatus = map[string]string{
- "": "CronJobStatus represents the current state of a cron job.",
- "active": "A list of pointers to currently running jobs.",
- "lastScheduleTime": "Information when was the last time the job was successfully scheduled.",
-}
-
-func (CronJobStatus) SwaggerDoc() map[string]string {
- return map_CronJobStatus
-}
-
-var map_JobTemplate = map[string]string{
- "": "JobTemplate describes a template for creating copies of a predefined pod.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "template": "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (JobTemplate) SwaggerDoc() map[string]string {
- return map_JobTemplate
-}
-
-var map_JobTemplateSpec = map[string]string{
- "": "JobTemplateSpec describes the data a Job should have when created from a template",
- "metadata": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (JobTemplateSpec) SwaggerDoc() map[string]string {
- return map_JobTemplateSpec
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/batch/v2alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/batch/v2alpha1/zz_generated.deepcopy.go
deleted file mode 100644
index d8352bfbe..000000000
--- a/vendor/k8s.io/api/batch/v2alpha1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,214 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v2alpha1
-
-import (
- v1 "k8s.io/api/core/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CronJob) DeepCopyInto(out *CronJob) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJob.
-func (in *CronJob) DeepCopy() *CronJob {
- if in == nil {
- return nil
- }
- out := new(CronJob)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *CronJob) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CronJobList) DeepCopyInto(out *CronJobList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]CronJob, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobList.
-func (in *CronJobList) DeepCopy() *CronJobList {
- if in == nil {
- return nil
- }
- out := new(CronJobList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *CronJobList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CronJobSpec) DeepCopyInto(out *CronJobSpec) {
- *out = *in
- if in.StartingDeadlineSeconds != nil {
- in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
- if *in == nil {
- *out = nil
- } else {
- *out = new(int64)
- **out = **in
- }
- }
- if in.Suspend != nil {
- in, out := &in.Suspend, &out.Suspend
- if *in == nil {
- *out = nil
- } else {
- *out = new(bool)
- **out = **in
- }
- }
- in.JobTemplate.DeepCopyInto(&out.JobTemplate)
- if in.SuccessfulJobsHistoryLimit != nil {
- in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.FailedJobsHistoryLimit != nil {
- in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobSpec.
-func (in *CronJobSpec) DeepCopy() *CronJobSpec {
- if in == nil {
- return nil
- }
- out := new(CronJobSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CronJobStatus) DeepCopyInto(out *CronJobStatus) {
- *out = *in
- if in.Active != nil {
- in, out := &in.Active, &out.Active
- *out = make([]v1.ObjectReference, len(*in))
- copy(*out, *in)
- }
- if in.LastScheduleTime != nil {
- in, out := &in.LastScheduleTime, &out.LastScheduleTime
- if *in == nil {
- *out = nil
- } else {
- *out = (*in).DeepCopy()
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobStatus.
-func (in *CronJobStatus) DeepCopy() *CronJobStatus {
- if in == nil {
- return nil
- }
- out := new(CronJobStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *JobTemplate) DeepCopyInto(out *JobTemplate) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Template.DeepCopyInto(&out.Template)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobTemplate.
-func (in *JobTemplate) DeepCopy() *JobTemplate {
- if in == nil {
- return nil
- }
- out := new(JobTemplate)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *JobTemplate) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *JobTemplateSpec) DeepCopyInto(out *JobTemplateSpec) {
- *out = *in
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobTemplateSpec.
-func (in *JobTemplateSpec) DeepCopy() *JobTemplateSpec {
- if in == nil {
- return nil
- }
- out := new(JobTemplateSpec)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/certificates/v1beta1/doc.go b/vendor/k8s.io/api/certificates/v1beta1/doc.go
deleted file mode 100644
index fb23aadb0..000000000
--- a/vendor/k8s.io/api/certificates/v1beta1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// +groupName=certificates.k8s.io
-package v1beta1 // import "k8s.io/api/certificates/v1beta1"
diff --git a/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go b/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go
deleted file mode 100644
index 7f704bf82..000000000
--- a/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,1693 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1beta1/generated.proto
-
- It has these top-level messages:
- CertificateSigningRequest
- CertificateSigningRequestCondition
- CertificateSigningRequestList
- CertificateSigningRequestSpec
- CertificateSigningRequestStatus
- ExtraValue
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} }
-func (*CertificateSigningRequest) ProtoMessage() {}
-func (*CertificateSigningRequest) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{0}
-}
-
-func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} }
-func (*CertificateSigningRequestCondition) ProtoMessage() {}
-func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{1}
-}
-
-func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} }
-func (*CertificateSigningRequestList) ProtoMessage() {}
-func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{2}
-}
-
-func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} }
-func (*CertificateSigningRequestSpec) ProtoMessage() {}
-func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{3}
-}
-
-func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} }
-func (*CertificateSigningRequestStatus) ProtoMessage() {}
-func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{4}
-}
-
-func (m *ExtraValue) Reset() { *m = ExtraValue{} }
-func (*ExtraValue) ProtoMessage() {}
-func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func init() {
- proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequest")
- proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestCondition")
- proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestList")
- proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestSpec")
- proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestStatus")
- proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.certificates.v1beta1.ExtraValue")
-}
-func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CertificateSigningRequest) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *CertificateSigningRequestCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CertificateSigningRequestCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
- n4, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- return i, nil
-}
-
-func (m *CertificateSigningRequestList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CertificateSigningRequestList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n5, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *CertificateSigningRequestSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CertificateSigningRequestSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Request != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Request)))
- i += copy(dAtA[i:], m.Request)
- }
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username)))
- i += copy(dAtA[i:], m.Username)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
- i += copy(dAtA[i:], m.UID)
- if len(m.Groups) > 0 {
- for _, s := range m.Groups {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Usages) > 0 {
- for _, s := range m.Usages {
- dAtA[i] = 0x2a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Extra) > 0 {
- keysForExtra := make([]string, 0, len(m.Extra))
- for k := range m.Extra {
- keysForExtra = append(keysForExtra, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
- for _, k := range keysForExtra {
- dAtA[i] = 0x32
- i++
- v := m.Extra[string(k)]
- msgSize := 0
- if (&v) != nil {
- msgSize = (&v).Size()
- msgSize += 1 + sovGenerated(uint64(msgSize))
- }
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
- n6, err := (&v).MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- }
- }
- return i, nil
-}
-
-func (m *CertificateSigningRequestStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CertificateSigningRequestStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if m.Certificate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Certificate)))
- i += copy(dAtA[i:], m.Certificate)
- }
- return i, nil
-}
-
-func (m ExtraValue) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m) > 0 {
- for _, s := range m {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *CertificateSigningRequest) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *CertificateSigningRequestCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastUpdateTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *CertificateSigningRequestList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *CertificateSigningRequestSpec) Size() (n int) {
- var l int
- _ = l
- if m.Request != nil {
- l = len(m.Request)
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = len(m.Username)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.UID)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Groups) > 0 {
- for _, s := range m.Groups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Usages) > 0 {
- for _, s := range m.Usages {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Extra) > 0 {
- for k, v := range m.Extra {
- _ = k
- _ = v
- l = v.Size()
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- return n
-}
-
-func (m *CertificateSigningRequestStatus) Size() (n int) {
- var l int
- _ = l
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.Certificate != nil {
- l = len(m.Certificate)
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m ExtraValue) Size() (n int) {
- var l int
- _ = l
- if len(m) > 0 {
- for _, s := range m {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *CertificateSigningRequest) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CertificateSigningRequest{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CertificateSigningRequestSpec", "CertificateSigningRequestSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CertificateSigningRequestStatus", "CertificateSigningRequestStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CertificateSigningRequestCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CertificateSigningRequestCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CertificateSigningRequestList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CertificateSigningRequestList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CertificateSigningRequest", "CertificateSigningRequest", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CertificateSigningRequestSpec) String() string {
- if this == nil {
- return "nil"
- }
- keysForExtra := make([]string, 0, len(this.Extra))
- for k := range this.Extra {
- keysForExtra = append(keysForExtra, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
- mapStringForExtra := "map[string]ExtraValue{"
- for _, k := range keysForExtra {
- mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
- }
- mapStringForExtra += "}"
- s := strings.Join([]string{`&CertificateSigningRequestSpec{`,
- `Request:` + valueToStringGenerated(this.Request) + `,`,
- `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
- `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
- `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
- `Usages:` + fmt.Sprintf("%v", this.Usages) + `,`,
- `Extra:` + mapStringForExtra + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CertificateSigningRequestStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CertificateSigningRequestStatus{`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "CertificateSigningRequestCondition", "CertificateSigningRequestCondition", 1), `&`, ``, 1) + `,`,
- `Certificate:` + valueToStringGenerated(this.Certificate) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *CertificateSigningRequest) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CertificateSigningRequest: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CertificateSigningRequest: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CertificateSigningRequestCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CertificateSigningRequestCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CertificateSigningRequestCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = RequestConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CertificateSigningRequestList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CertificateSigningRequestList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CertificateSigningRequestList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, CertificateSigningRequest{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CertificateSigningRequestSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CertificateSigningRequestSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CertificateSigningRequestSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
- }
- var byteLen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- byteLen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if byteLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + byteLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Request = append(m.Request[:0], dAtA[iNdEx:postIndex]...)
- if m.Request == nil {
- m.Request = []byte{}
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Username = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UID = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Usages", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Usages = append(m.Usages, KeyUsage(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.Extra == nil {
- m.Extra = make(map[string]ExtraValue)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapmsglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postmsgIndex := iNdEx + mapmsglen
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := &ExtraValue{}
- if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- m.Extra[mapkey] = *mapvalue
- } else {
- var mapvalue ExtraValue
- m.Extra[mapkey] = mapvalue
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CertificateSigningRequestStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CertificateSigningRequestStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CertificateSigningRequestStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, CertificateSigningRequestCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType)
- }
- var byteLen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- byteLen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if byteLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + byteLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Certificate = append(m.Certificate[:0], dAtA[iNdEx:postIndex]...)
- if m.Certificate == nil {
- m.Certificate = []byte{}
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ExtraValue) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- *m = append(*m, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 816 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0x1b, 0x45,
- 0x18, 0xf6, 0xfa, 0x2b, 0xf6, 0x38, 0xa4, 0xd5, 0x08, 0x55, 0x4b, 0xa4, 0xee, 0x46, 0x2b, 0x40,
- 0xe1, 0xa3, 0xb3, 0xa4, 0x20, 0x88, 0x72, 0x40, 0xb0, 0xa1, 0x82, 0x88, 0x56, 0x48, 0xd3, 0x86,
- 0x03, 0x42, 0xa2, 0xe3, 0xf5, 0xdb, 0xcd, 0xd4, 0xd9, 0x0f, 0x76, 0x66, 0x0d, 0xbe, 0xf5, 0x27,
- 0x70, 0xe4, 0x82, 0xc4, 0x2f, 0xe1, 0x1c, 0x0e, 0x48, 0x3d, 0xf6, 0x80, 0x2c, 0x62, 0xfe, 0x45,
- 0x4f, 0x68, 0x66, 0xc7, 0x5e, 0x63, 0xcb, 0x75, 0xd5, 0xdc, 0xf6, 0x7d, 0xde, 0xf7, 0x79, 0xde,
- 0xcf, 0x59, 0xf4, 0xd5, 0xf0, 0x50, 0x10, 0x9e, 0xfa, 0xc3, 0xa2, 0x0f, 0x79, 0x02, 0x12, 0x84,
- 0x3f, 0x82, 0x64, 0x90, 0xe6, 0xbe, 0x71, 0xb0, 0x8c, 0xfb, 0x21, 0xe4, 0x92, 0x3f, 0xe2, 0x21,
- 0xd3, 0xee, 0x83, 0x3e, 0x48, 0x76, 0xe0, 0x47, 0x90, 0x40, 0xce, 0x24, 0x0c, 0x48, 0x96, 0xa7,
- 0x32, 0xc5, 0x6e, 0x49, 0x20, 0x2c, 0xe3, 0x64, 0x91, 0x40, 0x0c, 0x61, 0xf7, 0x56, 0xc4, 0xe5,
- 0x59, 0xd1, 0x27, 0x61, 0x1a, 0xfb, 0x51, 0x1a, 0xa5, 0xbe, 0xe6, 0xf5, 0x8b, 0x47, 0xda, 0xd2,
- 0x86, 0xfe, 0x2a, 0xf5, 0x76, 0x3f, 0xaa, 0x0a, 0x88, 0x59, 0x78, 0xc6, 0x13, 0xc8, 0xc7, 0x7e,
- 0x36, 0x8c, 0x14, 0x20, 0xfc, 0x18, 0x24, 0xf3, 0x47, 0x2b, 0x55, 0xec, 0xfa, 0xeb, 0x58, 0x79,
- 0x91, 0x48, 0x1e, 0xc3, 0x0a, 0xe1, 0xe3, 0x4d, 0x04, 0x11, 0x9e, 0x41, 0xcc, 0x56, 0x78, 0x1f,
- 0xae, 0xe3, 0x15, 0x92, 0x9f, 0xfb, 0x3c, 0x91, 0x42, 0xe6, 0xcb, 0x24, 0xef, 0xcf, 0x3a, 0x7a,
- 0xe3, 0xb8, 0x9a, 0xcd, 0x7d, 0x1e, 0x25, 0x3c, 0x89, 0x28, 0xfc, 0x58, 0x80, 0x90, 0xf8, 0x21,
- 0xea, 0xa8, 0xb6, 0x06, 0x4c, 0x32, 0xdb, 0xda, 0xb3, 0xf6, 0x7b, 0xb7, 0x3f, 0x20, 0xd5, 0x50,
- 0xe7, 0x59, 0x48, 0x36, 0x8c, 0x14, 0x20, 0x88, 0x8a, 0x26, 0xa3, 0x03, 0xf2, 0x4d, 0xff, 0x31,
- 0x84, 0xf2, 0x1e, 0x48, 0x16, 0xe0, 0x8b, 0x89, 0x5b, 0x9b, 0x4e, 0x5c, 0x54, 0x61, 0x74, 0xae,
- 0x8a, 0x1f, 0xa2, 0xa6, 0xc8, 0x20, 0xb4, 0xeb, 0x5a, 0xfd, 0x53, 0xb2, 0x61, 0x65, 0x64, 0x6d,
- 0xad, 0xf7, 0x33, 0x08, 0x83, 0x6d, 0x93, 0xab, 0xa9, 0x2c, 0xaa, 0x95, 0xf1, 0x19, 0x6a, 0x0b,
- 0xc9, 0x64, 0x21, 0xec, 0x86, 0xce, 0xf1, 0xd9, 0x15, 0x72, 0x68, 0x9d, 0x60, 0xc7, 0x64, 0x69,
- 0x97, 0x36, 0x35, 0xfa, 0xde, 0x6f, 0x75, 0xe4, 0xad, 0xe5, 0x1e, 0xa7, 0xc9, 0x80, 0x4b, 0x9e,
- 0x26, 0xf8, 0x10, 0x35, 0xe5, 0x38, 0x03, 0x3d, 0xd0, 0x6e, 0xf0, 0xe6, 0xac, 0xe4, 0x07, 0xe3,
- 0x0c, 0x9e, 0x4f, 0xdc, 0xd7, 0x97, 0xe3, 0x15, 0x4e, 0x35, 0x03, 0xbf, 0x8d, 0xda, 0x39, 0x30,
- 0x91, 0x26, 0x7a, 0x5c, 0xdd, 0xaa, 0x10, 0xaa, 0x51, 0x6a, 0xbc, 0xf8, 0x1d, 0xb4, 0x15, 0x83,
- 0x10, 0x2c, 0x02, 0xdd, 0x73, 0x37, 0xb8, 0x66, 0x02, 0xb7, 0xee, 0x95, 0x30, 0x9d, 0xf9, 0xf1,
- 0x63, 0xb4, 0x73, 0xce, 0x84, 0x3c, 0xcd, 0x06, 0x4c, 0xc2, 0x03, 0x1e, 0x83, 0xdd, 0xd4, 0x53,
- 0x7a, 0xf7, 0xe5, 0xf6, 0xac, 0x18, 0xc1, 0x0d, 0xa3, 0xbe, 0x73, 0xf7, 0x7f, 0x4a, 0x74, 0x49,
- 0xd9, 0x9b, 0x58, 0xe8, 0xe6, 0xda, 0xf9, 0xdc, 0xe5, 0x42, 0xe2, 0xef, 0x57, 0xee, 0x8d, 0xbc,
- 0x5c, 0x1d, 0x8a, 0xad, 0xaf, 0xed, 0xba, 0xa9, 0xa5, 0x33, 0x43, 0x16, 0x6e, 0xed, 0x07, 0xd4,
- 0xe2, 0x12, 0x62, 0x61, 0xd7, 0xf7, 0x1a, 0xfb, 0xbd, 0xdb, 0x47, 0xaf, 0x7e, 0x08, 0xc1, 0x6b,
- 0x26, 0x4d, 0xeb, 0x44, 0x09, 0xd2, 0x52, 0xd7, 0xfb, 0xa3, 0xf1, 0x82, 0x06, 0xd5, 0x49, 0xe2,
- 0xb7, 0xd0, 0x56, 0x5e, 0x9a, 0xba, 0xbf, 0xed, 0xa0, 0xa7, 0xb6, 0x62, 0x22, 0xe8, 0xcc, 0x87,
- 0xdf, 0x47, 0x9d, 0x42, 0x40, 0x9e, 0xb0, 0x18, 0xcc, 0xaa, 0xe7, 0x7d, 0x9d, 0x1a, 0x9c, 0xce,
- 0x23, 0xf0, 0x4d, 0xd4, 0x28, 0xf8, 0xc0, 0xac, 0xba, 0x67, 0x02, 0x1b, 0xa7, 0x27, 0x5f, 0x50,
- 0x85, 0x63, 0x0f, 0xb5, 0xa3, 0x3c, 0x2d, 0x32, 0x61, 0x37, 0xf7, 0x1a, 0xfb, 0xdd, 0x00, 0xa9,
- 0x8b, 0xf9, 0x52, 0x23, 0xd4, 0x78, 0x30, 0x41, 0xed, 0x42, 0xdd, 0x83, 0xb0, 0x5b, 0x3a, 0xe6,
- 0x86, 0x8a, 0x39, 0xd5, 0xc8, 0xf3, 0x89, 0xdb, 0xf9, 0x1a, 0xc6, 0xda, 0xa0, 0x26, 0x0a, 0x27,
- 0xa8, 0x05, 0x3f, 0xcb, 0x9c, 0xd9, 0x6d, 0x3d, 0xca, 0x93, 0xab, 0xbd, 0x5b, 0x72, 0x47, 0x69,
- 0xdd, 0x49, 0x64, 0x3e, 0xae, 0x26, 0xab, 0x31, 0x5a, 0xa6, 0xd9, 0x05, 0x84, 0xaa, 0x18, 0x7c,
- 0x1d, 0x35, 0x86, 0x30, 0x2e, 0x1f, 0x10, 0x55, 0x9f, 0xf8, 0x73, 0xd4, 0x1a, 0xb1, 0xf3, 0x02,
- 0xcc, 0x7f, 0xe4, 0xbd, 0x8d, 0xf5, 0x68, 0xb5, 0x6f, 0x15, 0x85, 0x96, 0xcc, 0xa3, 0xfa, 0xa1,
- 0xe5, 0xfd, 0x65, 0x21, 0x77, 0xc3, 0xeb, 0xc7, 0x3f, 0x21, 0x14, 0xce, 0xde, 0xa6, 0xb0, 0x2d,
- 0xdd, 0xff, 0xf1, 0xab, 0xf7, 0x3f, 0x7f, 0xe7, 0xd5, 0x8f, 0x72, 0x0e, 0x09, 0xba, 0x90, 0x0a,
- 0x1f, 0xa0, 0xde, 0x82, 0xb4, 0xee, 0x74, 0x3b, 0xb8, 0x36, 0x9d, 0xb8, 0xbd, 0x05, 0x71, 0xba,
- 0x18, 0xe3, 0x7d, 0x62, 0xc6, 0xa6, 0x1b, 0xc5, 0xee, 0xec, 0xfe, 0x2d, 0xbd, 0xe3, 0xee, 0xf2,
- 0xfd, 0x1e, 0x75, 0x7e, 0xfd, 0xdd, 0xad, 0x3d, 0xf9, 0x7b, 0xaf, 0x16, 0xdc, 0xba, 0xb8, 0x74,
- 0x6a, 0x4f, 0x2f, 0x9d, 0xda, 0xb3, 0x4b, 0xa7, 0xf6, 0x64, 0xea, 0x58, 0x17, 0x53, 0xc7, 0x7a,
- 0x3a, 0x75, 0xac, 0x67, 0x53, 0xc7, 0xfa, 0x67, 0xea, 0x58, 0xbf, 0xfc, 0xeb, 0xd4, 0xbe, 0xdb,
- 0x32, 0xdd, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x73, 0x7d, 0xca, 0x2a, 0xb4, 0x07, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/certificates/v1beta1/generated.proto b/vendor/k8s.io/api/certificates/v1beta1/generated.proto
deleted file mode 100644
index e3cd9000f..000000000
--- a/vendor/k8s.io/api/certificates/v1beta1/generated.proto
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.certificates.v1beta1;
-
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// Describes a certificate signing request
-message CertificateSigningRequest {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // The certificate request itself and any additional information.
- // +optional
- optional CertificateSigningRequestSpec spec = 2;
-
- // Derived information about the request.
- // +optional
- optional CertificateSigningRequestStatus status = 3;
-}
-
-message CertificateSigningRequestCondition {
- // request approval state, currently Approved or Denied.
- optional string type = 1;
-
- // brief reason for the request state
- // +optional
- optional string reason = 2;
-
- // human readable message with details about the request state
- // +optional
- optional string message = 3;
-
- // timestamp for the last update to this condition
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 4;
-}
-
-message CertificateSigningRequestList {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- repeated CertificateSigningRequest items = 2;
-}
-
-// This information is immutable after the request is created. Only the Request
-// and Usages fields can be set on creation, other fields are derived by
-// Kubernetes and cannot be modified by users.
-message CertificateSigningRequestSpec {
- // Base64-encoded PKCS#10 CSR data
- optional bytes request = 1;
-
- // allowedUsages specifies a set of usage contexts the key will be
- // valid for.
- // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
- // https://tools.ietf.org/html/rfc5280#section-4.2.1.12
- repeated string usages = 5;
-
- // Information about the requesting user.
- // See user.Info interface for details.
- // +optional
- optional string username = 2;
-
- // UID information about the requesting user.
- // See user.Info interface for details.
- // +optional
- optional string uid = 3;
-
- // Group information about the requesting user.
- // See user.Info interface for details.
- // +optional
- repeated string groups = 4;
-
- // Extra information about the requesting user.
- // See user.Info interface for details.
- // +optional
- map<string, ExtraValue> extra = 6;
-}
-
-message CertificateSigningRequestStatus {
- // Conditions applied to the request, such as approval or denial.
- // +optional
- repeated CertificateSigningRequestCondition conditions = 1;
-
- // If request was approved, the controller will place the issued certificate here.
- // +optional
- optional bytes certificate = 2;
-}
-
-// ExtraValue masks the value so protobuf can generate
-// +protobuf.nullable=true
-// +protobuf.options.(gogoproto.goproto_stringer)=false
-message ExtraValue {
- // items, if empty, will result in an empty slice
-
- repeated string items = 1;
-}
-
diff --git a/vendor/k8s.io/api/certificates/v1beta1/register.go b/vendor/k8s.io/api/certificates/v1beta1/register.go
deleted file mode 100644
index b4f3af9b9..000000000
--- a/vendor/k8s.io/api/certificates/v1beta1/register.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "certificates.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Kind takes an unqualified kind and returns a Group qualified GroupKind
-func Kind(kind string) schema.GroupKind {
- return SchemeGroupVersion.WithKind(kind).GroupKind()
-}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &CertificateSigningRequest{},
- &CertificateSigningRequestList{},
- )
-
- // Add the watch version that applies
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/certificates/v1beta1/types.go b/vendor/k8s.io/api/certificates/v1beta1/types.go
deleted file mode 100644
index bb9e82d30..000000000
--- a/vendor/k8s.io/api/certificates/v1beta1/types.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-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 v1beta1
-
-import (
- "fmt"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Describes a certificate signing request
-type CertificateSigningRequest struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // The certificate request itself and any additional information.
- // +optional
- Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Derived information about the request.
- // +optional
- Status CertificateSigningRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// This information is immutable after the request is created. Only the Request
-// and Usages fields can be set on creation, other fields are derived by
-// Kubernetes and cannot be modified by users.
-type CertificateSigningRequestSpec struct {
- // Base64-encoded PKCS#10 CSR data
- Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"`
-
- // allowedUsages specifies a set of usage contexts the key will be
- // valid for.
- // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
- // https://tools.ietf.org/html/rfc5280#section-4.2.1.12
- Usages []KeyUsage `json:"usages,omitempty" protobuf:"bytes,5,opt,name=usages"`
-
- // Information about the requesting user.
- // See user.Info interface for details.
- // +optional
- Username string `json:"username,omitempty" protobuf:"bytes,2,opt,name=username"`
- // UID information about the requesting user.
- // See user.Info interface for details.
- // +optional
- UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"`
- // Group information about the requesting user.
- // See user.Info interface for details.
- // +optional
- Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"`
- // Extra information about the requesting user.
- // See user.Info interface for details.
- // +optional
- Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,6,rep,name=extra"`
-}
-
-// ExtraValue masks the value so protobuf can generate
-// +protobuf.nullable=true
-// +protobuf.options.(gogoproto.goproto_stringer)=false
-type ExtraValue []string
-
-func (t ExtraValue) String() string {
- return fmt.Sprintf("%v", []string(t))
-}
-
-type CertificateSigningRequestStatus struct {
- // Conditions applied to the request, such as approval or denial.
- // +optional
- Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
-
- // If request was approved, the controller will place the issued certificate here.
- // +optional
- Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"`
-}
-
-type RequestConditionType string
-
-// These are the possible conditions for a certificate request.
-const (
- CertificateApproved RequestConditionType = "Approved"
- CertificateDenied RequestConditionType = "Denied"
-)
-
-type CertificateSigningRequestCondition struct {
- // request approval state, currently Approved or Denied.
- Type RequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RequestConditionType"`
- // brief reason for the request state
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
- // human readable message with details about the request state
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
- // timestamp for the last update to this condition
- // +optional
- LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-type CertificateSigningRequestList struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- Items []CertificateSigningRequest `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// KeyUsages specifies valid usage contexts for keys.
-// See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
-// https://tools.ietf.org/html/rfc5280#section-4.2.1.12
-type KeyUsage string
-
-const (
- UsageSigning KeyUsage = "signing"
- UsageDigitalSignature KeyUsage = "digital signature"
- UsageContentCommittment KeyUsage = "content commitment"
- UsageKeyEncipherment KeyUsage = "key encipherment"
- UsageKeyAgreement KeyUsage = "key agreement"
- UsageDataEncipherment KeyUsage = "data encipherment"
- UsageCertSign KeyUsage = "cert sign"
- UsageCRLSign KeyUsage = "crl sign"
- UsageEncipherOnly KeyUsage = "encipher only"
- UsageDecipherOnly KeyUsage = "decipher only"
- UsageAny KeyUsage = "any"
- UsageServerAuth KeyUsage = "server auth"
- UsageClientAuth KeyUsage = "client auth"
- UsageCodeSigning KeyUsage = "code signing"
- UsageEmailProtection KeyUsage = "email protection"
- UsageSMIME KeyUsage = "s/mime"
- UsageIPsecEndSystem KeyUsage = "ipsec end system"
- UsageIPsecTunnel KeyUsage = "ipsec tunnel"
- UsageIPsecUser KeyUsage = "ipsec user"
- UsageTimestamping KeyUsage = "timestamping"
- UsageOCSPSigning KeyUsage = "ocsp signing"
- UsageMicrosoftSGC KeyUsage = "microsoft sgc"
- UsageNetscapSGC KeyUsage = "netscape sgc"
-)
diff --git a/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 4fd91df06..000000000
--- a/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_CertificateSigningRequest = map[string]string{
- "": "Describes a certificate signing request",
- "spec": "The certificate request itself and any additional information.",
- "status": "Derived information about the request.",
-}
-
-func (CertificateSigningRequest) SwaggerDoc() map[string]string {
- return map_CertificateSigningRequest
-}
-
-var map_CertificateSigningRequestCondition = map[string]string{
- "type": "request approval state, currently Approved or Denied.",
- "reason": "brief reason for the request state",
- "message": "human readable message with details about the request state",
- "lastUpdateTime": "timestamp for the last update to this condition",
-}
-
-func (CertificateSigningRequestCondition) SwaggerDoc() map[string]string {
- return map_CertificateSigningRequestCondition
-}
-
-var map_CertificateSigningRequestSpec = map[string]string{
- "": "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.",
- "request": "Base64-encoded PKCS#10 CSR data",
- "usages": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12",
- "username": "Information about the requesting user. See user.Info interface for details.",
- "uid": "UID information about the requesting user. See user.Info interface for details.",
- "groups": "Group information about the requesting user. See user.Info interface for details.",
- "extra": "Extra information about the requesting user. See user.Info interface for details.",
-}
-
-func (CertificateSigningRequestSpec) SwaggerDoc() map[string]string {
- return map_CertificateSigningRequestSpec
-}
-
-var map_CertificateSigningRequestStatus = map[string]string{
- "conditions": "Conditions applied to the request, such as approval or denial.",
- "certificate": "If request was approved, the controller will place the issued certificate here.",
-}
-
-func (CertificateSigningRequestStatus) SwaggerDoc() map[string]string {
- return map_CertificateSigningRequestStatus
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index 5848a255b..000000000
--- a/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,194 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CertificateSigningRequest) DeepCopyInto(out *CertificateSigningRequest) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSigningRequest.
-func (in *CertificateSigningRequest) DeepCopy() *CertificateSigningRequest {
- if in == nil {
- return nil
- }
- out := new(CertificateSigningRequest)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *CertificateSigningRequest) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CertificateSigningRequestCondition) DeepCopyInto(out *CertificateSigningRequestCondition) {
- *out = *in
- in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSigningRequestCondition.
-func (in *CertificateSigningRequestCondition) DeepCopy() *CertificateSigningRequestCondition {
- if in == nil {
- return nil
- }
- out := new(CertificateSigningRequestCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CertificateSigningRequestList) DeepCopyInto(out *CertificateSigningRequestList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]CertificateSigningRequest, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSigningRequestList.
-func (in *CertificateSigningRequestList) DeepCopy() *CertificateSigningRequestList {
- if in == nil {
- return nil
- }
- out := new(CertificateSigningRequestList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *CertificateSigningRequestList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CertificateSigningRequestSpec) DeepCopyInto(out *CertificateSigningRequestSpec) {
- *out = *in
- if in.Request != nil {
- in, out := &in.Request, &out.Request
- *out = make([]byte, len(*in))
- copy(*out, *in)
- }
- if in.Usages != nil {
- in, out := &in.Usages, &out.Usages
- *out = make([]KeyUsage, len(*in))
- copy(*out, *in)
- }
- if in.Groups != nil {
- in, out := &in.Groups, &out.Groups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Extra != nil {
- in, out := &in.Extra, &out.Extra
- *out = make(map[string]ExtraValue, len(*in))
- for key, val := range *in {
- if val == nil {
- (*out)[key] = nil
- } else {
- (*out)[key] = make([]string, len(val))
- copy((*out)[key], val)
- }
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSigningRequestSpec.
-func (in *CertificateSigningRequestSpec) DeepCopy() *CertificateSigningRequestSpec {
- if in == nil {
- return nil
- }
- out := new(CertificateSigningRequestSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CertificateSigningRequestStatus) DeepCopyInto(out *CertificateSigningRequestStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]CertificateSigningRequestCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Certificate != nil {
- in, out := &in.Certificate, &out.Certificate
- *out = make([]byte, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSigningRequestStatus.
-func (in *CertificateSigningRequestStatus) DeepCopy() *CertificateSigningRequestStatus {
- if in == nil {
- return nil
- }
- out := new(CertificateSigningRequestStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in ExtraValue) DeepCopyInto(out *ExtraValue) {
- {
- in := &in
- *out = make(ExtraValue, len(*in))
- copy(*out, *in)
- return
- }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue.
-func (in ExtraValue) DeepCopy() ExtraValue {
- if in == nil {
- return nil
- }
- out := new(ExtraValue)
- in.DeepCopyInto(out)
- return *out
-}
diff --git a/vendor/k8s.io/api/events/v1beta1/doc.go b/vendor/k8s.io/api/events/v1beta1/doc.go
deleted file mode 100644
index 8b1a3e312..000000000
--- a/vendor/k8s.io/api/events/v1beta1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// +groupName=events.k8s.io
-package v1beta1 // import "k8s.io/api/events/v1beta1"
diff --git a/vendor/k8s.io/api/events/v1beta1/generated.pb.go b/vendor/k8s.io/api/events/v1beta1/generated.pb.go
deleted file mode 100644
index 9aac8420f..000000000
--- a/vendor/k8s.io/api/events/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,1306 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/events/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/events/v1beta1/generated.proto
-
- It has these top-level messages:
- Event
- EventList
- EventSeries
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *Event) Reset() { *m = Event{} }
-func (*Event) ProtoMessage() {}
-func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *EventList) Reset() { *m = EventList{} }
-func (*EventList) ProtoMessage() {}
-func (*EventList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *EventSeries) Reset() { *m = EventSeries{} }
-func (*EventSeries) ProtoMessage() {}
-func (*EventSeries) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func init() {
- proto.RegisterType((*Event)(nil), "k8s.io.api.events.v1beta1.Event")
- proto.RegisterType((*EventList)(nil), "k8s.io.api.events.v1beta1.EventList")
- proto.RegisterType((*EventSeries)(nil), "k8s.io.api.events.v1beta1.EventSeries")
-}
-func (m *Event) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Event) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.EventTime.Size()))
- n2, err := m.EventTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- if m.Series != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Series.Size()))
- n3, err := m.Series.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- }
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.ReportingController)))
- i += copy(dAtA[i:], m.ReportingController)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.ReportingInstance)))
- i += copy(dAtA[i:], m.ReportingInstance)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Action)))
- i += copy(dAtA[i:], m.Action)
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x42
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Regarding.Size()))
- n4, err := m.Regarding.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- if m.Related != nil {
- dAtA[i] = 0x4a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Related.Size()))
- n5, err := m.Related.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- }
- dAtA[i] = 0x52
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Note)))
- i += copy(dAtA[i:], m.Note)
- dAtA[i] = 0x5a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x62
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DeprecatedSource.Size()))
- n6, err := m.DeprecatedSource.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- dAtA[i] = 0x6a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DeprecatedFirstTimestamp.Size()))
- n7, err := m.DeprecatedFirstTimestamp.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- dAtA[i] = 0x72
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DeprecatedLastTimestamp.Size()))
- n8, err := m.DeprecatedLastTimestamp.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- dAtA[i] = 0x78
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DeprecatedCount))
- return i, nil
-}
-
-func (m *EventList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *EventList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n9, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *EventSeries) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *EventSeries) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Count))
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastObservedTime.Size()))
- n10, err := m.LastObservedTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.State)))
- i += copy(dAtA[i:], m.State)
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *Event) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.EventTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.Series != nil {
- l = m.Series.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = len(m.ReportingController)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.ReportingInstance)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Action)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Regarding.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.Related != nil {
- l = m.Related.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = len(m.Note)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.DeprecatedSource.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.DeprecatedFirstTimestamp.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.DeprecatedLastTimestamp.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.DeprecatedCount))
- return n
-}
-
-func (m *EventList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *EventSeries) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Count))
- l = m.LastObservedTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.State)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *Event) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Event{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `EventTime:` + strings.Replace(strings.Replace(this.EventTime.String(), "MicroTime", "k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime", 1), `&`, ``, 1) + `,`,
- `Series:` + strings.Replace(fmt.Sprintf("%v", this.Series), "EventSeries", "EventSeries", 1) + `,`,
- `ReportingController:` + fmt.Sprintf("%v", this.ReportingController) + `,`,
- `ReportingInstance:` + fmt.Sprintf("%v", this.ReportingInstance) + `,`,
- `Action:` + fmt.Sprintf("%v", this.Action) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Regarding:` + strings.Replace(strings.Replace(this.Regarding.String(), "ObjectReference", "k8s_io_api_core_v1.ObjectReference", 1), `&`, ``, 1) + `,`,
- `Related:` + strings.Replace(fmt.Sprintf("%v", this.Related), "ObjectReference", "k8s_io_api_core_v1.ObjectReference", 1) + `,`,
- `Note:` + fmt.Sprintf("%v", this.Note) + `,`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `DeprecatedSource:` + strings.Replace(strings.Replace(this.DeprecatedSource.String(), "EventSource", "k8s_io_api_core_v1.EventSource", 1), `&`, ``, 1) + `,`,
- `DeprecatedFirstTimestamp:` + strings.Replace(strings.Replace(this.DeprecatedFirstTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `DeprecatedLastTimestamp:` + strings.Replace(strings.Replace(this.DeprecatedLastTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `DeprecatedCount:` + fmt.Sprintf("%v", this.DeprecatedCount) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *EventList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&EventList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Event", "Event", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *EventSeries) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&EventSeries{`,
- `Count:` + fmt.Sprintf("%v", this.Count) + `,`,
- `LastObservedTime:` + strings.Replace(strings.Replace(this.LastObservedTime.String(), "MicroTime", "k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime", 1), `&`, ``, 1) + `,`,
- `State:` + fmt.Sprintf("%v", this.State) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *Event) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Event: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field EventTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.EventTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Series == nil {
- m.Series = &EventSeries{}
- }
- if err := m.Series.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReportingController", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ReportingController = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReportingInstance", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ReportingInstance = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Action = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 8:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Regarding", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Regarding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 9:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Related", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Related == nil {
- m.Related = &k8s_io_api_core_v1.ObjectReference{}
- }
- if err := m.Related.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 10:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Note = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 11:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 12:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedSource", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.DeprecatedSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 13:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedFirstTimestamp", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.DeprecatedFirstTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 14:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedLastTimestamp", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.DeprecatedLastTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 15:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedCount", wireType)
- }
- m.DeprecatedCount = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.DeprecatedCount |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *EventList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: EventList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: EventList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Event{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *EventSeries) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: EventSeries: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: EventSeries: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
- }
- m.Count = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Count |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastObservedTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastObservedTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.State = EventSeriesState(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/events/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 814 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0xdb, 0x46,
- 0x10, 0x16, 0x13, 0x4b, 0xb6, 0x56, 0x49, 0x2c, 0x6f, 0x0e, 0xde, 0xb8, 0x00, 0xa5, 0x3a, 0x40,
- 0x60, 0x14, 0x08, 0x59, 0xa7, 0x45, 0xdb, 0x6b, 0x18, 0xbb, 0x45, 0x02, 0xbb, 0x01, 0xd6, 0x3e,
- 0x15, 0x3d, 0x64, 0x45, 0x4d, 0xe8, 0xad, 0xa5, 0x5d, 0x62, 0x77, 0x29, 0xc0, 0xb7, 0x5e, 0x0a,
- 0xf4, 0xd8, 0x67, 0xe8, 0x13, 0xf4, 0x31, 0x7c, 0xcc, 0x31, 0x27, 0xa1, 0x66, 0xdf, 0xa2, 0xa7,
- 0x82, 0xcb, 0x95, 0x28, 0x8b, 0x16, 0xec, 0x22, 0x37, 0x72, 0xe6, 0xfb, 0x99, 0x19, 0x0e, 0x07,
- 0x45, 0xe7, 0xdf, 0xe9, 0x80, 0xcb, 0xf0, 0x3c, 0x1b, 0x80, 0x12, 0x60, 0x40, 0x87, 0x13, 0x10,
- 0x43, 0xa9, 0x42, 0x97, 0x60, 0x29, 0x0f, 0x61, 0x02, 0xc2, 0xe8, 0x70, 0xb2, 0x3f, 0x00, 0xc3,
- 0xf6, 0xc3, 0x04, 0x04, 0x28, 0x66, 0x60, 0x18, 0xa4, 0x4a, 0x1a, 0x89, 0x9f, 0x94, 0xd0, 0x80,
- 0xa5, 0x3c, 0x28, 0xa1, 0x81, 0x83, 0xee, 0x3c, 0x4f, 0xb8, 0x39, 0xcb, 0x06, 0x41, 0x2c, 0xc7,
- 0x61, 0x22, 0x13, 0x19, 0x5a, 0xc6, 0x20, 0x7b, 0x6f, 0xdf, 0xec, 0x8b, 0x7d, 0x2a, 0x95, 0x76,
- 0x76, 0x17, 0x4c, 0x63, 0xa9, 0x20, 0x9c, 0xd4, 0xdc, 0x76, 0xbe, 0xae, 0x30, 0x63, 0x16, 0x9f,
- 0x71, 0x01, 0xea, 0x22, 0x4c, 0xcf, 0x93, 0x22, 0xa0, 0xc3, 0x31, 0x18, 0x76, 0x13, 0x2b, 0x5c,
- 0xc5, 0x52, 0x99, 0x30, 0x7c, 0x0c, 0x35, 0xc2, 0x37, 0xb7, 0x11, 0x74, 0x7c, 0x06, 0x63, 0x56,
- 0xe3, 0x7d, 0xb5, 0x8a, 0x97, 0x19, 0x3e, 0x0a, 0xb9, 0x30, 0xda, 0xa8, 0x65, 0xd2, 0xee, 0x9f,
- 0x6d, 0xd4, 0x3c, 0x2c, 0x26, 0x87, 0xdf, 0xa1, 0x8d, 0xa2, 0x85, 0x21, 0x33, 0x8c, 0x78, 0x7d,
- 0x6f, 0xaf, 0xf3, 0xe2, 0xcb, 0xa0, 0x1a, 0xef, 0x5c, 0x31, 0x48, 0xcf, 0x93, 0x22, 0xa0, 0x83,
- 0x02, 0x1d, 0x4c, 0xf6, 0x83, 0xb7, 0x83, 0x5f, 0x20, 0x36, 0xc7, 0x60, 0x58, 0x84, 0x2f, 0xa7,
- 0xbd, 0x46, 0x3e, 0xed, 0xa1, 0x2a, 0x46, 0xe7, 0xaa, 0xf8, 0x1d, 0x6a, 0xdb, 0x8f, 0x74, 0xca,
- 0xc7, 0x40, 0xee, 0x59, 0x8b, 0xf0, 0x6e, 0x16, 0xc7, 0x3c, 0x56, 0xb2, 0xa0, 0x45, 0x5b, 0xce,
- 0xa1, 0x7d, 0x38, 0x53, 0xa2, 0x95, 0x28, 0x7e, 0x83, 0x5a, 0x1a, 0x14, 0x07, 0x4d, 0xee, 0x5b,
- 0xf9, 0x67, 0xc1, 0xca, 0x05, 0x09, 0xac, 0xc0, 0x89, 0x45, 0x47, 0x28, 0x9f, 0xf6, 0x5a, 0xe5,
- 0x33, 0x75, 0x0a, 0xf8, 0x18, 0x3d, 0x56, 0x90, 0x4a, 0x65, 0xb8, 0x48, 0x5e, 0x49, 0x61, 0x94,
- 0x1c, 0x8d, 0x40, 0x91, 0xb5, 0xbe, 0xb7, 0xd7, 0x8e, 0x3e, 0x73, 0x65, 0x3c, 0xa6, 0x75, 0x08,
- 0xbd, 0x89, 0x87, 0x7f, 0x40, 0x5b, 0xf3, 0xf0, 0x6b, 0xa1, 0x0d, 0x13, 0x31, 0x90, 0xa6, 0x15,
- 0x7b, 0xe2, 0xc4, 0xb6, 0xe8, 0x32, 0x80, 0xd6, 0x39, 0xf8, 0x19, 0x6a, 0xb1, 0xd8, 0x70, 0x29,
- 0x48, 0xcb, 0xb2, 0x1f, 0x39, 0x76, 0xeb, 0xa5, 0x8d, 0x52, 0x97, 0x2d, 0x70, 0x0a, 0x98, 0x96,
- 0x82, 0xac, 0x5f, 0xc7, 0x51, 0x1b, 0xa5, 0x2e, 0x8b, 0x4f, 0x51, 0x5b, 0x41, 0xc2, 0xd4, 0x90,
- 0x8b, 0x84, 0x6c, 0xd8, 0xb1, 0x3d, 0x5d, 0x1c, 0x5b, 0xf1, 0x37, 0x54, 0x9f, 0x99, 0xc2, 0x7b,
- 0x50, 0x20, 0xe2, 0x85, 0x2f, 0x41, 0x67, 0x6c, 0x5a, 0x09, 0xe1, 0x37, 0x68, 0x5d, 0xc1, 0xa8,
- 0x58, 0x34, 0xd2, 0xbe, 0xbb, 0x66, 0x27, 0x9f, 0xf6, 0xd6, 0x69, 0xc9, 0xa3, 0x33, 0x01, 0xdc,
- 0x47, 0x6b, 0x42, 0x1a, 0x20, 0xc8, 0xf6, 0xf1, 0xc0, 0xf9, 0xae, 0xfd, 0x28, 0x0d, 0x50, 0x9b,
- 0x29, 0x10, 0xe6, 0x22, 0x05, 0xd2, 0xb9, 0x8e, 0x38, 0xbd, 0x48, 0x81, 0xda, 0x0c, 0x06, 0xd4,
- 0x1d, 0x42, 0xaa, 0x20, 0x2e, 0x14, 0x4f, 0x64, 0xa6, 0x62, 0x20, 0x0f, 0x6c, 0x61, 0xbd, 0x9b,
- 0x0a, 0x2b, 0x97, 0xc3, 0xc2, 0x22, 0xe2, 0xe4, 0xba, 0x07, 0x4b, 0x02, 0xb4, 0x26, 0x89, 0x7f,
- 0xf7, 0x10, 0xa9, 0x82, 0xdf, 0x73, 0xa5, 0xed, 0x62, 0x6a, 0xc3, 0xc6, 0x29, 0x79, 0x68, 0xfd,
- 0xbe, 0xb8, 0xdb, 0xca, 0xdb, 0x6d, 0xef, 0x3b, 0x6b, 0x72, 0xb0, 0x42, 0x93, 0xae, 0x74, 0xc3,
- 0xbf, 0x79, 0x68, 0xbb, 0x4a, 0x1e, 0xb1, 0xc5, 0x4a, 0x1e, 0xfd, 0xef, 0x4a, 0x7a, 0xae, 0x92,
- 0xed, 0x83, 0x9b, 0x25, 0xe9, 0x2a, 0x2f, 0xfc, 0x12, 0x6d, 0x56, 0xa9, 0x57, 0x32, 0x13, 0x86,
- 0x6c, 0xf6, 0xbd, 0xbd, 0x66, 0xb4, 0xed, 0x24, 0x37, 0x0f, 0xae, 0xa7, 0xe9, 0x32, 0x7e, 0xf7,
- 0x2f, 0x0f, 0x95, 0xff, 0xfb, 0x11, 0xd7, 0x06, 0xff, 0x5c, 0x3b, 0x54, 0xc1, 0xdd, 0x1a, 0x29,
- 0xd8, 0xf6, 0x4c, 0x75, 0x9d, 0xf3, 0xc6, 0x2c, 0xb2, 0x70, 0xa4, 0x0e, 0x51, 0x93, 0x1b, 0x18,
- 0x6b, 0x72, 0xaf, 0x7f, 0x7f, 0xaf, 0xf3, 0xa2, 0x7f, 0xdb, 0x05, 0x89, 0x1e, 0x3a, 0xb1, 0xe6,
- 0xeb, 0x82, 0x46, 0x4b, 0xf6, 0x6e, 0xee, 0xa1, 0xce, 0xc2, 0x85, 0xc1, 0x4f, 0x51, 0x33, 0xb6,
- 0xbd, 0x7b, 0xb6, 0xf7, 0x39, 0xa9, 0xec, 0xb8, 0xcc, 0xe1, 0x0c, 0x75, 0x47, 0x4c, 0x9b, 0xb7,
- 0x03, 0x0d, 0x6a, 0x02, 0xc3, 0x4f, 0xb9, 0x93, 0xf3, 0xa5, 0x3d, 0x5a, 0x12, 0xa4, 0x35, 0x0b,
- 0xfc, 0x2d, 0x6a, 0x6a, 0xc3, 0x0c, 0xd8, 0xa3, 0xd9, 0x8e, 0x3e, 0x9f, 0xd5, 0x76, 0x52, 0x04,
- 0xff, 0x9d, 0xf6, 0xba, 0x0b, 0x8d, 0xd8, 0x18, 0x2d, 0xf1, 0xd1, 0xf3, 0xcb, 0x2b, 0xbf, 0xf1,
- 0xe1, 0xca, 0x6f, 0x7c, 0xbc, 0xf2, 0x1b, 0xbf, 0xe6, 0xbe, 0x77, 0x99, 0xfb, 0xde, 0x87, 0xdc,
- 0xf7, 0x3e, 0xe6, 0xbe, 0xf7, 0x77, 0xee, 0x7b, 0x7f, 0xfc, 0xe3, 0x37, 0x7e, 0x5a, 0x77, 0xf3,
- 0xfa, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x69, 0xa9, 0x7b, 0x6e, 0xf2, 0x07, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/events/v1beta1/generated.proto b/vendor/k8s.io/api/events/v1beta1/generated.proto
deleted file mode 100644
index 0637f780a..000000000
--- a/vendor/k8s.io/api/events/v1beta1/generated.proto
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.events.v1beta1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
-message Event {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Required. Time when this Event was first observed.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 2;
-
- // Data about the Event series this event represents or nil if it's a singleton Event.
- // +optional
- optional EventSeries series = 3;
-
- // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
- // +optional
- optional string reportingController = 4;
-
- // ID of the controller instance, e.g. `kubelet-xyzf`.
- // +optional
- optional string reportingInstance = 5;
-
- // What action was taken/failed regarding to the regarding object.
- // +optional
- optional string action = 6;
-
- // Why the action was taken.
- optional string reason = 7;
-
- // The object this Event is about. In most cases it's an Object reporting controller implements.
- // E.g. ReplicaSetController implements ReplicaSets and this event is emitted because
- // it acts on some changes in a ReplicaSet object.
- // +optional
- optional k8s.io.api.core.v1.ObjectReference regarding = 8;
-
- // Optional secondary object for more complex actions. E.g. when regarding object triggers
- // a creation or deletion of related object.
- // +optional
- optional k8s.io.api.core.v1.ObjectReference related = 9;
-
- // Optional. A human-readable description of the status of this operation.
- // Maximal length of the note is 1kB, but libraries should be prepared to
- // handle values up to 64kB.
- // +optional
- optional string note = 10;
-
- // Type of this event (Normal, Warning), new types could be added in the
- // future.
- // +optional
- optional string type = 11;
-
- // Deprecated field assuring backward compatibility with core.v1 Event type
- // +optional
- optional k8s.io.api.core.v1.EventSource deprecatedSource = 12;
-
- // Deprecated field assuring backward compatibility with core.v1 Event type
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deprecatedFirstTimestamp = 13;
-
- // Deprecated field assuring backward compatibility with core.v1 Event type
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deprecatedLastTimestamp = 14;
-
- // Deprecated field assuring backward compatibility with core.v1 Event type
- // +optional
- optional int32 deprecatedCount = 15;
-}
-
-// EventList is a list of Event objects.
-message EventList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of schema objects.
- repeated Event items = 2;
-}
-
-// EventSeries contain information on series of events, i.e. thing that was/is happening
-// continuously for some time.
-message EventSeries {
- // Number of occurrences in this series up to the last heartbeat time
- optional int32 count = 1;
-
- // Time when last Event from the series was seen before last heartbeat.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2;
-
- // Information whether this series is ongoing or finished.
- optional string state = 3;
-}
-
diff --git a/vendor/k8s.io/api/events/v1beta1/register.go b/vendor/k8s.io/api/events/v1beta1/register.go
deleted file mode 100644
index 450678291..000000000
--- a/vendor/k8s.io/api/events/v1beta1/register.go
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "events.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to api.Scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Event{},
- &EventList{},
- )
-
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/events/v1beta1/types.go b/vendor/k8s.io/api/events/v1beta1/types.go
deleted file mode 100644
index dc48ddb06..000000000
--- a/vendor/k8s.io/api/events/v1beta1/types.go
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- corev1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
-type Event struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Required. Time when this Event was first observed.
- EventTime metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"`
-
- // Data about the Event series this event represents or nil if it's a singleton Event.
- // +optional
- Series *EventSeries `json:"series,omitempty" protobuf:"bytes,3,opt,name=series"`
-
- // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
- // +optional
- ReportingController string `json:"reportingController,omitempty" protobuf:"bytes,4,opt,name=reportingController"`
-
- // ID of the controller instance, e.g. `kubelet-xyzf`.
- // +optional
- ReportingInstance string `json:"reportingInstance,omitemtpy" protobuf:"bytes,5,opt,name=reportingInstance"`
-
- // What action was taken/failed regarding to the regarding object.
- // +optional
- Action string `json:"action,omitemtpy" protobuf:"bytes,6,name=action"`
-
- // Why the action was taken.
- Reason string `json:"reason,omitempty" protobuf:"bytes,7,name=reason"`
-
- // The object this Event is about. In most cases it's an Object reporting controller implements.
- // E.g. ReplicaSetController implements ReplicaSets and this event is emitted because
- // it acts on some changes in a ReplicaSet object.
- // +optional
- Regarding corev1.ObjectReference `json:"regarding,omitempty" protobuf:"bytes,8,opt,name=regarding"`
-
- // Optional secondary object for more complex actions. E.g. when regarding object triggers
- // a creation or deletion of related object.
- // +optional
- Related *corev1.ObjectReference `json:"related,omitempty" protobuf:"bytes,9,opt,name=related"`
-
- // Optional. A human-readable description of the status of this operation.
- // Maximal length of the note is 1kB, but libraries should be prepared to
- // handle values up to 64kB.
- // +optional
- Note string `json:"note,omitempty" protobuf:"bytes,10,opt,name=note"`
-
- // Type of this event (Normal, Warning), new types could be added in the
- // future.
- // +optional
- Type string `json:"type,omitempty" protobuf:"bytes,11,opt,name=type"`
-
- // Deprecated field assuring backward compatibility with core.v1 Event type
- // +optional
- DeprecatedSource corev1.EventSource `json:"deprecatedSource,omitempty" protobuf:"bytes,12,opt,name=deprecatedSource"`
- // Deprecated field assuring backward compatibility with core.v1 Event type
- // +optional
- DeprecatedFirstTimestamp metav1.Time `json:"deprecatedFirstTimestamp,omitempty" protobuf:"bytes,13,opt,name=deprecatedFirstTimestamp"`
- // Deprecated field assuring backward compatibility with core.v1 Event type
- // +optional
- DeprecatedLastTimestamp metav1.Time `json:"deprecatedLastTimestamp,omitempty" protobuf:"bytes,14,opt,name=deprecatedLastTimestamp"`
- // Deprecated field assuring backward compatibility with core.v1 Event type
- // +optional
- DeprecatedCount int32 `json:"deprecatedCount,omitempty" protobuf:"varint,15,opt,name=deprecatedCount"`
-}
-
-// EventSeries contain information on series of events, i.e. thing that was/is happening
-// continuously for some time.
-type EventSeries struct {
- // Number of occurrences in this series up to the last heartbeat time
- Count int32 `json:"count" protobuf:"varint,1,opt,name=count"`
- // Time when last Event from the series was seen before last heartbeat.
- LastObservedTime metav1.MicroTime `json:"lastObservedTime" protobuf:"bytes,2,opt,name=lastObservedTime"`
- // Information whether this series is ongoing or finished.
- State EventSeriesState `json:"state" protobuf:"bytes,3,opt,name=state"`
-}
-
-type EventSeriesState string
-
-const (
- EventSeriesStateOngoing EventSeriesState = "Ongoing"
- EventSeriesStateFinished EventSeriesState = "Finished"
- EventSeriesStateUnknown EventSeriesState = "Unknown"
-)
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// EventList is a list of Event objects.
-type EventList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of schema objects.
- Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 17ec3d777..000000000
--- a/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_Event = map[string]string{
- "": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.",
- "eventTime": "Required. Time when this Event was first observed.",
- "series": "Data about the Event series this event represents or nil if it's a singleton Event.",
- "reportingController": "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.",
- "reportingInstance": "ID of the controller instance, e.g. `kubelet-xyzf`.",
- "action": "What action was taken/failed regarding to the regarding object.",
- "reason": "Why the action was taken.",
- "regarding": "The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.",
- "related": "Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.",
- "note": "Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.",
- "type": "Type of this event (Normal, Warning), new types could be added in the future.",
- "deprecatedSource": "Deprecated field assuring backward compatibility with core.v1 Event type",
- "deprecatedFirstTimestamp": "Deprecated field assuring backward compatibility with core.v1 Event type",
- "deprecatedLastTimestamp": "Deprecated field assuring backward compatibility with core.v1 Event type",
- "deprecatedCount": "Deprecated field assuring backward compatibility with core.v1 Event type",
-}
-
-func (Event) SwaggerDoc() map[string]string {
- return map_Event
-}
-
-var map_EventList = map[string]string{
- "": "EventList is a list of Event objects.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is a list of schema objects.",
-}
-
-func (EventList) SwaggerDoc() map[string]string {
- return map_EventList
-}
-
-var map_EventSeries = map[string]string{
- "": "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.",
- "count": "Number of occurrences in this series up to the last heartbeat time",
- "lastObservedTime": "Time when last Event from the series was seen before last heartbeat.",
- "state": "Information whether this series is ongoing or finished.",
-}
-
-func (EventSeries) SwaggerDoc() map[string]string {
- return map_EventSeries
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/events/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/events/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index 546d69e7e..000000000
--- a/vendor/k8s.io/api/events/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,125 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- v1 "k8s.io/api/core/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Event) DeepCopyInto(out *Event) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.EventTime.DeepCopyInto(&out.EventTime)
- if in.Series != nil {
- in, out := &in.Series, &out.Series
- if *in == nil {
- *out = nil
- } else {
- *out = new(EventSeries)
- (*in).DeepCopyInto(*out)
- }
- }
- out.Regarding = in.Regarding
- if in.Related != nil {
- in, out := &in.Related, &out.Related
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.ObjectReference)
- **out = **in
- }
- }
- out.DeprecatedSource = in.DeprecatedSource
- in.DeprecatedFirstTimestamp.DeepCopyInto(&out.DeprecatedFirstTimestamp)
- in.DeprecatedLastTimestamp.DeepCopyInto(&out.DeprecatedLastTimestamp)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event.
-func (in *Event) DeepCopy() *Event {
- if in == nil {
- return nil
- }
- out := new(Event)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Event) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *EventList) DeepCopyInto(out *EventList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Event, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList.
-func (in *EventList) DeepCopy() *EventList {
- if in == nil {
- return nil
- }
- out := new(EventList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *EventList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *EventSeries) DeepCopyInto(out *EventSeries) {
- *out = *in
- in.LastObservedTime.DeepCopyInto(&out.LastObservedTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSeries.
-func (in *EventSeries) DeepCopy() *EventSeries {
- if in == nil {
- return nil
- }
- out := new(EventSeries)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/extensions/v1beta1/doc.go b/vendor/k8s.io/api/extensions/v1beta1/doc.go
deleted file mode 100644
index 8ce18304b..000000000
--- a/vendor/k8s.io/api/extensions/v1beta1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-package v1beta1 // import "k8s.io/api/extensions/v1beta1"
diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go
deleted file mode 100644
index fcb80615f..000000000
--- a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,12513 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/extensions/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/extensions/v1beta1/generated.proto
-
- It has these top-level messages:
- AllowedFlexVolume
- AllowedHostPath
- CustomMetricCurrentStatus
- CustomMetricCurrentStatusList
- CustomMetricTarget
- CustomMetricTargetList
- DaemonSet
- DaemonSetCondition
- DaemonSetList
- DaemonSetSpec
- DaemonSetStatus
- DaemonSetUpdateStrategy
- Deployment
- DeploymentCondition
- DeploymentList
- DeploymentRollback
- DeploymentSpec
- DeploymentStatus
- DeploymentStrategy
- FSGroupStrategyOptions
- HTTPIngressPath
- HTTPIngressRuleValue
- HostPortRange
- IDRange
- IPBlock
- Ingress
- IngressBackend
- IngressList
- IngressRule
- IngressRuleValue
- IngressSpec
- IngressStatus
- IngressTLS
- NetworkPolicy
- NetworkPolicyEgressRule
- NetworkPolicyIngressRule
- NetworkPolicyList
- NetworkPolicyPeer
- NetworkPolicyPort
- NetworkPolicySpec
- PodSecurityPolicy
- PodSecurityPolicyList
- PodSecurityPolicySpec
- ReplicaSet
- ReplicaSetCondition
- ReplicaSetList
- ReplicaSetSpec
- ReplicaSetStatus
- ReplicationControllerDummy
- RollbackConfig
- RollingUpdateDaemonSet
- RollingUpdateDeployment
- RunAsUserStrategyOptions
- SELinuxStrategyOptions
- Scale
- ScaleSpec
- ScaleStatus
- SupplementalGroupsStrategyOptions
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *AllowedFlexVolume) Reset() { *m = AllowedFlexVolume{} }
-func (*AllowedFlexVolume) ProtoMessage() {}
-func (*AllowedFlexVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *AllowedHostPath) Reset() { *m = AllowedHostPath{} }
-func (*AllowedHostPath) ProtoMessage() {}
-func (*AllowedHostPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *CustomMetricCurrentStatus) Reset() { *m = CustomMetricCurrentStatus{} }
-func (*CustomMetricCurrentStatus) ProtoMessage() {}
-func (*CustomMetricCurrentStatus) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{2}
-}
-
-func (m *CustomMetricCurrentStatusList) Reset() { *m = CustomMetricCurrentStatusList{} }
-func (*CustomMetricCurrentStatusList) ProtoMessage() {}
-func (*CustomMetricCurrentStatusList) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{3}
-}
-
-func (m *CustomMetricTarget) Reset() { *m = CustomMetricTarget{} }
-func (*CustomMetricTarget) ProtoMessage() {}
-func (*CustomMetricTarget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *CustomMetricTargetList) Reset() { *m = CustomMetricTargetList{} }
-func (*CustomMetricTargetList) ProtoMessage() {}
-func (*CustomMetricTargetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *DaemonSet) Reset() { *m = DaemonSet{} }
-func (*DaemonSet) ProtoMessage() {}
-func (*DaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} }
-func (*DaemonSetCondition) ProtoMessage() {}
-func (*DaemonSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func (m *DaemonSetList) Reset() { *m = DaemonSetList{} }
-func (*DaemonSetList) ProtoMessage() {}
-func (*DaemonSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} }
-func (*DaemonSetSpec) ProtoMessage() {}
-func (*DaemonSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
-
-func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} }
-func (*DaemonSetStatus) ProtoMessage() {}
-func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} }
-func (*DaemonSetUpdateStrategy) ProtoMessage() {}
-func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{11}
-}
-
-func (m *Deployment) Reset() { *m = Deployment{} }
-func (*Deployment) ProtoMessage() {}
-func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
-
-func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} }
-func (*DeploymentCondition) ProtoMessage() {}
-func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
-
-func (m *DeploymentList) Reset() { *m = DeploymentList{} }
-func (*DeploymentList) ProtoMessage() {}
-func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
-
-func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} }
-func (*DeploymentRollback) ProtoMessage() {}
-func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
-
-func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} }
-func (*DeploymentSpec) ProtoMessage() {}
-func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
-
-func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} }
-func (*DeploymentStatus) ProtoMessage() {}
-func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
-
-func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} }
-func (*DeploymentStrategy) ProtoMessage() {}
-func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
-
-func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} }
-func (*FSGroupStrategyOptions) ProtoMessage() {}
-func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} }
-
-func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} }
-func (*HTTPIngressPath) ProtoMessage() {}
-func (*HTTPIngressPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} }
-
-func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} }
-func (*HTTPIngressRuleValue) ProtoMessage() {}
-func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} }
-
-func (m *HostPortRange) Reset() { *m = HostPortRange{} }
-func (*HostPortRange) ProtoMessage() {}
-func (*HostPortRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} }
-
-func (m *IDRange) Reset() { *m = IDRange{} }
-func (*IDRange) ProtoMessage() {}
-func (*IDRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} }
-
-func (m *IPBlock) Reset() { *m = IPBlock{} }
-func (*IPBlock) ProtoMessage() {}
-func (*IPBlock) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} }
-
-func (m *Ingress) Reset() { *m = Ingress{} }
-func (*Ingress) ProtoMessage() {}
-func (*Ingress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} }
-
-func (m *IngressBackend) Reset() { *m = IngressBackend{} }
-func (*IngressBackend) ProtoMessage() {}
-func (*IngressBackend) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} }
-
-func (m *IngressList) Reset() { *m = IngressList{} }
-func (*IngressList) ProtoMessage() {}
-func (*IngressList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} }
-
-func (m *IngressRule) Reset() { *m = IngressRule{} }
-func (*IngressRule) ProtoMessage() {}
-func (*IngressRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} }
-
-func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} }
-func (*IngressRuleValue) ProtoMessage() {}
-func (*IngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} }
-
-func (m *IngressSpec) Reset() { *m = IngressSpec{} }
-func (*IngressSpec) ProtoMessage() {}
-func (*IngressSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} }
-
-func (m *IngressStatus) Reset() { *m = IngressStatus{} }
-func (*IngressStatus) ProtoMessage() {}
-func (*IngressStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} }
-
-func (m *IngressTLS) Reset() { *m = IngressTLS{} }
-func (*IngressTLS) ProtoMessage() {}
-func (*IngressTLS) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} }
-
-func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} }
-func (*NetworkPolicy) ProtoMessage() {}
-func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} }
-
-func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} }
-func (*NetworkPolicyEgressRule) ProtoMessage() {}
-func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{34}
-}
-
-func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} }
-func (*NetworkPolicyIngressRule) ProtoMessage() {}
-func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{35}
-}
-
-func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} }
-func (*NetworkPolicyList) ProtoMessage() {}
-func (*NetworkPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} }
-
-func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} }
-func (*NetworkPolicyPeer) ProtoMessage() {}
-func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} }
-
-func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} }
-func (*NetworkPolicyPort) ProtoMessage() {}
-func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} }
-
-func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} }
-func (*NetworkPolicySpec) ProtoMessage() {}
-func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} }
-
-func (m *PodSecurityPolicy) Reset() { *m = PodSecurityPolicy{} }
-func (*PodSecurityPolicy) ProtoMessage() {}
-func (*PodSecurityPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} }
-
-func (m *PodSecurityPolicyList) Reset() { *m = PodSecurityPolicyList{} }
-func (*PodSecurityPolicyList) ProtoMessage() {}
-func (*PodSecurityPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} }
-
-func (m *PodSecurityPolicySpec) Reset() { *m = PodSecurityPolicySpec{} }
-func (*PodSecurityPolicySpec) ProtoMessage() {}
-func (*PodSecurityPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} }
-
-func (m *ReplicaSet) Reset() { *m = ReplicaSet{} }
-func (*ReplicaSet) ProtoMessage() {}
-func (*ReplicaSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} }
-
-func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} }
-func (*ReplicaSetCondition) ProtoMessage() {}
-func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{44} }
-
-func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} }
-func (*ReplicaSetList) ProtoMessage() {}
-func (*ReplicaSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} }
-
-func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} }
-func (*ReplicaSetSpec) ProtoMessage() {}
-func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} }
-
-func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} }
-func (*ReplicaSetStatus) ProtoMessage() {}
-func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{47} }
-
-func (m *ReplicationControllerDummy) Reset() { *m = ReplicationControllerDummy{} }
-func (*ReplicationControllerDummy) ProtoMessage() {}
-func (*ReplicationControllerDummy) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{48}
-}
-
-func (m *RollbackConfig) Reset() { *m = RollbackConfig{} }
-func (*RollbackConfig) ProtoMessage() {}
-func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} }
-
-func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} }
-func (*RollingUpdateDaemonSet) ProtoMessage() {}
-func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} }
-
-func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} }
-func (*RollingUpdateDeployment) ProtoMessage() {}
-func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{51}
-}
-
-func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} }
-func (*RunAsUserStrategyOptions) ProtoMessage() {}
-func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{52}
-}
-
-func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} }
-func (*SELinuxStrategyOptions) ProtoMessage() {}
-func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} }
-
-func (m *Scale) Reset() { *m = Scale{} }
-func (*Scale) ProtoMessage() {}
-func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} }
-
-func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
-func (*ScaleSpec) ProtoMessage() {}
-func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{55} }
-
-func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
-func (*ScaleStatus) ProtoMessage() {}
-func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{56} }
-
-func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} }
-func (*SupplementalGroupsStrategyOptions) ProtoMessage() {}
-func (*SupplementalGroupsStrategyOptions) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{57}
-}
-
-func init() {
- proto.RegisterType((*AllowedFlexVolume)(nil), "k8s.io.api.extensions.v1beta1.AllowedFlexVolume")
- proto.RegisterType((*AllowedHostPath)(nil), "k8s.io.api.extensions.v1beta1.AllowedHostPath")
- proto.RegisterType((*CustomMetricCurrentStatus)(nil), "k8s.io.api.extensions.v1beta1.CustomMetricCurrentStatus")
- proto.RegisterType((*CustomMetricCurrentStatusList)(nil), "k8s.io.api.extensions.v1beta1.CustomMetricCurrentStatusList")
- proto.RegisterType((*CustomMetricTarget)(nil), "k8s.io.api.extensions.v1beta1.CustomMetricTarget")
- proto.RegisterType((*CustomMetricTargetList)(nil), "k8s.io.api.extensions.v1beta1.CustomMetricTargetList")
- proto.RegisterType((*DaemonSet)(nil), "k8s.io.api.extensions.v1beta1.DaemonSet")
- proto.RegisterType((*DaemonSetCondition)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetCondition")
- proto.RegisterType((*DaemonSetList)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetList")
- proto.RegisterType((*DaemonSetSpec)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetSpec")
- proto.RegisterType((*DaemonSetStatus)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetStatus")
- proto.RegisterType((*DaemonSetUpdateStrategy)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetUpdateStrategy")
- proto.RegisterType((*Deployment)(nil), "k8s.io.api.extensions.v1beta1.Deployment")
- proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.api.extensions.v1beta1.DeploymentCondition")
- proto.RegisterType((*DeploymentList)(nil), "k8s.io.api.extensions.v1beta1.DeploymentList")
- proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.api.extensions.v1beta1.DeploymentRollback")
- proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.api.extensions.v1beta1.DeploymentSpec")
- proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.api.extensions.v1beta1.DeploymentStatus")
- proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.api.extensions.v1beta1.DeploymentStrategy")
- proto.RegisterType((*FSGroupStrategyOptions)(nil), "k8s.io.api.extensions.v1beta1.FSGroupStrategyOptions")
- proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.api.extensions.v1beta1.HTTPIngressPath")
- proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.api.extensions.v1beta1.HTTPIngressRuleValue")
- proto.RegisterType((*HostPortRange)(nil), "k8s.io.api.extensions.v1beta1.HostPortRange")
- proto.RegisterType((*IDRange)(nil), "k8s.io.api.extensions.v1beta1.IDRange")
- proto.RegisterType((*IPBlock)(nil), "k8s.io.api.extensions.v1beta1.IPBlock")
- proto.RegisterType((*Ingress)(nil), "k8s.io.api.extensions.v1beta1.Ingress")
- proto.RegisterType((*IngressBackend)(nil), "k8s.io.api.extensions.v1beta1.IngressBackend")
- proto.RegisterType((*IngressList)(nil), "k8s.io.api.extensions.v1beta1.IngressList")
- proto.RegisterType((*IngressRule)(nil), "k8s.io.api.extensions.v1beta1.IngressRule")
- proto.RegisterType((*IngressRuleValue)(nil), "k8s.io.api.extensions.v1beta1.IngressRuleValue")
- proto.RegisterType((*IngressSpec)(nil), "k8s.io.api.extensions.v1beta1.IngressSpec")
- proto.RegisterType((*IngressStatus)(nil), "k8s.io.api.extensions.v1beta1.IngressStatus")
- proto.RegisterType((*IngressTLS)(nil), "k8s.io.api.extensions.v1beta1.IngressTLS")
- proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicy")
- proto.RegisterType((*NetworkPolicyEgressRule)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyEgressRule")
- proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyIngressRule")
- proto.RegisterType((*NetworkPolicyList)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyList")
- proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyPeer")
- proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyPort")
- proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicySpec")
- proto.RegisterType((*PodSecurityPolicy)(nil), "k8s.io.api.extensions.v1beta1.PodSecurityPolicy")
- proto.RegisterType((*PodSecurityPolicyList)(nil), "k8s.io.api.extensions.v1beta1.PodSecurityPolicyList")
- proto.RegisterType((*PodSecurityPolicySpec)(nil), "k8s.io.api.extensions.v1beta1.PodSecurityPolicySpec")
- proto.RegisterType((*ReplicaSet)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSet")
- proto.RegisterType((*ReplicaSetCondition)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetCondition")
- proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetList")
- proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetSpec")
- proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetStatus")
- proto.RegisterType((*ReplicationControllerDummy)(nil), "k8s.io.api.extensions.v1beta1.ReplicationControllerDummy")
- proto.RegisterType((*RollbackConfig)(nil), "k8s.io.api.extensions.v1beta1.RollbackConfig")
- proto.RegisterType((*RollingUpdateDaemonSet)(nil), "k8s.io.api.extensions.v1beta1.RollingUpdateDaemonSet")
- proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.api.extensions.v1beta1.RollingUpdateDeployment")
- proto.RegisterType((*RunAsUserStrategyOptions)(nil), "k8s.io.api.extensions.v1beta1.RunAsUserStrategyOptions")
- proto.RegisterType((*SELinuxStrategyOptions)(nil), "k8s.io.api.extensions.v1beta1.SELinuxStrategyOptions")
- proto.RegisterType((*Scale)(nil), "k8s.io.api.extensions.v1beta1.Scale")
- proto.RegisterType((*ScaleSpec)(nil), "k8s.io.api.extensions.v1beta1.ScaleSpec")
- proto.RegisterType((*ScaleStatus)(nil), "k8s.io.api.extensions.v1beta1.ScaleStatus")
- proto.RegisterType((*SupplementalGroupsStrategyOptions)(nil), "k8s.io.api.extensions.v1beta1.SupplementalGroupsStrategyOptions")
-}
-func (m *AllowedFlexVolume) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *AllowedFlexVolume) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
- i += copy(dAtA[i:], m.Driver)
- return i, nil
-}
-
-func (m *AllowedHostPath) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *AllowedHostPath) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.PathPrefix)))
- i += copy(dAtA[i:], m.PathPrefix)
- return i, nil
-}
-
-func (m *CustomMetricCurrentStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CustomMetricCurrentStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
- n1, err := m.CurrentValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- return i, nil
-}
-
-func (m *CustomMetricCurrentStatusList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CustomMetricCurrentStatusList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *CustomMetricTarget) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CustomMetricTarget) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
- n2, err := m.TargetValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- return i, nil
-}
-
-func (m *CustomMetricTargetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CustomMetricTargetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DaemonSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n4, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n5, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- return i, nil
-}
-
-func (m *DaemonSetCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n6, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *DaemonSetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n7, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DaemonSetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Selector != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n8, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- }
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n9, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size()))
- n10, err := m.UpdateStrategy.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.TemplateGeneration))
- if m.RevisionHistoryLimit != nil {
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
- }
- return i, nil
-}
-
-func (m *DaemonSetStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentNumberScheduled))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberMisscheduled))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredNumberScheduled))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberReady))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedNumberScheduled))
- dAtA[i] = 0x38
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberAvailable))
- dAtA[i] = 0x40
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NumberUnavailable))
- if m.CollisionCount != nil {
- dAtA[i] = 0x48
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x52
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DaemonSetUpdateStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DaemonSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.RollingUpdate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
- n11, err := m.RollingUpdate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- }
- return i, nil
-}
-
-func (m *Deployment) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Deployment) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n12, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n13, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n14, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n14
- return i, nil
-}
-
-func (m *DeploymentCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
- n15, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n15
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n16, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n16
- return i, nil
-}
-
-func (m *DeploymentList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n17, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n17
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *DeploymentRollback) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentRollback) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- if len(m.UpdatedAnnotations) > 0 {
- keysForUpdatedAnnotations := make([]string, 0, len(m.UpdatedAnnotations))
- for k := range m.UpdatedAnnotations {
- keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
- for _, k := range keysForUpdatedAnnotations {
- dAtA[i] = 0x12
- i++
- v := m.UpdatedAnnotations[string(k)]
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
- i += copy(dAtA[i:], v)
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
- n18, err := m.RollbackTo.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n18
- return i, nil
-}
-
-func (m *DeploymentSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Replicas != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n19, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n19
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n20, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n20
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Strategy.Size()))
- n21, err := m.Strategy.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n21
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
- }
- dAtA[i] = 0x38
- i++
- if m.Paused {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if m.RollbackTo != nil {
- dAtA[i] = 0x42
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
- n22, err := m.RollbackTo.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n22
- }
- if m.ProgressDeadlineSeconds != nil {
- dAtA[i] = 0x48
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.ProgressDeadlineSeconds))
- }
- return i, nil
-}
-
-func (m *DeploymentStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.UnavailableReplicas))
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x38
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
- if m.CollisionCount != nil {
- dAtA[i] = 0x40
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
- }
- return i, nil
-}
-
-func (m *DeploymentStrategy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- if m.RollingUpdate != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
- n23, err := m.RollingUpdate.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n23
- }
- return i, nil
-}
-
-func (m *FSGroupStrategyOptions) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *FSGroupStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
- i += copy(dAtA[i:], m.Rule)
- if len(m.Ranges) > 0 {
- for _, msg := range m.Ranges {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HTTPIngressPath) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
- i += copy(dAtA[i:], m.Path)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Backend.Size()))
- n24, err := m.Backend.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n24
- return i, nil
-}
-
-func (m *HTTPIngressRuleValue) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HTTPIngressRuleValue) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Paths) > 0 {
- for _, msg := range m.Paths {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *HostPortRange) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HostPortRange) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Min))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Max))
- return i, nil
-}
-
-func (m *IDRange) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IDRange) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Min))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Max))
- return i, nil
-}
-
-func (m *IPBlock) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IPBlock) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.CIDR)))
- i += copy(dAtA[i:], m.CIDR)
- if len(m.Except) > 0 {
- for _, s := range m.Except {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *Ingress) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Ingress) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n25, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n25
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n26, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n26
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n27, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n27
- return i, nil
-}
-
-func (m *IngressBackend) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IngressBackend) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName)))
- i += copy(dAtA[i:], m.ServiceName)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ServicePort.Size()))
- n28, err := m.ServicePort.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n28
- return i, nil
-}
-
-func (m *IngressList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IngressList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n29, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n29
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *IngressRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IngressRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host)))
- i += copy(dAtA[i:], m.Host)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.IngressRuleValue.Size()))
- n30, err := m.IngressRuleValue.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n30
- return i, nil
-}
-
-func (m *IngressRuleValue) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IngressRuleValue) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.HTTP != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.HTTP.Size()))
- n31, err := m.HTTP.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n31
- }
- return i, nil
-}
-
-func (m *IngressSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IngressSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Backend != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Backend.Size()))
- n32, err := m.Backend.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n32
- }
- if len(m.TLS) > 0 {
- for _, msg := range m.TLS {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *IngressStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IngressStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LoadBalancer.Size()))
- n33, err := m.LoadBalancer.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n33
- return i, nil
-}
-
-func (m *IngressTLS) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IngressTLS) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Hosts) > 0 {
- for _, s := range m.Hosts {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretName)))
- i += copy(dAtA[i:], m.SecretName)
- return i, nil
-}
-
-func (m *NetworkPolicy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n34, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n34
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n35, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n35
- return i, nil
-}
-
-func (m *NetworkPolicyEgressRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicyEgressRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Ports) > 0 {
- for _, msg := range m.Ports {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.To) > 0 {
- for _, msg := range m.To {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *NetworkPolicyIngressRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicyIngressRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Ports) > 0 {
- for _, msg := range m.Ports {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.From) > 0 {
- for _, msg := range m.From {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *NetworkPolicyList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicyList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n36, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n36
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *NetworkPolicyPeer) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicyPeer) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.PodSelector != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
- n37, err := m.PodSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n37
- }
- if m.NamespaceSelector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NamespaceSelector.Size()))
- n38, err := m.NamespaceSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n38
- }
- if m.IPBlock != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.IPBlock.Size()))
- n39, err := m.IPBlock.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n39
- }
- return i, nil
-}
-
-func (m *NetworkPolicyPort) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicyPort) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Protocol != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Protocol)))
- i += copy(dAtA[i:], *m.Protocol)
- }
- if m.Port != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size()))
- n40, err := m.Port.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n40
- }
- return i, nil
-}
-
-func (m *NetworkPolicySpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicySpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
- n41, err := m.PodSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n41
- if len(m.Ingress) > 0 {
- for _, msg := range m.Ingress {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.Egress) > 0 {
- for _, msg := range m.Egress {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.PolicyTypes) > 0 {
- for _, s := range m.PolicyTypes {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *PodSecurityPolicy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodSecurityPolicy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n42, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n42
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n43, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n43
- return i, nil
-}
-
-func (m *PodSecurityPolicyList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodSecurityPolicyList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n44, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n44
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *PodSecurityPolicySpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodSecurityPolicySpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- if m.Privileged {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if len(m.DefaultAddCapabilities) > 0 {
- for _, s := range m.DefaultAddCapabilities {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.RequiredDropCapabilities) > 0 {
- for _, s := range m.RequiredDropCapabilities {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.AllowedCapabilities) > 0 {
- for _, s := range m.AllowedCapabilities {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Volumes) > 0 {
- for _, s := range m.Volumes {
- dAtA[i] = 0x2a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- dAtA[i] = 0x30
- i++
- if m.HostNetwork {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if len(m.HostPorts) > 0 {
- for _, msg := range m.HostPorts {
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x40
- i++
- if m.HostPID {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x48
- i++
- if m.HostIPC {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x52
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.SELinux.Size()))
- n45, err := m.SELinux.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n45
- dAtA[i] = 0x5a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RunAsUser.Size()))
- n46, err := m.RunAsUser.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n46
- dAtA[i] = 0x62
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.SupplementalGroups.Size()))
- n47, err := m.SupplementalGroups.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n47
- dAtA[i] = 0x6a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.FSGroup.Size()))
- n48, err := m.FSGroup.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n48
- dAtA[i] = 0x70
- i++
- if m.ReadOnlyRootFilesystem {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if m.DefaultAllowPrivilegeEscalation != nil {
- dAtA[i] = 0x78
- i++
- if *m.DefaultAllowPrivilegeEscalation {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.AllowPrivilegeEscalation != nil {
- dAtA[i] = 0x80
- i++
- dAtA[i] = 0x1
- i++
- if *m.AllowPrivilegeEscalation {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if len(m.AllowedHostPaths) > 0 {
- for _, msg := range m.AllowedHostPaths {
- dAtA[i] = 0x8a
- i++
- dAtA[i] = 0x1
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.AllowedFlexVolumes) > 0 {
- for _, msg := range m.AllowedFlexVolumes {
- dAtA[i] = 0x92
- i++
- dAtA[i] = 0x1
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ReplicaSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n49, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n49
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n50, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n50
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n51, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n51
- return i, nil
-}
-
-func (m *ReplicaSetCondition) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetCondition) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
- i += copy(dAtA[i:], m.Type)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
- i += copy(dAtA[i:], m.Status)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
- n52, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n52
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
- i += copy(dAtA[i:], m.Reason)
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func (m *ReplicaSetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n53, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n53
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ReplicaSetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Replicas != nil {
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n54, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n54
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
- n55, err := m.Template.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n55
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
- return i, nil
-}
-
-func (m *ReplicaSetStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicaSetStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.FullyLabeledReplicas))
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- dAtA[i] = 0x32
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ReplicationControllerDummy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ReplicationControllerDummy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- return i, nil
-}
-
-func (m *RollbackConfig) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollbackConfig) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
- return i, nil
-}
-
-func (m *RollingUpdateDaemonSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollingUpdateDaemonSet) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
- n56, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n56
- }
- return i, nil
-}
-
-func (m *RollingUpdateDeployment) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RollingUpdateDeployment) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
- n57, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n57
- }
- if m.MaxSurge != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxSurge.Size()))
- n58, err := m.MaxSurge.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n58
- }
- return i, nil
-}
-
-func (m *RunAsUserStrategyOptions) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RunAsUserStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
- i += copy(dAtA[i:], m.Rule)
- if len(m.Ranges) > 0 {
- for _, msg := range m.Ranges {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *SELinuxStrategyOptions) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SELinuxStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
- i += copy(dAtA[i:], m.Rule)
- if m.SELinuxOptions != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size()))
- n59, err := m.SELinuxOptions.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n59
- }
- return i, nil
-}
-
-func (m *Scale) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Scale) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n60, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n60
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n61, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n61
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n62, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n62
- return i, nil
-}
-
-func (m *ScaleSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ScaleSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- return i, nil
-}
-
-func (m *ScaleStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
- if len(m.Selector) > 0 {
- keysForSelector := make([]string, 0, len(m.Selector))
- for k := range m.Selector {
- keysForSelector = append(keysForSelector, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
- for _, k := range keysForSelector {
- dAtA[i] = 0x12
- i++
- v := m.Selector[string(k)]
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
- i += copy(dAtA[i:], v)
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.TargetSelector)))
- i += copy(dAtA[i:], m.TargetSelector)
- return i, nil
-}
-
-func (m *SupplementalGroupsStrategyOptions) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SupplementalGroupsStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
- i += copy(dAtA[i:], m.Rule)
- if len(m.Ranges) > 0 {
- for _, msg := range m.Ranges {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *AllowedFlexVolume) Size() (n int) {
- var l int
- _ = l
- l = len(m.Driver)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *AllowedHostPath) Size() (n int) {
- var l int
- _ = l
- l = len(m.PathPrefix)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *CustomMetricCurrentStatus) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.CurrentValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *CustomMetricCurrentStatusList) Size() (n int) {
- var l int
- _ = l
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *CustomMetricTarget) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.TargetValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *CustomMetricTargetList) Size() (n int) {
- var l int
- _ = l
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DaemonSet) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DaemonSetCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DaemonSetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DaemonSetSpec) Size() (n int) {
- var l int
- _ = l
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.UpdateStrategy.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.MinReadySeconds))
- n += 1 + sovGenerated(uint64(m.TemplateGeneration))
- if m.RevisionHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
- }
- return n
-}
-
-func (m *DaemonSetStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.CurrentNumberScheduled))
- n += 1 + sovGenerated(uint64(m.NumberMisscheduled))
- n += 1 + sovGenerated(uint64(m.DesiredNumberScheduled))
- n += 1 + sovGenerated(uint64(m.NumberReady))
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.UpdatedNumberScheduled))
- n += 1 + sovGenerated(uint64(m.NumberAvailable))
- n += 1 + sovGenerated(uint64(m.NumberUnavailable))
- if m.CollisionCount != nil {
- n += 1 + sovGenerated(uint64(*m.CollisionCount))
- }
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DaemonSetUpdateStrategy) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.RollingUpdate != nil {
- l = m.RollingUpdate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *Deployment) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeploymentCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastUpdateTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeploymentList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeploymentRollback) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.UpdatedAnnotations) > 0 {
- for k, v := range m.UpdatedAnnotations {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- l = m.RollbackTo.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeploymentSpec) Size() (n int) {
- var l int
- _ = l
- if m.Replicas != nil {
- n += 1 + sovGenerated(uint64(*m.Replicas))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Strategy.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.MinReadySeconds))
- if m.RevisionHistoryLimit != nil {
- n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
- }
- n += 2
- if m.RollbackTo != nil {
- l = m.RollbackTo.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.ProgressDeadlineSeconds != nil {
- n += 1 + sovGenerated(uint64(*m.ProgressDeadlineSeconds))
- }
- return n
-}
-
-func (m *DeploymentStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.Replicas))
- n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
- n += 1 + sovGenerated(uint64(m.AvailableReplicas))
- n += 1 + sovGenerated(uint64(m.UnavailableReplicas))
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- n += 1 + sovGenerated(uint64(m.ReadyReplicas))
- if m.CollisionCount != nil {
- n += 1 + sovGenerated(uint64(*m.CollisionCount))
- }
- return n
-}
-
-func (m *DeploymentStrategy) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- if m.RollingUpdate != nil {
- l = m.RollingUpdate.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *FSGroupStrategyOptions) Size() (n int) {
- var l int
- _ = l
- l = len(m.Rule)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Ranges) > 0 {
- for _, e := range m.Ranges {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *HTTPIngressPath) Size() (n int) {
- var l int
- _ = l
- l = len(m.Path)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Backend.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *HTTPIngressRuleValue) Size() (n int) {
- var l int
- _ = l
- if len(m.Paths) > 0 {
- for _, e := range m.Paths {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *HostPortRange) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Min))
- n += 1 + sovGenerated(uint64(m.Max))
- return n
-}
-
-func (m *IDRange) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Min))
- n += 1 + sovGenerated(uint64(m.Max))
- return n
-}
-
-func (m *IPBlock) Size() (n int) {
- var l int
- _ = l
- l = len(m.CIDR)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Except) > 0 {
- for _, s := range m.Except {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *Ingress) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *IngressBackend) Size() (n int) {
- var l int
- _ = l
- l = len(m.ServiceName)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.ServicePort.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *IngressList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *IngressRule) Size() (n int) {
- var l int
- _ = l
- l = len(m.Host)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.IngressRuleValue.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *IngressRuleValue) Size() (n int) {
- var l int
- _ = l
- if m.HTTP != nil {
- l = m.HTTP.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *IngressSpec) Size() (n int) {
- var l int
- _ = l
- if m.Backend != nil {
- l = m.Backend.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if len(m.TLS) > 0 {
- for _, e := range m.TLS {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *IngressStatus) Size() (n int) {
- var l int
- _ = l
- l = m.LoadBalancer.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *IngressTLS) Size() (n int) {
- var l int
- _ = l
- if len(m.Hosts) > 0 {
- for _, s := range m.Hosts {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = len(m.SecretName)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *NetworkPolicy) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *NetworkPolicyEgressRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Ports) > 0 {
- for _, e := range m.Ports {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.To) > 0 {
- for _, e := range m.To {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *NetworkPolicyIngressRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Ports) > 0 {
- for _, e := range m.Ports {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.From) > 0 {
- for _, e := range m.From {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *NetworkPolicyList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *NetworkPolicyPeer) Size() (n int) {
- var l int
- _ = l
- if m.PodSelector != nil {
- l = m.PodSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.NamespaceSelector != nil {
- l = m.NamespaceSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.IPBlock != nil {
- l = m.IPBlock.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *NetworkPolicyPort) Size() (n int) {
- var l int
- _ = l
- if m.Protocol != nil {
- l = len(*m.Protocol)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Port != nil {
- l = m.Port.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *NetworkPolicySpec) Size() (n int) {
- var l int
- _ = l
- l = m.PodSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Ingress) > 0 {
- for _, e := range m.Ingress {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Egress) > 0 {
- for _, e := range m.Egress {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.PolicyTypes) > 0 {
- for _, s := range m.PolicyTypes {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *PodSecurityPolicy) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *PodSecurityPolicyList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *PodSecurityPolicySpec) Size() (n int) {
- var l int
- _ = l
- n += 2
- if len(m.DefaultAddCapabilities) > 0 {
- for _, s := range m.DefaultAddCapabilities {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.RequiredDropCapabilities) > 0 {
- for _, s := range m.RequiredDropCapabilities {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.AllowedCapabilities) > 0 {
- for _, s := range m.AllowedCapabilities {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Volumes) > 0 {
- for _, s := range m.Volumes {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- n += 2
- if len(m.HostPorts) > 0 {
- for _, e := range m.HostPorts {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- n += 2
- n += 2
- l = m.SELinux.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.RunAsUser.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.SupplementalGroups.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.FSGroup.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 2
- if m.DefaultAllowPrivilegeEscalation != nil {
- n += 2
- }
- if m.AllowPrivilegeEscalation != nil {
- n += 3
- }
- if len(m.AllowedHostPaths) > 0 {
- for _, e := range m.AllowedHostPaths {
- l = e.Size()
- n += 2 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.AllowedFlexVolumes) > 0 {
- for _, e := range m.AllowedFlexVolumes {
- l = e.Size()
- n += 2 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ReplicaSet) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ReplicaSetCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ReplicaSetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ReplicaSetSpec) Size() (n int) {
- var l int
- _ = l
- if m.Replicas != nil {
- n += 1 + sovGenerated(uint64(*m.Replicas))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Template.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.MinReadySeconds))
- return n
-}
-
-func (m *ReplicaSetStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- n += 1 + sovGenerated(uint64(m.FullyLabeledReplicas))
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- n += 1 + sovGenerated(uint64(m.ReadyReplicas))
- n += 1 + sovGenerated(uint64(m.AvailableReplicas))
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ReplicationControllerDummy) Size() (n int) {
- var l int
- _ = l
- return n
-}
-
-func (m *RollbackConfig) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Revision))
- return n
-}
-
-func (m *RollingUpdateDaemonSet) Size() (n int) {
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- l = m.MaxUnavailable.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *RollingUpdateDeployment) Size() (n int) {
- var l int
- _ = l
- if m.MaxUnavailable != nil {
- l = m.MaxUnavailable.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.MaxSurge != nil {
- l = m.MaxSurge.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *RunAsUserStrategyOptions) Size() (n int) {
- var l int
- _ = l
- l = len(m.Rule)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Ranges) > 0 {
- for _, e := range m.Ranges {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *SELinuxStrategyOptions) Size() (n int) {
- var l int
- _ = l
- l = len(m.Rule)
- n += 1 + l + sovGenerated(uint64(l))
- if m.SELinuxOptions != nil {
- l = m.SELinuxOptions.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *Scale) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ScaleSpec) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- return n
-}
-
-func (m *ScaleStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Replicas))
- if len(m.Selector) > 0 {
- for k, v := range m.Selector {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- l = len(m.TargetSelector)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *SupplementalGroupsStrategyOptions) Size() (n int) {
- var l int
- _ = l
- l = len(m.Rule)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Ranges) > 0 {
- for _, e := range m.Ranges {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *AllowedFlexVolume) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&AllowedFlexVolume{`,
- `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *AllowedHostPath) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&AllowedHostPath{`,
- `PathPrefix:` + fmt.Sprintf("%v", this.PathPrefix) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CustomMetricCurrentStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CustomMetricCurrentStatus{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CustomMetricCurrentStatusList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CustomMetricCurrentStatusList{`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CustomMetricCurrentStatus", "CustomMetricCurrentStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CustomMetricTarget) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CustomMetricTarget{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CustomMetricTargetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CustomMetricTargetList{`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CustomMetricTarget", "CustomMetricTarget", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSet{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DaemonSet", "DaemonSet", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetSpec{`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "DaemonSetUpdateStrategy", "DaemonSetUpdateStrategy", 1), `&`, ``, 1) + `,`,
- `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
- `TemplateGeneration:` + fmt.Sprintf("%v", this.TemplateGeneration) + `,`,
- `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetStatus{`,
- `CurrentNumberScheduled:` + fmt.Sprintf("%v", this.CurrentNumberScheduled) + `,`,
- `NumberMisscheduled:` + fmt.Sprintf("%v", this.NumberMisscheduled) + `,`,
- `DesiredNumberScheduled:` + fmt.Sprintf("%v", this.DesiredNumberScheduled) + `,`,
- `NumberReady:` + fmt.Sprintf("%v", this.NumberReady) + `,`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `UpdatedNumberScheduled:` + fmt.Sprintf("%v", this.UpdatedNumberScheduled) + `,`,
- `NumberAvailable:` + fmt.Sprintf("%v", this.NumberAvailable) + `,`,
- `NumberUnavailable:` + fmt.Sprintf("%v", this.NumberUnavailable) + `,`,
- `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DaemonSetCondition", "DaemonSetCondition", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DaemonSetUpdateStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DaemonSetUpdateStrategy{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDaemonSet", "RollingUpdateDaemonSet", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Deployment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Deployment{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Deployment", "Deployment", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentRollback) String() string {
- if this == nil {
- return "nil"
- }
- keysForUpdatedAnnotations := make([]string, 0, len(this.UpdatedAnnotations))
- for k := range this.UpdatedAnnotations {
- keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
- mapStringForUpdatedAnnotations := "map[string]string{"
- for _, k := range keysForUpdatedAnnotations {
- mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k])
- }
- mapStringForUpdatedAnnotations += "}"
- s := strings.Join([]string{`&DeploymentRollback{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `UpdatedAnnotations:` + mapStringForUpdatedAnnotations + `,`,
- `RollbackTo:` + strings.Replace(strings.Replace(this.RollbackTo.String(), "RollbackConfig", "RollbackConfig", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentSpec{`,
- `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`,
- `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
- `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
- `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`,
- `RollbackTo:` + strings.Replace(fmt.Sprintf("%v", this.RollbackTo), "RollbackConfig", "RollbackConfig", 1) + `,`,
- `ProgressDeadlineSeconds:` + valueToStringGenerated(this.ProgressDeadlineSeconds) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentStatus{`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
- `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
- `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + `,`,
- `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
- `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeploymentStrategy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeploymentStrategy{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDeployment", "RollingUpdateDeployment", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *FSGroupStrategyOptions) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&FSGroupStrategyOptions{`,
- `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
- `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HTTPIngressPath) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HTTPIngressPath{`,
- `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
- `Backend:` + strings.Replace(strings.Replace(this.Backend.String(), "IngressBackend", "IngressBackend", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HTTPIngressRuleValue) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HTTPIngressRuleValue{`,
- `Paths:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Paths), "HTTPIngressPath", "HTTPIngressPath", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HostPortRange) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HostPortRange{`,
- `Min:` + fmt.Sprintf("%v", this.Min) + `,`,
- `Max:` + fmt.Sprintf("%v", this.Max) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IDRange) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IDRange{`,
- `Min:` + fmt.Sprintf("%v", this.Min) + `,`,
- `Max:` + fmt.Sprintf("%v", this.Max) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IPBlock) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IPBlock{`,
- `CIDR:` + fmt.Sprintf("%v", this.CIDR) + `,`,
- `Except:` + fmt.Sprintf("%v", this.Except) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Ingress) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Ingress{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IngressSpec", "IngressSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "IngressStatus", "IngressStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IngressBackend) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IngressBackend{`,
- `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
- `ServicePort:` + strings.Replace(strings.Replace(this.ServicePort.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IngressList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IngressList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Ingress", "Ingress", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IngressRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IngressRule{`,
- `Host:` + fmt.Sprintf("%v", this.Host) + `,`,
- `IngressRuleValue:` + strings.Replace(strings.Replace(this.IngressRuleValue.String(), "IngressRuleValue", "IngressRuleValue", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IngressRuleValue) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IngressRuleValue{`,
- `HTTP:` + strings.Replace(fmt.Sprintf("%v", this.HTTP), "HTTPIngressRuleValue", "HTTPIngressRuleValue", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IngressSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IngressSpec{`,
- `Backend:` + strings.Replace(fmt.Sprintf("%v", this.Backend), "IngressBackend", "IngressBackend", 1) + `,`,
- `TLS:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TLS), "IngressTLS", "IngressTLS", 1), `&`, ``, 1) + `,`,
- `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "IngressRule", "IngressRule", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IngressStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IngressStatus{`,
- `LoadBalancer:` + strings.Replace(strings.Replace(this.LoadBalancer.String(), "LoadBalancerStatus", "k8s_io_api_core_v1.LoadBalancerStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IngressTLS) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IngressTLS{`,
- `Hosts:` + fmt.Sprintf("%v", this.Hosts) + `,`,
- `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicy{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicyEgressRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicyEgressRule{`,
- `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "NetworkPolicyPort", "NetworkPolicyPort", 1), `&`, ``, 1) + `,`,
- `To:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.To), "NetworkPolicyPeer", "NetworkPolicyPeer", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicyIngressRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicyIngressRule{`,
- `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "NetworkPolicyPort", "NetworkPolicyPort", 1), `&`, ``, 1) + `,`,
- `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "NetworkPolicyPeer", "NetworkPolicyPeer", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicyList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicyList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "NetworkPolicy", "NetworkPolicy", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicyPeer) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicyPeer{`,
- `PodSelector:` + strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `IPBlock:` + strings.Replace(fmt.Sprintf("%v", this.IPBlock), "IPBlock", "IPBlock", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicyPort) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicyPort{`,
- `Protocol:` + valueToStringGenerated(this.Protocol) + `,`,
- `Port:` + strings.Replace(fmt.Sprintf("%v", this.Port), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicySpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicySpec{`,
- `PodSelector:` + strings.Replace(strings.Replace(this.PodSelector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
- `Ingress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ingress), "NetworkPolicyIngressRule", "NetworkPolicyIngressRule", 1), `&`, ``, 1) + `,`,
- `Egress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Egress), "NetworkPolicyEgressRule", "NetworkPolicyEgressRule", 1), `&`, ``, 1) + `,`,
- `PolicyTypes:` + fmt.Sprintf("%v", this.PolicyTypes) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodSecurityPolicy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodSecurityPolicy{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySpec", "PodSecurityPolicySpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodSecurityPolicyList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodSecurityPolicyList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodSecurityPolicy", "PodSecurityPolicy", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodSecurityPolicySpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodSecurityPolicySpec{`,
- `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`,
- `DefaultAddCapabilities:` + fmt.Sprintf("%v", this.DefaultAddCapabilities) + `,`,
- `RequiredDropCapabilities:` + fmt.Sprintf("%v", this.RequiredDropCapabilities) + `,`,
- `AllowedCapabilities:` + fmt.Sprintf("%v", this.AllowedCapabilities) + `,`,
- `Volumes:` + fmt.Sprintf("%v", this.Volumes) + `,`,
- `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`,
- `HostPorts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.HostPorts), "HostPortRange", "HostPortRange", 1), `&`, ``, 1) + `,`,
- `HostPID:` + fmt.Sprintf("%v", this.HostPID) + `,`,
- `HostIPC:` + fmt.Sprintf("%v", this.HostIPC) + `,`,
- `SELinux:` + strings.Replace(strings.Replace(this.SELinux.String(), "SELinuxStrategyOptions", "SELinuxStrategyOptions", 1), `&`, ``, 1) + `,`,
- `RunAsUser:` + strings.Replace(strings.Replace(this.RunAsUser.String(), "RunAsUserStrategyOptions", "RunAsUserStrategyOptions", 1), `&`, ``, 1) + `,`,
- `SupplementalGroups:` + strings.Replace(strings.Replace(this.SupplementalGroups.String(), "SupplementalGroupsStrategyOptions", "SupplementalGroupsStrategyOptions", 1), `&`, ``, 1) + `,`,
- `FSGroup:` + strings.Replace(strings.Replace(this.FSGroup.String(), "FSGroupStrategyOptions", "FSGroupStrategyOptions", 1), `&`, ``, 1) + `,`,
- `ReadOnlyRootFilesystem:` + fmt.Sprintf("%v", this.ReadOnlyRootFilesystem) + `,`,
- `DefaultAllowPrivilegeEscalation:` + valueToStringGenerated(this.DefaultAllowPrivilegeEscalation) + `,`,
- `AllowPrivilegeEscalation:` + valueToStringGenerated(this.AllowPrivilegeEscalation) + `,`,
- `AllowedHostPaths:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedHostPaths), "AllowedHostPath", "AllowedHostPath", 1), `&`, ``, 1) + `,`,
- `AllowedFlexVolumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedFlexVolumes), "AllowedFlexVolume", "AllowedFlexVolume", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSet{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicaSetSpec", "ReplicaSetSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicaSetStatus", "ReplicaSetStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ReplicaSet", "ReplicaSet", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetSpec{`,
- `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
- `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicaSetStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicaSetStatus{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `FullyLabeledReplicas:` + fmt.Sprintf("%v", this.FullyLabeledReplicas) + `,`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
- `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ReplicaSetCondition", "ReplicaSetCondition", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ReplicationControllerDummy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ReplicationControllerDummy{`,
- `}`,
- }, "")
- return s
-}
-func (this *RollbackConfig) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollbackConfig{`,
- `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollingUpdateDaemonSet) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollingUpdateDaemonSet{`,
- `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RollingUpdateDeployment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RollingUpdateDeployment{`,
- `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RunAsUserStrategyOptions) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RunAsUserStrategyOptions{`,
- `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
- `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SELinuxStrategyOptions) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SELinuxStrategyOptions{`,
- `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
- `SELinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxOptions), "SELinuxOptions", "k8s_io_api_core_v1.SELinuxOptions", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Scale) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Scale{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ScaleSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ScaleSpec{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ScaleStatus) String() string {
- if this == nil {
- return "nil"
- }
- keysForSelector := make([]string, 0, len(this.Selector))
- for k := range this.Selector {
- keysForSelector = append(keysForSelector, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
- mapStringForSelector := "map[string]string{"
- for _, k := range keysForSelector {
- mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
- }
- mapStringForSelector += "}"
- s := strings.Join([]string{`&ScaleStatus{`,
- `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
- `Selector:` + mapStringForSelector + `,`,
- `TargetSelector:` + fmt.Sprintf("%v", this.TargetSelector) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SupplementalGroupsStrategyOptions) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SupplementalGroupsStrategyOptions{`,
- `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
- `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *AllowedFlexVolume) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: AllowedFlexVolume: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: AllowedFlexVolume: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Driver = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *AllowedHostPath) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: AllowedHostPath: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: AllowedHostPath: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PathPrefix", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PathPrefix = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CustomMetricCurrentStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CustomMetricCurrentStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CustomMetricCurrentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CustomMetricCurrentStatusList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CustomMetricCurrentStatusList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CustomMetricCurrentStatusList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, CustomMetricCurrentStatus{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CustomMetricTarget) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CustomMetricTarget: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CustomMetricTarget: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CustomMetricTargetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CustomMetricTargetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CustomMetricTargetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, CustomMetricTarget{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DaemonSetConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, DaemonSet{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
- }
- m.MinReadySeconds = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MinReadySeconds |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field TemplateGeneration", wireType)
- }
- m.TemplateGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.TemplateGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RevisionHistoryLimit = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentNumberScheduled", wireType)
- }
- m.CurrentNumberScheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.CurrentNumberScheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberMisscheduled", wireType)
- }
- m.NumberMisscheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberMisscheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DesiredNumberScheduled", wireType)
- }
- m.DesiredNumberScheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.DesiredNumberScheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberReady", wireType)
- }
- m.NumberReady = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberReady |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedNumberScheduled", wireType)
- }
- m.UpdatedNumberScheduled = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UpdatedNumberScheduled |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberAvailable", wireType)
- }
- m.NumberAvailable = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberAvailable |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NumberUnavailable", wireType)
- }
- m.NumberUnavailable = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.NumberUnavailable |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CollisionCount = &v
- case 10:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, DaemonSetCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DaemonSetUpdateStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DaemonSetUpdateStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DaemonSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DaemonSetUpdateStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollingUpdate == nil {
- m.RollingUpdate = &RollingUpdateDaemonSet{}
- }
- if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Deployment) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Deployment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DeploymentConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Deployment{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentRollback) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentRollback: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentRollback: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAnnotations", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.UpdatedAnnotations == nil {
- m.UpdatedAnnotations = make(map[string]string)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapvalue uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapvalue := int(stringLenmapvalue)
- if intStringLenmapvalue < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapvalue := iNdEx + intStringLenmapvalue
- if postStringIndexmapvalue > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
- iNdEx = postStringIndexmapvalue
- m.UpdatedAnnotations[mapkey] = mapvalue
- } else {
- var mapvalue string
- m.UpdatedAnnotations[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Replicas = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
- }
- m.MinReadySeconds = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MinReadySeconds |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RevisionHistoryLimit = &v
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Paused = bool(v != 0)
- case 8:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollbackTo == nil {
- m.RollbackTo = &RollbackConfig{}
- }
- if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ProgressDeadlineSeconds", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ProgressDeadlineSeconds = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
- }
- m.UpdatedReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
- }
- m.AvailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.AvailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field UnavailableReplicas", wireType)
- }
- m.UnavailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.UnavailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, DeploymentCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
- }
- m.ReadyReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ReadyReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.CollisionCount = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeploymentStrategy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeploymentStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = DeploymentStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.RollingUpdate == nil {
- m.RollingUpdate = &RollingUpdateDeployment{}
- }
- if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *FSGroupStrategyOptions) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: FSGroupStrategyOptions: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: FSGroupStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rule = FSGroupStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ranges = append(m.Ranges, IDRange{})
- if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HTTPIngressPath: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HTTPIngressPath: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Path = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Backend", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Backend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HTTPIngressRuleValue: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HTTPIngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Paths = append(m.Paths, HTTPIngressPath{})
- if err := m.Paths[len(m.Paths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HostPortRange) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HostPortRange: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HostPortRange: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
- }
- m.Min = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Min |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
- }
- m.Max = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Max |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IDRange) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IDRange: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IDRange: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
- }
- m.Min = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Min |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
- }
- m.Max = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Max |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IPBlock) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IPBlock: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IPBlock: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CIDR", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CIDR = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Except", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Except = append(m.Except, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Ingress) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Ingress: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Ingress: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IngressBackend) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IngressBackend: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IngressBackend: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ServiceName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ServicePort", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ServicePort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IngressList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IngressList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IngressList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Ingress{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IngressRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IngressRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IngressRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Host = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field IngressRuleValue", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.IngressRuleValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IngressRuleValue) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IngressRuleValue: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.HTTP == nil {
- m.HTTP = &HTTPIngressRuleValue{}
- }
- if err := m.HTTP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IngressSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IngressSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IngressSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Backend", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Backend == nil {
- m.Backend = &IngressBackend{}
- }
- if err := m.Backend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TLS", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.TLS = append(m.TLS, IngressTLS{})
- if err := m.TLS[len(m.TLS)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, IngressRule{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IngressStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IngressStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IngressStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IngressTLS) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IngressTLS: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IngressTLS: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.SecretName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicyEgressRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicyEgressRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicyEgressRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ports = append(m.Ports, NetworkPolicyPort{})
- if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field To", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.To = append(m.To, NetworkPolicyPeer{})
- if err := m.To[len(m.To)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicyIngressRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicyIngressRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicyIngressRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ports = append(m.Ports, NetworkPolicyPort{})
- if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.From = append(m.From, NetworkPolicyPeer{})
- if err := m.From[len(m.From)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicyList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, NetworkPolicy{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicyPeer: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.PodSelector == nil {
- m.PodSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NamespaceSelector == nil {
- m.NamespaceSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field IPBlock", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.IPBlock == nil {
- m.IPBlock = &IPBlock{}
- }
- if err := m.IPBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicyPort) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicyPort: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicyPort: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := k8s_io_api_core_v1.Protocol(dAtA[iNdEx:postIndex])
- m.Protocol = &s
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Port == nil {
- m.Port = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicySpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ingress = append(m.Ingress, NetworkPolicyIngressRule{})
- if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Egress", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Egress = append(m.Egress, NetworkPolicyEgressRule{})
- if err := m.Egress[len(m.Egress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PolicyTypes", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PolicyTypes = append(m.PolicyTypes, PolicyType(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodSecurityPolicy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodSecurityPolicy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodSecurityPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodSecurityPolicyList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodSecurityPolicyList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodSecurityPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, PodSecurityPolicy{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodSecurityPolicySpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodSecurityPolicySpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodSecurityPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Privileged = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DefaultAddCapabilities", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.DefaultAddCapabilities = append(m.DefaultAddCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RequiredDropCapabilities", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.RequiredDropCapabilities = append(m.RequiredDropCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowedCapabilities", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.AllowedCapabilities = append(m.AllowedCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Volumes = append(m.Volumes, FSType(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field HostNetwork", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.HostNetwork = bool(v != 0)
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field HostPorts", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.HostPorts = append(m.HostPorts, HostPortRange{})
- if err := m.HostPorts[len(m.HostPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field HostPID", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.HostPID = bool(v != 0)
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field HostIPC", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.HostIPC = bool(v != 0)
- case 10:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SELinux", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.SELinux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 11:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RunAsUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 12:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.SupplementalGroups.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 13:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field FSGroup", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.FSGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 14:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadOnlyRootFilesystem", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ReadOnlyRootFilesystem = bool(v != 0)
- case 15:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DefaultAllowPrivilegeEscalation", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.DefaultAllowPrivilegeEscalation = &b
- case 16:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowPrivilegeEscalation", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.AllowPrivilegeEscalation = &b
- case 17:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowedHostPaths", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.AllowedHostPaths = append(m.AllowedHostPaths, AllowedHostPath{})
- if err := m.AllowedHostPaths[len(m.AllowedHostPaths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 18:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowedFlexVolumes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.AllowedFlexVolumes = append(m.AllowedFlexVolumes, AllowedFlexVolume{})
- if err := m.AllowedFlexVolumes[len(m.AllowedFlexVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetCondition) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Type = ReplicaSetConditionType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Reason = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ReplicaSet{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- var v int32
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Replicas = &v
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
- }
- m.MinReadySeconds = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MinReadySeconds |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicaSetStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicaSetStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicaSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field FullyLabeledReplicas", wireType)
- }
- m.FullyLabeledReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.FullyLabeledReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
- }
- m.ReadyReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ReadyReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
- }
- m.AvailableReplicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.AvailableReplicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, ReplicaSetCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ReplicationControllerDummy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ReplicationControllerDummy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ReplicationControllerDummy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollbackConfig) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollbackConfig: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollbackConfig: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
- }
- m.Revision = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Revision |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollingUpdateDaemonSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollingUpdateDaemonSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollingUpdateDaemonSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxUnavailable == nil {
- m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RollingUpdateDeployment) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RollingUpdateDeployment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RollingUpdateDeployment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxUnavailable == nil {
- m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxSurge", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxSurge == nil {
- m.MaxSurge = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxSurge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RunAsUserStrategyOptions) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RunAsUserStrategyOptions: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RunAsUserStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rule = RunAsUserStrategy(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ranges = append(m.Ranges, IDRange{})
- if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SELinuxStrategyOptions) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SELinuxStrategyOptions: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SELinuxStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rule = SELinuxStrategy(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SELinuxOptions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.SELinuxOptions == nil {
- m.SELinuxOptions = &k8s_io_api_core_v1.SELinuxOptions{}
- }
- if err := m.SELinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Scale) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Scale: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ScaleSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ScaleStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
- }
- m.Replicas = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Replicas |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.Selector == nil {
- m.Selector = make(map[string]string)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapvalue uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapvalue := int(stringLenmapvalue)
- if intStringLenmapvalue < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapvalue := iNdEx + intStringLenmapvalue
- if postStringIndexmapvalue > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
- iNdEx = postStringIndexmapvalue
- m.Selector[mapkey] = mapvalue
- } else {
- var mapvalue string
- m.Selector[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.TargetSelector = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SupplementalGroupsStrategyOptions) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rule = SupplementalGroupsStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ranges = append(m.Ranges, IDRange{})
- if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/extensions/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 3571 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcd, 0x6f, 0x1c, 0x47,
- 0x76, 0x57, 0xcf, 0x0c, 0x39, 0xc3, 0x47, 0xf1, 0xab, 0x28, 0x93, 0x63, 0xca, 0xe2, 0xc8, 0x6d,
- 0x40, 0x91, 0x1c, 0x69, 0xc6, 0x92, 0x2d, 0x59, 0xb1, 0x10, 0x3b, 0x1c, 0x52, 0x1f, 0x74, 0xf8,
- 0xa5, 0x1a, 0x52, 0x71, 0x8c, 0xc8, 0x71, 0x73, 0xa6, 0x38, 0x6c, 0xb1, 0xa7, 0xbb, 0xdd, 0x5d,
- 0x4d, 0x73, 0x80, 0x20, 0xc8, 0x21, 0x08, 0x10, 0x20, 0x41, 0x92, 0x83, 0xf3, 0x71, 0x8b, 0x2f,
- 0x39, 0x25, 0x48, 0x6e, 0xc9, 0xc1, 0x30, 0x10, 0xc0, 0x0b, 0x08, 0x0b, 0x2f, 0xe0, 0xdb, 0xfa,
- 0x44, 0xac, 0xe9, 0xd3, 0x62, 0xff, 0x81, 0x85, 0x0e, 0x8b, 0x45, 0x55, 0x57, 0x7f, 0x77, 0x73,
- 0x66, 0x68, 0x89, 0x58, 0x2c, 0xf6, 0xc6, 0xa9, 0xf7, 0xde, 0xef, 0xbd, 0x7a, 0xf5, 0xea, 0xbd,
- 0xd7, 0x55, 0x45, 0xb8, 0xb7, 0x77, 0xdb, 0xae, 0xaa, 0x46, 0x6d, 0xcf, 0xd9, 0x26, 0x96, 0x4e,
- 0x28, 0xb1, 0x6b, 0xfb, 0x44, 0x6f, 0x19, 0x56, 0x4d, 0x10, 0x14, 0x53, 0xad, 0x91, 0x03, 0x4a,
- 0x74, 0x5b, 0x35, 0x74, 0xbb, 0xb6, 0x7f, 0x7d, 0x9b, 0x50, 0xe5, 0x7a, 0xad, 0x4d, 0x74, 0x62,
- 0x29, 0x94, 0xb4, 0xaa, 0xa6, 0x65, 0x50, 0x03, 0x5d, 0x70, 0xd9, 0xab, 0x8a, 0xa9, 0x56, 0x03,
- 0xf6, 0xaa, 0x60, 0x9f, 0xbb, 0xd6, 0x56, 0xe9, 0xae, 0xb3, 0x5d, 0x6d, 0x1a, 0x9d, 0x5a, 0xdb,
- 0x68, 0x1b, 0x35, 0x2e, 0xb5, 0xed, 0xec, 0xf0, 0x5f, 0xfc, 0x07, 0xff, 0xcb, 0x45, 0x9b, 0x93,
- 0x43, 0xca, 0x9b, 0x86, 0x45, 0x6a, 0xfb, 0x09, 0x8d, 0x73, 0x57, 0x42, 0x3c, 0xa6, 0xa1, 0xa9,
- 0xcd, 0x6e, 0x96, 0x71, 0x73, 0x6f, 0x05, 0xac, 0x1d, 0xa5, 0xb9, 0xab, 0xea, 0xc4, 0xea, 0xd6,
- 0xcc, 0xbd, 0x36, 0x97, 0xb5, 0x88, 0x6d, 0x38, 0x56, 0x93, 0x0c, 0x24, 0x65, 0xd7, 0x3a, 0x84,
- 0x2a, 0x69, 0x66, 0xd5, 0xb2, 0xa4, 0x2c, 0x47, 0xa7, 0x6a, 0x27, 0xa9, 0xe6, 0x56, 0x2f, 0x01,
- 0xbb, 0xb9, 0x4b, 0x3a, 0x4a, 0x42, 0xee, 0xcd, 0x2c, 0x39, 0x87, 0xaa, 0x5a, 0x4d, 0xd5, 0xa9,
- 0x4d, 0xad, 0xb8, 0x90, 0x7c, 0x07, 0xa6, 0x16, 0x34, 0xcd, 0xf8, 0x94, 0xb4, 0xee, 0x69, 0xe4,
- 0xe0, 0x91, 0xa1, 0x39, 0x1d, 0x82, 0x2e, 0xc1, 0x70, 0xcb, 0x52, 0xf7, 0x89, 0x55, 0x96, 0x2e,
- 0x4a, 0x97, 0x47, 0xea, 0xe3, 0x4f, 0x0f, 0x2b, 0x67, 0x8e, 0x0e, 0x2b, 0xc3, 0x4b, 0x7c, 0x14,
- 0x0b, 0xaa, 0x7c, 0x17, 0x26, 0x84, 0xf0, 0x03, 0xc3, 0xa6, 0x1b, 0x0a, 0xdd, 0x45, 0x37, 0x00,
- 0x4c, 0x85, 0xee, 0x6e, 0x58, 0x64, 0x47, 0x3d, 0x10, 0xe2, 0x48, 0x88, 0xc3, 0x86, 0x4f, 0xc1,
- 0x21, 0x2e, 0xf9, 0xdf, 0x24, 0x78, 0x79, 0xd1, 0xb1, 0xa9, 0xd1, 0x59, 0x25, 0xd4, 0x52, 0x9b,
- 0x8b, 0x8e, 0x65, 0x11, 0x9d, 0x36, 0xa8, 0x42, 0x1d, 0x1b, 0x5d, 0x84, 0x82, 0xae, 0x74, 0x88,
- 0xc0, 0x3a, 0x2b, 0xb0, 0x0a, 0x6b, 0x4a, 0x87, 0x60, 0x4e, 0x41, 0x1f, 0xc2, 0xd0, 0xbe, 0xa2,
- 0x39, 0xa4, 0x9c, 0xbb, 0x28, 0x5d, 0x1e, 0xbd, 0x51, 0xad, 0x06, 0xa1, 0xe7, 0x3b, 0xa2, 0x6a,
- 0xee, 0xb5, 0x79, 0x2c, 0x7a, 0xab, 0x5b, 0x7d, 0xe8, 0x28, 0x3a, 0x55, 0x69, 0xb7, 0x7e, 0x4e,
- 0x40, 0x9e, 0x15, 0x7a, 0x1f, 0x31, 0x2c, 0xec, 0x42, 0xca, 0x7f, 0x09, 0x17, 0x32, 0x4d, 0x5b,
- 0x51, 0x6d, 0x8a, 0x1e, 0xc3, 0x90, 0x4a, 0x49, 0xc7, 0x2e, 0x4b, 0x17, 0xf3, 0x97, 0x47, 0x6f,
- 0xdc, 0xae, 0x1e, 0x1b, 0xf7, 0xd5, 0x4c, 0xb0, 0xfa, 0x98, 0x30, 0x63, 0x68, 0x99, 0xc1, 0x61,
- 0x17, 0x55, 0xfe, 0x27, 0x09, 0x50, 0x58, 0x66, 0x53, 0xb1, 0xda, 0x84, 0xf6, 0xe1, 0x94, 0x3f,
- 0xfd, 0x61, 0x4e, 0x99, 0x16, 0x90, 0xa3, 0xae, 0xc2, 0x88, 0x4f, 0x4c, 0x98, 0x49, 0x9a, 0xc4,
- 0x9d, 0xf1, 0x28, 0xea, 0x8c, 0xeb, 0x03, 0x38, 0xc3, 0x45, 0xc9, 0xf0, 0xc2, 0x67, 0x39, 0x18,
- 0x59, 0x52, 0x48, 0xc7, 0xd0, 0x1b, 0x84, 0xa2, 0x8f, 0xa1, 0xc4, 0x36, 0x5b, 0x4b, 0xa1, 0x0a,
- 0x77, 0xc0, 0xe8, 0x8d, 0x37, 0x8e, 0x9b, 0x9d, 0x5d, 0x65, 0xdc, 0xd5, 0xfd, 0xeb, 0xd5, 0xf5,
- 0xed, 0x27, 0xa4, 0x49, 0x57, 0x09, 0x55, 0x82, 0x98, 0x0c, 0xc6, 0xb0, 0x8f, 0x8a, 0xd6, 0xa0,
- 0x60, 0x9b, 0xa4, 0x29, 0x7c, 0x77, 0xb5, 0xc7, 0x34, 0x7c, 0xcb, 0x1a, 0x26, 0x69, 0x06, 0x8b,
- 0xc1, 0x7e, 0x61, 0x8e, 0x83, 0x1e, 0xc1, 0xb0, 0xcd, 0x57, 0xb9, 0x9c, 0x4f, 0xac, 0xc6, 0xf1,
- 0x88, 0x6e, 0x6c, 0xf8, 0x1b, 0xd0, 0xfd, 0x8d, 0x05, 0x9a, 0xfc, 0xf3, 0x1c, 0x20, 0x9f, 0x77,
- 0xd1, 0xd0, 0x5b, 0x2a, 0x55, 0x0d, 0x1d, 0xbd, 0x03, 0x05, 0xda, 0x35, 0xbd, 0xe8, 0xb8, 0xe4,
- 0x19, 0xb4, 0xd9, 0x35, 0xc9, 0xb3, 0xc3, 0xca, 0x4c, 0x52, 0x82, 0x51, 0x30, 0x97, 0x41, 0x2b,
- 0xbe, 0xa9, 0x39, 0x2e, 0xfd, 0x56, 0x54, 0xf5, 0xb3, 0xc3, 0x4a, 0x4a, 0x2e, 0xae, 0xfa, 0x48,
- 0x51, 0x03, 0xd1, 0x3e, 0x20, 0x4d, 0xb1, 0xe9, 0xa6, 0xa5, 0xe8, 0xb6, 0xab, 0x49, 0xed, 0x10,
- 0xe1, 0x84, 0xd7, 0xfb, 0x5b, 0x34, 0x26, 0x51, 0x9f, 0x13, 0x56, 0xa0, 0x95, 0x04, 0x1a, 0x4e,
- 0xd1, 0xc0, 0x32, 0x98, 0x45, 0x14, 0xdb, 0xd0, 0xcb, 0x85, 0x68, 0x06, 0xc3, 0x7c, 0x14, 0x0b,
- 0x2a, 0xba, 0x02, 0xc5, 0x0e, 0xb1, 0x6d, 0xa5, 0x4d, 0xca, 0x43, 0x9c, 0x71, 0x42, 0x30, 0x16,
- 0x57, 0xdd, 0x61, 0xec, 0xd1, 0xe5, 0x2f, 0x24, 0x18, 0xf3, 0x3d, 0xc7, 0xa3, 0xfd, 0xcf, 0x12,
- 0x71, 0x58, 0xed, 0x6f, 0x4a, 0x4c, 0x9a, 0x47, 0xe1, 0xa4, 0xd0, 0x56, 0xf2, 0x46, 0x42, 0x31,
- 0xb8, 0xea, 0xed, 0xa5, 0x1c, 0xdf, 0x4b, 0x97, 0xfb, 0x0d, 0x99, 0x8c, 0x2d, 0xf4, 0xcf, 0x85,
- 0x90, 0xf9, 0x2c, 0x34, 0xd1, 0x63, 0x28, 0xd9, 0x44, 0x23, 0x4d, 0x6a, 0x58, 0xc2, 0xfc, 0x37,
- 0xfb, 0x34, 0x5f, 0xd9, 0x26, 0x5a, 0x43, 0x88, 0xd6, 0xcf, 0x32, 0xfb, 0xbd, 0x5f, 0xd8, 0x87,
- 0x44, 0x0f, 0xa1, 0x44, 0x49, 0xc7, 0xd4, 0x14, 0xea, 0xe5, 0xa0, 0xd7, 0xc2, 0x53, 0x60, 0x91,
- 0xc3, 0xc0, 0x36, 0x8c, 0xd6, 0xa6, 0x60, 0xe3, 0xdb, 0xc7, 0x77, 0x89, 0x37, 0x8a, 0x7d, 0x18,
- 0xb4, 0x0f, 0xe3, 0x8e, 0xd9, 0x62, 0x9c, 0x94, 0xd5, 0xb0, 0x76, 0x57, 0x44, 0xd2, 0xad, 0x7e,
- 0x7d, 0xb3, 0x15, 0x91, 0xae, 0xcf, 0x08, 0x5d, 0xe3, 0xd1, 0x71, 0x1c, 0xd3, 0x82, 0x16, 0x60,
- 0xa2, 0xa3, 0xea, 0x98, 0x28, 0xad, 0x6e, 0x83, 0x34, 0x0d, 0xbd, 0x65, 0xf3, 0xb0, 0x1a, 0xaa,
- 0xcf, 0x0a, 0x80, 0x89, 0xd5, 0x28, 0x19, 0xc7, 0xf9, 0xd1, 0xfb, 0x80, 0xbc, 0x69, 0xdc, 0x77,
- 0x4b, 0xb0, 0x6a, 0xe8, 0x3c, 0xe6, 0xf2, 0x41, 0x70, 0x6f, 0x26, 0x38, 0x70, 0x8a, 0x14, 0x5a,
- 0x81, 0x73, 0x16, 0xd9, 0x57, 0xd9, 0x1c, 0x1f, 0xa8, 0x36, 0x35, 0xac, 0xee, 0x8a, 0xda, 0x51,
- 0x69, 0x79, 0x98, 0xdb, 0x54, 0x3e, 0x3a, 0xac, 0x9c, 0xc3, 0x29, 0x74, 0x9c, 0x2a, 0x25, 0xff,
- 0xcb, 0x30, 0x4c, 0xc4, 0xf2, 0x0d, 0x7a, 0x04, 0x33, 0x4d, 0xb7, 0x38, 0xad, 0x39, 0x9d, 0x6d,
- 0x62, 0x35, 0x9a, 0xbb, 0xa4, 0xe5, 0x68, 0xa4, 0xc5, 0x03, 0x65, 0xa8, 0x3e, 0x2f, 0x2c, 0x9e,
- 0x59, 0x4c, 0xe5, 0xc2, 0x19, 0xd2, 0xcc, 0x0b, 0x3a, 0x1f, 0x5a, 0x55, 0x6d, 0xdb, 0xc7, 0xcc,
- 0x71, 0x4c, 0xdf, 0x0b, 0x6b, 0x09, 0x0e, 0x9c, 0x22, 0xc5, 0x6c, 0x6c, 0x11, 0x5b, 0xb5, 0x48,
- 0x2b, 0x6e, 0x63, 0x3e, 0x6a, 0xe3, 0x52, 0x2a, 0x17, 0xce, 0x90, 0x46, 0x37, 0x61, 0xd4, 0xd5,
- 0xc6, 0xd7, 0x4f, 0x2c, 0xb4, 0x5f, 0x0e, 0xd7, 0x02, 0x12, 0x0e, 0xf3, 0xb1, 0xa9, 0x19, 0xdb,
- 0x36, 0xb1, 0xf6, 0x49, 0x2b, 0x7b, 0x81, 0xd7, 0x13, 0x1c, 0x38, 0x45, 0x8a, 0x4d, 0xcd, 0x8d,
- 0xc0, 0xc4, 0xd4, 0x86, 0xa3, 0x53, 0xdb, 0x4a, 0xe5, 0xc2, 0x19, 0xd2, 0x2c, 0x8e, 0x5d, 0x93,
- 0x17, 0xf6, 0x15, 0x55, 0x53, 0xb6, 0x35, 0x52, 0x2e, 0x46, 0xe3, 0x78, 0x2d, 0x4a, 0xc6, 0x71,
- 0x7e, 0x74, 0x1f, 0xa6, 0xdc, 0xa1, 0x2d, 0x5d, 0xf1, 0x41, 0x4a, 0x1c, 0xe4, 0x65, 0x01, 0x32,
- 0xb5, 0x16, 0x67, 0xc0, 0x49, 0x19, 0xf4, 0x0e, 0x8c, 0x37, 0x0d, 0x4d, 0xe3, 0xf1, 0xb8, 0x68,
- 0x38, 0x3a, 0x2d, 0x8f, 0x70, 0x14, 0xc4, 0xf6, 0xe3, 0x62, 0x84, 0x82, 0x63, 0x9c, 0x88, 0x00,
- 0x34, 0xbd, 0x82, 0x63, 0x97, 0xa1, 0xaf, 0x5e, 0x23, 0x59, 0xf4, 0x82, 0x1e, 0xc0, 0x1f, 0xb2,
- 0x71, 0x08, 0x58, 0xfe, 0xb1, 0x04, 0xb3, 0x19, 0xa9, 0x03, 0xbd, 0x17, 0x29, 0xb1, 0xbf, 0x1f,
- 0x2b, 0xb1, 0xe7, 0x33, 0xc4, 0x42, 0x75, 0x56, 0x87, 0x31, 0x8b, 0xcd, 0x4a, 0x6f, 0xbb, 0x2c,
- 0x22, 0x47, 0xde, 0xec, 0x31, 0x0d, 0x1c, 0x96, 0x09, 0x72, 0xfe, 0xd4, 0xd1, 0x61, 0x65, 0x2c,
- 0x42, 0xc3, 0x51, 0x78, 0xf9, 0x5f, 0x73, 0x00, 0x4b, 0xc4, 0xd4, 0x8c, 0x6e, 0x87, 0xe8, 0xa7,
- 0xd1, 0x43, 0xad, 0x47, 0x7a, 0xa8, 0x6b, 0xbd, 0x96, 0xc7, 0x37, 0x2d, 0xb3, 0x89, 0xfa, 0x93,
- 0x58, 0x13, 0x55, 0xeb, 0x1f, 0xf2, 0xf8, 0x2e, 0xea, 0xa7, 0x79, 0x98, 0x0e, 0x98, 0x83, 0x36,
- 0xea, 0x4e, 0x64, 0x8d, 0x7f, 0x2f, 0xb6, 0xc6, 0xb3, 0x29, 0x22, 0x2f, 0xac, 0x8f, 0x7a, 0xfe,
- 0xfd, 0x0c, 0x7a, 0x02, 0xe3, 0xac, 0x71, 0x72, 0xc3, 0x83, 0xb7, 0x65, 0xc3, 0x03, 0xb7, 0x65,
- 0x7e, 0x01, 0x5d, 0x89, 0x20, 0xe1, 0x18, 0x72, 0x46, 0x1b, 0x58, 0x7c, 0xd1, 0x6d, 0xa0, 0xfc,
- 0xa5, 0x04, 0xe3, 0xc1, 0x32, 0x9d, 0x42, 0xd3, 0xb6, 0x16, 0x6d, 0xda, 0xae, 0xf4, 0x1d, 0xa2,
- 0x19, 0x5d, 0xdb, 0x2f, 0x59, 0x83, 0xef, 0x33, 0xb1, 0x0d, 0xbe, 0xad, 0x34, 0xf7, 0xfa, 0xf8,
- 0xfc, 0xfb, 0x4c, 0x02, 0x24, 0xaa, 0xc0, 0x82, 0xae, 0x1b, 0x54, 0x71, 0x73, 0xa5, 0x6b, 0xd6,
- 0x72, 0xdf, 0x66, 0x79, 0x1a, 0xab, 0x5b, 0x09, 0xac, 0xbb, 0x3a, 0xb5, 0xba, 0xc1, 0x8a, 0x24,
- 0x19, 0x70, 0x8a, 0x01, 0x48, 0x01, 0xb0, 0x04, 0xe6, 0xa6, 0x21, 0x36, 0xf2, 0xb5, 0x3e, 0x72,
- 0x1e, 0x13, 0x58, 0x34, 0xf4, 0x1d, 0xb5, 0x1d, 0xa4, 0x1d, 0xec, 0x03, 0xe1, 0x10, 0xe8, 0xdc,
- 0x5d, 0x98, 0xcd, 0xb0, 0x16, 0x4d, 0x42, 0x7e, 0x8f, 0x74, 0x5d, 0xb7, 0x61, 0xf6, 0x27, 0x3a,
- 0x17, 0xfe, 0x4c, 0x1e, 0x11, 0x5f, 0xb8, 0xef, 0xe4, 0x6e, 0x4b, 0xf2, 0x17, 0x43, 0xe1, 0xd8,
- 0xe1, 0x1d, 0xf3, 0x65, 0x28, 0x59, 0xc4, 0xd4, 0xd4, 0xa6, 0x62, 0x8b, 0x46, 0x88, 0x37, 0xbf,
- 0x58, 0x8c, 0x61, 0x9f, 0x1a, 0xe9, 0xad, 0x73, 0x2f, 0xb6, 0xb7, 0xce, 0x3f, 0x9f, 0xde, 0xfa,
- 0xcf, 0xa1, 0x64, 0x7b, 0x5d, 0x75, 0x81, 0x43, 0x5e, 0x1f, 0x20, 0xbf, 0x8a, 0x86, 0xda, 0x57,
- 0xe0, 0xb7, 0xd2, 0x3e, 0x68, 0x5a, 0x13, 0x3d, 0x34, 0x60, 0x13, 0xfd, 0x5c, 0x1b, 0x5f, 0x96,
- 0x53, 0x4d, 0xc5, 0xb1, 0x49, 0x8b, 0x27, 0xa2, 0x52, 0x90, 0x53, 0x37, 0xf8, 0x28, 0x16, 0x54,
- 0xf4, 0x38, 0x12, 0xb2, 0xa5, 0x93, 0x84, 0xec, 0x78, 0x76, 0xb8, 0xa2, 0x2d, 0x98, 0x35, 0x2d,
- 0xa3, 0x6d, 0x11, 0xdb, 0x5e, 0x22, 0x4a, 0x4b, 0x53, 0x75, 0xe2, 0xf9, 0xc7, 0xed, 0x88, 0xce,
- 0x1f, 0x1d, 0x56, 0x66, 0x37, 0xd2, 0x59, 0x70, 0x96, 0xac, 0xfc, 0xb4, 0x00, 0x93, 0xf1, 0x0a,
- 0x98, 0xd1, 0xa4, 0x4a, 0x27, 0x6a, 0x52, 0xaf, 0x86, 0x36, 0x83, 0xdb, 0xc1, 0xfb, 0xab, 0x9f,
- 0xb2, 0x21, 0x16, 0x60, 0x42, 0x64, 0x03, 0x8f, 0x28, 0xda, 0x74, 0x7f, 0xf5, 0xb7, 0xa2, 0x64,
- 0x1c, 0xe7, 0x67, 0xad, 0x67, 0xd0, 0x51, 0x7a, 0x20, 0x85, 0x68, 0xeb, 0xb9, 0x10, 0x67, 0xc0,
- 0x49, 0x19, 0xb4, 0x0a, 0xd3, 0x8e, 0x9e, 0x84, 0x72, 0xa3, 0xf1, 0xbc, 0x80, 0x9a, 0xde, 0x4a,
- 0xb2, 0xe0, 0x34, 0x39, 0xb4, 0x13, 0xe9, 0x46, 0x87, 0x79, 0x86, 0xbd, 0xd1, 0xf7, 0xde, 0xe9,
- 0xbb, 0x1d, 0x45, 0x77, 0x60, 0xcc, 0xe2, 0xdf, 0x1d, 0x9e, 0xc1, 0x6e, 0xef, 0xfe, 0x92, 0x10,
- 0x1b, 0xc3, 0x61, 0x22, 0x8e, 0xf2, 0xa6, 0xb4, 0xdb, 0xa5, 0x7e, 0xdb, 0x6d, 0xf9, 0xff, 0xa5,
- 0x70, 0x11, 0xf2, 0x5b, 0xe0, 0x5e, 0xa7, 0x4c, 0x09, 0x89, 0x50, 0x77, 0x64, 0xa4, 0x77, 0xbf,
- 0xb7, 0x06, 0xea, 0x7e, 0x83, 0xe2, 0xd9, 0xbb, 0xfd, 0xfd, 0x5c, 0x82, 0x99, 0x7b, 0x8d, 0xfb,
- 0x96, 0xe1, 0x98, 0x9e, 0x39, 0xeb, 0xa6, 0xeb, 0xd7, 0xb7, 0xa1, 0x60, 0x39, 0x9a, 0x37, 0x8f,
- 0xd7, 0xbc, 0x79, 0x60, 0x47, 0x63, 0xf3, 0x98, 0x8e, 0x49, 0xb9, 0x93, 0x60, 0x02, 0x68, 0x0d,
- 0x86, 0x2d, 0x45, 0x6f, 0x13, 0xaf, 0xac, 0x5e, 0xea, 0x61, 0xfd, 0xf2, 0x12, 0x66, 0xec, 0xa1,
- 0xe6, 0x8d, 0x4b, 0x63, 0x81, 0x22, 0xff, 0xbd, 0x04, 0x13, 0x0f, 0x36, 0x37, 0x37, 0x96, 0x75,
- 0xbe, 0xa3, 0xf9, 0x79, 0xfa, 0x45, 0x28, 0x98, 0x0a, 0xdd, 0x8d, 0x57, 0x7a, 0x46, 0xc3, 0x9c,
- 0x82, 0x3e, 0x80, 0x22, 0xcb, 0x24, 0x44, 0x6f, 0xf5, 0xd9, 0x6a, 0x0b, 0xf8, 0xba, 0x2b, 0x14,
- 0x74, 0x88, 0x62, 0x00, 0x7b, 0x70, 0xf2, 0x1e, 0x9c, 0x0b, 0x99, 0xc3, 0xfc, 0xc1, 0x8f, 0x81,
- 0x51, 0x03, 0x86, 0x98, 0x66, 0xef, 0x94, 0xb7, 0xd7, 0x61, 0x66, 0x6c, 0x4a, 0x41, 0xa7, 0xc3,
- 0x7e, 0xd9, 0xd8, 0xc5, 0x92, 0x57, 0x61, 0x8c, 0x5f, 0x22, 0x18, 0x16, 0xe5, 0x6e, 0x41, 0x17,
- 0x20, 0xdf, 0x51, 0x75, 0x51, 0x67, 0x47, 0x85, 0x4c, 0x9e, 0xd5, 0x08, 0x36, 0xce, 0xc9, 0xca,
- 0x81, 0xc8, 0x3c, 0x01, 0x59, 0x39, 0xc0, 0x6c, 0x5c, 0xbe, 0x0f, 0x45, 0xe1, 0xee, 0x30, 0x50,
- 0xfe, 0x78, 0xa0, 0x7c, 0x0a, 0xd0, 0x3a, 0x14, 0x97, 0x37, 0xea, 0x9a, 0xe1, 0x76, 0x5d, 0x4d,
- 0xb5, 0x65, 0xc5, 0xd7, 0x62, 0x71, 0x79, 0x09, 0x63, 0x4e, 0x41, 0x32, 0x0c, 0x93, 0x83, 0x26,
- 0x31, 0x29, 0x8f, 0x88, 0x91, 0x3a, 0xb0, 0x55, 0xbe, 0xcb, 0x47, 0xb0, 0xa0, 0xc8, 0xff, 0x90,
- 0x83, 0xa2, 0x70, 0xc7, 0x29, 0x7c, 0x85, 0xad, 0x44, 0xbe, 0xc2, 0x5e, 0xef, 0x2f, 0x34, 0x32,
- 0x3f, 0xc1, 0x36, 0x63, 0x9f, 0x60, 0x57, 0xfb, 0xc4, 0x3b, 0xfe, 0xfb, 0xeb, 0x7f, 0x24, 0x18,
- 0x8f, 0x06, 0x25, 0xba, 0x09, 0xa3, 0xac, 0xe0, 0xa8, 0x4d, 0xb2, 0x16, 0xf4, 0xb9, 0xfe, 0x21,
- 0x4c, 0x23, 0x20, 0xe1, 0x30, 0x1f, 0x6a, 0xfb, 0x62, 0x2c, 0x8e, 0xc4, 0xa4, 0xb3, 0x5d, 0xea,
- 0x50, 0x55, 0xab, 0xba, 0x17, 0x63, 0xd5, 0x65, 0x9d, 0xae, 0x5b, 0x0d, 0x6a, 0xa9, 0x7a, 0x3b,
- 0xa1, 0x88, 0x07, 0x65, 0x18, 0x59, 0xfe, 0x3f, 0x09, 0x46, 0x85, 0xc9, 0xa7, 0xf0, 0x55, 0xf1,
- 0xc7, 0xd1, 0xaf, 0x8a, 0x4b, 0x7d, 0x6e, 0xf0, 0xf4, 0x4f, 0x8a, 0xff, 0x08, 0x4c, 0x67, 0x5b,
- 0x9a, 0x45, 0xf5, 0xae, 0x61, 0xd3, 0x78, 0x54, 0xb3, 0xcd, 0x88, 0x39, 0x05, 0x39, 0x30, 0xa9,
- 0xc6, 0x72, 0x80, 0x70, 0x6d, 0xad, 0x3f, 0x4b, 0x7c, 0xb1, 0x7a, 0x59, 0xc0, 0x4f, 0xc6, 0x29,
- 0x38, 0xa1, 0x42, 0x26, 0x90, 0xe0, 0x42, 0x0f, 0xa1, 0xb0, 0x4b, 0xa9, 0x99, 0x72, 0x5e, 0xdd,
- 0x23, 0xf3, 0x04, 0x26, 0x94, 0xf8, 0xec, 0x36, 0x37, 0x37, 0x30, 0x87, 0x92, 0x7f, 0x15, 0xf8,
- 0xa3, 0xe1, 0xc6, 0xb8, 0x9f, 0x4f, 0xa5, 0x93, 0xe4, 0xd3, 0xd1, 0xb4, 0x5c, 0x8a, 0x1e, 0x40,
- 0x9e, 0x6a, 0xfd, 0x7e, 0x16, 0x0a, 0xc4, 0xcd, 0x95, 0x46, 0x90, 0x90, 0x36, 0x57, 0x1a, 0x98,
- 0x41, 0xa0, 0x75, 0x18, 0x62, 0xd5, 0x87, 0x6d, 0xc1, 0x7c, 0xff, 0x5b, 0x9a, 0xcd, 0x3f, 0x08,
- 0x08, 0xf6, 0xcb, 0xc6, 0x2e, 0x8e, 0xfc, 0x09, 0x8c, 0x45, 0xf6, 0x29, 0xfa, 0x18, 0xce, 0x6a,
- 0x86, 0xd2, 0xaa, 0x2b, 0x9a, 0xa2, 0x37, 0x89, 0x77, 0x39, 0x70, 0x29, 0xed, 0x0b, 0x63, 0x25,
- 0xc4, 0x27, 0x76, 0xb9, 0x7f, 0x9d, 0x1a, 0xa6, 0xe1, 0x08, 0xa2, 0xac, 0x00, 0x04, 0x73, 0x44,
- 0x15, 0x18, 0x62, 0x71, 0xe6, 0xd6, 0x93, 0x91, 0xfa, 0x08, 0xb3, 0x90, 0x85, 0x9f, 0x8d, 0xdd,
- 0x71, 0x74, 0x03, 0xc0, 0x26, 0x4d, 0x8b, 0x50, 0x9e, 0x0c, 0x72, 0xd1, 0x4b, 0xe5, 0x86, 0x4f,
- 0xc1, 0x21, 0x2e, 0xf9, 0x47, 0x12, 0x8c, 0xad, 0x11, 0xfa, 0xa9, 0x61, 0xed, 0x6d, 0xf0, 0xc7,
- 0x00, 0xa7, 0x90, 0x6c, 0x71, 0x24, 0xd9, 0xbe, 0xd1, 0x63, 0x65, 0x22, 0xd6, 0x65, 0xa5, 0x5c,
- 0xf9, 0x4b, 0x09, 0x66, 0x23, 0x9c, 0x77, 0x83, 0xad, 0xbb, 0x05, 0x43, 0xa6, 0x61, 0x51, 0xaf,
- 0x10, 0x0f, 0xa4, 0x90, 0xa5, 0xb1, 0x50, 0x29, 0x66, 0x30, 0xd8, 0x45, 0x43, 0x2b, 0x90, 0xa3,
- 0x86, 0x08, 0xd5, 0xc1, 0x30, 0x09, 0xb1, 0xea, 0x20, 0x30, 0x73, 0x9b, 0x06, 0xce, 0x51, 0x83,
- 0x2d, 0x44, 0x39, 0xc2, 0x15, 0x4e, 0x3e, 0x2f, 0x68, 0x06, 0x18, 0x0a, 0x3b, 0x96, 0xd1, 0x39,
- 0xf1, 0x1c, 0xfc, 0x85, 0xb8, 0x67, 0x19, 0x1d, 0xcc, 0xb1, 0xe4, 0xaf, 0x24, 0x98, 0x8a, 0x70,
- 0x9e, 0x42, 0xe2, 0x7f, 0x18, 0x4d, 0xfc, 0x57, 0x07, 0x99, 0x48, 0x46, 0xfa, 0xff, 0x2a, 0x17,
- 0x9b, 0x06, 0x9b, 0x30, 0xda, 0x81, 0x51, 0xd3, 0x68, 0x35, 0x9e, 0xc3, 0x75, 0xe0, 0x04, 0xab,
- 0x9b, 0x1b, 0x01, 0x16, 0x0e, 0x03, 0xa3, 0x03, 0x98, 0xd2, 0x95, 0x0e, 0xb1, 0x4d, 0xa5, 0x49,
- 0x1a, 0xcf, 0xe1, 0x80, 0xe4, 0x25, 0x7e, 0xdf, 0x10, 0x47, 0xc4, 0x49, 0x25, 0x68, 0x15, 0x8a,
- 0xaa, 0xc9, 0xfb, 0x38, 0xd1, 0xbb, 0xf4, 0xac, 0xa2, 0x6e, 0xd7, 0xe7, 0xe6, 0x73, 0xf1, 0x03,
- 0x7b, 0x18, 0xf2, 0x7f, 0xc6, 0xa3, 0x81, 0xc5, 0x1f, 0xba, 0x0f, 0x25, 0xfe, 0xac, 0xa6, 0x69,
- 0x68, 0xde, 0xcd, 0x00, 0x5b, 0xd9, 0x0d, 0x31, 0xf6, 0xec, 0xb0, 0x72, 0x3e, 0xe5, 0xd0, 0xd7,
- 0x23, 0x63, 0x5f, 0x18, 0xad, 0x41, 0xc1, 0xfc, 0x21, 0x1d, 0x0c, 0x2f, 0x72, 0xbc, 0x6d, 0xe1,
- 0x38, 0xf2, 0x5f, 0xe7, 0x63, 0xe6, 0xf2, 0x52, 0xf7, 0xe4, 0xb9, 0xad, 0xba, 0xdf, 0x31, 0x65,
- 0xae, 0xfc, 0x36, 0x14, 0x45, 0x85, 0x17, 0xc1, 0xfc, 0xf6, 0x20, 0xc1, 0x1c, 0xae, 0x62, 0xfe,
- 0x07, 0x8b, 0x37, 0xe8, 0x01, 0xa3, 0x8f, 0x60, 0x98, 0xb8, 0x2a, 0xdc, 0xda, 0x78, 0x6b, 0x10,
- 0x15, 0x41, 0x5e, 0x0d, 0x1a, 0x55, 0x31, 0x26, 0x50, 0xd1, 0x7b, 0xcc, 0x5f, 0x8c, 0x97, 0x7d,
- 0x04, 0xda, 0xe5, 0x02, 0x2f, 0x57, 0x17, 0xdc, 0x69, 0xfb, 0xc3, 0xcf, 0x0e, 0x2b, 0x10, 0xfc,
- 0xc4, 0x61, 0x09, 0xf9, 0x27, 0x12, 0x4c, 0x71, 0x0f, 0x35, 0x1d, 0x4b, 0xa5, 0xdd, 0x53, 0x2b,
- 0x4c, 0x8f, 0x22, 0x85, 0xe9, 0xad, 0x1e, 0x6e, 0x49, 0x58, 0x98, 0x59, 0x9c, 0xbe, 0x96, 0xe0,
- 0xa5, 0x04, 0xf7, 0x29, 0xe4, 0xc5, 0xad, 0x68, 0x5e, 0x7c, 0x63, 0xd0, 0x09, 0x65, 0xbd, 0x91,
- 0x18, 0x4b, 0x99, 0x0e, 0xdf, 0x29, 0x37, 0x00, 0x4c, 0x4b, 0xdd, 0x57, 0x35, 0xd2, 0x16, 0x97,
- 0xe0, 0xa5, 0xd0, 0xb3, 0x36, 0x9f, 0x82, 0x43, 0x5c, 0xc8, 0x86, 0x99, 0x16, 0xd9, 0x51, 0x1c,
- 0x8d, 0x2e, 0xb4, 0x5a, 0x8b, 0x8a, 0xa9, 0x6c, 0xab, 0x9a, 0x4a, 0x55, 0x71, 0x5c, 0x30, 0x52,
- 0xbf, 0xe3, 0x5e, 0x4e, 0xa7, 0x71, 0x3c, 0x3b, 0xac, 0x5c, 0x48, 0xbb, 0x1d, 0xf2, 0x58, 0xba,
- 0x38, 0x03, 0x1a, 0x75, 0xa1, 0x6c, 0x91, 0x4f, 0x1c, 0xd5, 0x22, 0xad, 0x25, 0xcb, 0x30, 0x23,
- 0x6a, 0xf3, 0x5c, 0xed, 0x1f, 0x1e, 0x1d, 0x56, 0xca, 0x38, 0x83, 0xa7, 0xb7, 0xe2, 0x4c, 0x78,
- 0xf4, 0x04, 0xa6, 0x15, 0xf7, 0x35, 0x60, 0x44, 0xab, 0xbb, 0x4b, 0x6e, 0x1f, 0x1d, 0x56, 0xa6,
- 0x17, 0x92, 0xe4, 0xde, 0x0a, 0xd3, 0x40, 0x51, 0x0d, 0x8a, 0xfb, 0xfc, 0xad, 0xa2, 0x5d, 0x1e,
- 0xe2, 0xf8, 0xac, 0x10, 0x14, 0xdd, 0xe7, 0x8b, 0x0c, 0x73, 0xf8, 0x5e, 0x83, 0xef, 0x3e, 0x8f,
- 0x8b, 0x7d, 0x50, 0xb2, 0x5e, 0x52, 0xec, 0x78, 0x7e, 0x62, 0x5c, 0x0a, 0xb2, 0xd6, 0x83, 0x80,
- 0x84, 0xc3, 0x7c, 0xe8, 0x31, 0x8c, 0xec, 0x8a, 0x53, 0x09, 0xbb, 0x5c, 0xec, 0xab, 0x08, 0x47,
- 0x4e, 0x31, 0xea, 0x53, 0x42, 0xc5, 0x88, 0x37, 0x6c, 0xe3, 0x00, 0x11, 0x5d, 0x81, 0x22, 0xff,
- 0xb1, 0xbc, 0xc4, 0x8f, 0xe3, 0x4a, 0x41, 0x6e, 0x7b, 0xe0, 0x0e, 0x63, 0x8f, 0xee, 0xb1, 0x2e,
- 0x6f, 0x2c, 0xf2, 0x63, 0xe1, 0x18, 0xeb, 0xf2, 0xc6, 0x22, 0xf6, 0xe8, 0xe8, 0x63, 0x28, 0xda,
- 0x64, 0x45, 0xd5, 0x9d, 0x83, 0x32, 0xf4, 0x75, 0xa9, 0xdc, 0xb8, 0xcb, 0xb9, 0x63, 0x07, 0x63,
- 0x81, 0x06, 0x41, 0xc7, 0x1e, 0x2c, 0xda, 0x85, 0x11, 0xcb, 0xd1, 0x17, 0xec, 0x2d, 0x9b, 0x58,
- 0xe5, 0x51, 0xae, 0xa3, 0x57, 0x3a, 0xc7, 0x1e, 0x7f, 0x5c, 0x8b, 0xef, 0x21, 0x9f, 0x03, 0x07,
- 0xe0, 0xe8, 0xef, 0x24, 0x40, 0xb6, 0x63, 0x9a, 0x1a, 0xe9, 0x10, 0x9d, 0x2a, 0x1a, 0x3f, 0x8b,
- 0xb3, 0xcb, 0x67, 0xb9, 0xce, 0x3f, 0xea, 0x35, 0xaf, 0x84, 0x60, 0x5c, 0xb9, 0x7f, 0xe8, 0x9d,
- 0x64, 0xc5, 0x29, 0x7a, 0x99, 0x6b, 0x77, 0x6c, 0xfe, 0x77, 0x79, 0xac, 0x2f, 0xd7, 0xa6, 0x9f,
- 0x39, 0x06, 0xae, 0x15, 0x74, 0xec, 0xc1, 0xa2, 0x47, 0x30, 0x63, 0x11, 0xa5, 0xb5, 0xae, 0x6b,
- 0x5d, 0x6c, 0x18, 0xf4, 0x9e, 0xaa, 0x11, 0xbb, 0x6b, 0x53, 0xd2, 0x29, 0x8f, 0xf3, 0x65, 0xf7,
- 0xdf, 0x7e, 0xe0, 0x54, 0x2e, 0x9c, 0x21, 0x8d, 0x3a, 0x50, 0xf1, 0x52, 0x06, 0xdb, 0x4f, 0x7e,
- 0xce, 0xba, 0x6b, 0x37, 0x15, 0xcd, 0xbd, 0x07, 0x98, 0xe0, 0x0a, 0x5e, 0x3b, 0x3a, 0xac, 0x54,
- 0x96, 0x8e, 0x67, 0xc5, 0xbd, 0xb0, 0xd0, 0x07, 0x50, 0x56, 0xb2, 0xf4, 0x4c, 0x72, 0x3d, 0xaf,
- 0xb0, 0x3c, 0x94, 0xa9, 0x20, 0x53, 0x1a, 0x51, 0x98, 0x54, 0xa2, 0x8f, 0x8e, 0xed, 0xf2, 0x54,
- 0x5f, 0x07, 0x91, 0xb1, 0xb7, 0xca, 0xc1, 0x61, 0x44, 0x8c, 0x60, 0xe3, 0x84, 0x06, 0xf4, 0x17,
- 0x80, 0x94, 0xf8, 0x3b, 0x69, 0xbb, 0x8c, 0xfa, 0x2a, 0x3f, 0x89, 0x07, 0xd6, 0x41, 0xd8, 0x25,
- 0x48, 0x36, 0x4e, 0xd1, 0xc3, 0x1f, 0x6f, 0x88, 0xa3, 0xfc, 0xd3, 0x79, 0x00, 0x3b, 0xd8, 0xe3,
- 0x8d, 0xc0, 0xb4, 0xe7, 0xf6, 0x78, 0x23, 0x04, 0x79, 0xfc, 0xe1, 0xe1, 0x2f, 0x72, 0x30, 0x1d,
- 0x30, 0xf7, 0xfd, 0x78, 0x23, 0x45, 0xe4, 0x77, 0x8f, 0x60, 0x7b, 0x3f, 0x82, 0xfd, 0x52, 0x82,
- 0xf1, 0xc0, 0x75, 0xbf, 0x79, 0x0f, 0x2a, 0x02, 0xdb, 0x32, 0x5a, 0xbc, 0xff, 0xce, 0x85, 0x27,
- 0xf0, 0x5b, 0x7f, 0xab, 0xff, 0xc3, 0x5f, 0xae, 0xca, 0x5f, 0xe7, 0x61, 0x32, 0xbe, 0x1b, 0x23,
- 0x97, 0xbf, 0x52, 0xcf, 0xcb, 0xdf, 0x0d, 0x38, 0xb7, 0xe3, 0x68, 0x5a, 0x97, 0xbb, 0x21, 0x74,
- 0x03, 0xec, 0x5e, 0xde, 0xbc, 0x22, 0x24, 0xcf, 0xdd, 0x4b, 0xe1, 0xc1, 0xa9, 0x92, 0x19, 0x17,
- 0xd9, 0xf9, 0x13, 0x5d, 0x64, 0x27, 0xee, 0x55, 0x0b, 0x03, 0xdc, 0xab, 0xa6, 0x5e, 0x4a, 0x0f,
- 0x9d, 0xe0, 0x52, 0xfa, 0x24, 0xb7, 0xc8, 0x29, 0x49, 0xac, 0xe7, 0xa3, 0xc6, 0x57, 0x60, 0x4e,
- 0x88, 0x51, 0x7e, 0xc1, 0xab, 0x53, 0xcb, 0xd0, 0x34, 0x62, 0x2d, 0x39, 0x9d, 0x4e, 0x57, 0x7e,
- 0x17, 0xc6, 0xa3, 0x4f, 0x17, 0xdc, 0x95, 0x76, 0x5f, 0x4f, 0x88, 0x2b, 0xb4, 0xd0, 0x4a, 0xbb,
- 0xe3, 0xd8, 0xe7, 0x90, 0xff, 0x46, 0x82, 0x99, 0xf4, 0x27, 0x8a, 0x48, 0x83, 0xf1, 0x8e, 0x72,
- 0x10, 0x7e, 0x36, 0x2a, 0x9d, 0xf0, 0x70, 0x83, 0xdf, 0x59, 0xaf, 0x46, 0xb0, 0x70, 0x0c, 0x5b,
- 0xfe, 0x5e, 0x82, 0xd9, 0x8c, 0xdb, 0xe2, 0xd3, 0xb5, 0x04, 0x7d, 0x08, 0xa5, 0x8e, 0x72, 0xd0,
- 0x70, 0xac, 0x36, 0x39, 0xf1, 0x71, 0x0e, 0xcf, 0x18, 0xab, 0x02, 0x05, 0xfb, 0x78, 0xf2, 0xe7,
- 0x12, 0x94, 0xb3, 0x1a, 0x6b, 0x74, 0x33, 0x72, 0xaf, 0xfd, 0x6a, 0xec, 0x5e, 0x7b, 0x2a, 0x21,
- 0xf7, 0x82, 0x6e, 0xb5, 0xff, 0x4b, 0x82, 0x99, 0xf4, 0x0f, 0x0c, 0xf4, 0x66, 0xc4, 0xc2, 0x4a,
- 0xcc, 0xc2, 0x89, 0x98, 0x94, 0xb0, 0xef, 0x23, 0x18, 0x17, 0x9f, 0x21, 0x02, 0x46, 0x78, 0x55,
- 0x4e, 0xcb, 0x95, 0x02, 0xc2, 0x6b, 0xbb, 0xf9, 0x7a, 0x45, 0xc7, 0x70, 0x0c, 0x4d, 0xfe, 0xdb,
- 0x1c, 0x0c, 0x35, 0x9a, 0x8a, 0x46, 0x4e, 0xa1, 0xcd, 0x7a, 0x3f, 0xd2, 0x66, 0xf5, 0xfa, 0x17,
- 0x0f, 0x6e, 0x55, 0x66, 0x87, 0x85, 0x63, 0x1d, 0xd6, 0xeb, 0x7d, 0xa1, 0x1d, 0xdf, 0x5c, 0xfd,
- 0x01, 0x8c, 0xf8, 0x4a, 0x07, 0xcb, 0xf9, 0xf2, 0xbf, 0xe7, 0x60, 0x34, 0xa4, 0x62, 0xc0, 0x8a,
- 0xb1, 0x13, 0xa9, 0xb4, 0xfd, 0xfc, 0x63, 0x5d, 0x48, 0x57, 0xd5, 0xab, 0xad, 0xee, 0x13, 0xc5,
- 0xe0, 0x51, 0x5a, 0xb2, 0xe4, 0xbe, 0x0b, 0xe3, 0x94, 0xff, 0xe3, 0x99, 0x7f, 0x08, 0x9a, 0xe7,
- 0xb1, 0xe8, 0x3f, 0x6c, 0xdd, 0x8c, 0x50, 0x71, 0x8c, 0x7b, 0xee, 0x0e, 0x8c, 0x45, 0x94, 0x0d,
- 0xf4, 0xc2, 0xf0, 0x7f, 0x25, 0x78, 0xb5, 0xe7, 0x27, 0x2a, 0xaa, 0x47, 0x36, 0x49, 0x35, 0xb6,
- 0x49, 0xe6, 0xb3, 0x01, 0x5e, 0xdc, 0x4b, 0x95, 0xfa, 0xb5, 0xa7, 0xdf, 0xcd, 0x9f, 0xf9, 0xe6,
- 0xbb, 0xf9, 0x33, 0xdf, 0x7e, 0x37, 0x7f, 0xe6, 0xaf, 0x8e, 0xe6, 0xa5, 0xa7, 0x47, 0xf3, 0xd2,
- 0x37, 0x47, 0xf3, 0xd2, 0xb7, 0x47, 0xf3, 0xd2, 0xcf, 0x8e, 0xe6, 0xa5, 0x7f, 0xfc, 0x7e, 0xfe,
- 0xcc, 0x87, 0x45, 0x01, 0xf7, 0xeb, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1, 0xb3, 0xc8, 0xe2, 0x54,
- 0x3c, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/vendor/k8s.io/api/extensions/v1beta1/generated.proto
deleted file mode 100644
index 8308786d1..000000000
--- a/vendor/k8s.io/api/extensions/v1beta1/generated.proto
+++ /dev/null
@@ -1,1117 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.extensions.v1beta1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/api/policy/v1beta1/generated.proto";
-import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// AllowedFlexVolume represents a single Flexvolume that is allowed to be used.
-message AllowedFlexVolume {
- // Driver is the name of the Flexvolume driver.
- optional string driver = 1;
-}
-
-// defines the host volume conditions that will be enabled by a policy
-// for pods to use. It requires the path prefix to be defined.
-message AllowedHostPath {
- // is the path prefix that the host volume must match.
- // It does not support `*`.
- // Trailing slashes are trimmed when validating the path prefix with a host path.
- //
- // Examples:
- // `/foo` would allow `/foo`, `/foo/` and `/foo/bar`
- // `/foo` would not allow `/food` or `/etc/foo`
- optional string pathPrefix = 1;
-}
-
-message CustomMetricCurrentStatus {
- // Custom Metric name.
- optional string name = 1;
-
- // Custom Metric value (average).
- optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2;
-}
-
-message CustomMetricCurrentStatusList {
- repeated CustomMetricCurrentStatus items = 1;
-}
-
-// Alpha-level support for Custom Metrics in HPA (as annotations).
-message CustomMetricTarget {
- // Custom Metric name.
- optional string name = 1;
-
- // Custom Metric value (average).
- optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2;
-}
-
-message CustomMetricTargetList {
- repeated CustomMetricTarget items = 1;
-}
-
-// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for
-// more information.
-// DaemonSet represents the configuration of a daemon set.
-message DaemonSet {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // The desired behavior of this daemon set.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional DaemonSetSpec spec = 2;
-
- // The current status of this daemon set. This data may be
- // out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional DaemonSetStatus status = 3;
-}
-
-// DaemonSetCondition describes the state of a DaemonSet at a certain point.
-message DaemonSetCondition {
- // Type of DaemonSet condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // Last time the condition transitioned from one status to another.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // The reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- // +optional
- optional string message = 5;
-}
-
-// DaemonSetList is a collection of daemon sets.
-message DaemonSetList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // A list of daemon sets.
- repeated DaemonSet items = 2;
-}
-
-// DaemonSetSpec is the specification of a daemon set.
-message DaemonSetSpec {
- // A label query over pods that are managed by the daemon set.
- // Must match in order to be controlled.
- // If empty, defaulted to labels on Pod template.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
-
- // An object that describes the pod that will be created.
- // The DaemonSet will create exactly one copy of this pod on every node
- // that matches the template's node selector (or on every node if no node
- // selector is specified).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- optional k8s.io.api.core.v1.PodTemplateSpec template = 2;
-
- // An update strategy to replace existing DaemonSet pods with new pods.
- // +optional
- optional DaemonSetUpdateStrategy updateStrategy = 3;
-
- // The minimum number of seconds for which a newly created DaemonSet pod should
- // be ready without any of its container crashing, for it to be considered
- // available. Defaults to 0 (pod will be considered available as soon as it
- // is ready).
- // +optional
- optional int32 minReadySeconds = 4;
-
- // DEPRECATED.
- // A sequence number representing a specific generation of the template.
- // Populated by the system. It can be set only during the creation.
- // +optional
- optional int64 templateGeneration = 5;
-
- // The number of old history to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 10.
- // +optional
- optional int32 revisionHistoryLimit = 6;
-}
-
-// DaemonSetStatus represents the current status of a daemon set.
-message DaemonSetStatus {
- // The number of nodes that are running at least 1
- // daemon pod and are supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- optional int32 currentNumberScheduled = 1;
-
- // The number of nodes that are running the daemon pod, but are
- // not supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- optional int32 numberMisscheduled = 2;
-
- // The total number of nodes that should be running the daemon
- // pod (including nodes correctly running the daemon pod).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- optional int32 desiredNumberScheduled = 3;
-
- // The number of nodes that should be running the daemon pod and have one
- // or more of the daemon pod running and ready.
- optional int32 numberReady = 4;
-
- // The most recent generation observed by the daemon set controller.
- // +optional
- optional int64 observedGeneration = 5;
-
- // The total number of nodes that are running updated daemon pod
- // +optional
- optional int32 updatedNumberScheduled = 6;
-
- // The number of nodes that should be running the
- // daemon pod and have one or more of the daemon pod running and
- // available (ready for at least spec.minReadySeconds)
- // +optional
- optional int32 numberAvailable = 7;
-
- // The number of nodes that should be running the
- // daemon pod and have none of the daemon pod running and available
- // (ready for at least spec.minReadySeconds)
- // +optional
- optional int32 numberUnavailable = 8;
-
- // Count of hash collisions for the DaemonSet. The DaemonSet controller
- // uses this field as a collision avoidance mechanism when it needs to
- // create the name for the newest ControllerRevision.
- // +optional
- optional int32 collisionCount = 9;
-
- // Represents the latest available observations of a DaemonSet's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated DaemonSetCondition conditions = 10;
-}
-
-message DaemonSetUpdateStrategy {
- // Type of daemon set update. Can be "RollingUpdate" or "OnDelete".
- // Default is OnDelete.
- // +optional
- optional string type = 1;
-
- // Rolling update config params. Present only if type = "RollingUpdate".
- // ---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be. Same as Deployment `strategy.rollingUpdate`.
- // See https://github.com/kubernetes/kubernetes/issues/35345
- // +optional
- optional RollingUpdateDaemonSet rollingUpdate = 2;
-}
-
-// DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for
-// more information.
-// Deployment enables declarative updates for Pods and ReplicaSets.
-message Deployment {
- // Standard object metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior of the Deployment.
- // +optional
- optional DeploymentSpec spec = 2;
-
- // Most recently observed status of the Deployment.
- // +optional
- optional DeploymentStatus status = 3;
-}
-
-// DeploymentCondition describes the state of a deployment at a certain point.
-message DeploymentCondition {
- // Type of deployment condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // The last time this condition was updated.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
-
- // Last time the condition transitioned from one status to another.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
-
- // The reason for the condition's last transition.
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- optional string message = 5;
-}
-
-// DeploymentList is a list of Deployments.
-message DeploymentList {
- // Standard list metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of Deployments.
- repeated Deployment items = 2;
-}
-
-// DEPRECATED.
-// DeploymentRollback stores the information required to rollback a deployment.
-message DeploymentRollback {
- // Required: This must match the Name of a deployment.
- optional string name = 1;
-
- // The annotations to be updated to a deployment
- // +optional
- map<string, string> updatedAnnotations = 2;
-
- // The config of this deployment rollback.
- optional RollbackConfig rollbackTo = 3;
-}
-
-// DeploymentSpec is the specification of the desired behavior of the Deployment.
-message DeploymentSpec {
- // Number of desired pods. This is a pointer to distinguish between explicit
- // zero and not specified. Defaults to 1.
- // +optional
- optional int32 replicas = 1;
-
- // Label selector for pods. Existing ReplicaSets whose pods are
- // selected by this will be the ones affected by this deployment.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // Template describes the pods that will be created.
- optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
-
- // The deployment strategy to use to replace existing pods with new ones.
- // +optional
- // +patchStrategy=retainKeys
- optional DeploymentStrategy strategy = 4;
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- optional int32 minReadySeconds = 5;
-
- // The number of old ReplicaSets to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // +optional
- optional int32 revisionHistoryLimit = 6;
-
- // Indicates that the deployment is paused and will not be processed by the
- // deployment controller.
- // +optional
- optional bool paused = 7;
-
- // DEPRECATED.
- // The config this deployment is rolling back to. Will be cleared after rollback is done.
- // +optional
- optional RollbackConfig rollbackTo = 8;
-
- // The maximum time in seconds for a deployment to make progress before it
- // is considered to be failed. The deployment controller will continue to
- // process failed deployments and a condition with a ProgressDeadlineExceeded
- // reason will be surfaced in the deployment status. Note that progress will
- // not be estimated during the time a deployment is paused. This is not set
- // by default.
- // +optional
- optional int32 progressDeadlineSeconds = 9;
-}
-
-// DeploymentStatus is the most recently observed status of the Deployment.
-message DeploymentStatus {
- // The generation observed by the deployment controller.
- // +optional
- optional int64 observedGeneration = 1;
-
- // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
- // +optional
- optional int32 replicas = 2;
-
- // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
- // +optional
- optional int32 updatedReplicas = 3;
-
- // Total number of ready pods targeted by this deployment.
- // +optional
- optional int32 readyReplicas = 7;
-
- // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
- // +optional
- optional int32 availableReplicas = 4;
-
- // Total number of unavailable pods targeted by this deployment. This is the total number of
- // pods that are still required for the deployment to have 100% available capacity. They may
- // either be pods that are running but not yet available or pods that still have not been created.
- // +optional
- optional int32 unavailableReplicas = 5;
-
- // Represents the latest available observations of a deployment's current state.
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated DeploymentCondition conditions = 6;
-
- // Count of hash collisions for the Deployment. The Deployment controller uses this
- // field as a collision avoidance mechanism when it needs to create the name for the
- // newest ReplicaSet.
- // +optional
- optional int32 collisionCount = 8;
-}
-
-// DeploymentStrategy describes how to replace existing pods with new ones.
-message DeploymentStrategy {
- // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
- // +optional
- optional string type = 1;
-
- // Rolling update config params. Present only if DeploymentStrategyType =
- // RollingUpdate.
- // ---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be.
- // +optional
- optional RollingUpdateDeployment rollingUpdate = 2;
-}
-
-// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
-message FSGroupStrategyOptions {
- // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
- // +optional
- optional string rule = 1;
-
- // Ranges are the allowed ranges of fs groups. If you would like to force a single
- // fs group then supply a single range with the same start and end.
- // +optional
- repeated IDRange ranges = 2;
-}
-
-// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
-// the path are forwarded to the backend.
-message HTTPIngressPath {
- // Path is an extended POSIX regex as defined by IEEE Std 1003.1,
- // (i.e this follows the egrep/unix syntax, not the perl syntax)
- // matched against the path of an incoming request. Currently it can
- // contain characters disallowed from the conventional "path"
- // part of a URL as defined by RFC 3986. Paths must begin with
- // a '/'. If unspecified, the path defaults to a catch all sending
- // traffic to the backend.
- // +optional
- optional string path = 1;
-
- // Backend defines the referenced service endpoint to which the traffic
- // will be forwarded to.
- optional IngressBackend backend = 2;
-}
-
-// HTTPIngressRuleValue is a list of http selectors pointing to backends.
-// In the example: http://<host>/<path>?<searchpart> -> backend where
-// where parts of the url correspond to RFC 3986, this resource will be used
-// to match against everything after the last '/' and before the first '?'
-// or '#'.
-message HTTPIngressRuleValue {
- // A collection of paths that map requests to backends.
- repeated HTTPIngressPath paths = 1;
-}
-
-// Host Port Range defines a range of host ports that will be enabled by a policy
-// for pods to use. It requires both the start and end to be defined.
-message HostPortRange {
- // min is the start of the range, inclusive.
- optional int32 min = 1;
-
- // max is the end of the range, inclusive.
- optional int32 max = 2;
-}
-
-// ID Range provides a min/max of an allowed range of IDs.
-message IDRange {
- // Min is the start of the range, inclusive.
- optional int64 min = 1;
-
- // Max is the end of the range, inclusive.
- optional int64 max = 2;
-}
-
-// DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock.
-// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods
-// matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should
-// not be included within this rule.
-message IPBlock {
- // CIDR is a string representing the IP Block
- // Valid examples are "192.168.1.1/24"
- optional string cidr = 1;
-
- // Except is a slice of CIDRs that should not be included within an IP Block
- // Valid examples are "192.168.1.1/24"
- // Except values will be rejected if they are outside the CIDR range
- // +optional
- repeated string except = 2;
-}
-
-// Ingress is a collection of rules that allow inbound connections to reach the
-// endpoints defined by a backend. An Ingress can be configured to give services
-// externally-reachable urls, load balance traffic, terminate SSL, offer name
-// based virtual hosting etc.
-message Ingress {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec is the desired state of the Ingress.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional IngressSpec spec = 2;
-
- // Status is the current state of the Ingress.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional IngressStatus status = 3;
-}
-
-// IngressBackend describes all endpoints for a given service and port.
-message IngressBackend {
- // Specifies the name of the referenced service.
- optional string serviceName = 1;
-
- // Specifies the port of the referenced service.
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2;
-}
-
-// IngressList is a collection of Ingress.
-message IngressList {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of Ingress.
- repeated Ingress items = 2;
-}
-
-// IngressRule represents the rules mapping the paths under a specified host to
-// the related backend services. Incoming requests are first evaluated for a host
-// match, then routed to the backend associated with the matching IngressRuleValue.
-message IngressRule {
- // Host is the fully qualified domain name of a network host, as defined
- // by RFC 3986. Note the following deviations from the "host" part of the
- // URI as defined in the RFC:
- // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
- // IP in the Spec of the parent Ingress.
- // 2. The `:` delimiter is not respected because ports are not allowed.
- // Currently the port of an Ingress is implicitly :80 for http and
- // :443 for https.
- // Both these may change in the future.
- // Incoming requests are matched against the host before the IngressRuleValue.
- // If the host is unspecified, the Ingress routes all traffic based on the
- // specified IngressRuleValue.
- // +optional
- optional string host = 1;
-
- // IngressRuleValue represents a rule to route requests for this IngressRule.
- // If unspecified, the rule defaults to a http catch-all. Whether that sends
- // just traffic matching the host to the default backend or all traffic to the
- // default backend, is left to the controller fulfilling the Ingress. Http is
- // currently the only supported IngressRuleValue.
- // +optional
- optional IngressRuleValue ingressRuleValue = 2;
-}
-
-// IngressRuleValue represents a rule to apply against incoming requests. If the
-// rule is satisfied, the request is routed to the specified backend. Currently
-// mixing different types of rules in a single Ingress is disallowed, so exactly
-// one of the following must be set.
-message IngressRuleValue {
- // +optional
- optional HTTPIngressRuleValue http = 1;
-}
-
-// IngressSpec describes the Ingress the user wishes to exist.
-message IngressSpec {
- // A default backend capable of servicing requests that don't match any
- // rule. At least one of 'backend' or 'rules' must be specified. This field
- // is optional to allow the loadbalancer controller or defaulting logic to
- // specify a global default.
- // +optional
- optional IngressBackend backend = 1;
-
- // TLS configuration. Currently the Ingress only supports a single TLS
- // port, 443. If multiple members of this list specify different hosts, they
- // will be multiplexed on the same port according to the hostname specified
- // through the SNI TLS extension, if the ingress controller fulfilling the
- // ingress supports SNI.
- // +optional
- repeated IngressTLS tls = 2;
-
- // A list of host rules used to configure the Ingress. If unspecified, or
- // no rule matches, all traffic is sent to the default backend.
- // +optional
- repeated IngressRule rules = 3;
-}
-
-// IngressStatus describe the current state of the Ingress.
-message IngressStatus {
- // LoadBalancer contains the current status of the load-balancer.
- // +optional
- optional k8s.io.api.core.v1.LoadBalancerStatus loadBalancer = 1;
-}
-
-// IngressTLS describes the transport layer security associated with an Ingress.
-message IngressTLS {
- // Hosts are a list of hosts included in the TLS certificate. The values in
- // this list must match the name/s used in the tlsSecret. Defaults to the
- // wildcard host setting for the loadbalancer controller fulfilling this
- // Ingress, if left unspecified.
- // +optional
- repeated string hosts = 1;
-
- // SecretName is the name of the secret used to terminate SSL traffic on 443.
- // Field is left optional to allow SSL routing based on SNI hostname alone.
- // If the SNI host in a listener conflicts with the "Host" header field used
- // by an IngressRule, the SNI host is used for termination and value of the
- // Host header is used for routing.
- // +optional
- optional string secretName = 2;
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy.
-// NetworkPolicy describes what network traffic is allowed for a set of Pods
-message NetworkPolicy {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior for this NetworkPolicy.
- // +optional
- optional NetworkPolicySpec spec = 2;
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule.
-// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
-// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
-// This type is beta-level in 1.8
-message NetworkPolicyEgressRule {
- // List of destination ports for outgoing traffic.
- // Each item in this list is combined using a logical OR. If this field is
- // empty or missing, this rule matches all ports (traffic not restricted by port).
- // If this field is present and contains at least one item, then this rule allows
- // traffic only if the traffic matches at least one port in the list.
- // +optional
- repeated NetworkPolicyPort ports = 1;
-
- // List of destinations for outgoing traffic of pods selected for this rule.
- // Items in this list are combined using a logical OR operation. If this field is
- // empty or missing, this rule matches all destinations (traffic not restricted by
- // destination). If this field is present and contains at least one item, this rule
- // allows traffic only if the traffic matches at least one item in the to list.
- // +optional
- repeated NetworkPolicyPeer to = 2;
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule.
-// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
-message NetworkPolicyIngressRule {
- // List of ports which should be made accessible on the pods selected for this rule.
- // Each item in this list is combined using a logical OR.
- // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
- // If this field is present and contains at least one item, then this rule allows traffic
- // only if the traffic matches at least one port in the list.
- // +optional
- repeated NetworkPolicyPort ports = 1;
-
- // List of sources which should be able to access the pods selected for this rule.
- // Items in this list are combined using a logical OR operation.
- // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
- // If this field is present and contains at least on item, this rule allows traffic only if the
- // traffic matches at least one item in the from list.
- // +optional
- repeated NetworkPolicyPeer from = 2;
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList.
-// Network Policy List is a list of NetworkPolicy objects.
-message NetworkPolicyList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of schema objects.
- repeated NetworkPolicy items = 2;
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.
-message NetworkPolicyPeer {
- // This is a label selector which selects Pods in this namespace.
- // This field follows standard label selector semantics.
- // If present but empty, this selector selects all pods in this namespace.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
-
- // Selects Namespaces using cluster scoped-labels. This
- // matches all pods in all namespaces selected by this label selector.
- // This field follows standard label selector semantics.
- // If present but empty, this selector selects all namespaces.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2;
-
- // IPBlock defines policy on a particular IPBlock
- // +optional
- optional IPBlock ipBlock = 3;
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.
-message NetworkPolicyPort {
- // Optional. The protocol (TCP or UDP) which traffic must match.
- // If not specified, this field defaults to TCP.
- // +optional
- optional string protocol = 1;
-
- // If specified, the port on the given protocol. This can
- // either be a numerical or named port on a pod. If this field is not provided,
- // this matches all port names and numbers.
- // If present, only traffic on the specified protocol AND port
- // will be matched.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.
-message NetworkPolicySpec {
- // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules
- // is applied to any pods selected by this field. Multiple network policies can select the
- // same set of pods. In this case, the ingress rules for each are combined additively.
- // This field is NOT optional and follows standard label selector semantics.
- // An empty podSelector matches all pods in this namespace.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
-
- // List of ingress rules to be applied to the selected pods.
- // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
- // OR if the traffic source is the pod's local node,
- // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy
- // objects whose podSelector matches the pod.
- // If this field is empty then this NetworkPolicy does not allow any traffic
- // (and serves solely to ensure that the pods it selects are isolated by default).
- // +optional
- repeated NetworkPolicyIngressRule ingress = 2;
-
- // List of egress rules to be applied to the selected pods. Outgoing traffic is
- // allowed if there are no NetworkPolicies selecting the pod (and cluster policy
- // otherwise allows the traffic), OR if the traffic matches at least one egress rule
- // across all of the NetworkPolicy objects whose podSelector matches the pod. If
- // this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
- // solely to ensure that the pods it selects are isolated by default).
- // This field is beta-level in 1.8
- // +optional
- repeated NetworkPolicyEgressRule egress = 3;
-
- // List of rule types that the NetworkPolicy relates to.
- // Valid options are Ingress, Egress, or Ingress,Egress.
- // If this field is not specified, it will default based on the existence of Ingress or Egress rules;
- // policies that contain an Egress section are assumed to affect Egress, and all policies
- // (whether or not they contain an Ingress section) are assumed to affect Ingress.
- // If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
- // Likewise, if you want to write a policy that specifies that no egress is allowed,
- // you must specify a policyTypes value that include "Egress" (since such a policy would not include
- // an Egress section and would otherwise default to just [ "Ingress" ]).
- // This field is beta-level in 1.8
- // +optional
- repeated string policyTypes = 4;
-}
-
-// Pod Security Policy governs the ability to make requests that affect the Security Context
-// that will be applied to a pod and container.
-message PodSecurityPolicy {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // spec defines the policy enforced.
- // +optional
- optional PodSecurityPolicySpec spec = 2;
-}
-
-// Pod Security Policy List is a list of PodSecurityPolicy objects.
-message PodSecurityPolicyList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of schema objects.
- repeated PodSecurityPolicy items = 2;
-}
-
-// Pod Security Policy Spec defines the policy enforced.
-message PodSecurityPolicySpec {
- // privileged determines if a pod can request to be run as privileged.
- // +optional
- optional bool privileged = 1;
-
- // DefaultAddCapabilities is the default set of capabilities that will be added to the container
- // unless the pod spec specifically drops the capability. You may not list a capability in both
- // DefaultAddCapabilities and RequiredDropCapabilities. Capabilities added here are implicitly
- // allowed, and need not be included in the AllowedCapabilities list.
- // +optional
- repeated string defaultAddCapabilities = 2;
-
- // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
- // are required to be dropped and cannot be added.
- // +optional
- repeated string requiredDropCapabilities = 3;
-
- // AllowedCapabilities is a list of capabilities that can be requested to add to the container.
- // Capabilities in this field may be added at the pod author's discretion.
- // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
- // +optional
- repeated string allowedCapabilities = 4;
-
- // volumes is a white list of allowed volume plugins. Empty indicates that all plugins
- // may be used.
- // +optional
- repeated string volumes = 5;
-
- // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
- // +optional
- optional bool hostNetwork = 6;
-
- // hostPorts determines which host port ranges are allowed to be exposed.
- // +optional
- repeated HostPortRange hostPorts = 7;
-
- // hostPID determines if the policy allows the use of HostPID in the pod spec.
- // +optional
- optional bool hostPID = 8;
-
- // hostIPC determines if the policy allows the use of HostIPC in the pod spec.
- // +optional
- optional bool hostIPC = 9;
-
- // seLinux is the strategy that will dictate the allowable labels that may be set.
- optional SELinuxStrategyOptions seLinux = 10;
-
- // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
- optional RunAsUserStrategyOptions runAsUser = 11;
-
- // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
- optional SupplementalGroupsStrategyOptions supplementalGroups = 12;
-
- // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
- optional FSGroupStrategyOptions fsGroup = 13;
-
- // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
- // system. If the container specifically requests to run with a non-read only root file system
- // the PSP should deny the pod.
- // If set to false the container may run with a read only root file system if it wishes but it
- // will not be forced to.
- // +optional
- optional bool readOnlyRootFilesystem = 14;
-
- // DefaultAllowPrivilegeEscalation controls the default setting for whether a
- // process can gain more privileges than its parent process.
- // +optional
- optional bool defaultAllowPrivilegeEscalation = 15;
-
- // AllowPrivilegeEscalation determines if a pod can request to allow
- // privilege escalation. If unspecified, defaults to true.
- // +optional
- optional bool allowPrivilegeEscalation = 16;
-
- // is a white list of allowed host paths. Empty indicates that all host paths may be used.
- // +optional
- repeated AllowedHostPath allowedHostPaths = 17;
-
- // AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all
- // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes
- // is allowed in the "Volumes" field.
- // +optional
- repeated AllowedFlexVolume allowedFlexVolumes = 18;
-}
-
-// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for
-// more information.
-// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
-message ReplicaSet {
- // If the Labels of a ReplicaSet are empty, they are defaulted to
- // be the same as the Pod(s) that the ReplicaSet manages.
- // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec defines the specification of the desired behavior of the ReplicaSet.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional ReplicaSetSpec spec = 2;
-
- // Status is the most recently observed status of the ReplicaSet.
- // This data may be out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- optional ReplicaSetStatus status = 3;
-}
-
-// ReplicaSetCondition describes the state of a replica set at a certain point.
-message ReplicaSetCondition {
- // Type of replica set condition.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // The last time the condition transitioned from one status to another.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
-
- // The reason for the condition's last transition.
- // +optional
- optional string reason = 4;
-
- // A human readable message indicating details about the transition.
- // +optional
- optional string message = 5;
-}
-
-// ReplicaSetList is a collection of ReplicaSets.
-message ReplicaSetList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // List of ReplicaSets.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
- repeated ReplicaSet items = 2;
-}
-
-// ReplicaSetSpec is the specification of a ReplicaSet.
-message ReplicaSetSpec {
- // Replicas is the number of desired replicas.
- // This is a pointer to distinguish between explicit zero and unspecified.
- // Defaults to 1.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- // +optional
- optional int32 replicas = 1;
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- optional int32 minReadySeconds = 4;
-
- // Selector is a label query over pods that should match the replica count.
- // If the selector is empty, it is defaulted to the labels present on the pod template.
- // Label keys and values that must match in order to be controlled by this replica set.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // Template is the object that describes the pod that will be created if
- // insufficient replicas are detected.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- // +optional
- optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
-}
-
-// ReplicaSetStatus represents the current status of a ReplicaSet.
-message ReplicaSetStatus {
- // Replicas is the most recently oberved number of replicas.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- optional int32 replicas = 1;
-
- // The number of pods that have labels matching the labels of the pod template of the replicaset.
- // +optional
- optional int32 fullyLabeledReplicas = 2;
-
- // The number of ready replicas for this replica set.
- // +optional
- optional int32 readyReplicas = 4;
-
- // The number of available replicas (ready for at least minReadySeconds) for this replica set.
- // +optional
- optional int32 availableReplicas = 5;
-
- // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
- // +optional
- optional int64 observedGeneration = 3;
-
- // Represents the latest available observations of a replica set's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- repeated ReplicaSetCondition conditions = 6;
-}
-
-// Dummy definition
-message ReplicationControllerDummy {
-}
-
-// DEPRECATED.
-message RollbackConfig {
- // The revision to rollback to. If set to 0, rollback to the last revision.
- // +optional
- optional int64 revision = 1;
-}
-
-// Spec to control the desired behavior of daemon set rolling update.
-message RollingUpdateDaemonSet {
- // The maximum number of DaemonSet pods that can be unavailable during the
- // update. Value can be an absolute number (ex: 5) or a percentage of total
- // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
- // number is calculated from percentage by rounding up.
- // This cannot be 0.
- // Default value is 1.
- // Example: when this is set to 30%, at most 30% of the total number of nodes
- // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
- // can have their pods stopped for an update at any given
- // time. The update starts by stopping at most 30% of those DaemonSet pods
- // and then brings up new DaemonSet pods in their place. Once the new pods
- // are available, it then proceeds onto other DaemonSet pods, thus ensuring
- // that at least 70% of original number of DaemonSet pods are available at
- // all times during the update.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
-}
-
-// Spec to control the desired behavior of rolling update.
-message RollingUpdateDeployment {
- // The maximum number of pods that can be unavailable during the update.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // Absolute number is calculated from percentage by rounding down.
- // This can not be 0 if MaxSurge is 0.
- // By default, a fixed value of 1 is used.
- // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
- // immediately when the rolling update starts. Once new pods are ready, old RC
- // can be scaled down further, followed by scaling up the new RC, ensuring
- // that the total number of pods available at all times during the update is at
- // least 70% of desired pods.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
-
- // The maximum number of pods that can be scheduled above the desired number of
- // pods.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // This can not be 0 if MaxUnavailable is 0.
- // Absolute number is calculated from percentage by rounding up.
- // By default, a value of 1 is used.
- // Example: when this is set to 30%, the new RC can be scaled up immediately when
- // the rolling update starts, such that the total number of old and new pods do not exceed
- // 130% of desired pods. Once old pods have been killed,
- // new RC can be scaled up further, ensuring that total number of pods running
- // at any time during the update is atmost 130% of desired pods.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
-}
-
-// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.
-message RunAsUserStrategyOptions {
- // Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
- optional string rule = 1;
-
- // Ranges are the allowed ranges of uids that may be used.
- // +optional
- repeated IDRange ranges = 2;
-}
-
-// SELinux Strategy Options defines the strategy type and any options used to create the strategy.
-message SELinuxStrategyOptions {
- // type is the strategy that will dictate the allowable labels that may be set.
- optional string rule = 1;
-
- // seLinuxOptions required to run as; required for MustRunAs
- // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
- // +optional
- optional k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 2;
-}
-
-// represents a scaling request for a resource.
-message Scale {
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- optional ScaleSpec spec = 2;
-
- // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
- // +optional
- optional ScaleStatus status = 3;
-}
-
-// describes the attributes of a scale subresource
-message ScaleSpec {
- // desired number of instances for the scaled object.
- // +optional
- optional int32 replicas = 1;
-}
-
-// represents the current status of a scale subresource.
-message ScaleStatus {
- // actual number of observed instances of the scaled object.
- optional int32 replicas = 1;
-
- // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
- // +optional
- map<string, string> selector = 2;
-
- // label selector for pods that should match the replicas count. This is a serializated
- // version of both map-based and more expressive set-based selectors. This is done to
- // avoid introspection in the clients. The string will be in the same format as the
- // query-param syntax. If the target type only supports map-based selectors, both this
- // field and map-based selector field are populated.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- optional string targetSelector = 3;
-}
-
-// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
-message SupplementalGroupsStrategyOptions {
- // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
- // +optional
- optional string rule = 1;
-
- // Ranges are the allowed ranges of supplemental groups. If you would like to force a single
- // supplemental group then supply a single range with the same start and end.
- // +optional
- repeated IDRange ranges = 2;
-}
-
diff --git a/vendor/k8s.io/api/extensions/v1beta1/register.go b/vendor/k8s.io/api/extensions/v1beta1/register.go
deleted file mode 100644
index 7625f6781..000000000
--- a/vendor/k8s.io/api/extensions/v1beta1/register.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright 2015 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "extensions"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Deployment{},
- &DeploymentList{},
- &DeploymentRollback{},
- &ReplicationControllerDummy{},
- &Scale{},
- &DaemonSetList{},
- &DaemonSet{},
- &Ingress{},
- &IngressList{},
- &ReplicaSet{},
- &ReplicaSetList{},
- &PodSecurityPolicy{},
- &PodSecurityPolicyList{},
- &NetworkPolicy{},
- &NetworkPolicyList{},
- )
- // Add the watch version that applies
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/extensions/v1beta1/types.go b/vendor/k8s.io/api/extensions/v1beta1/types.go
deleted file mode 100644
index c3d9f72d7..000000000
--- a/vendor/k8s.io/api/extensions/v1beta1/types.go
+++ /dev/null
@@ -1,1292 +0,0 @@
-/*
-Copyright 2015 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 v1beta1
-
-import (
- appsv1beta1 "k8s.io/api/apps/v1beta1"
- "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/resource"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// describes the attributes of a scale subresource
-type ScaleSpec struct {
- // desired number of instances for the scaled object.
- // +optional
- Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-}
-
-// represents the current status of a scale subresource.
-type ScaleStatus struct {
- // actual number of observed instances of the scaled object.
- Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
-
- // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
- // +optional
- Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
-
- // label selector for pods that should match the replicas count. This is a serializated
- // version of both map-based and more expressive set-based selectors. This is done to
- // avoid introspection in the clients. The string will be in the same format as the
- // query-param syntax. If the target type only supports map-based selectors, both this
- // field and map-based selector field are populated.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"`
-}
-
-// +genclient
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// represents a scaling request for a resource.
-type Scale struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
- // +optional
- Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
- // +optional
- Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Dummy definition
-type ReplicationControllerDummy struct {
- metav1.TypeMeta `json:",inline"`
-}
-
-// Alpha-level support for Custom Metrics in HPA (as annotations).
-type CustomMetricTarget struct {
- // Custom Metric name.
- Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
- // Custom Metric value (average).
- TargetValue resource.Quantity `json:"value" protobuf:"bytes,2,opt,name=value"`
-}
-
-type CustomMetricTargetList struct {
- Items []CustomMetricTarget `json:"items" protobuf:"bytes,1,rep,name=items"`
-}
-
-type CustomMetricCurrentStatus struct {
- // Custom Metric name.
- Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
- // Custom Metric value (average).
- CurrentValue resource.Quantity `json:"value" protobuf:"bytes,2,opt,name=value"`
-}
-
-type CustomMetricCurrentStatusList struct {
- Items []CustomMetricCurrentStatus `json:"items" protobuf:"bytes,1,rep,name=items"`
-}
-
-// +genclient
-// +genclient:method=GetScale,verb=get,subresource=scale,result=Scale
-// +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for
-// more information.
-// Deployment enables declarative updates for Pods and ReplicaSets.
-type Deployment struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior of the Deployment.
- // +optional
- Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Most recently observed status of the Deployment.
- // +optional
- Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// DeploymentSpec is the specification of the desired behavior of the Deployment.
-type DeploymentSpec struct {
- // Number of desired pods. This is a pointer to distinguish between explicit
- // zero and not specified. Defaults to 1.
- // +optional
- Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-
- // Label selector for pods. Existing ReplicaSets whose pods are
- // selected by this will be the ones affected by this deployment.
- // +optional
- Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
-
- // Template describes the pods that will be created.
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
-
- // The deployment strategy to use to replace existing pods with new ones.
- // +optional
- // +patchStrategy=retainKeys
- Strategy DeploymentStrategy `json:"strategy,omitempty" patchStrategy:"retainKeys" protobuf:"bytes,4,opt,name=strategy"`
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`
-
- // The number of old ReplicaSets to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // +optional
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
-
- // Indicates that the deployment is paused and will not be processed by the
- // deployment controller.
- // +optional
- Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
-
- // DEPRECATED.
- // The config this deployment is rolling back to. Will be cleared after rollback is done.
- // +optional
- RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
-
- // The maximum time in seconds for a deployment to make progress before it
- // is considered to be failed. The deployment controller will continue to
- // process failed deployments and a condition with a ProgressDeadlineExceeded
- // reason will be surfaced in the deployment status. Note that progress will
- // not be estimated during the time a deployment is paused. This is not set
- // by default.
- // +optional
- ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED.
-// DeploymentRollback stores the information required to rollback a deployment.
-type DeploymentRollback struct {
- metav1.TypeMeta `json:",inline"`
- // Required: This must match the Name of a deployment.
- Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
- // The annotations to be updated to a deployment
- // +optional
- UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"`
- // The config of this deployment rollback.
- RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
-}
-
-// DEPRECATED.
-type RollbackConfig struct {
- // The revision to rollback to. If set to 0, rollback to the last revision.
- // +optional
- Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"`
-}
-
-const (
- // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
- // to existing RCs (and label key that is added to its pods) to prevent the existing RCs
- // to select new pods (and old pods being select by new RC).
- DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
-)
-
-// DeploymentStrategy describes how to replace existing pods with new ones.
-type DeploymentStrategy struct {
- // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
- // +optional
- Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
-
- // Rolling update config params. Present only if DeploymentStrategyType =
- // RollingUpdate.
- //---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be.
- // +optional
- RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
-}
-
-type DeploymentStrategyType string
-
-const (
- // Kill all existing pods before creating new ones.
- RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
-
- // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
- RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
-)
-
-// Spec to control the desired behavior of rolling update.
-type RollingUpdateDeployment struct {
- // The maximum number of pods that can be unavailable during the update.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // Absolute number is calculated from percentage by rounding down.
- // This can not be 0 if MaxSurge is 0.
- // By default, a fixed value of 1 is used.
- // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
- // immediately when the rolling update starts. Once new pods are ready, old RC
- // can be scaled down further, followed by scaling up the new RC, ensuring
- // that the total number of pods available at all times during the update is at
- // least 70% of desired pods.
- // +optional
- MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
-
- // The maximum number of pods that can be scheduled above the desired number of
- // pods.
- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
- // This can not be 0 if MaxUnavailable is 0.
- // Absolute number is calculated from percentage by rounding up.
- // By default, a value of 1 is used.
- // Example: when this is set to 30%, the new RC can be scaled up immediately when
- // the rolling update starts, such that the total number of old and new pods do not exceed
- // 130% of desired pods. Once old pods have been killed,
- // new RC can be scaled up further, ensuring that total number of pods running
- // at any time during the update is atmost 130% of desired pods.
- // +optional
- MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
-}
-
-// DeploymentStatus is the most recently observed status of the Deployment.
-type DeploymentStatus struct {
- // The generation observed by the deployment controller.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
- // +optional
- Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
-
- // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
- // +optional
- UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
-
- // Total number of ready pods targeted by this deployment.
- // +optional
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"`
-
- // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
- // +optional
- AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
-
- // Total number of unavailable pods targeted by this deployment. This is the total number of
- // pods that are still required for the deployment to have 100% available capacity. They may
- // either be pods that are running but not yet available or pods that still have not been created.
- // +optional
- UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
-
- // Represents the latest available observations of a deployment's current state.
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
-
- // Count of hash collisions for the Deployment. The Deployment controller uses this
- // field as a collision avoidance mechanism when it needs to create the name for the
- // newest ReplicaSet.
- // +optional
- CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,8,opt,name=collisionCount"`
-}
-
-type DeploymentConditionType string
-
-// These are valid conditions of a deployment.
-const (
- // Available means the deployment is available, ie. at least the minimum available
- // replicas required are up and running for at least minReadySeconds.
- DeploymentAvailable DeploymentConditionType = "Available"
- // Progressing means the deployment is progressing. Progress for a deployment is
- // considered when a new replica set is created or adopted, and when new pods scale
- // up or old pods scale down. Progress is not estimated for paused deployments or
- // when progressDeadlineSeconds is not specified.
- DeploymentProgressing DeploymentConditionType = "Progressing"
- // ReplicaFailure is added in a deployment when one of its pods fails to be created
- // or deleted.
- DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure"
-)
-
-// DeploymentCondition describes the state of a deployment at a certain point.
-type DeploymentCondition struct {
- // Type of deployment condition.
- Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // The last time this condition was updated.
- LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"`
- // Last time the condition transitioned from one status to another.
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DeploymentList is a list of Deployments.
-type DeploymentList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of Deployments.
- Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-type DaemonSetUpdateStrategy struct {
- // Type of daemon set update. Can be "RollingUpdate" or "OnDelete".
- // Default is OnDelete.
- // +optional
- Type DaemonSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type"`
-
- // Rolling update config params. Present only if type = "RollingUpdate".
- //---
- // TODO: Update this to follow our convention for oneOf, whatever we decide it
- // to be. Same as Deployment `strategy.rollingUpdate`.
- // See https://github.com/kubernetes/kubernetes/issues/35345
- // +optional
- RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
-}
-
-type DaemonSetUpdateStrategyType string
-
-const (
- // Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
- RollingUpdateDaemonSetStrategyType DaemonSetUpdateStrategyType = "RollingUpdate"
-
- // Replace the old daemons only when it's killed
- OnDeleteDaemonSetStrategyType DaemonSetUpdateStrategyType = "OnDelete"
-)
-
-// Spec to control the desired behavior of daemon set rolling update.
-type RollingUpdateDaemonSet struct {
- // The maximum number of DaemonSet pods that can be unavailable during the
- // update. Value can be an absolute number (ex: 5) or a percentage of total
- // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
- // number is calculated from percentage by rounding up.
- // This cannot be 0.
- // Default value is 1.
- // Example: when this is set to 30%, at most 30% of the total number of nodes
- // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
- // can have their pods stopped for an update at any given
- // time. The update starts by stopping at most 30% of those DaemonSet pods
- // and then brings up new DaemonSet pods in their place. Once the new pods
- // are available, it then proceeds onto other DaemonSet pods, thus ensuring
- // that at least 70% of original number of DaemonSet pods are available at
- // all times during the update.
- // +optional
- MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
-}
-
-// DaemonSetSpec is the specification of a daemon set.
-type DaemonSetSpec struct {
- // A label query over pods that are managed by the daemon set.
- // Must match in order to be controlled.
- // If empty, defaulted to labels on Pod template.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
-
- // An object that describes the pod that will be created.
- // The DaemonSet will create exactly one copy of this pod on every node
- // that matches the template's node selector (or on every node if no node
- // selector is specified).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"`
-
- // An update strategy to replace existing DaemonSet pods with new pods.
- // +optional
- UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,3,opt,name=updateStrategy"`
-
- // The minimum number of seconds for which a newly created DaemonSet pod should
- // be ready without any of its container crashing, for it to be considered
- // available. Defaults to 0 (pod will be considered available as soon as it
- // is ready).
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
-
- // DEPRECATED.
- // A sequence number representing a specific generation of the template.
- // Populated by the system. It can be set only during the creation.
- // +optional
- TemplateGeneration int64 `json:"templateGeneration,omitempty" protobuf:"varint,5,opt,name=templateGeneration"`
-
- // The number of old history to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 10.
- // +optional
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
-}
-
-// DaemonSetStatus represents the current status of a daemon set.
-type DaemonSetStatus struct {
- // The number of nodes that are running at least 1
- // daemon pod and are supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- CurrentNumberScheduled int32 `json:"currentNumberScheduled" protobuf:"varint,1,opt,name=currentNumberScheduled"`
-
- // The number of nodes that are running the daemon pod, but are
- // not supposed to run the daemon pod.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- NumberMisscheduled int32 `json:"numberMisscheduled" protobuf:"varint,2,opt,name=numberMisscheduled"`
-
- // The total number of nodes that should be running the daemon
- // pod (including nodes correctly running the daemon pod).
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
- DesiredNumberScheduled int32 `json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"`
-
- // The number of nodes that should be running the daemon pod and have one
- // or more of the daemon pod running and ready.
- NumberReady int32 `json:"numberReady" protobuf:"varint,4,opt,name=numberReady"`
-
- // The most recent generation observed by the daemon set controller.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,5,opt,name=observedGeneration"`
-
- // The total number of nodes that are running updated daemon pod
- // +optional
- UpdatedNumberScheduled int32 `json:"updatedNumberScheduled,omitempty" protobuf:"varint,6,opt,name=updatedNumberScheduled"`
-
- // The number of nodes that should be running the
- // daemon pod and have one or more of the daemon pod running and
- // available (ready for at least spec.minReadySeconds)
- // +optional
- NumberAvailable int32 `json:"numberAvailable,omitempty" protobuf:"varint,7,opt,name=numberAvailable"`
-
- // The number of nodes that should be running the
- // daemon pod and have none of the daemon pod running and available
- // (ready for at least spec.minReadySeconds)
- // +optional
- NumberUnavailable int32 `json:"numberUnavailable,omitempty" protobuf:"varint,8,opt,name=numberUnavailable"`
-
- // Count of hash collisions for the DaemonSet. The DaemonSet controller
- // uses this field as a collision avoidance mechanism when it needs to
- // create the name for the newest ControllerRevision.
- // +optional
- CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"`
-
- // Represents the latest available observations of a DaemonSet's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"`
-}
-
-type DaemonSetConditionType string
-
-// TODO: Add valid condition types of a DaemonSet.
-
-// DaemonSetCondition describes the state of a DaemonSet at a certain point.
-type DaemonSetCondition struct {
- // Type of DaemonSet condition.
- Type DaemonSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DaemonSetConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // Last time the condition transitioned from one status to another.
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for
-// more information.
-// DaemonSet represents the configuration of a daemon set.
-type DaemonSet struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // The desired behavior of this daemon set.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // The current status of this daemon set. This data may be
- // out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-const (
- // DEPRECATED: DefaultDaemonSetUniqueLabelKey is used instead.
- // DaemonSetTemplateGenerationKey is the key of the labels that is added
- // to daemon set pods to distinguish between old and new pod templates
- // during DaemonSet template update.
- DaemonSetTemplateGenerationKey string = "pod-template-generation"
-
- // DefaultDaemonSetUniqueLabelKey is the default label key that is added
- // to existing DaemonSet pods to distinguish between old and new
- // DaemonSet pods during DaemonSet template updates.
- DefaultDaemonSetUniqueLabelKey = appsv1beta1.ControllerRevisionHashLabelKey
-)
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DaemonSetList is a collection of daemon sets.
-type DaemonSetList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // A list of daemon sets.
- Items []DaemonSet `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Ingress is a collection of rules that allow inbound connections to reach the
-// endpoints defined by a backend. An Ingress can be configured to give services
-// externally-reachable urls, load balance traffic, terminate SSL, offer name
-// based virtual hosting etc.
-type Ingress struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec is the desired state of the Ingress.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec IngressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is the current state of the Ingress.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Status IngressStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// IngressList is a collection of Ingress.
-type IngressList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of Ingress.
- Items []Ingress `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// IngressSpec describes the Ingress the user wishes to exist.
-type IngressSpec struct {
- // A default backend capable of servicing requests that don't match any
- // rule. At least one of 'backend' or 'rules' must be specified. This field
- // is optional to allow the loadbalancer controller or defaulting logic to
- // specify a global default.
- // +optional
- Backend *IngressBackend `json:"backend,omitempty" protobuf:"bytes,1,opt,name=backend"`
-
- // TLS configuration. Currently the Ingress only supports a single TLS
- // port, 443. If multiple members of this list specify different hosts, they
- // will be multiplexed on the same port according to the hostname specified
- // through the SNI TLS extension, if the ingress controller fulfilling the
- // ingress supports SNI.
- // +optional
- TLS []IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"`
-
- // A list of host rules used to configure the Ingress. If unspecified, or
- // no rule matches, all traffic is sent to the default backend.
- // +optional
- Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"`
- // TODO: Add the ability to specify load-balancer IP through claims
-}
-
-// IngressTLS describes the transport layer security associated with an Ingress.
-type IngressTLS struct {
- // Hosts are a list of hosts included in the TLS certificate. The values in
- // this list must match the name/s used in the tlsSecret. Defaults to the
- // wildcard host setting for the loadbalancer controller fulfilling this
- // Ingress, if left unspecified.
- // +optional
- Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"`
- // SecretName is the name of the secret used to terminate SSL traffic on 443.
- // Field is left optional to allow SSL routing based on SNI hostname alone.
- // If the SNI host in a listener conflicts with the "Host" header field used
- // by an IngressRule, the SNI host is used for termination and value of the
- // Host header is used for routing.
- // +optional
- SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"`
- // TODO: Consider specifying different modes of termination, protocols etc.
-}
-
-// IngressStatus describe the current state of the Ingress.
-type IngressStatus struct {
- // LoadBalancer contains the current status of the load-balancer.
- // +optional
- LoadBalancer v1.LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"`
-}
-
-// IngressRule represents the rules mapping the paths under a specified host to
-// the related backend services. Incoming requests are first evaluated for a host
-// match, then routed to the backend associated with the matching IngressRuleValue.
-type IngressRule struct {
- // Host is the fully qualified domain name of a network host, as defined
- // by RFC 3986. Note the following deviations from the "host" part of the
- // URI as defined in the RFC:
- // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
- // IP in the Spec of the parent Ingress.
- // 2. The `:` delimiter is not respected because ports are not allowed.
- // Currently the port of an Ingress is implicitly :80 for http and
- // :443 for https.
- // Both these may change in the future.
- // Incoming requests are matched against the host before the IngressRuleValue.
- // If the host is unspecified, the Ingress routes all traffic based on the
- // specified IngressRuleValue.
- // +optional
- Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"`
- // IngressRuleValue represents a rule to route requests for this IngressRule.
- // If unspecified, the rule defaults to a http catch-all. Whether that sends
- // just traffic matching the host to the default backend or all traffic to the
- // default backend, is left to the controller fulfilling the Ingress. Http is
- // currently the only supported IngressRuleValue.
- // +optional
- IngressRuleValue `json:",inline,omitempty" protobuf:"bytes,2,opt,name=ingressRuleValue"`
-}
-
-// IngressRuleValue represents a rule to apply against incoming requests. If the
-// rule is satisfied, the request is routed to the specified backend. Currently
-// mixing different types of rules in a single Ingress is disallowed, so exactly
-// one of the following must be set.
-type IngressRuleValue struct {
- //TODO:
- // 1. Consider renaming this resource and the associated rules so they
- // aren't tied to Ingress. They can be used to route intra-cluster traffic.
- // 2. Consider adding fields for ingress-type specific global options
- // usable by a loadbalancer, like http keep-alive.
-
- // +optional
- HTTP *HTTPIngressRuleValue `json:"http,omitempty" protobuf:"bytes,1,opt,name=http"`
-}
-
-// HTTPIngressRuleValue is a list of http selectors pointing to backends.
-// In the example: http://<host>/<path>?<searchpart> -> backend where
-// where parts of the url correspond to RFC 3986, this resource will be used
-// to match against everything after the last '/' and before the first '?'
-// or '#'.
-type HTTPIngressRuleValue struct {
- // A collection of paths that map requests to backends.
- Paths []HTTPIngressPath `json:"paths" protobuf:"bytes,1,rep,name=paths"`
- // TODO: Consider adding fields for ingress-type specific global
- // options usable by a loadbalancer, like http keep-alive.
-}
-
-// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
-// the path are forwarded to the backend.
-type HTTPIngressPath struct {
- // Path is an extended POSIX regex as defined by IEEE Std 1003.1,
- // (i.e this follows the egrep/unix syntax, not the perl syntax)
- // matched against the path of an incoming request. Currently it can
- // contain characters disallowed from the conventional "path"
- // part of a URL as defined by RFC 3986. Paths must begin with
- // a '/'. If unspecified, the path defaults to a catch all sending
- // traffic to the backend.
- // +optional
- Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
-
- // Backend defines the referenced service endpoint to which the traffic
- // will be forwarded to.
- Backend IngressBackend `json:"backend" protobuf:"bytes,2,opt,name=backend"`
-}
-
-// IngressBackend describes all endpoints for a given service and port.
-type IngressBackend struct {
- // Specifies the name of the referenced service.
- ServiceName string `json:"serviceName" protobuf:"bytes,1,opt,name=serviceName"`
-
- // Specifies the port of the referenced service.
- ServicePort intstr.IntOrString `json:"servicePort" protobuf:"bytes,2,opt,name=servicePort"`
-}
-
-// +genclient
-// +genclient:method=GetScale,verb=get,subresource=scale,result=Scale
-// +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for
-// more information.
-// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
-type ReplicaSet struct {
- metav1.TypeMeta `json:",inline"`
-
- // If the Labels of a ReplicaSet are empty, they are defaulted to
- // be the same as the Pod(s) that the ReplicaSet manages.
- // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec defines the specification of the desired behavior of the ReplicaSet.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec ReplicaSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is the most recently observed status of the ReplicaSet.
- // This data may be out of date by some window of time.
- // Populated by the system.
- // Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ReplicaSetList is a collection of ReplicaSets.
-type ReplicaSetList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // List of ReplicaSets.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
- Items []ReplicaSet `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// ReplicaSetSpec is the specification of a ReplicaSet.
-type ReplicaSetSpec struct {
- // Replicas is the number of desired replicas.
- // This is a pointer to distinguish between explicit zero and unspecified.
- // Defaults to 1.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- // +optional
- Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
-
- // Minimum number of seconds for which a newly created pod should be ready
- // without any of its container crashing, for it to be considered available.
- // Defaults to 0 (pod will be considered available as soon as it is ready)
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
-
- // Selector is a label query over pods that should match the replica count.
- // If the selector is empty, it is defaulted to the labels present on the pod template.
- // Label keys and values that must match in order to be controlled by this replica set.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- // +optional
- Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
-
- // Template is the object that describes the pod that will be created if
- // insufficient replicas are detected.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
- // +optional
- Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
-}
-
-// ReplicaSetStatus represents the current status of a ReplicaSet.
-type ReplicaSetStatus struct {
- // Replicas is the most recently oberved number of replicas.
- // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
- Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
-
- // The number of pods that have labels matching the labels of the pod template of the replicaset.
- // +optional
- FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
-
- // The number of ready replicas for this replica set.
- // +optional
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
-
- // The number of available replicas (ready for at least minReadySeconds) for this replica set.
- // +optional
- AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`
-
- // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
-
- // Represents the latest available observations of a replica set's current state.
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
-}
-
-type ReplicaSetConditionType string
-
-// These are valid conditions of a replica set.
-const (
- // ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created
- // due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted
- // due to kubelet being down or finalizers are failing.
- ReplicaSetReplicaFailure ReplicaSetConditionType = "ReplicaFailure"
-)
-
-// ReplicaSetCondition describes the state of a replica set at a certain point.
-type ReplicaSetCondition struct {
- // Type of replica set condition.
- Type ReplicaSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicaSetConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
- // The last time the condition transitioned from one status to another.
- // +optional
- LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
- // The reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
- // A human readable message indicating details about the transition.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Pod Security Policy governs the ability to make requests that affect the Security Context
-// that will be applied to a pod and container.
-type PodSecurityPolicy struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // spec defines the policy enforced.
- // +optional
- Spec PodSecurityPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-}
-
-// Pod Security Policy Spec defines the policy enforced.
-type PodSecurityPolicySpec struct {
- // privileged determines if a pod can request to be run as privileged.
- // +optional
- Privileged bool `json:"privileged,omitempty" protobuf:"varint,1,opt,name=privileged"`
- // DefaultAddCapabilities is the default set of capabilities that will be added to the container
- // unless the pod spec specifically drops the capability. You may not list a capability in both
- // DefaultAddCapabilities and RequiredDropCapabilities. Capabilities added here are implicitly
- // allowed, and need not be included in the AllowedCapabilities list.
- // +optional
- DefaultAddCapabilities []v1.Capability `json:"defaultAddCapabilities,omitempty" protobuf:"bytes,2,rep,name=defaultAddCapabilities,casttype=k8s.io/api/core/v1.Capability"`
- // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
- // are required to be dropped and cannot be added.
- // +optional
- RequiredDropCapabilities []v1.Capability `json:"requiredDropCapabilities,omitempty" protobuf:"bytes,3,rep,name=requiredDropCapabilities,casttype=k8s.io/api/core/v1.Capability"`
- // AllowedCapabilities is a list of capabilities that can be requested to add to the container.
- // Capabilities in this field may be added at the pod author's discretion.
- // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
- // +optional
- AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/api/core/v1.Capability"`
- // volumes is a white list of allowed volume plugins. Empty indicates that all plugins
- // may be used.
- // +optional
- Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"`
- // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
- // +optional
- HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,6,opt,name=hostNetwork"`
- // hostPorts determines which host port ranges are allowed to be exposed.
- // +optional
- HostPorts []HostPortRange `json:"hostPorts,omitempty" protobuf:"bytes,7,rep,name=hostPorts"`
- // hostPID determines if the policy allows the use of HostPID in the pod spec.
- // +optional
- HostPID bool `json:"hostPID,omitempty" protobuf:"varint,8,opt,name=hostPID"`
- // hostIPC determines if the policy allows the use of HostIPC in the pod spec.
- // +optional
- HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,9,opt,name=hostIPC"`
- // seLinux is the strategy that will dictate the allowable labels that may be set.
- SELinux SELinuxStrategyOptions `json:"seLinux" protobuf:"bytes,10,opt,name=seLinux"`
- // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
- RunAsUser RunAsUserStrategyOptions `json:"runAsUser" protobuf:"bytes,11,opt,name=runAsUser"`
- // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
- SupplementalGroups SupplementalGroupsStrategyOptions `json:"supplementalGroups" protobuf:"bytes,12,opt,name=supplementalGroups"`
- // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
- FSGroup FSGroupStrategyOptions `json:"fsGroup" protobuf:"bytes,13,opt,name=fsGroup"`
- // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
- // system. If the container specifically requests to run with a non-read only root file system
- // the PSP should deny the pod.
- // If set to false the container may run with a read only root file system if it wishes but it
- // will not be forced to.
- // +optional
- ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,14,opt,name=readOnlyRootFilesystem"`
- // DefaultAllowPrivilegeEscalation controls the default setting for whether a
- // process can gain more privileges than its parent process.
- // +optional
- DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty" protobuf:"varint,15,opt,name=defaultAllowPrivilegeEscalation"`
- // AllowPrivilegeEscalation determines if a pod can request to allow
- // privilege escalation. If unspecified, defaults to true.
- // +optional
- AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty" protobuf:"varint,16,opt,name=allowPrivilegeEscalation"`
- // is a white list of allowed host paths. Empty indicates that all host paths may be used.
- // +optional
- AllowedHostPaths []AllowedHostPath `json:"allowedHostPaths,omitempty" protobuf:"bytes,17,rep,name=allowedHostPaths"`
- // AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all
- // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes
- // is allowed in the "Volumes" field.
- // +optional
- AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" protobuf:"bytes,18,rep,name=allowedFlexVolumes"`
-}
-
-// defines the host volume conditions that will be enabled by a policy
-// for pods to use. It requires the path prefix to be defined.
-type AllowedHostPath struct {
- // is the path prefix that the host volume must match.
- // It does not support `*`.
- // Trailing slashes are trimmed when validating the path prefix with a host path.
- //
- // Examples:
- // `/foo` would allow `/foo`, `/foo/` and `/foo/bar`
- // `/foo` would not allow `/food` or `/etc/foo`
- PathPrefix string `json:"pathPrefix,omitempty" protobuf:"bytes,1,rep,name=pathPrefix"`
-}
-
-// FS Type gives strong typing to different file systems that are used by volumes.
-type FSType string
-
-var (
- AzureFile FSType = "azureFile"
- Flocker FSType = "flocker"
- FlexVolume FSType = "flexVolume"
- HostPath FSType = "hostPath"
- EmptyDir FSType = "emptyDir"
- GCEPersistentDisk FSType = "gcePersistentDisk"
- AWSElasticBlockStore FSType = "awsElasticBlockStore"
- GitRepo FSType = "gitRepo"
- Secret FSType = "secret"
- NFS FSType = "nfs"
- ISCSI FSType = "iscsi"
- Glusterfs FSType = "glusterfs"
- PersistentVolumeClaim FSType = "persistentVolumeClaim"
- RBD FSType = "rbd"
- Cinder FSType = "cinder"
- CephFS FSType = "cephFS"
- DownwardAPI FSType = "downwardAPI"
- FC FSType = "fc"
- ConfigMap FSType = "configMap"
- Quobyte FSType = "quobyte"
- AzureDisk FSType = "azureDisk"
- All FSType = "*"
-)
-
-// AllowedFlexVolume represents a single Flexvolume that is allowed to be used.
-type AllowedFlexVolume struct {
- // Driver is the name of the Flexvolume driver.
- Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
-}
-
-// Host Port Range defines a range of host ports that will be enabled by a policy
-// for pods to use. It requires both the start and end to be defined.
-type HostPortRange struct {
- // min is the start of the range, inclusive.
- Min int32 `json:"min" protobuf:"varint,1,opt,name=min"`
- // max is the end of the range, inclusive.
- Max int32 `json:"max" protobuf:"varint,2,opt,name=max"`
-}
-
-// SELinux Strategy Options defines the strategy type and any options used to create the strategy.
-type SELinuxStrategyOptions struct {
- // type is the strategy that will dictate the allowable labels that may be set.
- Rule SELinuxStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=SELinuxStrategy"`
- // seLinuxOptions required to run as; required for MustRunAs
- // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
- // +optional
- SELinuxOptions *v1.SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,2,opt,name=seLinuxOptions"`
-}
-
-// SELinuxStrategy denotes strategy types for generating SELinux options for a
-// Security Context.
-type SELinuxStrategy string
-
-const (
- // container must have SELinux labels of X applied.
- SELinuxStrategyMustRunAs SELinuxStrategy = "MustRunAs"
- // container may make requests for any SELinux context labels.
- SELinuxStrategyRunAsAny SELinuxStrategy = "RunAsAny"
-)
-
-// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.
-type RunAsUserStrategyOptions struct {
- // Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
- Rule RunAsUserStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=RunAsUserStrategy"`
- // Ranges are the allowed ranges of uids that may be used.
- // +optional
- Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
-}
-
-// ID Range provides a min/max of an allowed range of IDs.
-type IDRange struct {
- // Min is the start of the range, inclusive.
- Min int64 `json:"min" protobuf:"varint,1,opt,name=min"`
- // Max is the end of the range, inclusive.
- Max int64 `json:"max" protobuf:"varint,2,opt,name=max"`
-}
-
-// RunAsUserStrategy denotes strategy types for generating RunAsUser values for a
-// Security Context.
-type RunAsUserStrategy string
-
-const (
- // container must run as a particular uid.
- RunAsUserStrategyMustRunAs RunAsUserStrategy = "MustRunAs"
- // container must run as a non-root uid
- RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategy = "MustRunAsNonRoot"
- // container may make requests for any uid.
- RunAsUserStrategyRunAsAny RunAsUserStrategy = "RunAsAny"
-)
-
-// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
-type FSGroupStrategyOptions struct {
- // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
- // +optional
- Rule FSGroupStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=FSGroupStrategyType"`
- // Ranges are the allowed ranges of fs groups. If you would like to force a single
- // fs group then supply a single range with the same start and end.
- // +optional
- Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
-}
-
-// FSGroupStrategyType denotes strategy types for generating FSGroup values for a
-// SecurityContext
-type FSGroupStrategyType string
-
-const (
- // container must have FSGroup of X applied.
- FSGroupStrategyMustRunAs FSGroupStrategyType = "MustRunAs"
- // container may make requests for any FSGroup labels.
- FSGroupStrategyRunAsAny FSGroupStrategyType = "RunAsAny"
-)
-
-// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
-type SupplementalGroupsStrategyOptions struct {
- // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
- // +optional
- Rule SupplementalGroupsStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=SupplementalGroupsStrategyType"`
- // Ranges are the allowed ranges of supplemental groups. If you would like to force a single
- // supplemental group then supply a single range with the same start and end.
- // +optional
- Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
-}
-
-// SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental
-// groups for a SecurityContext.
-type SupplementalGroupsStrategyType string
-
-const (
- // container must run as a particular gid.
- SupplementalGroupsStrategyMustRunAs SupplementalGroupsStrategyType = "MustRunAs"
- // container may make requests for any gid.
- SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny"
-)
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Pod Security Policy List is a list of PodSecurityPolicy objects.
-type PodSecurityPolicyList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of schema objects.
- Items []PodSecurityPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy.
-// NetworkPolicy describes what network traffic is allowed for a set of Pods
-type NetworkPolicy struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior for this NetworkPolicy.
- // +optional
- Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-}
-
-// DEPRECATED 1.9 - This group version of PolicyType is deprecated by networking/v1/PolicyType.
-// Policy Type string describes the NetworkPolicy type
-// This type is beta-level in 1.8
-type PolicyType string
-
-const (
- // PolicyTypeIngress is a NetworkPolicy that affects ingress traffic on selected pods
- PolicyTypeIngress PolicyType = "Ingress"
- // PolicyTypeEgress is a NetworkPolicy that affects egress traffic on selected pods
- PolicyTypeEgress PolicyType = "Egress"
-)
-
-// DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.
-type NetworkPolicySpec struct {
- // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules
- // is applied to any pods selected by this field. Multiple network policies can select the
- // same set of pods. In this case, the ingress rules for each are combined additively.
- // This field is NOT optional and follows standard label selector semantics.
- // An empty podSelector matches all pods in this namespace.
- PodSelector metav1.LabelSelector `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"`
-
- // List of ingress rules to be applied to the selected pods.
- // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
- // OR if the traffic source is the pod's local node,
- // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy
- // objects whose podSelector matches the pod.
- // If this field is empty then this NetworkPolicy does not allow any traffic
- // (and serves solely to ensure that the pods it selects are isolated by default).
- // +optional
- Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"`
-
- // List of egress rules to be applied to the selected pods. Outgoing traffic is
- // allowed if there are no NetworkPolicies selecting the pod (and cluster policy
- // otherwise allows the traffic), OR if the traffic matches at least one egress rule
- // across all of the NetworkPolicy objects whose podSelector matches the pod. If
- // this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
- // solely to ensure that the pods it selects are isolated by default).
- // This field is beta-level in 1.8
- // +optional
- Egress []NetworkPolicyEgressRule `json:"egress,omitempty" protobuf:"bytes,3,rep,name=egress"`
-
- // List of rule types that the NetworkPolicy relates to.
- // Valid options are Ingress, Egress, or Ingress,Egress.
- // If this field is not specified, it will default based on the existence of Ingress or Egress rules;
- // policies that contain an Egress section are assumed to affect Egress, and all policies
- // (whether or not they contain an Ingress section) are assumed to affect Ingress.
- // If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
- // Likewise, if you want to write a policy that specifies that no egress is allowed,
- // you must specify a policyTypes value that include "Egress" (since such a policy would not include
- // an Egress section and would otherwise default to just [ "Ingress" ]).
- // This field is beta-level in 1.8
- // +optional
- PolicyTypes []PolicyType `json:"policyTypes,omitempty" protobuf:"bytes,4,rep,name=policyTypes,casttype=PolicyType"`
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule.
-// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
-type NetworkPolicyIngressRule struct {
- // List of ports which should be made accessible on the pods selected for this rule.
- // Each item in this list is combined using a logical OR.
- // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
- // If this field is present and contains at least one item, then this rule allows traffic
- // only if the traffic matches at least one port in the list.
- // +optional
- Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
-
- // List of sources which should be able to access the pods selected for this rule.
- // Items in this list are combined using a logical OR operation.
- // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
- // If this field is present and contains at least on item, this rule allows traffic only if the
- // traffic matches at least one item in the from list.
- // +optional
- From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule.
-// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
-// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
-// This type is beta-level in 1.8
-type NetworkPolicyEgressRule struct {
- // List of destination ports for outgoing traffic.
- // Each item in this list is combined using a logical OR. If this field is
- // empty or missing, this rule matches all ports (traffic not restricted by port).
- // If this field is present and contains at least one item, then this rule allows
- // traffic only if the traffic matches at least one port in the list.
- // +optional
- Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
-
- // List of destinations for outgoing traffic of pods selected for this rule.
- // Items in this list are combined using a logical OR operation. If this field is
- // empty or missing, this rule matches all destinations (traffic not restricted by
- // destination). If this field is present and contains at least one item, this rule
- // allows traffic only if the traffic matches at least one item in the to list.
- // +optional
- To []NetworkPolicyPeer `json:"to,omitempty" protobuf:"bytes,2,rep,name=to"`
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.
-type NetworkPolicyPort struct {
- // Optional. The protocol (TCP or UDP) which traffic must match.
- // If not specified, this field defaults to TCP.
- // +optional
- Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/api/core/v1.Protocol"`
-
- // If specified, the port on the given protocol. This can
- // either be a numerical or named port on a pod. If this field is not provided,
- // this matches all port names and numbers.
- // If present, only traffic on the specified protocol AND port
- // will be matched.
- // +optional
- Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"`
-}
-
-// DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock.
-// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods
-// matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should
-// not be included within this rule.
-type IPBlock struct {
- // CIDR is a string representing the IP Block
- // Valid examples are "192.168.1.1/24"
- CIDR string `json:"cidr" protobuf:"bytes,1,name=cidr"`
- // Except is a slice of CIDRs that should not be included within an IP Block
- // Valid examples are "192.168.1.1/24"
- // Except values will be rejected if they are outside the CIDR range
- // +optional
- Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"`
-}
-
-// DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.
-type NetworkPolicyPeer struct {
- // Exactly one of the following must be specified.
-
- // This is a label selector which selects Pods in this namespace.
- // This field follows standard label selector semantics.
- // If present but empty, this selector selects all pods in this namespace.
- // +optional
- PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"`
-
- // Selects Namespaces using cluster scoped-labels. This
- // matches all pods in all namespaces selected by this label selector.
- // This field follows standard label selector semantics.
- // If present but empty, this selector selects all namespaces.
- // +optional
- NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`
-
- // IPBlock defines policy on a particular IPBlock
- // +optional
- IPBlock *IPBlock `json:"ipBlock,omitempty" protobuf:"bytes,3,rep,name=ipBlock"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList.
-// Network Policy List is a list of NetworkPolicy objects.
-type NetworkPolicyList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of schema objects.
- Items []NetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 236d934fa..000000000
--- a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_AllowedFlexVolume = map[string]string{
- "": "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.",
- "driver": "Driver is the name of the Flexvolume driver.",
-}
-
-func (AllowedFlexVolume) SwaggerDoc() map[string]string {
- return map_AllowedFlexVolume
-}
-
-var map_AllowedHostPath = map[string]string{
- "": "defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.",
- "pathPrefix": "is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`",
-}
-
-func (AllowedHostPath) SwaggerDoc() map[string]string {
- return map_AllowedHostPath
-}
-
-var map_CustomMetricCurrentStatus = map[string]string{
- "name": "Custom Metric name.",
- "value": "Custom Metric value (average).",
-}
-
-func (CustomMetricCurrentStatus) SwaggerDoc() map[string]string {
- return map_CustomMetricCurrentStatus
-}
-
-var map_CustomMetricTarget = map[string]string{
- "": "Alpha-level support for Custom Metrics in HPA (as annotations).",
- "name": "Custom Metric name.",
- "value": "Custom Metric value (average).",
-}
-
-func (CustomMetricTarget) SwaggerDoc() map[string]string {
- return map_CustomMetricTarget
-}
-
-var map_DaemonSet = map[string]string{
- "": "DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
- "status": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (DaemonSet) SwaggerDoc() map[string]string {
- return map_DaemonSet
-}
-
-var map_DaemonSetCondition = map[string]string{
- "": "DaemonSetCondition describes the state of a DaemonSet at a certain point.",
- "type": "Type of DaemonSet condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastTransitionTime": "Last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (DaemonSetCondition) SwaggerDoc() map[string]string {
- return map_DaemonSetCondition
-}
-
-var map_DaemonSetList = map[string]string{
- "": "DaemonSetList is a collection of daemon sets.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "A list of daemon sets.",
-}
-
-func (DaemonSetList) SwaggerDoc() map[string]string {
- return map_DaemonSetList
-}
-
-var map_DaemonSetSpec = map[string]string{
- "": "DaemonSetSpec is the specification of a daemon set.",
- "selector": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- "template": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
- "updateStrategy": "An update strategy to replace existing DaemonSet pods with new pods.",
- "minReadySeconds": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).",
- "templateGeneration": "DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.",
- "revisionHistoryLimit": "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.",
-}
-
-func (DaemonSetSpec) SwaggerDoc() map[string]string {
- return map_DaemonSetSpec
-}
-
-var map_DaemonSetStatus = map[string]string{
- "": "DaemonSetStatus represents the current status of a daemon set.",
- "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
- "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
- "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
- "numberReady": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.",
- "observedGeneration": "The most recent generation observed by the daemon set controller.",
- "updatedNumberScheduled": "The total number of nodes that are running updated daemon pod",
- "numberAvailable": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)",
- "numberUnavailable": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)",
- "collisionCount": "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
- "conditions": "Represents the latest available observations of a DaemonSet's current state.",
-}
-
-func (DaemonSetStatus) SwaggerDoc() map[string]string {
- return map_DaemonSetStatus
-}
-
-var map_DaemonSetUpdateStrategy = map[string]string{
- "type": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete.",
- "rollingUpdate": "Rolling update config params. Present only if type = \"RollingUpdate\".",
-}
-
-func (DaemonSetUpdateStrategy) SwaggerDoc() map[string]string {
- return map_DaemonSetUpdateStrategy
-}
-
-var map_Deployment = map[string]string{
- "": "DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.",
- "metadata": "Standard object metadata.",
- "spec": "Specification of the desired behavior of the Deployment.",
- "status": "Most recently observed status of the Deployment.",
-}
-
-func (Deployment) SwaggerDoc() map[string]string {
- return map_Deployment
-}
-
-var map_DeploymentCondition = map[string]string{
- "": "DeploymentCondition describes the state of a deployment at a certain point.",
- "type": "Type of deployment condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastUpdateTime": "The last time this condition was updated.",
- "lastTransitionTime": "Last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (DeploymentCondition) SwaggerDoc() map[string]string {
- return map_DeploymentCondition
-}
-
-var map_DeploymentList = map[string]string{
- "": "DeploymentList is a list of Deployments.",
- "metadata": "Standard list metadata.",
- "items": "Items is the list of Deployments.",
-}
-
-func (DeploymentList) SwaggerDoc() map[string]string {
- return map_DeploymentList
-}
-
-var map_DeploymentRollback = map[string]string{
- "": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.",
- "name": "Required: This must match the Name of a deployment.",
- "updatedAnnotations": "The annotations to be updated to a deployment",
- "rollbackTo": "The config of this deployment rollback.",
-}
-
-func (DeploymentRollback) SwaggerDoc() map[string]string {
- return map_DeploymentRollback
-}
-
-var map_DeploymentSpec = map[string]string{
- "": "DeploymentSpec is the specification of the desired behavior of the Deployment.",
- "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
- "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.",
- "template": "Template describes the pods that will be created.",
- "strategy": "The deployment strategy to use to replace existing pods with new ones.",
- "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
- "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.",
- "paused": "Indicates that the deployment is paused and will not be processed by the deployment controller.",
- "rollbackTo": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.",
- "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. This is not set by default.",
-}
-
-func (DeploymentSpec) SwaggerDoc() map[string]string {
- return map_DeploymentSpec
-}
-
-var map_DeploymentStatus = map[string]string{
- "": "DeploymentStatus is the most recently observed status of the Deployment.",
- "observedGeneration": "The generation observed by the deployment controller.",
- "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).",
- "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.",
- "readyReplicas": "Total number of ready pods targeted by this deployment.",
- "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.",
- "unavailableReplicas": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.",
- "conditions": "Represents the latest available observations of a deployment's current state.",
- "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.",
-}
-
-func (DeploymentStatus) SwaggerDoc() map[string]string {
- return map_DeploymentStatus
-}
-
-var map_DeploymentStrategy = map[string]string{
- "": "DeploymentStrategy describes how to replace existing pods with new ones.",
- "type": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.",
- "rollingUpdate": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.",
-}
-
-func (DeploymentStrategy) SwaggerDoc() map[string]string {
- return map_DeploymentStrategy
-}
-
-var map_FSGroupStrategyOptions = map[string]string{
- "": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.",
- "rule": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.",
- "ranges": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end.",
-}
-
-func (FSGroupStrategyOptions) SwaggerDoc() map[string]string {
- return map_FSGroupStrategyOptions
-}
-
-var map_HTTPIngressPath = map[string]string{
- "": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.",
- "path": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.",
- "backend": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.",
-}
-
-func (HTTPIngressPath) SwaggerDoc() map[string]string {
- return map_HTTPIngressPath
-}
-
-var map_HTTPIngressRuleValue = map[string]string{
- "": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://<host>/<path>?<searchpart> -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.",
- "paths": "A collection of paths that map requests to backends.",
-}
-
-func (HTTPIngressRuleValue) SwaggerDoc() map[string]string {
- return map_HTTPIngressRuleValue
-}
-
-var map_HostPortRange = map[string]string{
- "": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.",
- "min": "min is the start of the range, inclusive.",
- "max": "max is the end of the range, inclusive.",
-}
-
-func (HostPortRange) SwaggerDoc() map[string]string {
- return map_HostPortRange
-}
-
-var map_IDRange = map[string]string{
- "": "ID Range provides a min/max of an allowed range of IDs.",
- "min": "Min is the start of the range, inclusive.",
- "max": "Max is the end of the range, inclusive.",
-}
-
-func (IDRange) SwaggerDoc() map[string]string {
- return map_IDRange
-}
-
-var map_IPBlock = map[string]string{
- "": "DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.",
- "cidr": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"",
- "except": "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" Except values will be rejected if they are outside the CIDR range",
-}
-
-func (IPBlock) SwaggerDoc() map[string]string {
- return map_IPBlock
-}
-
-var map_Ingress = map[string]string{
- "": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
- "status": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (Ingress) SwaggerDoc() map[string]string {
- return map_Ingress
-}
-
-var map_IngressBackend = map[string]string{
- "": "IngressBackend describes all endpoints for a given service and port.",
- "serviceName": "Specifies the name of the referenced service.",
- "servicePort": "Specifies the port of the referenced service.",
-}
-
-func (IngressBackend) SwaggerDoc() map[string]string {
- return map_IngressBackend
-}
-
-var map_IngressList = map[string]string{
- "": "IngressList is a collection of Ingress.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is the list of Ingress.",
-}
-
-func (IngressList) SwaggerDoc() map[string]string {
- return map_IngressList
-}
-
-var map_IngressRule = map[string]string{
- "": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.",
- "host": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.",
-}
-
-func (IngressRule) SwaggerDoc() map[string]string {
- return map_IngressRule
-}
-
-var map_IngressRuleValue = map[string]string{
- "": "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.",
-}
-
-func (IngressRuleValue) SwaggerDoc() map[string]string {
- return map_IngressRuleValue
-}
-
-var map_IngressSpec = map[string]string{
- "": "IngressSpec describes the Ingress the user wishes to exist.",
- "backend": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.",
- "tls": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.",
- "rules": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.",
-}
-
-func (IngressSpec) SwaggerDoc() map[string]string {
- return map_IngressSpec
-}
-
-var map_IngressStatus = map[string]string{
- "": "IngressStatus describe the current state of the Ingress.",
- "loadBalancer": "LoadBalancer contains the current status of the load-balancer.",
-}
-
-func (IngressStatus) SwaggerDoc() map[string]string {
- return map_IngressStatus
-}
-
-var map_IngressTLS = map[string]string{
- "": "IngressTLS describes the transport layer security associated with an Ingress.",
- "hosts": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.",
- "secretName": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.",
-}
-
-func (IngressTLS) SwaggerDoc() map[string]string {
- return map_IngressTLS
-}
-
-var map_NetworkPolicy = map[string]string{
- "": "DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Specification of the desired behavior for this NetworkPolicy.",
-}
-
-func (NetworkPolicy) SwaggerDoc() map[string]string {
- return map_NetworkPolicy
-}
-
-var map_NetworkPolicyEgressRule = map[string]string{
- "": "DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8",
- "ports": "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
- "to": "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.",
-}
-
-func (NetworkPolicyEgressRule) SwaggerDoc() map[string]string {
- return map_NetworkPolicyEgressRule
-}
-
-var map_NetworkPolicyIngressRule = map[string]string{
- "": "DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.",
- "ports": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
- "from": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.",
-}
-
-func (NetworkPolicyIngressRule) SwaggerDoc() map[string]string {
- return map_NetworkPolicyIngressRule
-}
-
-var map_NetworkPolicyList = map[string]string{
- "": "DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is a list of schema objects.",
-}
-
-func (NetworkPolicyList) SwaggerDoc() map[string]string {
- return map_NetworkPolicyList
-}
-
-var map_NetworkPolicyPeer = map[string]string{
- "": "DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.",
- "podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.",
- "namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.",
- "ipBlock": "IPBlock defines policy on a particular IPBlock",
-}
-
-func (NetworkPolicyPeer) SwaggerDoc() map[string]string {
- return map_NetworkPolicyPeer
-}
-
-var map_NetworkPolicyPort = map[string]string{
- "": "DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.",
- "protocol": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.",
- "port": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.",
-}
-
-func (NetworkPolicyPort) SwaggerDoc() map[string]string {
- return map_NetworkPolicyPort
-}
-
-var map_NetworkPolicySpec = map[string]string{
- "": "DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.",
- "podSelector": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.",
- "ingress": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default).",
- "egress": "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8",
- "policyTypes": "List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8",
-}
-
-func (NetworkPolicySpec) SwaggerDoc() map[string]string {
- return map_NetworkPolicySpec
-}
-
-var map_PodSecurityPolicy = map[string]string{
- "": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "spec defines the policy enforced.",
-}
-
-func (PodSecurityPolicy) SwaggerDoc() map[string]string {
- return map_PodSecurityPolicy
-}
-
-var map_PodSecurityPolicyList = map[string]string{
- "": "Pod Security Policy List is a list of PodSecurityPolicy objects.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is a list of schema objects.",
-}
-
-func (PodSecurityPolicyList) SwaggerDoc() map[string]string {
- return map_PodSecurityPolicyList
-}
-
-var map_PodSecurityPolicySpec = map[string]string{
- "": "Pod Security Policy Spec defines the policy enforced.",
- "privileged": "privileged determines if a pod can request to be run as privileged.",
- "defaultAddCapabilities": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both DefaultAddCapabilities and RequiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the AllowedCapabilities list.",
- "requiredDropCapabilities": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.",
- "allowedCapabilities": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.",
- "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.",
- "hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.",
- "hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.",
- "hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.",
- "hostIPC": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.",
- "seLinux": "seLinux is the strategy that will dictate the allowable labels that may be set.",
- "runAsUser": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.",
- "supplementalGroups": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.",
- "fsGroup": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.",
- "readOnlyRootFilesystem": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.",
- "defaultAllowPrivilegeEscalation": "DefaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.",
- "allowPrivilegeEscalation": "AllowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.",
- "allowedHostPaths": "is a white list of allowed host paths. Empty indicates that all host paths may be used.",
- "allowedFlexVolumes": "AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"Volumes\" field.",
-}
-
-func (PodSecurityPolicySpec) SwaggerDoc() map[string]string {
- return map_PodSecurityPolicySpec
-}
-
-var map_ReplicaSet = map[string]string{
- "": "DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.",
- "metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
- "status": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
-}
-
-func (ReplicaSet) SwaggerDoc() map[string]string {
- return map_ReplicaSet
-}
-
-var map_ReplicaSetCondition = map[string]string{
- "": "ReplicaSetCondition describes the state of a replica set at a certain point.",
- "type": "Type of replica set condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastTransitionTime": "The last time the condition transitioned from one status to another.",
- "reason": "The reason for the condition's last transition.",
- "message": "A human readable message indicating details about the transition.",
-}
-
-func (ReplicaSetCondition) SwaggerDoc() map[string]string {
- return map_ReplicaSetCondition
-}
-
-var map_ReplicaSetList = map[string]string{
- "": "ReplicaSetList is a collection of ReplicaSets.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
- "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller",
-}
-
-func (ReplicaSetList) SwaggerDoc() map[string]string {
- return map_ReplicaSetList
-}
-
-var map_ReplicaSetSpec = map[string]string{
- "": "ReplicaSetSpec is the specification of a ReplicaSet.",
- "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller",
- "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
- "selector": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
-}
-
-func (ReplicaSetSpec) SwaggerDoc() map[string]string {
- return map_ReplicaSetSpec
-}
-
-var map_ReplicaSetStatus = map[string]string{
- "": "ReplicaSetStatus represents the current status of a ReplicaSet.",
- "replicas": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller",
- "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.",
- "readyReplicas": "The number of ready replicas for this replica set.",
- "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replica set.",
- "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.",
- "conditions": "Represents the latest available observations of a replica set's current state.",
-}
-
-func (ReplicaSetStatus) SwaggerDoc() map[string]string {
- return map_ReplicaSetStatus
-}
-
-var map_ReplicationControllerDummy = map[string]string{
- "": "Dummy definition",
-}
-
-func (ReplicationControllerDummy) SwaggerDoc() map[string]string {
- return map_ReplicationControllerDummy
-}
-
-var map_RollbackConfig = map[string]string{
- "": "DEPRECATED.",
- "revision": "The revision to rollback to. If set to 0, rollback to the last revision.",
-}
-
-func (RollbackConfig) SwaggerDoc() map[string]string {
- return map_RollbackConfig
-}
-
-var map_RollingUpdateDaemonSet = map[string]string{
- "": "Spec to control the desired behavior of daemon set rolling update.",
- "maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.",
-}
-
-func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string {
- return map_RollingUpdateDaemonSet
-}
-
-var map_RollingUpdateDeployment = map[string]string{
- "": "Spec to control the desired behavior of rolling update.",
- "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.",
- "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.",
-}
-
-func (RollingUpdateDeployment) SwaggerDoc() map[string]string {
- return map_RollingUpdateDeployment
-}
-
-var map_RunAsUserStrategyOptions = map[string]string{
- "": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.",
- "rule": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set.",
- "ranges": "Ranges are the allowed ranges of uids that may be used.",
-}
-
-func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string {
- return map_RunAsUserStrategyOptions
-}
-
-var map_SELinuxStrategyOptions = map[string]string{
- "": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.",
- "rule": "type is the strategy that will dictate the allowable labels that may be set.",
- "seLinuxOptions": "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/",
-}
-
-func (SELinuxStrategyOptions) SwaggerDoc() map[string]string {
- return map_SELinuxStrategyOptions
-}
-
-var map_Scale = map[string]string{
- "": "represents a scaling request for a resource.",
- "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
- "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
- "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.",
-}
-
-func (Scale) SwaggerDoc() map[string]string {
- return map_Scale
-}
-
-var map_ScaleSpec = map[string]string{
- "": "describes the attributes of a scale subresource",
- "replicas": "desired number of instances for the scaled object.",
-}
-
-func (ScaleSpec) SwaggerDoc() map[string]string {
- return map_ScaleSpec
-}
-
-var map_ScaleStatus = map[string]string{
- "": "represents the current status of a scale subresource.",
- "replicas": "actual number of observed instances of the scaled object.",
- "selector": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors",
- "targetSelector": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
-}
-
-func (ScaleStatus) SwaggerDoc() map[string]string {
- return map_ScaleStatus
-}
-
-var map_SupplementalGroupsStrategyOptions = map[string]string{
- "": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.",
- "rule": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.",
- "ranges": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end.",
-}
-
-func (SupplementalGroupsStrategyOptions) SwaggerDoc() map[string]string {
- return map_SupplementalGroupsStrategyOptions
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index de1970c8f..000000000
--- a/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,1588 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- core_v1 "k8s.io/api/core/v1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- intstr "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *AllowedFlexVolume) DeepCopyInto(out *AllowedFlexVolume) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedFlexVolume.
-func (in *AllowedFlexVolume) DeepCopy() *AllowedFlexVolume {
- if in == nil {
- return nil
- }
- out := new(AllowedFlexVolume)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *AllowedHostPath) DeepCopyInto(out *AllowedHostPath) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedHostPath.
-func (in *AllowedHostPath) DeepCopy() *AllowedHostPath {
- if in == nil {
- return nil
- }
- out := new(AllowedHostPath)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CustomMetricCurrentStatus) DeepCopyInto(out *CustomMetricCurrentStatus) {
- *out = *in
- out.CurrentValue = in.CurrentValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMetricCurrentStatus.
-func (in *CustomMetricCurrentStatus) DeepCopy() *CustomMetricCurrentStatus {
- if in == nil {
- return nil
- }
- out := new(CustomMetricCurrentStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CustomMetricCurrentStatusList) DeepCopyInto(out *CustomMetricCurrentStatusList) {
- *out = *in
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]CustomMetricCurrentStatus, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMetricCurrentStatusList.
-func (in *CustomMetricCurrentStatusList) DeepCopy() *CustomMetricCurrentStatusList {
- if in == nil {
- return nil
- }
- out := new(CustomMetricCurrentStatusList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CustomMetricTarget) DeepCopyInto(out *CustomMetricTarget) {
- *out = *in
- out.TargetValue = in.TargetValue.DeepCopy()
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMetricTarget.
-func (in *CustomMetricTarget) DeepCopy() *CustomMetricTarget {
- if in == nil {
- return nil
- }
- out := new(CustomMetricTarget)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *CustomMetricTargetList) DeepCopyInto(out *CustomMetricTargetList) {
- *out = *in
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]CustomMetricTarget, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMetricTargetList.
-func (in *CustomMetricTargetList) DeepCopy() *CustomMetricTargetList {
- if in == nil {
- return nil
- }
- out := new(CustomMetricTargetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSet) DeepCopyInto(out *DaemonSet) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSet.
-func (in *DaemonSet) DeepCopy() *DaemonSet {
- if in == nil {
- return nil
- }
- out := new(DaemonSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DaemonSet) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetCondition) DeepCopyInto(out *DaemonSetCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetCondition.
-func (in *DaemonSetCondition) DeepCopy() *DaemonSetCondition {
- if in == nil {
- return nil
- }
- out := new(DaemonSetCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetList) DeepCopyInto(out *DaemonSetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]DaemonSet, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetList.
-func (in *DaemonSetList) DeepCopy() *DaemonSetList {
- if in == nil {
- return nil
- }
- out := new(DaemonSetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DaemonSetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetSpec) DeepCopyInto(out *DaemonSetSpec) {
- *out = *in
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy)
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetSpec.
-func (in *DaemonSetSpec) DeepCopy() *DaemonSetSpec {
- if in == nil {
- return nil
- }
- out := new(DaemonSetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetStatus) DeepCopyInto(out *DaemonSetStatus) {
- *out = *in
- if in.CollisionCount != nil {
- in, out := &in.CollisionCount, &out.CollisionCount
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]DaemonSetCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetStatus.
-func (in *DaemonSetStatus) DeepCopy() *DaemonSetStatus {
- if in == nil {
- return nil
- }
- out := new(DaemonSetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DaemonSetUpdateStrategy) DeepCopyInto(out *DaemonSetUpdateStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollingUpdateDaemonSet)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetUpdateStrategy.
-func (in *DaemonSetUpdateStrategy) DeepCopy() *DaemonSetUpdateStrategy {
- if in == nil {
- return nil
- }
- out := new(DaemonSetUpdateStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Deployment) DeepCopyInto(out *Deployment) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Deployment.
-func (in *Deployment) DeepCopy() *Deployment {
- if in == nil {
- return nil
- }
- out := new(Deployment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Deployment) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentCondition) DeepCopyInto(out *DeploymentCondition) {
- *out = *in
- in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime)
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentCondition.
-func (in *DeploymentCondition) DeepCopy() *DeploymentCondition {
- if in == nil {
- return nil
- }
- out := new(DeploymentCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentList) DeepCopyInto(out *DeploymentList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Deployment, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentList.
-func (in *DeploymentList) DeepCopy() *DeploymentList {
- if in == nil {
- return nil
- }
- out := new(DeploymentList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DeploymentList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentRollback) DeepCopyInto(out *DeploymentRollback) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- if in.UpdatedAnnotations != nil {
- in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- }
- out.RollbackTo = in.RollbackTo
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentRollback.
-func (in *DeploymentRollback) DeepCopy() *DeploymentRollback {
- if in == nil {
- return nil
- }
- out := new(DeploymentRollback)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DeploymentRollback) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- in.Strategy.DeepCopyInto(&out.Strategy)
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.RollbackTo != nil {
- in, out := &in.RollbackTo, &out.RollbackTo
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollbackConfig)
- **out = **in
- }
- }
- if in.ProgressDeadlineSeconds != nil {
- in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpec.
-func (in *DeploymentSpec) DeepCopy() *DeploymentSpec {
- if in == nil {
- return nil
- }
- out := new(DeploymentSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]DeploymentCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.CollisionCount != nil {
- in, out := &in.CollisionCount, &out.CollisionCount
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStatus.
-func (in *DeploymentStatus) DeepCopy() *DeploymentStatus {
- if in == nil {
- return nil
- }
- out := new(DeploymentStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- if *in == nil {
- *out = nil
- } else {
- *out = new(RollingUpdateDeployment)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStrategy.
-func (in *DeploymentStrategy) DeepCopy() *DeploymentStrategy {
- if in == nil {
- return nil
- }
- out := new(DeploymentStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *FSGroupStrategyOptions) DeepCopyInto(out *FSGroupStrategyOptions) {
- *out = *in
- if in.Ranges != nil {
- in, out := &in.Ranges, &out.Ranges
- *out = make([]IDRange, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FSGroupStrategyOptions.
-func (in *FSGroupStrategyOptions) DeepCopy() *FSGroupStrategyOptions {
- if in == nil {
- return nil
- }
- out := new(FSGroupStrategyOptions)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HTTPIngressPath) DeepCopyInto(out *HTTPIngressPath) {
- *out = *in
- out.Backend = in.Backend
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPIngressPath.
-func (in *HTTPIngressPath) DeepCopy() *HTTPIngressPath {
- if in == nil {
- return nil
- }
- out := new(HTTPIngressPath)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HTTPIngressRuleValue) DeepCopyInto(out *HTTPIngressRuleValue) {
- *out = *in
- if in.Paths != nil {
- in, out := &in.Paths, &out.Paths
- *out = make([]HTTPIngressPath, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPIngressRuleValue.
-func (in *HTTPIngressRuleValue) DeepCopy() *HTTPIngressRuleValue {
- if in == nil {
- return nil
- }
- out := new(HTTPIngressRuleValue)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HostPortRange) DeepCopyInto(out *HostPortRange) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPortRange.
-func (in *HostPortRange) DeepCopy() *HostPortRange {
- if in == nil {
- return nil
- }
- out := new(HostPortRange)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IDRange) DeepCopyInto(out *IDRange) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IDRange.
-func (in *IDRange) DeepCopy() *IDRange {
- if in == nil {
- return nil
- }
- out := new(IDRange)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IPBlock) DeepCopyInto(out *IPBlock) {
- *out = *in
- if in.Except != nil {
- in, out := &in.Except, &out.Except
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPBlock.
-func (in *IPBlock) DeepCopy() *IPBlock {
- if in == nil {
- return nil
- }
- out := new(IPBlock)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Ingress) DeepCopyInto(out *Ingress) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ingress.
-func (in *Ingress) DeepCopy() *Ingress {
- if in == nil {
- return nil
- }
- out := new(Ingress)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Ingress) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IngressBackend) DeepCopyInto(out *IngressBackend) {
- *out = *in
- out.ServicePort = in.ServicePort
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressBackend.
-func (in *IngressBackend) DeepCopy() *IngressBackend {
- if in == nil {
- return nil
- }
- out := new(IngressBackend)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IngressList) DeepCopyInto(out *IngressList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Ingress, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressList.
-func (in *IngressList) DeepCopy() *IngressList {
- if in == nil {
- return nil
- }
- out := new(IngressList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *IngressList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IngressRule) DeepCopyInto(out *IngressRule) {
- *out = *in
- in.IngressRuleValue.DeepCopyInto(&out.IngressRuleValue)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRule.
-func (in *IngressRule) DeepCopy() *IngressRule {
- if in == nil {
- return nil
- }
- out := new(IngressRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IngressRuleValue) DeepCopyInto(out *IngressRuleValue) {
- *out = *in
- if in.HTTP != nil {
- in, out := &in.HTTP, &out.HTTP
- if *in == nil {
- *out = nil
- } else {
- *out = new(HTTPIngressRuleValue)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRuleValue.
-func (in *IngressRuleValue) DeepCopy() *IngressRuleValue {
- if in == nil {
- return nil
- }
- out := new(IngressRuleValue)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IngressSpec) DeepCopyInto(out *IngressSpec) {
- *out = *in
- if in.Backend != nil {
- in, out := &in.Backend, &out.Backend
- if *in == nil {
- *out = nil
- } else {
- *out = new(IngressBackend)
- **out = **in
- }
- }
- if in.TLS != nil {
- in, out := &in.TLS, &out.TLS
- *out = make([]IngressTLS, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]IngressRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressSpec.
-func (in *IngressSpec) DeepCopy() *IngressSpec {
- if in == nil {
- return nil
- }
- out := new(IngressSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IngressStatus) DeepCopyInto(out *IngressStatus) {
- *out = *in
- in.LoadBalancer.DeepCopyInto(&out.LoadBalancer)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressStatus.
-func (in *IngressStatus) DeepCopy() *IngressStatus {
- if in == nil {
- return nil
- }
- out := new(IngressStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IngressTLS) DeepCopyInto(out *IngressTLS) {
- *out = *in
- if in.Hosts != nil {
- in, out := &in.Hosts, &out.Hosts
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressTLS.
-func (in *IngressTLS) DeepCopy() *IngressTLS {
- if in == nil {
- return nil
- }
- out := new(IngressTLS)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicy.
-func (in *NetworkPolicy) DeepCopy() *NetworkPolicy {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *NetworkPolicy) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyEgressRule) DeepCopyInto(out *NetworkPolicyEgressRule) {
- *out = *in
- if in.Ports != nil {
- in, out := &in.Ports, &out.Ports
- *out = make([]NetworkPolicyPort, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.To != nil {
- in, out := &in.To, &out.To
- *out = make([]NetworkPolicyPeer, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyEgressRule.
-func (in *NetworkPolicyEgressRule) DeepCopy() *NetworkPolicyEgressRule {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyEgressRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyIngressRule) DeepCopyInto(out *NetworkPolicyIngressRule) {
- *out = *in
- if in.Ports != nil {
- in, out := &in.Ports, &out.Ports
- *out = make([]NetworkPolicyPort, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.From != nil {
- in, out := &in.From, &out.From
- *out = make([]NetworkPolicyPeer, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyIngressRule.
-func (in *NetworkPolicyIngressRule) DeepCopy() *NetworkPolicyIngressRule {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyIngressRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyList) DeepCopyInto(out *NetworkPolicyList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]NetworkPolicy, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyList.
-func (in *NetworkPolicyList) DeepCopy() *NetworkPolicyList {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *NetworkPolicyList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyPeer) DeepCopyInto(out *NetworkPolicyPeer) {
- *out = *in
- if in.PodSelector != nil {
- in, out := &in.PodSelector, &out.PodSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.NamespaceSelector != nil {
- in, out := &in.NamespaceSelector, &out.NamespaceSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.IPBlock != nil {
- in, out := &in.IPBlock, &out.IPBlock
- if *in == nil {
- *out = nil
- } else {
- *out = new(IPBlock)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyPeer.
-func (in *NetworkPolicyPeer) DeepCopy() *NetworkPolicyPeer {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyPeer)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyPort) DeepCopyInto(out *NetworkPolicyPort) {
- *out = *in
- if in.Protocol != nil {
- in, out := &in.Protocol, &out.Protocol
- if *in == nil {
- *out = nil
- } else {
- *out = new(core_v1.Protocol)
- **out = **in
- }
- }
- if in.Port != nil {
- in, out := &in.Port, &out.Port
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyPort.
-func (in *NetworkPolicyPort) DeepCopy() *NetworkPolicyPort {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyPort)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicySpec) DeepCopyInto(out *NetworkPolicySpec) {
- *out = *in
- in.PodSelector.DeepCopyInto(&out.PodSelector)
- if in.Ingress != nil {
- in, out := &in.Ingress, &out.Ingress
- *out = make([]NetworkPolicyIngressRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Egress != nil {
- in, out := &in.Egress, &out.Egress
- *out = make([]NetworkPolicyEgressRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.PolicyTypes != nil {
- in, out := &in.PolicyTypes, &out.PolicyTypes
- *out = make([]PolicyType, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicySpec.
-func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicySpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodSecurityPolicy) DeepCopyInto(out *PodSecurityPolicy) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicy.
-func (in *PodSecurityPolicy) DeepCopy() *PodSecurityPolicy {
- if in == nil {
- return nil
- }
- out := new(PodSecurityPolicy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PodSecurityPolicy) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodSecurityPolicyList) DeepCopyInto(out *PodSecurityPolicyList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]PodSecurityPolicy, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyList.
-func (in *PodSecurityPolicyList) DeepCopy() *PodSecurityPolicyList {
- if in == nil {
- return nil
- }
- out := new(PodSecurityPolicyList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PodSecurityPolicyList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodSecurityPolicySpec) DeepCopyInto(out *PodSecurityPolicySpec) {
- *out = *in
- if in.DefaultAddCapabilities != nil {
- in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities
- *out = make([]core_v1.Capability, len(*in))
- copy(*out, *in)
- }
- if in.RequiredDropCapabilities != nil {
- in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities
- *out = make([]core_v1.Capability, len(*in))
- copy(*out, *in)
- }
- if in.AllowedCapabilities != nil {
- in, out := &in.AllowedCapabilities, &out.AllowedCapabilities
- *out = make([]core_v1.Capability, len(*in))
- copy(*out, *in)
- }
- if in.Volumes != nil {
- in, out := &in.Volumes, &out.Volumes
- *out = make([]FSType, len(*in))
- copy(*out, *in)
- }
- if in.HostPorts != nil {
- in, out := &in.HostPorts, &out.HostPorts
- *out = make([]HostPortRange, len(*in))
- copy(*out, *in)
- }
- in.SELinux.DeepCopyInto(&out.SELinux)
- in.RunAsUser.DeepCopyInto(&out.RunAsUser)
- in.SupplementalGroups.DeepCopyInto(&out.SupplementalGroups)
- in.FSGroup.DeepCopyInto(&out.FSGroup)
- if in.DefaultAllowPrivilegeEscalation != nil {
- in, out := &in.DefaultAllowPrivilegeEscalation, &out.DefaultAllowPrivilegeEscalation
- if *in == nil {
- *out = nil
- } else {
- *out = new(bool)
- **out = **in
- }
- }
- if in.AllowPrivilegeEscalation != nil {
- in, out := &in.AllowPrivilegeEscalation, &out.AllowPrivilegeEscalation
- if *in == nil {
- *out = nil
- } else {
- *out = new(bool)
- **out = **in
- }
- }
- if in.AllowedHostPaths != nil {
- in, out := &in.AllowedHostPaths, &out.AllowedHostPaths
- *out = make([]AllowedHostPath, len(*in))
- copy(*out, *in)
- }
- if in.AllowedFlexVolumes != nil {
- in, out := &in.AllowedFlexVolumes, &out.AllowedFlexVolumes
- *out = make([]AllowedFlexVolume, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicySpec.
-func (in *PodSecurityPolicySpec) DeepCopy() *PodSecurityPolicySpec {
- if in == nil {
- return nil
- }
- out := new(PodSecurityPolicySpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSet) DeepCopyInto(out *ReplicaSet) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSet.
-func (in *ReplicaSet) DeepCopy() *ReplicaSet {
- if in == nil {
- return nil
- }
- out := new(ReplicaSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ReplicaSet) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetCondition) DeepCopyInto(out *ReplicaSetCondition) {
- *out = *in
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetCondition.
-func (in *ReplicaSetCondition) DeepCopy() *ReplicaSetCondition {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetList) DeepCopyInto(out *ReplicaSetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ReplicaSet, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetList.
-func (in *ReplicaSetList) DeepCopy() *ReplicaSetList {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ReplicaSetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetSpec) DeepCopyInto(out *ReplicaSetSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- if *in == nil {
- *out = nil
- } else {
- *out = new(int32)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- in.Template.DeepCopyInto(&out.Template)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetSpec.
-func (in *ReplicaSetSpec) DeepCopy() *ReplicaSetSpec {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]ReplicaSetCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetStatus.
-func (in *ReplicaSetStatus) DeepCopy() *ReplicaSetStatus {
- if in == nil {
- return nil
- }
- out := new(ReplicaSetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ReplicationControllerDummy) DeepCopyInto(out *ReplicationControllerDummy) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationControllerDummy.
-func (in *ReplicationControllerDummy) DeepCopy() *ReplicationControllerDummy {
- if in == nil {
- return nil
- }
- out := new(ReplicationControllerDummy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ReplicationControllerDummy) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollbackConfig) DeepCopyInto(out *RollbackConfig) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollbackConfig.
-func (in *RollbackConfig) DeepCopy() *RollbackConfig {
- if in == nil {
- return nil
- }
- out := new(RollbackConfig)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) {
- *out = *in
- if in.MaxUnavailable != nil {
- in, out := &in.MaxUnavailable, &out.MaxUnavailable
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateDaemonSet.
-func (in *RollingUpdateDaemonSet) DeepCopy() *RollingUpdateDaemonSet {
- if in == nil {
- return nil
- }
- out := new(RollingUpdateDaemonSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RollingUpdateDeployment) DeepCopyInto(out *RollingUpdateDeployment) {
- *out = *in
- if in.MaxUnavailable != nil {
- in, out := &in.MaxUnavailable, &out.MaxUnavailable
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- if in.MaxSurge != nil {
- in, out := &in.MaxSurge, &out.MaxSurge
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateDeployment.
-func (in *RollingUpdateDeployment) DeepCopy() *RollingUpdateDeployment {
- if in == nil {
- return nil
- }
- out := new(RollingUpdateDeployment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RunAsUserStrategyOptions) DeepCopyInto(out *RunAsUserStrategyOptions) {
- *out = *in
- if in.Ranges != nil {
- in, out := &in.Ranges, &out.Ranges
- *out = make([]IDRange, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunAsUserStrategyOptions.
-func (in *RunAsUserStrategyOptions) DeepCopy() *RunAsUserStrategyOptions {
- if in == nil {
- return nil
- }
- out := new(RunAsUserStrategyOptions)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SELinuxStrategyOptions) DeepCopyInto(out *SELinuxStrategyOptions) {
- *out = *in
- if in.SELinuxOptions != nil {
- in, out := &in.SELinuxOptions, &out.SELinuxOptions
- if *in == nil {
- *out = nil
- } else {
- *out = new(core_v1.SELinuxOptions)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SELinuxStrategyOptions.
-func (in *SELinuxStrategyOptions) DeepCopy() *SELinuxStrategyOptions {
- if in == nil {
- return nil
- }
- out := new(SELinuxStrategyOptions)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Scale) DeepCopyInto(out *Scale) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- out.Spec = in.Spec
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scale.
-func (in *Scale) DeepCopy() *Scale {
- if in == nil {
- return nil
- }
- out := new(Scale)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Scale) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ScaleSpec) DeepCopyInto(out *ScaleSpec) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleSpec.
-func (in *ScaleSpec) DeepCopy() *ScaleSpec {
- if in == nil {
- return nil
- }
- out := new(ScaleSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ScaleStatus) DeepCopyInto(out *ScaleStatus) {
- *out = *in
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleStatus.
-func (in *ScaleStatus) DeepCopy() *ScaleStatus {
- if in == nil {
- return nil
- }
- out := new(ScaleStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SupplementalGroupsStrategyOptions) DeepCopyInto(out *SupplementalGroupsStrategyOptions) {
- *out = *in
- if in.Ranges != nil {
- in, out := &in.Ranges, &out.Ranges
- *out = make([]IDRange, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupplementalGroupsStrategyOptions.
-func (in *SupplementalGroupsStrategyOptions) DeepCopy() *SupplementalGroupsStrategyOptions {
- if in == nil {
- return nil
- }
- out := new(SupplementalGroupsStrategyOptions)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/networking/v1/doc.go b/vendor/k8s.io/api/networking/v1/doc.go
deleted file mode 100644
index ef9ae2ae4..000000000
--- a/vendor/k8s.io/api/networking/v1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-// +groupName=networking.k8s.io
-package v1 // import "k8s.io/api/networking/v1"
diff --git a/vendor/k8s.io/api/networking/v1/generated.pb.go b/vendor/k8s.io/api/networking/v1/generated.pb.go
deleted file mode 100644
index 05aaf1d9a..000000000
--- a/vendor/k8s.io/api/networking/v1/generated.pb.go
+++ /dev/null
@@ -1,1869 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/networking/v1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/networking/v1/generated.proto
-
- It has these top-level messages:
- IPBlock
- NetworkPolicy
- NetworkPolicyEgressRule
- NetworkPolicyIngressRule
- NetworkPolicyList
- NetworkPolicyPeer
- NetworkPolicyPort
- NetworkPolicySpec
-*/
-package v1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *IPBlock) Reset() { *m = IPBlock{} }
-func (*IPBlock) ProtoMessage() {}
-func (*IPBlock) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} }
-func (*NetworkPolicy) ProtoMessage() {}
-func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} }
-func (*NetworkPolicyEgressRule) ProtoMessage() {}
-func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} }
-func (*NetworkPolicyIngressRule) ProtoMessage() {}
-func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{3}
-}
-
-func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} }
-func (*NetworkPolicyList) ProtoMessage() {}
-func (*NetworkPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} }
-func (*NetworkPolicyPeer) ProtoMessage() {}
-func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} }
-func (*NetworkPolicyPort) ProtoMessage() {}
-func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} }
-func (*NetworkPolicySpec) ProtoMessage() {}
-func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func init() {
- proto.RegisterType((*IPBlock)(nil), "k8s.io.api.networking.v1.IPBlock")
- proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.api.networking.v1.NetworkPolicy")
- proto.RegisterType((*NetworkPolicyEgressRule)(nil), "k8s.io.api.networking.v1.NetworkPolicyEgressRule")
- proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.api.networking.v1.NetworkPolicyIngressRule")
- proto.RegisterType((*NetworkPolicyList)(nil), "k8s.io.api.networking.v1.NetworkPolicyList")
- proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.api.networking.v1.NetworkPolicyPeer")
- proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.api.networking.v1.NetworkPolicyPort")
- proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.api.networking.v1.NetworkPolicySpec")
-}
-func (m *IPBlock) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IPBlock) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.CIDR)))
- i += copy(dAtA[i:], m.CIDR)
- if len(m.Except) > 0 {
- for _, s := range m.Except {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *NetworkPolicy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- return i, nil
-}
-
-func (m *NetworkPolicyEgressRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicyEgressRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Ports) > 0 {
- for _, msg := range m.Ports {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.To) > 0 {
- for _, msg := range m.To {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *NetworkPolicyIngressRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicyIngressRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Ports) > 0 {
- for _, msg := range m.Ports {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.From) > 0 {
- for _, msg := range m.From {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *NetworkPolicyList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicyList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n3, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *NetworkPolicyPeer) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicyPeer) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.PodSelector != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
- n4, err := m.PodSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- }
- if m.NamespaceSelector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.NamespaceSelector.Size()))
- n5, err := m.NamespaceSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- }
- if m.IPBlock != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.IPBlock.Size()))
- n6, err := m.IPBlock.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- }
- return i, nil
-}
-
-func (m *NetworkPolicyPort) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicyPort) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Protocol != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Protocol)))
- i += copy(dAtA[i:], *m.Protocol)
- }
- if m.Port != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size()))
- n7, err := m.Port.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- }
- return i, nil
-}
-
-func (m *NetworkPolicySpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkPolicySpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
- n8, err := m.PodSelector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- if len(m.Ingress) > 0 {
- for _, msg := range m.Ingress {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.Egress) > 0 {
- for _, msg := range m.Egress {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.PolicyTypes) > 0 {
- for _, s := range m.PolicyTypes {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *IPBlock) Size() (n int) {
- var l int
- _ = l
- l = len(m.CIDR)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Except) > 0 {
- for _, s := range m.Except {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *NetworkPolicy) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *NetworkPolicyEgressRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Ports) > 0 {
- for _, e := range m.Ports {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.To) > 0 {
- for _, e := range m.To {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *NetworkPolicyIngressRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Ports) > 0 {
- for _, e := range m.Ports {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.From) > 0 {
- for _, e := range m.From {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *NetworkPolicyList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *NetworkPolicyPeer) Size() (n int) {
- var l int
- _ = l
- if m.PodSelector != nil {
- l = m.PodSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.NamespaceSelector != nil {
- l = m.NamespaceSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.IPBlock != nil {
- l = m.IPBlock.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *NetworkPolicyPort) Size() (n int) {
- var l int
- _ = l
- if m.Protocol != nil {
- l = len(*m.Protocol)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Port != nil {
- l = m.Port.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *NetworkPolicySpec) Size() (n int) {
- var l int
- _ = l
- l = m.PodSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Ingress) > 0 {
- for _, e := range m.Ingress {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Egress) > 0 {
- for _, e := range m.Egress {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.PolicyTypes) > 0 {
- for _, s := range m.PolicyTypes {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *IPBlock) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IPBlock{`,
- `CIDR:` + fmt.Sprintf("%v", this.CIDR) + `,`,
- `Except:` + fmt.Sprintf("%v", this.Except) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicy{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicyEgressRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicyEgressRule{`,
- `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "NetworkPolicyPort", "NetworkPolicyPort", 1), `&`, ``, 1) + `,`,
- `To:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.To), "NetworkPolicyPeer", "NetworkPolicyPeer", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicyIngressRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicyIngressRule{`,
- `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "NetworkPolicyPort", "NetworkPolicyPort", 1), `&`, ``, 1) + `,`,
- `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "NetworkPolicyPeer", "NetworkPolicyPeer", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicyList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicyList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "NetworkPolicy", "NetworkPolicy", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicyPeer) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicyPeer{`,
- `PodSelector:` + strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `IPBlock:` + strings.Replace(fmt.Sprintf("%v", this.IPBlock), "IPBlock", "IPBlock", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicyPort) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicyPort{`,
- `Protocol:` + valueToStringGenerated(this.Protocol) + `,`,
- `Port:` + strings.Replace(fmt.Sprintf("%v", this.Port), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkPolicySpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkPolicySpec{`,
- `PodSelector:` + strings.Replace(strings.Replace(this.PodSelector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
- `Ingress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ingress), "NetworkPolicyIngressRule", "NetworkPolicyIngressRule", 1), `&`, ``, 1) + `,`,
- `Egress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Egress), "NetworkPolicyEgressRule", "NetworkPolicyEgressRule", 1), `&`, ``, 1) + `,`,
- `PolicyTypes:` + fmt.Sprintf("%v", this.PolicyTypes) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *IPBlock) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IPBlock: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IPBlock: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CIDR", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CIDR = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Except", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Except = append(m.Except, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicyEgressRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicyEgressRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicyEgressRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ports = append(m.Ports, NetworkPolicyPort{})
- if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field To", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.To = append(m.To, NetworkPolicyPeer{})
- if err := m.To[len(m.To)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicyIngressRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicyIngressRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicyIngressRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ports = append(m.Ports, NetworkPolicyPort{})
- if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.From = append(m.From, NetworkPolicyPeer{})
- if err := m.From[len(m.From)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicyList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, NetworkPolicy{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicyPeer: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.PodSelector == nil {
- m.PodSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NamespaceSelector == nil {
- m.NamespaceSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field IPBlock", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.IPBlock == nil {
- m.IPBlock = &IPBlock{}
- }
- if err := m.IPBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicyPort) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicyPort: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicyPort: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := k8s_io_api_core_v1.Protocol(dAtA[iNdEx:postIndex])
- m.Protocol = &s
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Port == nil {
- m.Port = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkPolicySpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ingress = append(m.Ingress, NetworkPolicyIngressRule{})
- if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Egress", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Egress = append(m.Egress, NetworkPolicyEgressRule{})
- if err := m.Egress[len(m.Egress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PolicyTypes", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PolicyTypes = append(m.PolicyTypes, PolicyType(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/networking/v1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 829 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4d, 0x6f, 0x1b, 0x45,
- 0x18, 0xf6, 0x3a, 0xce, 0x47, 0x27, 0x94, 0x92, 0x41, 0x08, 0x2b, 0x88, 0x75, 0xd8, 0x0b, 0x41,
- 0x55, 0x67, 0x71, 0x8b, 0x10, 0x37, 0xc4, 0x42, 0x29, 0x96, 0x9a, 0xc4, 0x9a, 0xf4, 0x02, 0x02,
- 0x89, 0xf5, 0xfa, 0xcd, 0x66, 0x6a, 0xef, 0xce, 0x6a, 0x66, 0x6c, 0x92, 0x1b, 0x3f, 0x81, 0x1f,
- 0xc2, 0x91, 0x1b, 0x87, 0x72, 0xcc, 0xb1, 0xc7, 0x9e, 0x56, 0x64, 0xf9, 0x17, 0x39, 0xa1, 0x99,
- 0x1d, 0x7b, 0xfd, 0x51, 0x0b, 0xb7, 0xa2, 0x37, 0xcf, 0x3b, 0xcf, 0xf3, 0xbc, 0x1f, 0xf3, 0xf8,
- 0x5d, 0xf4, 0xd5, 0xe0, 0x0b, 0x49, 0x18, 0xf7, 0x07, 0xa3, 0x1e, 0x88, 0x14, 0x14, 0x48, 0x7f,
- 0x0c, 0x69, 0x9f, 0x0b, 0xdf, 0x5e, 0x84, 0x19, 0xf3, 0x53, 0x50, 0xbf, 0x70, 0x31, 0x60, 0x69,
- 0xec, 0x8f, 0xdb, 0x7e, 0x0c, 0x29, 0x88, 0x50, 0x41, 0x9f, 0x64, 0x82, 0x2b, 0x8e, 0x9b, 0x25,
- 0x92, 0x84, 0x19, 0x23, 0x15, 0x92, 0x8c, 0xdb, 0xfb, 0xf7, 0x62, 0xa6, 0xce, 0x47, 0x3d, 0x12,
- 0xf1, 0xc4, 0x8f, 0x79, 0xcc, 0x7d, 0x43, 0xe8, 0x8d, 0xce, 0xcc, 0xc9, 0x1c, 0xcc, 0xaf, 0x52,
- 0x68, 0xdf, 0x9b, 0x49, 0x19, 0x71, 0x01, 0x2f, 0x49, 0xb6, 0x7f, 0x6f, 0x06, 0x03, 0x17, 0x0a,
- 0x52, 0xc9, 0x78, 0x2a, 0xfd, 0x71, 0xbb, 0x07, 0x2a, 0x5c, 0x86, 0x7f, 0x32, 0x03, 0xcf, 0xf8,
- 0x90, 0x45, 0x97, 0x2b, 0xa1, 0x9f, 0x55, 0xd0, 0x24, 0x8c, 0xce, 0x59, 0x0a, 0xe2, 0xd2, 0xcf,
- 0x06, 0xb1, 0x0e, 0x48, 0x3f, 0x01, 0x15, 0xbe, 0xac, 0x1e, 0x7f, 0x15, 0x4b, 0x8c, 0x52, 0xc5,
- 0x12, 0x58, 0x22, 0x7c, 0xfe, 0x5f, 0x04, 0x19, 0x9d, 0x43, 0x12, 0x2e, 0xf1, 0x1e, 0xac, 0xe2,
- 0x8d, 0x14, 0x1b, 0xfa, 0x2c, 0x55, 0x52, 0x89, 0x45, 0x92, 0x77, 0x82, 0xb6, 0x3b, 0xdd, 0x60,
- 0xc8, 0xa3, 0x01, 0x3e, 0x40, 0x8d, 0x88, 0xf5, 0x45, 0xd3, 0x39, 0x70, 0x0e, 0x6f, 0x05, 0x6f,
- 0x5d, 0xe5, 0xad, 0x5a, 0x91, 0xb7, 0x1a, 0x5f, 0x77, 0xbe, 0xa1, 0xd4, 0xdc, 0x60, 0x0f, 0x6d,
- 0xc1, 0x45, 0x04, 0x99, 0x6a, 0xd6, 0x0f, 0x36, 0x0e, 0x6f, 0x05, 0xa8, 0xc8, 0x5b, 0x5b, 0x0f,
- 0x4d, 0x84, 0xda, 0x1b, 0xef, 0x2f, 0x07, 0xdd, 0x3e, 0x2e, 0xdf, 0xb8, 0x6b, 0xc6, 0x89, 0x7f,
- 0x46, 0x3b, 0x7a, 0x36, 0xfd, 0x50, 0x85, 0x46, 0x7b, 0xf7, 0xfe, 0xa7, 0xa4, 0x32, 0xc4, 0xb4,
- 0x54, 0x92, 0x0d, 0x62, 0x1d, 0x90, 0x44, 0xa3, 0xc9, 0xb8, 0x4d, 0x4e, 0x7a, 0x4f, 0x21, 0x52,
- 0x47, 0xa0, 0xc2, 0x00, 0xdb, 0x6a, 0x50, 0x15, 0xa3, 0x53, 0x55, 0x7c, 0x84, 0x1a, 0x32, 0x83,
- 0xa8, 0x59, 0x37, 0xea, 0x77, 0xc9, 0x2a, 0xbb, 0x91, 0xb9, 0xc2, 0x4e, 0x33, 0x88, 0xaa, 0x36,
- 0xf5, 0x89, 0x1a, 0x19, 0xef, 0x0f, 0x07, 0xbd, 0x3f, 0x87, 0x7c, 0x18, 0x0b, 0x90, 0x92, 0x8e,
- 0x86, 0x80, 0xbb, 0x68, 0x33, 0xe3, 0x42, 0xc9, 0xa6, 0x73, 0xb0, 0xf1, 0x0a, 0xb9, 0xba, 0x5c,
- 0xa8, 0xe0, 0xb6, 0xcd, 0xb5, 0xa9, 0x4f, 0x92, 0x96, 0x42, 0xf8, 0x11, 0xaa, 0x2b, 0x6e, 0x06,
- 0xfa, 0x0a, 0x72, 0x00, 0x22, 0x40, 0x56, 0xae, 0xfe, 0x84, 0xd3, 0xba, 0xe2, 0xde, 0x9f, 0x0e,
- 0x6a, 0xce, 0xa1, 0x3a, 0xe9, 0x9b, 0xac, 0xfb, 0x08, 0x35, 0xce, 0x04, 0x4f, 0x5e, 0xa7, 0xf2,
- 0xe9, 0xd0, 0xbf, 0x15, 0x3c, 0xa1, 0x46, 0xc6, 0x7b, 0xe6, 0xa0, 0xbd, 0x39, 0xe4, 0x63, 0x26,
- 0x15, 0xfe, 0x71, 0xc9, 0x3b, 0x64, 0x3d, 0xef, 0x68, 0xb6, 0x71, 0xce, 0x3b, 0x36, 0xd7, 0xce,
- 0x24, 0x32, 0xe3, 0x9b, 0xc7, 0x68, 0x93, 0x29, 0x48, 0xa4, 0xed, 0xe1, 0xe3, 0x35, 0x7b, 0xa8,
- 0x06, 0xd2, 0xd1, 0x6c, 0x5a, 0x8a, 0x78, 0xcf, 0xea, 0x0b, 0x1d, 0xe8, 0x5e, 0xf1, 0x19, 0xda,
- 0xcd, 0x78, 0xff, 0x14, 0x86, 0x10, 0x29, 0x2e, 0x6c, 0x13, 0x0f, 0xd6, 0x6c, 0x22, 0xec, 0xc1,
- 0x70, 0x42, 0x0d, 0xee, 0x14, 0x79, 0x6b, 0xb7, 0x5b, 0x69, 0xd1, 0x59, 0x61, 0x7c, 0x81, 0xf6,
- 0xd2, 0x30, 0x01, 0x99, 0x85, 0x11, 0x4c, 0xb3, 0xd5, 0x5f, 0x3f, 0xdb, 0x7b, 0x45, 0xde, 0xda,
- 0x3b, 0x5e, 0x54, 0xa4, 0xcb, 0x49, 0xf0, 0x77, 0x68, 0x9b, 0x65, 0x66, 0x85, 0x34, 0x37, 0x4c,
- 0xbe, 0x8f, 0x56, 0xcf, 0xd1, 0xee, 0x9a, 0x60, 0xb7, 0xc8, 0x5b, 0x93, 0xc5, 0x43, 0x27, 0x74,
- 0xef, 0xf7, 0x45, 0x0f, 0x68, 0xc3, 0xe1, 0x47, 0x68, 0xc7, 0xec, 0xaa, 0x88, 0x0f, 0xed, 0x6e,
- 0xba, 0xab, 0xdf, 0xb3, 0x6b, 0x63, 0x37, 0x79, 0xeb, 0x83, 0xe5, 0xcf, 0x02, 0x99, 0x5c, 0xd3,
- 0x29, 0x19, 0x1f, 0xa3, 0x86, 0xb6, 0xae, 0x9d, 0xca, 0xea, 0x25, 0xa4, 0xf7, 0x25, 0x29, 0xf7,
- 0x25, 0xe9, 0xa4, 0xea, 0x44, 0x9c, 0x2a, 0xc1, 0xd2, 0x38, 0xd8, 0xd1, 0x96, 0xd5, 0x25, 0x51,
- 0xa3, 0xe3, 0xdd, 0x2c, 0x3e, 0xb8, 0xde, 0x21, 0xf8, 0xe9, 0xff, 0xf6, 0xe0, 0xef, 0x5a, 0x9b,
- 0xad, 0x7e, 0xf4, 0x9f, 0xd0, 0x36, 0x2b, 0xff, 0xe4, 0xd6, 0xc2, 0xf7, 0xd7, 0xb4, 0xf0, 0xcc,
- 0x6a, 0x08, 0xee, 0xd8, 0x34, 0xdb, 0x93, 0xe0, 0x44, 0x13, 0x7f, 0x8f, 0xb6, 0xa0, 0x54, 0xdf,
- 0x30, 0xea, 0xed, 0x35, 0xd5, 0xab, 0x7d, 0x19, 0xbc, 0x6d, 0xc5, 0xb7, 0x6c, 0xcc, 0x0a, 0xe2,
- 0x2f, 0xf5, 0x94, 0x34, 0xf6, 0xc9, 0x65, 0x06, 0xb2, 0xd9, 0x30, 0xdf, 0x93, 0x0f, 0xcb, 0x66,
- 0xa7, 0xe1, 0x9b, 0xbc, 0x85, 0xaa, 0x23, 0x9d, 0x65, 0x04, 0x87, 0x57, 0xd7, 0x6e, 0xed, 0xf9,
- 0xb5, 0x5b, 0x7b, 0x71, 0xed, 0xd6, 0x7e, 0x2d, 0x5c, 0xe7, 0xaa, 0x70, 0x9d, 0xe7, 0x85, 0xeb,
- 0xbc, 0x28, 0x5c, 0xe7, 0xef, 0xc2, 0x75, 0x7e, 0xfb, 0xc7, 0xad, 0xfd, 0x50, 0x1f, 0xb7, 0xff,
- 0x0d, 0x00, 0x00, 0xff, 0xff, 0x48, 0x47, 0x24, 0xc9, 0xc1, 0x08, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/networking/v1/generated.proto b/vendor/k8s.io/api/networking/v1/generated.proto
deleted file mode 100644
index 06365ebe3..000000000
--- a/vendor/k8s.io/api/networking/v1/generated.proto
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.networking.v1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/api/extensions/v1beta1/generated.proto";
-import "k8s.io/api/policy/v1beta1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1";
-
-// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods
-// matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should
-// not be included within this rule.
-message IPBlock {
- // CIDR is a string representing the IP Block
- // Valid examples are "192.168.1.1/24"
- optional string cidr = 1;
-
- // Except is a slice of CIDRs that should not be included within an IP Block
- // Valid examples are "192.168.1.1/24"
- // Except values will be rejected if they are outside the CIDR range
- // +optional
- repeated string except = 2;
-}
-
-// NetworkPolicy describes what network traffic is allowed for a set of Pods
-message NetworkPolicy {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior for this NetworkPolicy.
- // +optional
- optional NetworkPolicySpec spec = 2;
-}
-
-// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
-// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
-// This type is beta-level in 1.8
-message NetworkPolicyEgressRule {
- // List of destination ports for outgoing traffic.
- // Each item in this list is combined using a logical OR. If this field is
- // empty or missing, this rule matches all ports (traffic not restricted by port).
- // If this field is present and contains at least one item, then this rule allows
- // traffic only if the traffic matches at least one port in the list.
- // +optional
- repeated NetworkPolicyPort ports = 1;
-
- // List of destinations for outgoing traffic of pods selected for this rule.
- // Items in this list are combined using a logical OR operation. If this field is
- // empty or missing, this rule matches all destinations (traffic not restricted by
- // destination). If this field is present and contains at least one item, this rule
- // allows traffic only if the traffic matches at least one item in the to list.
- // +optional
- repeated NetworkPolicyPeer to = 2;
-}
-
-// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
-// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
-message NetworkPolicyIngressRule {
- // List of ports which should be made accessible on the pods selected for this
- // rule. Each item in this list is combined using a logical OR. If this field is
- // empty or missing, this rule matches all ports (traffic not restricted by port).
- // If this field is present and contains at least one item, then this rule allows
- // traffic only if the traffic matches at least one port in the list.
- // +optional
- repeated NetworkPolicyPort ports = 1;
-
- // List of sources which should be able to access the pods selected for this rule.
- // Items in this list are combined using a logical OR operation. If this field is
- // empty or missing, this rule matches all sources (traffic not restricted by
- // source). If this field is present and contains at least on item, this rule
- // allows traffic only if the traffic matches at least one item in the from list.
- // +optional
- repeated NetworkPolicyPeer from = 2;
-}
-
-// NetworkPolicyList is a list of NetworkPolicy objects.
-message NetworkPolicyList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of schema objects.
- repeated NetworkPolicy items = 2;
-}
-
-// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields
-// must be specified.
-message NetworkPolicyPeer {
- // This is a label selector which selects Pods in this namespace. This field
- // follows standard label selector semantics. If present but empty, this selector
- // selects all pods in this namespace.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
-
- // Selects Namespaces using cluster scoped-labels. This matches all pods in all
- // namespaces selected by this label selector. This field follows standard label
- // selector semantics. If present but empty, this selector selects all namespaces.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2;
-
- // IPBlock defines policy on a particular IPBlock
- // +optional
- optional IPBlock ipBlock = 3;
-}
-
-// NetworkPolicyPort describes a port to allow traffic on
-message NetworkPolicyPort {
- // The protocol (TCP or UDP) which traffic must match. If not specified, this
- // field defaults to TCP.
- // +optional
- optional string protocol = 1;
-
- // The port on the given protocol. This can either be a numerical or named port on
- // a pod. If this field is not provided, this matches all port names and numbers.
- // +optional
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
-}
-
-// NetworkPolicySpec provides the specification of a NetworkPolicy
-message NetworkPolicySpec {
- // Selects the pods to which this NetworkPolicy object applies. The array of
- // ingress rules is applied to any pods selected by this field. Multiple network
- // policies can select the same set of pods. In this case, the ingress rules for
- // each are combined additively. This field is NOT optional and follows standard
- // label selector semantics. An empty podSelector matches all pods in this
- // namespace.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
-
- // List of ingress rules to be applied to the selected pods. Traffic is allowed to
- // a pod if there are no NetworkPolicies selecting the pod
- // (and cluster policy otherwise allows the traffic), OR if the traffic source is
- // the pod's local node, OR if the traffic matches at least one ingress rule
- // across all of the NetworkPolicy objects whose podSelector matches the pod. If
- // this field is empty then this NetworkPolicy does not allow any traffic (and serves
- // solely to ensure that the pods it selects are isolated by default)
- // +optional
- repeated NetworkPolicyIngressRule ingress = 2;
-
- // List of egress rules to be applied to the selected pods. Outgoing traffic is
- // allowed if there are no NetworkPolicies selecting the pod (and cluster policy
- // otherwise allows the traffic), OR if the traffic matches at least one egress rule
- // across all of the NetworkPolicy objects whose podSelector matches the pod. If
- // this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
- // solely to ensure that the pods it selects are isolated by default).
- // This field is beta-level in 1.8
- // +optional
- repeated NetworkPolicyEgressRule egress = 3;
-
- // List of rule types that the NetworkPolicy relates to.
- // Valid options are Ingress, Egress, or Ingress,Egress.
- // If this field is not specified, it will default based on the existence of Ingress or Egress rules;
- // policies that contain an Egress section are assumed to affect Egress, and all policies
- // (whether or not they contain an Ingress section) are assumed to affect Ingress.
- // If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
- // Likewise, if you want to write a policy that specifies that no egress is allowed,
- // you must specify a policyTypes value that include "Egress" (since such a policy would not include
- // an Egress section and would otherwise default to just [ "Ingress" ]).
- // This field is beta-level in 1.8
- // +optional
- repeated string policyTypes = 4;
-}
-
diff --git a/vendor/k8s.io/api/networking/v1/register.go b/vendor/k8s.io/api/networking/v1/register.go
deleted file mode 100644
index f47f22e9e..000000000
--- a/vendor/k8s.io/api/networking/v1/register.go
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "networking.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &NetworkPolicy{},
- &NetworkPolicyList{},
- )
-
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/networking/v1/types.go b/vendor/k8s.io/api/networking/v1/types.go
deleted file mode 100644
index 57bc8005e..000000000
--- a/vendor/k8s.io/api/networking/v1/types.go
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// NetworkPolicy describes what network traffic is allowed for a set of Pods
-type NetworkPolicy struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior for this NetworkPolicy.
- // +optional
- Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-}
-
-// Policy Type string describes the NetworkPolicy type
-// This type is beta-level in 1.8
-type PolicyType string
-
-const (
- // PolicyTypeIngress is a NetworkPolicy that affects ingress traffic on selected pods
- PolicyTypeIngress PolicyType = "Ingress"
- // PolicyTypeEgress is a NetworkPolicy that affects egress traffic on selected pods
- PolicyTypeEgress PolicyType = "Egress"
-)
-
-// NetworkPolicySpec provides the specification of a NetworkPolicy
-type NetworkPolicySpec struct {
- // Selects the pods to which this NetworkPolicy object applies. The array of
- // ingress rules is applied to any pods selected by this field. Multiple network
- // policies can select the same set of pods. In this case, the ingress rules for
- // each are combined additively. This field is NOT optional and follows standard
- // label selector semantics. An empty podSelector matches all pods in this
- // namespace.
- PodSelector metav1.LabelSelector `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"`
-
- // List of ingress rules to be applied to the selected pods. Traffic is allowed to
- // a pod if there are no NetworkPolicies selecting the pod
- // (and cluster policy otherwise allows the traffic), OR if the traffic source is
- // the pod's local node, OR if the traffic matches at least one ingress rule
- // across all of the NetworkPolicy objects whose podSelector matches the pod. If
- // this field is empty then this NetworkPolicy does not allow any traffic (and serves
- // solely to ensure that the pods it selects are isolated by default)
- // +optional
- Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"`
-
- // List of egress rules to be applied to the selected pods. Outgoing traffic is
- // allowed if there are no NetworkPolicies selecting the pod (and cluster policy
- // otherwise allows the traffic), OR if the traffic matches at least one egress rule
- // across all of the NetworkPolicy objects whose podSelector matches the pod. If
- // this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
- // solely to ensure that the pods it selects are isolated by default).
- // This field is beta-level in 1.8
- // +optional
- Egress []NetworkPolicyEgressRule `json:"egress,omitempty" protobuf:"bytes,3,rep,name=egress"`
-
- // List of rule types that the NetworkPolicy relates to.
- // Valid options are Ingress, Egress, or Ingress,Egress.
- // If this field is not specified, it will default based on the existence of Ingress or Egress rules;
- // policies that contain an Egress section are assumed to affect Egress, and all policies
- // (whether or not they contain an Ingress section) are assumed to affect Ingress.
- // If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
- // Likewise, if you want to write a policy that specifies that no egress is allowed,
- // you must specify a policyTypes value that include "Egress" (since such a policy would not include
- // an Egress section and would otherwise default to just [ "Ingress" ]).
- // This field is beta-level in 1.8
- // +optional
- PolicyTypes []PolicyType `json:"policyTypes,omitempty" protobuf:"bytes,4,rep,name=policyTypes,casttype=PolicyType"`
-}
-
-// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
-// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
-type NetworkPolicyIngressRule struct {
- // List of ports which should be made accessible on the pods selected for this
- // rule. Each item in this list is combined using a logical OR. If this field is
- // empty or missing, this rule matches all ports (traffic not restricted by port).
- // If this field is present and contains at least one item, then this rule allows
- // traffic only if the traffic matches at least one port in the list.
- // +optional
- Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
-
- // List of sources which should be able to access the pods selected for this rule.
- // Items in this list are combined using a logical OR operation. If this field is
- // empty or missing, this rule matches all sources (traffic not restricted by
- // source). If this field is present and contains at least on item, this rule
- // allows traffic only if the traffic matches at least one item in the from list.
- // +optional
- From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
-}
-
-// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
-// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
-// This type is beta-level in 1.8
-type NetworkPolicyEgressRule struct {
- // List of destination ports for outgoing traffic.
- // Each item in this list is combined using a logical OR. If this field is
- // empty or missing, this rule matches all ports (traffic not restricted by port).
- // If this field is present and contains at least one item, then this rule allows
- // traffic only if the traffic matches at least one port in the list.
- // +optional
- Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
-
- // List of destinations for outgoing traffic of pods selected for this rule.
- // Items in this list are combined using a logical OR operation. If this field is
- // empty or missing, this rule matches all destinations (traffic not restricted by
- // destination). If this field is present and contains at least one item, this rule
- // allows traffic only if the traffic matches at least one item in the to list.
- // +optional
- To []NetworkPolicyPeer `json:"to,omitempty" protobuf:"bytes,2,rep,name=to"`
-}
-
-// NetworkPolicyPort describes a port to allow traffic on
-type NetworkPolicyPort struct {
- // The protocol (TCP or UDP) which traffic must match. If not specified, this
- // field defaults to TCP.
- // +optional
- Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/api/core/v1.Protocol"`
-
- // The port on the given protocol. This can either be a numerical or named port on
- // a pod. If this field is not provided, this matches all port names and numbers.
- // +optional
- Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"`
-}
-
-// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods
-// matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should
-// not be included within this rule.
-type IPBlock struct {
- // CIDR is a string representing the IP Block
- // Valid examples are "192.168.1.1/24"
- CIDR string `json:"cidr" protobuf:"bytes,1,name=cidr"`
- // Except is a slice of CIDRs that should not be included within an IP Block
- // Valid examples are "192.168.1.1/24"
- // Except values will be rejected if they are outside the CIDR range
- // +optional
- Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"`
-}
-
-// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields
-// must be specified.
-type NetworkPolicyPeer struct {
- // This is a label selector which selects Pods in this namespace. This field
- // follows standard label selector semantics. If present but empty, this selector
- // selects all pods in this namespace.
- // +optional
- PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"`
-
- // Selects Namespaces using cluster scoped-labels. This matches all pods in all
- // namespaces selected by this label selector. This field follows standard label
- // selector semantics. If present but empty, this selector selects all namespaces.
- // +optional
- NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`
-
- // IPBlock defines policy on a particular IPBlock
- // +optional
- IPBlock *IPBlock `json:"ipBlock,omitempty" protobuf:"bytes,3,rep,name=ipBlock"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// NetworkPolicyList is a list of NetworkPolicy objects.
-type NetworkPolicyList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of schema objects.
- Items []NetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go
deleted file mode 100644
index ad0bafeac..000000000
--- a/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-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 v1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_IPBlock = map[string]string{
- "": "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.",
- "cidr": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"",
- "except": "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" Except values will be rejected if they are outside the CIDR range",
-}
-
-func (IPBlock) SwaggerDoc() map[string]string {
- return map_IPBlock
-}
-
-var map_NetworkPolicy = map[string]string{
- "": "NetworkPolicy describes what network traffic is allowed for a set of Pods",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Specification of the desired behavior for this NetworkPolicy.",
-}
-
-func (NetworkPolicy) SwaggerDoc() map[string]string {
- return map_NetworkPolicy
-}
-
-var map_NetworkPolicyEgressRule = map[string]string{
- "": "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8",
- "ports": "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
- "to": "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.",
-}
-
-func (NetworkPolicyEgressRule) SwaggerDoc() map[string]string {
- return map_NetworkPolicyEgressRule
-}
-
-var map_NetworkPolicyIngressRule = map[string]string{
- "": "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.",
- "ports": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
- "from": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.",
-}
-
-func (NetworkPolicyIngressRule) SwaggerDoc() map[string]string {
- return map_NetworkPolicyIngressRule
-}
-
-var map_NetworkPolicyList = map[string]string{
- "": "NetworkPolicyList is a list of NetworkPolicy objects.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is a list of schema objects.",
-}
-
-func (NetworkPolicyList) SwaggerDoc() map[string]string {
- return map_NetworkPolicyList
-}
-
-var map_NetworkPolicyPeer = map[string]string{
- "": "NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields must be specified.",
- "podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.",
- "namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.",
- "ipBlock": "IPBlock defines policy on a particular IPBlock",
-}
-
-func (NetworkPolicyPeer) SwaggerDoc() map[string]string {
- return map_NetworkPolicyPeer
-}
-
-var map_NetworkPolicyPort = map[string]string{
- "": "NetworkPolicyPort describes a port to allow traffic on",
- "protocol": "The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.",
- "port": "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers.",
-}
-
-func (NetworkPolicyPort) SwaggerDoc() map[string]string {
- return map_NetworkPolicyPort
-}
-
-var map_NetworkPolicySpec = map[string]string{
- "": "NetworkPolicySpec provides the specification of a NetworkPolicy",
- "podSelector": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.",
- "ingress": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)",
- "egress": "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8",
- "policyTypes": "List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8",
-}
-
-func (NetworkPolicySpec) SwaggerDoc() map[string]string {
- return map_NetworkPolicySpec
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go
deleted file mode 100644
index 8a7c1530e..000000000
--- a/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,282 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1
-
-import (
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- intstr "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IPBlock) DeepCopyInto(out *IPBlock) {
- *out = *in
- if in.Except != nil {
- in, out := &in.Except, &out.Except
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPBlock.
-func (in *IPBlock) DeepCopy() *IPBlock {
- if in == nil {
- return nil
- }
- out := new(IPBlock)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicy.
-func (in *NetworkPolicy) DeepCopy() *NetworkPolicy {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *NetworkPolicy) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyEgressRule) DeepCopyInto(out *NetworkPolicyEgressRule) {
- *out = *in
- if in.Ports != nil {
- in, out := &in.Ports, &out.Ports
- *out = make([]NetworkPolicyPort, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.To != nil {
- in, out := &in.To, &out.To
- *out = make([]NetworkPolicyPeer, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyEgressRule.
-func (in *NetworkPolicyEgressRule) DeepCopy() *NetworkPolicyEgressRule {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyEgressRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyIngressRule) DeepCopyInto(out *NetworkPolicyIngressRule) {
- *out = *in
- if in.Ports != nil {
- in, out := &in.Ports, &out.Ports
- *out = make([]NetworkPolicyPort, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.From != nil {
- in, out := &in.From, &out.From
- *out = make([]NetworkPolicyPeer, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyIngressRule.
-func (in *NetworkPolicyIngressRule) DeepCopy() *NetworkPolicyIngressRule {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyIngressRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyList) DeepCopyInto(out *NetworkPolicyList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]NetworkPolicy, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyList.
-func (in *NetworkPolicyList) DeepCopy() *NetworkPolicyList {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *NetworkPolicyList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyPeer) DeepCopyInto(out *NetworkPolicyPeer) {
- *out = *in
- if in.PodSelector != nil {
- in, out := &in.PodSelector, &out.PodSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(meta_v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.NamespaceSelector != nil {
- in, out := &in.NamespaceSelector, &out.NamespaceSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(meta_v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.IPBlock != nil {
- in, out := &in.IPBlock, &out.IPBlock
- if *in == nil {
- *out = nil
- } else {
- *out = new(IPBlock)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyPeer.
-func (in *NetworkPolicyPeer) DeepCopy() *NetworkPolicyPeer {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyPeer)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyPort) DeepCopyInto(out *NetworkPolicyPort) {
- *out = *in
- if in.Protocol != nil {
- in, out := &in.Protocol, &out.Protocol
- if *in == nil {
- *out = nil
- } else {
- *out = new(core_v1.Protocol)
- **out = **in
- }
- }
- if in.Port != nil {
- in, out := &in.Port, &out.Port
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyPort.
-func (in *NetworkPolicyPort) DeepCopy() *NetworkPolicyPort {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyPort)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicySpec) DeepCopyInto(out *NetworkPolicySpec) {
- *out = *in
- in.PodSelector.DeepCopyInto(&out.PodSelector)
- if in.Ingress != nil {
- in, out := &in.Ingress, &out.Ingress
- *out = make([]NetworkPolicyIngressRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Egress != nil {
- in, out := &in.Egress, &out.Egress
- *out = make([]NetworkPolicyEgressRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.PolicyTypes != nil {
- in, out := &in.PolicyTypes, &out.PolicyTypes
- *out = make([]PolicyType, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicySpec.
-func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicySpec)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/policy/v1beta1/doc.go b/vendor/k8s.io/api/policy/v1beta1/doc.go
deleted file mode 100644
index 9c456f923..000000000
--- a/vendor/k8s.io/api/policy/v1beta1/doc.go
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-
-// Package policy is for any kind of policy object. Suitable examples, even if
-// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy,
-// NetworkPolicy, etc.
-// +k8s:openapi-gen=true
-package v1beta1 // import "k8s.io/api/policy/v1beta1"
diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.pb.go b/vendor/k8s.io/api/policy/v1beta1/generated.pb.go
deleted file mode 100644
index 24bbe8975..000000000
--- a/vendor/k8s.io/api/policy/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,3916 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/policy/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/policy/v1beta1/generated.proto
-
- It has these top-level messages:
- AllowedFlexVolume
- AllowedHostPath
- Eviction
- FSGroupStrategyOptions
- HostPortRange
- IDRange
- PodDisruptionBudget
- PodDisruptionBudgetList
- PodDisruptionBudgetSpec
- PodDisruptionBudgetStatus
- PodSecurityPolicy
- PodSecurityPolicyList
- PodSecurityPolicySpec
- RunAsUserStrategyOptions
- SELinuxStrategyOptions
- SupplementalGroupsStrategyOptions
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *AllowedFlexVolume) Reset() { *m = AllowedFlexVolume{} }
-func (*AllowedFlexVolume) ProtoMessage() {}
-func (*AllowedFlexVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *AllowedHostPath) Reset() { *m = AllowedHostPath{} }
-func (*AllowedHostPath) ProtoMessage() {}
-func (*AllowedHostPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *Eviction) Reset() { *m = Eviction{} }
-func (*Eviction) ProtoMessage() {}
-func (*Eviction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} }
-func (*FSGroupStrategyOptions) ProtoMessage() {}
-func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *HostPortRange) Reset() { *m = HostPortRange{} }
-func (*HostPortRange) ProtoMessage() {}
-func (*HostPortRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *IDRange) Reset() { *m = IDRange{} }
-func (*IDRange) ProtoMessage() {}
-func (*IDRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} }
-func (*PodDisruptionBudget) ProtoMessage() {}
-func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} }
-func (*PodDisruptionBudgetList) ProtoMessage() {}
-func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} }
-func (*PodDisruptionBudgetSpec) ProtoMessage() {}
-func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} }
-func (*PodDisruptionBudgetStatus) ProtoMessage() {}
-func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{9}
-}
-
-func (m *PodSecurityPolicy) Reset() { *m = PodSecurityPolicy{} }
-func (*PodSecurityPolicy) ProtoMessage() {}
-func (*PodSecurityPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *PodSecurityPolicyList) Reset() { *m = PodSecurityPolicyList{} }
-func (*PodSecurityPolicyList) ProtoMessage() {}
-func (*PodSecurityPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
-
-func (m *PodSecurityPolicySpec) Reset() { *m = PodSecurityPolicySpec{} }
-func (*PodSecurityPolicySpec) ProtoMessage() {}
-func (*PodSecurityPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
-
-func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} }
-func (*RunAsUserStrategyOptions) ProtoMessage() {}
-func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{13}
-}
-
-func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} }
-func (*SELinuxStrategyOptions) ProtoMessage() {}
-func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
-
-func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} }
-func (*SupplementalGroupsStrategyOptions) ProtoMessage() {}
-func (*SupplementalGroupsStrategyOptions) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{15}
-}
-
-func init() {
- proto.RegisterType((*AllowedFlexVolume)(nil), "k8s.io.api.policy.v1beta1.AllowedFlexVolume")
- proto.RegisterType((*AllowedHostPath)(nil), "k8s.io.api.policy.v1beta1.AllowedHostPath")
- proto.RegisterType((*Eviction)(nil), "k8s.io.api.policy.v1beta1.Eviction")
- proto.RegisterType((*FSGroupStrategyOptions)(nil), "k8s.io.api.policy.v1beta1.FSGroupStrategyOptions")
- proto.RegisterType((*HostPortRange)(nil), "k8s.io.api.policy.v1beta1.HostPortRange")
- proto.RegisterType((*IDRange)(nil), "k8s.io.api.policy.v1beta1.IDRange")
- proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudget")
- proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetList")
- proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetSpec")
- proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetStatus")
- proto.RegisterType((*PodSecurityPolicy)(nil), "k8s.io.api.policy.v1beta1.PodSecurityPolicy")
- proto.RegisterType((*PodSecurityPolicyList)(nil), "k8s.io.api.policy.v1beta1.PodSecurityPolicyList")
- proto.RegisterType((*PodSecurityPolicySpec)(nil), "k8s.io.api.policy.v1beta1.PodSecurityPolicySpec")
- proto.RegisterType((*RunAsUserStrategyOptions)(nil), "k8s.io.api.policy.v1beta1.RunAsUserStrategyOptions")
- proto.RegisterType((*SELinuxStrategyOptions)(nil), "k8s.io.api.policy.v1beta1.SELinuxStrategyOptions")
- proto.RegisterType((*SupplementalGroupsStrategyOptions)(nil), "k8s.io.api.policy.v1beta1.SupplementalGroupsStrategyOptions")
-}
-func (m *AllowedFlexVolume) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *AllowedFlexVolume) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
- i += copy(dAtA[i:], m.Driver)
- return i, nil
-}
-
-func (m *AllowedHostPath) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *AllowedHostPath) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.PathPrefix)))
- i += copy(dAtA[i:], m.PathPrefix)
- return i, nil
-}
-
-func (m *Eviction) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Eviction) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- if m.DeleteOptions != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DeleteOptions.Size()))
- n2, err := m.DeleteOptions.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- }
- return i, nil
-}
-
-func (m *FSGroupStrategyOptions) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *FSGroupStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
- i += copy(dAtA[i:], m.Rule)
- if len(m.Ranges) > 0 {
- for _, msg := range m.Ranges {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *HostPortRange) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *HostPortRange) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Min))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Max))
- return i, nil
-}
-
-func (m *IDRange) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IDRange) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Min))
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Max))
- return i, nil
-}
-
-func (m *PodDisruptionBudget) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodDisruptionBudget) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n4, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n5, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- return i, nil
-}
-
-func (m *PodDisruptionBudgetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodDisruptionBudgetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n6, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *PodDisruptionBudgetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodDisruptionBudgetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.MinAvailable != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MinAvailable.Size()))
- n7, err := m.MinAvailable.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- }
- if m.Selector != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n8, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- }
- if m.MaxUnavailable != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
- n9, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- }
- return i, nil
-}
-
-func (m *PodDisruptionBudgetStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodDisruptionBudgetStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
- if len(m.DisruptedPods) > 0 {
- keysForDisruptedPods := make([]string, 0, len(m.DisruptedPods))
- for k := range m.DisruptedPods {
- keysForDisruptedPods = append(keysForDisruptedPods, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods)
- for _, k := range keysForDisruptedPods {
- dAtA[i] = 0x12
- i++
- v := m.DisruptedPods[string(k)]
- msgSize := 0
- if (&v) != nil {
- msgSize = (&v).Size()
- msgSize += 1 + sovGenerated(uint64(msgSize))
- }
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
- n10, err := (&v).MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- }
- }
- dAtA[i] = 0x18
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.PodDisruptionsAllowed))
- dAtA[i] = 0x20
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentHealthy))
- dAtA[i] = 0x28
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredHealthy))
- dAtA[i] = 0x30
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ExpectedPods))
- return i, nil
-}
-
-func (m *PodSecurityPolicy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodSecurityPolicy) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n11, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n12, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- return i, nil
-}
-
-func (m *PodSecurityPolicyList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodSecurityPolicyList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n13, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *PodSecurityPolicySpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodSecurityPolicySpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- if m.Privileged {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if len(m.DefaultAddCapabilities) > 0 {
- for _, s := range m.DefaultAddCapabilities {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.RequiredDropCapabilities) > 0 {
- for _, s := range m.RequiredDropCapabilities {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.AllowedCapabilities) > 0 {
- for _, s := range m.AllowedCapabilities {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Volumes) > 0 {
- for _, s := range m.Volumes {
- dAtA[i] = 0x2a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- dAtA[i] = 0x30
- i++
- if m.HostNetwork {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if len(m.HostPorts) > 0 {
- for _, msg := range m.HostPorts {
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x40
- i++
- if m.HostPID {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x48
- i++
- if m.HostIPC {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x52
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.SELinux.Size()))
- n14, err := m.SELinux.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n14
- dAtA[i] = 0x5a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RunAsUser.Size()))
- n15, err := m.RunAsUser.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n15
- dAtA[i] = 0x62
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.SupplementalGroups.Size()))
- n16, err := m.SupplementalGroups.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n16
- dAtA[i] = 0x6a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.FSGroup.Size()))
- n17, err := m.FSGroup.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n17
- dAtA[i] = 0x70
- i++
- if m.ReadOnlyRootFilesystem {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if m.DefaultAllowPrivilegeEscalation != nil {
- dAtA[i] = 0x78
- i++
- if *m.DefaultAllowPrivilegeEscalation {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.AllowPrivilegeEscalation != nil {
- dAtA[i] = 0x80
- i++
- dAtA[i] = 0x1
- i++
- if *m.AllowPrivilegeEscalation {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if len(m.AllowedHostPaths) > 0 {
- for _, msg := range m.AllowedHostPaths {
- dAtA[i] = 0x8a
- i++
- dAtA[i] = 0x1
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.AllowedFlexVolumes) > 0 {
- for _, msg := range m.AllowedFlexVolumes {
- dAtA[i] = 0x92
- i++
- dAtA[i] = 0x1
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RunAsUserStrategyOptions) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RunAsUserStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
- i += copy(dAtA[i:], m.Rule)
- if len(m.Ranges) > 0 {
- for _, msg := range m.Ranges {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *SELinuxStrategyOptions) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SELinuxStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
- i += copy(dAtA[i:], m.Rule)
- if m.SELinuxOptions != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size()))
- n18, err := m.SELinuxOptions.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n18
- }
- return i, nil
-}
-
-func (m *SupplementalGroupsStrategyOptions) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SupplementalGroupsStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
- i += copy(dAtA[i:], m.Rule)
- if len(m.Ranges) > 0 {
- for _, msg := range m.Ranges {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *AllowedFlexVolume) Size() (n int) {
- var l int
- _ = l
- l = len(m.Driver)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *AllowedHostPath) Size() (n int) {
- var l int
- _ = l
- l = len(m.PathPrefix)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *Eviction) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.DeleteOptions != nil {
- l = m.DeleteOptions.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *FSGroupStrategyOptions) Size() (n int) {
- var l int
- _ = l
- l = len(m.Rule)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Ranges) > 0 {
- for _, e := range m.Ranges {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *HostPortRange) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Min))
- n += 1 + sovGenerated(uint64(m.Max))
- return n
-}
-
-func (m *IDRange) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.Min))
- n += 1 + sovGenerated(uint64(m.Max))
- return n
-}
-
-func (m *PodDisruptionBudget) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *PodDisruptionBudgetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *PodDisruptionBudgetSpec) Size() (n int) {
- var l int
- _ = l
- if m.MinAvailable != nil {
- l = m.MinAvailable.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.MaxUnavailable != nil {
- l = m.MaxUnavailable.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *PodDisruptionBudgetStatus) Size() (n int) {
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- if len(m.DisruptedPods) > 0 {
- for k, v := range m.DisruptedPods {
- _ = k
- _ = v
- l = v.Size()
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- n += 1 + sovGenerated(uint64(m.PodDisruptionsAllowed))
- n += 1 + sovGenerated(uint64(m.CurrentHealthy))
- n += 1 + sovGenerated(uint64(m.DesiredHealthy))
- n += 1 + sovGenerated(uint64(m.ExpectedPods))
- return n
-}
-
-func (m *PodSecurityPolicy) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *PodSecurityPolicyList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *PodSecurityPolicySpec) Size() (n int) {
- var l int
- _ = l
- n += 2
- if len(m.DefaultAddCapabilities) > 0 {
- for _, s := range m.DefaultAddCapabilities {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.RequiredDropCapabilities) > 0 {
- for _, s := range m.RequiredDropCapabilities {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.AllowedCapabilities) > 0 {
- for _, s := range m.AllowedCapabilities {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Volumes) > 0 {
- for _, s := range m.Volumes {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- n += 2
- if len(m.HostPorts) > 0 {
- for _, e := range m.HostPorts {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- n += 2
- n += 2
- l = m.SELinux.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.RunAsUser.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.SupplementalGroups.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.FSGroup.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 2
- if m.DefaultAllowPrivilegeEscalation != nil {
- n += 2
- }
- if m.AllowPrivilegeEscalation != nil {
- n += 3
- }
- if len(m.AllowedHostPaths) > 0 {
- for _, e := range m.AllowedHostPaths {
- l = e.Size()
- n += 2 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.AllowedFlexVolumes) > 0 {
- for _, e := range m.AllowedFlexVolumes {
- l = e.Size()
- n += 2 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RunAsUserStrategyOptions) Size() (n int) {
- var l int
- _ = l
- l = len(m.Rule)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Ranges) > 0 {
- for _, e := range m.Ranges {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *SELinuxStrategyOptions) Size() (n int) {
- var l int
- _ = l
- l = len(m.Rule)
- n += 1 + l + sovGenerated(uint64(l))
- if m.SELinuxOptions != nil {
- l = m.SELinuxOptions.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *SupplementalGroupsStrategyOptions) Size() (n int) {
- var l int
- _ = l
- l = len(m.Rule)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Ranges) > 0 {
- for _, e := range m.Ranges {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *AllowedFlexVolume) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&AllowedFlexVolume{`,
- `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *AllowedHostPath) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&AllowedHostPath{`,
- `PathPrefix:` + fmt.Sprintf("%v", this.PathPrefix) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Eviction) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Eviction{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *FSGroupStrategyOptions) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&FSGroupStrategyOptions{`,
- `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
- `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *HostPortRange) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&HostPortRange{`,
- `Min:` + fmt.Sprintf("%v", this.Min) + `,`,
- `Max:` + fmt.Sprintf("%v", this.Max) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IDRange) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IDRange{`,
- `Min:` + fmt.Sprintf("%v", this.Min) + `,`,
- `Max:` + fmt.Sprintf("%v", this.Max) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodDisruptionBudget) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodDisruptionBudget{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodDisruptionBudgetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodDisruptionBudgetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodDisruptionBudget", "PodDisruptionBudget", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodDisruptionBudgetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodDisruptionBudgetSpec{`,
- `MinAvailable:` + strings.Replace(fmt.Sprintf("%v", this.MinAvailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
- `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodDisruptionBudgetStatus) String() string {
- if this == nil {
- return "nil"
- }
- keysForDisruptedPods := make([]string, 0, len(this.DisruptedPods))
- for k := range this.DisruptedPods {
- keysForDisruptedPods = append(keysForDisruptedPods, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods)
- mapStringForDisruptedPods := "map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time{"
- for _, k := range keysForDisruptedPods {
- mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k])
- }
- mapStringForDisruptedPods += "}"
- s := strings.Join([]string{`&PodDisruptionBudgetStatus{`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `DisruptedPods:` + mapStringForDisruptedPods + `,`,
- `PodDisruptionsAllowed:` + fmt.Sprintf("%v", this.PodDisruptionsAllowed) + `,`,
- `CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`,
- `DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`,
- `ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodSecurityPolicy) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodSecurityPolicy{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySpec", "PodSecurityPolicySpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodSecurityPolicyList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodSecurityPolicyList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodSecurityPolicy", "PodSecurityPolicy", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodSecurityPolicySpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodSecurityPolicySpec{`,
- `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`,
- `DefaultAddCapabilities:` + fmt.Sprintf("%v", this.DefaultAddCapabilities) + `,`,
- `RequiredDropCapabilities:` + fmt.Sprintf("%v", this.RequiredDropCapabilities) + `,`,
- `AllowedCapabilities:` + fmt.Sprintf("%v", this.AllowedCapabilities) + `,`,
- `Volumes:` + fmt.Sprintf("%v", this.Volumes) + `,`,
- `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`,
- `HostPorts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.HostPorts), "HostPortRange", "HostPortRange", 1), `&`, ``, 1) + `,`,
- `HostPID:` + fmt.Sprintf("%v", this.HostPID) + `,`,
- `HostIPC:` + fmt.Sprintf("%v", this.HostIPC) + `,`,
- `SELinux:` + strings.Replace(strings.Replace(this.SELinux.String(), "SELinuxStrategyOptions", "SELinuxStrategyOptions", 1), `&`, ``, 1) + `,`,
- `RunAsUser:` + strings.Replace(strings.Replace(this.RunAsUser.String(), "RunAsUserStrategyOptions", "RunAsUserStrategyOptions", 1), `&`, ``, 1) + `,`,
- `SupplementalGroups:` + strings.Replace(strings.Replace(this.SupplementalGroups.String(), "SupplementalGroupsStrategyOptions", "SupplementalGroupsStrategyOptions", 1), `&`, ``, 1) + `,`,
- `FSGroup:` + strings.Replace(strings.Replace(this.FSGroup.String(), "FSGroupStrategyOptions", "FSGroupStrategyOptions", 1), `&`, ``, 1) + `,`,
- `ReadOnlyRootFilesystem:` + fmt.Sprintf("%v", this.ReadOnlyRootFilesystem) + `,`,
- `DefaultAllowPrivilegeEscalation:` + valueToStringGenerated(this.DefaultAllowPrivilegeEscalation) + `,`,
- `AllowPrivilegeEscalation:` + valueToStringGenerated(this.AllowPrivilegeEscalation) + `,`,
- `AllowedHostPaths:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedHostPaths), "AllowedHostPath", "AllowedHostPath", 1), `&`, ``, 1) + `,`,
- `AllowedFlexVolumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedFlexVolumes), "AllowedFlexVolume", "AllowedFlexVolume", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RunAsUserStrategyOptions) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RunAsUserStrategyOptions{`,
- `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
- `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SELinuxStrategyOptions) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SELinuxStrategyOptions{`,
- `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
- `SELinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxOptions), "SELinuxOptions", "k8s_io_api_core_v1.SELinuxOptions", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *SupplementalGroupsStrategyOptions) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&SupplementalGroupsStrategyOptions{`,
- `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
- `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *AllowedFlexVolume) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: AllowedFlexVolume: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: AllowedFlexVolume: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Driver = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *AllowedHostPath) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: AllowedHostPath: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: AllowedHostPath: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PathPrefix", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PathPrefix = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Eviction) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Eviction: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Eviction: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeleteOptions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.DeleteOptions == nil {
- m.DeleteOptions = &k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions{}
- }
- if err := m.DeleteOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *FSGroupStrategyOptions) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: FSGroupStrategyOptions: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: FSGroupStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rule = FSGroupStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ranges = append(m.Ranges, IDRange{})
- if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *HostPortRange) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HostPortRange: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HostPortRange: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
- }
- m.Min = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Min |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
- }
- m.Max = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Max |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IDRange) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IDRange: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IDRange: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
- }
- m.Min = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Min |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
- }
- m.Max = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Max |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodDisruptionBudget) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodDisruptionBudget: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodDisruptionBudget: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodDisruptionBudgetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodDisruptionBudgetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, PodDisruptionBudget{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodDisruptionBudgetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodDisruptionBudgetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinAvailable", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MinAvailable == nil {
- m.MinAvailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MinAvailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Selector == nil {
- m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.MaxUnavailable == nil {
- m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
- }
- if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodDisruptionBudgetStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodDisruptionBudgetStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodDisruptionBudgetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
- }
- m.ObservedGeneration = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ObservedGeneration |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DisruptedPods", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.DisruptedPods == nil {
- m.DisruptedPods = make(map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapmsglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postmsgIndex := iNdEx + mapmsglen
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
- if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- m.DisruptedPods[mapkey] = *mapvalue
- } else {
- var mapvalue k8s_io_apimachinery_pkg_apis_meta_v1.Time
- m.DisruptedPods[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionsAllowed", wireType)
- }
- m.PodDisruptionsAllowed = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.PodDisruptionsAllowed |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CurrentHealthy", wireType)
- }
- m.CurrentHealthy = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.CurrentHealthy |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DesiredHealthy", wireType)
- }
- m.DesiredHealthy = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.DesiredHealthy |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ExpectedPods", wireType)
- }
- m.ExpectedPods = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ExpectedPods |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodSecurityPolicy) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodSecurityPolicy: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodSecurityPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodSecurityPolicyList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodSecurityPolicyList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodSecurityPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, PodSecurityPolicy{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodSecurityPolicySpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodSecurityPolicySpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodSecurityPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Privileged = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DefaultAddCapabilities", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.DefaultAddCapabilities = append(m.DefaultAddCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RequiredDropCapabilities", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.RequiredDropCapabilities = append(m.RequiredDropCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowedCapabilities", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.AllowedCapabilities = append(m.AllowedCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Volumes = append(m.Volumes, FSType(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field HostNetwork", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.HostNetwork = bool(v != 0)
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field HostPorts", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.HostPorts = append(m.HostPorts, HostPortRange{})
- if err := m.HostPorts[len(m.HostPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field HostPID", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.HostPID = bool(v != 0)
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field HostIPC", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.HostIPC = bool(v != 0)
- case 10:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SELinux", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.SELinux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 11:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RunAsUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 12:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.SupplementalGroups.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 13:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field FSGroup", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.FSGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 14:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReadOnlyRootFilesystem", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.ReadOnlyRootFilesystem = bool(v != 0)
- case 15:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DefaultAllowPrivilegeEscalation", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.DefaultAllowPrivilegeEscalation = &b
- case 16:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowPrivilegeEscalation", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.AllowPrivilegeEscalation = &b
- case 17:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowedHostPaths", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.AllowedHostPaths = append(m.AllowedHostPaths, AllowedHostPath{})
- if err := m.AllowedHostPaths[len(m.AllowedHostPaths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 18:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowedFlexVolumes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.AllowedFlexVolumes = append(m.AllowedFlexVolumes, AllowedFlexVolume{})
- if err := m.AllowedFlexVolumes[len(m.AllowedFlexVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RunAsUserStrategyOptions) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RunAsUserStrategyOptions: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RunAsUserStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rule = RunAsUserStrategy(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ranges = append(m.Ranges, IDRange{})
- if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SELinuxStrategyOptions) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SELinuxStrategyOptions: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SELinuxStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rule = SELinuxStrategy(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SELinuxOptions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.SELinuxOptions == nil {
- m.SELinuxOptions = &k8s_io_api_core_v1.SELinuxOptions{}
- }
- if err := m.SELinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SupplementalGroupsStrategyOptions) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rule = SupplementalGroupsStrategyType(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ranges = append(m.Ranges, IDRange{})
- if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/policy/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 1605 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4f, 0x6f, 0x1b, 0xb9,
- 0x15, 0xf7, 0x58, 0xb6, 0x65, 0xd3, 0xf2, 0x3f, 0xba, 0x76, 0x27, 0x46, 0x23, 0x35, 0x0a, 0x50,
- 0xa4, 0x41, 0x33, 0x8a, 0x9d, 0xa4, 0x35, 0x9a, 0xb6, 0xa8, 0xc7, 0xf2, 0xbf, 0x20, 0xae, 0x55,
- 0x2a, 0x09, 0xda, 0x22, 0x2d, 0x4a, 0x69, 0x68, 0x89, 0xf1, 0x68, 0x66, 0x4a, 0x72, 0x14, 0xe9,
- 0xd6, 0x43, 0x0f, 0x3d, 0xf6, 0x0b, 0xf4, 0x13, 0x14, 0x3d, 0xed, 0x97, 0xf0, 0x02, 0x8b, 0x45,
- 0x8e, 0xc1, 0x1e, 0x84, 0x8d, 0x16, 0xfb, 0x25, 0x72, 0x5a, 0x0c, 0xc5, 0x91, 0x34, 0x33, 0x92,
- 0x1c, 0x07, 0x48, 0x6e, 0x1a, 0xbe, 0xdf, 0xef, 0xf7, 0x1e, 0x1f, 0xc9, 0xc7, 0x47, 0x01, 0xf3,
- 0x62, 0x97, 0x1b, 0xd4, 0x2d, 0x5c, 0xf8, 0x15, 0xc2, 0x1c, 0x22, 0x08, 0x2f, 0x34, 0x89, 0x63,
- 0xb9, 0xac, 0xa0, 0x0c, 0xd8, 0xa3, 0x05, 0xcf, 0xb5, 0x69, 0xb5, 0x5d, 0x68, 0x6e, 0x57, 0x88,
- 0xc0, 0xdb, 0x85, 0x1a, 0x71, 0x08, 0xc3, 0x82, 0x58, 0x86, 0xc7, 0x5c, 0xe1, 0xc2, 0x1b, 0x3d,
- 0xa8, 0x81, 0x3d, 0x6a, 0xf4, 0xa0, 0x86, 0x82, 0x6e, 0xdd, 0xab, 0x51, 0x51, 0xf7, 0x2b, 0x46,
- 0xd5, 0x6d, 0x14, 0x6a, 0x6e, 0xcd, 0x2d, 0x48, 0x46, 0xc5, 0x3f, 0x97, 0x5f, 0xf2, 0x43, 0xfe,
- 0xea, 0x29, 0x6d, 0xe5, 0x87, 0x9c, 0x56, 0x5d, 0x46, 0x0a, 0xcd, 0x84, 0xb7, 0xad, 0x87, 0x03,
- 0x4c, 0x03, 0x57, 0xeb, 0xd4, 0x21, 0xac, 0x5d, 0xf0, 0x2e, 0x6a, 0xc1, 0x00, 0x2f, 0x34, 0x88,
- 0xc0, 0xa3, 0x58, 0x85, 0x71, 0x2c, 0xe6, 0x3b, 0x82, 0x36, 0x48, 0x82, 0xf0, 0xcb, 0xab, 0x08,
- 0xbc, 0x5a, 0x27, 0x0d, 0x9c, 0xe0, 0x3d, 0x18, 0xc7, 0xf3, 0x05, 0xb5, 0x0b, 0xd4, 0x11, 0x5c,
- 0xb0, 0x38, 0x29, 0xff, 0x18, 0xac, 0xed, 0xd9, 0xb6, 0xfb, 0x9a, 0x58, 0x87, 0x36, 0x69, 0xbd,
- 0x70, 0x6d, 0xbf, 0x41, 0xe0, 0xcf, 0xc0, 0x9c, 0xc5, 0x68, 0x93, 0x30, 0x5d, 0xfb, 0xa9, 0x76,
- 0x67, 0xc1, 0x5c, 0xbe, 0xec, 0xe4, 0xa6, 0xba, 0x9d, 0xdc, 0x5c, 0x51, 0x8e, 0x22, 0x65, 0xcd,
- 0x1f, 0x80, 0x15, 0x45, 0x3e, 0x76, 0xb9, 0x28, 0x61, 0x51, 0x87, 0x3b, 0x00, 0x78, 0x58, 0xd4,
- 0x4b, 0x8c, 0x9c, 0xd3, 0x96, 0xa2, 0x43, 0x45, 0x07, 0xa5, 0xbe, 0x05, 0x0d, 0xa1, 0xf2, 0xdf,
- 0x68, 0x60, 0xfe, 0xa0, 0x49, 0xab, 0x82, 0xba, 0x0e, 0xfc, 0x3b, 0x98, 0x0f, 0x32, 0x69, 0x61,
- 0x81, 0x25, 0x7d, 0x71, 0xe7, 0xbe, 0x31, 0x58, 0xe5, 0xfe, 0xc4, 0x0c, 0xef, 0xa2, 0x16, 0x0c,
- 0x70, 0x23, 0x40, 0x1b, 0xcd, 0x6d, 0xe3, 0xac, 0xf2, 0x8a, 0x54, 0xc5, 0x29, 0x11, 0x78, 0xe0,
- 0x70, 0x30, 0x86, 0xfa, 0xaa, 0xd0, 0x06, 0x4b, 0x16, 0xb1, 0x89, 0x20, 0x67, 0x5e, 0xe0, 0x91,
- 0xeb, 0xd3, 0xd2, 0xcd, 0x83, 0x0f, 0x73, 0x53, 0x1c, 0xa6, 0x9a, 0x6b, 0xdd, 0x4e, 0x6e, 0x29,
- 0x32, 0x84, 0xa2, 0xe2, 0xf9, 0xff, 0x6a, 0x60, 0xf3, 0xb0, 0x7c, 0xc4, 0x5c, 0xdf, 0x2b, 0x8b,
- 0x20, 0xf3, 0xb5, 0xb6, 0x32, 0xc1, 0x5f, 0x81, 0x19, 0xe6, 0xdb, 0x44, 0x65, 0xe9, 0xb6, 0x0a,
- 0x7a, 0x06, 0xf9, 0x36, 0x79, 0xdf, 0xc9, 0xad, 0xc7, 0x58, 0xcf, 0xda, 0x1e, 0x41, 0x92, 0x00,
- 0x9f, 0x80, 0x39, 0x86, 0x9d, 0x1a, 0x09, 0x42, 0x4f, 0xdd, 0x59, 0xdc, 0xc9, 0x1b, 0x63, 0xcf,
- 0x81, 0x71, 0x52, 0x44, 0x01, 0x74, 0xb0, 0x86, 0xf2, 0x93, 0x23, 0xa5, 0x90, 0x3f, 0x05, 0x4b,
- 0x72, 0xf1, 0x5c, 0x26, 0xa4, 0x05, 0xde, 0x04, 0xa9, 0x06, 0x75, 0x64, 0x50, 0xb3, 0xe6, 0xa2,
- 0x62, 0xa5, 0x4e, 0xa9, 0x83, 0x82, 0x71, 0x69, 0xc6, 0x2d, 0x99, 0xb3, 0x61, 0x33, 0x6e, 0xa1,
- 0x60, 0x3c, 0x7f, 0x04, 0xd2, 0xca, 0xe3, 0xb0, 0x50, 0x6a, 0xb2, 0x50, 0x6a, 0x84, 0xd0, 0xff,
- 0xa6, 0xc1, 0x7a, 0xc9, 0xb5, 0x8a, 0x94, 0x33, 0x5f, 0xe6, 0xcb, 0xf4, 0xad, 0x1a, 0x11, 0x9f,
- 0x61, 0x7f, 0x3c, 0x03, 0x33, 0xdc, 0x23, 0x55, 0xb5, 0x2d, 0x76, 0x26, 0xe4, 0x76, 0x44, 0x7c,
- 0x65, 0x8f, 0x54, 0xcd, 0x4c, 0xb8, 0x94, 0xc1, 0x17, 0x92, 0x6a, 0xf0, 0x25, 0x98, 0xe3, 0x02,
- 0x0b, 0x9f, 0xeb, 0x29, 0xa9, 0xfb, 0xf0, 0x9a, 0xba, 0x92, 0x3b, 0x58, 0xc5, 0xde, 0x37, 0x52,
- 0x9a, 0xf9, 0xaf, 0x34, 0xf0, 0xe3, 0x11, 0xac, 0xa7, 0x94, 0x0b, 0xf8, 0x32, 0x91, 0x31, 0xe3,
- 0xc3, 0x32, 0x16, 0xb0, 0x65, 0xbe, 0x56, 0x95, 0xd7, 0xf9, 0x70, 0x64, 0x28, 0x5b, 0x65, 0x30,
- 0x4b, 0x05, 0x69, 0x84, 0x5b, 0xd1, 0xb8, 0xde, 0xb4, 0xcc, 0x25, 0x25, 0x3d, 0x7b, 0x12, 0x88,
- 0xa0, 0x9e, 0x56, 0xfe, 0xeb, 0xe9, 0x91, 0xd3, 0x09, 0xd2, 0x09, 0xcf, 0x41, 0xa6, 0x41, 0x9d,
- 0xbd, 0x26, 0xa6, 0x36, 0xae, 0xa8, 0xd3, 0x33, 0x69, 0x13, 0x04, 0xd5, 0xcf, 0xe8, 0x55, 0x3f,
- 0xe3, 0xc4, 0x11, 0x67, 0xac, 0x2c, 0x18, 0x75, 0x6a, 0xe6, 0x6a, 0xb7, 0x93, 0xcb, 0x9c, 0x0e,
- 0x29, 0xa1, 0x88, 0x2e, 0xfc, 0x2b, 0x98, 0xe7, 0xc4, 0x26, 0x55, 0xe1, 0xb2, 0xeb, 0x55, 0x88,
- 0xa7, 0xb8, 0x42, 0xec, 0xb2, 0xa2, 0x9a, 0x99, 0x20, 0x6f, 0xe1, 0x17, 0xea, 0x4b, 0x42, 0x1b,
- 0x2c, 0x37, 0x70, 0xeb, 0xb9, 0x83, 0xfb, 0x13, 0x49, 0x7d, 0xe4, 0x44, 0x60, 0xb7, 0x93, 0x5b,
- 0x3e, 0x8d, 0x68, 0xa1, 0x98, 0x76, 0xfe, 0xfb, 0x19, 0x70, 0x63, 0xec, 0xae, 0x82, 0x4f, 0x00,
- 0x74, 0x2b, 0x9c, 0xb0, 0x26, 0xb1, 0x8e, 0x7a, 0xf7, 0x03, 0x75, 0xc3, 0x83, 0xbb, 0xa5, 0x16,
- 0x08, 0x9e, 0x25, 0x10, 0x68, 0x04, 0x0b, 0xfe, 0x4b, 0x03, 0x4b, 0x56, 0xcf, 0x0d, 0xb1, 0x4a,
- 0xae, 0x15, 0x6e, 0x8c, 0xa3, 0x8f, 0xd9, 0xef, 0x46, 0x71, 0x58, 0xe9, 0xc0, 0x11, 0xac, 0x6d,
- 0x6e, 0xa8, 0x80, 0x96, 0x22, 0x36, 0x14, 0x75, 0x0a, 0x4f, 0x01, 0xb4, 0xfa, 0x92, 0x5c, 0xdd,
- 0x52, 0x32, 0xc5, 0xb3, 0xe6, 0x4d, 0xa5, 0xb0, 0x11, 0xf1, 0x1b, 0x82, 0xd0, 0x08, 0x22, 0xfc,
- 0x1d, 0x58, 0xae, 0xfa, 0x8c, 0x11, 0x47, 0x1c, 0x13, 0x6c, 0x8b, 0x7a, 0x5b, 0x9f, 0x91, 0x52,
- 0x9b, 0x4a, 0x6a, 0x79, 0x3f, 0x62, 0x45, 0x31, 0x74, 0xc0, 0xb7, 0x08, 0xa7, 0x8c, 0x58, 0x21,
- 0x7f, 0x36, 0xca, 0x2f, 0x46, 0xac, 0x28, 0x86, 0x86, 0xbb, 0x20, 0x43, 0x5a, 0x1e, 0xa9, 0x86,
- 0x39, 0x9d, 0x93, 0xec, 0x1f, 0x29, 0x76, 0xe6, 0x60, 0xc8, 0x86, 0x22, 0xc8, 0x2d, 0x1b, 0xc0,
- 0x64, 0x12, 0xe1, 0x2a, 0x48, 0x5d, 0x90, 0x76, 0xef, 0xe6, 0x41, 0xc1, 0x4f, 0xf8, 0x7b, 0x30,
- 0xdb, 0xc4, 0xb6, 0x4f, 0xd4, 0x5e, 0xbf, 0xfb, 0x61, 0x7b, 0xfd, 0x19, 0x6d, 0x10, 0xd4, 0x23,
- 0xfe, 0x7a, 0x7a, 0x57, 0xcb, 0x7f, 0xa9, 0x81, 0xb5, 0x92, 0x6b, 0x95, 0x49, 0xd5, 0x67, 0x54,
- 0xb4, 0x4b, 0x72, 0x9d, 0x3f, 0x43, 0xcd, 0x46, 0x91, 0x9a, 0x7d, 0x7f, 0xf2, 0x5e, 0x8b, 0x46,
- 0x37, 0xae, 0x62, 0xe7, 0x2f, 0x35, 0xb0, 0x91, 0x40, 0x7f, 0x86, 0x8a, 0xfa, 0xc7, 0x68, 0x45,
- 0xfd, 0xc5, 0x75, 0x26, 0x33, 0xa6, 0x9e, 0xbe, 0xcf, 0x8c, 0x98, 0x8a, 0xac, 0xa6, 0x41, 0xbf,
- 0xc6, 0x68, 0x93, 0xda, 0xa4, 0x46, 0x2c, 0x39, 0x99, 0xf9, 0xa1, 0x7e, 0xad, 0x6f, 0x41, 0x43,
- 0x28, 0xc8, 0xc1, 0xa6, 0x45, 0xce, 0xb1, 0x6f, 0x8b, 0x3d, 0xcb, 0xda, 0xc7, 0x1e, 0xae, 0x50,
- 0x9b, 0x0a, 0xaa, 0xda, 0x91, 0x05, 0xf3, 0x71, 0xb7, 0x93, 0xdb, 0x2c, 0x8e, 0x44, 0xbc, 0xef,
- 0xe4, 0x6e, 0x26, 0x3b, 0x6d, 0xa3, 0x0f, 0x69, 0xa3, 0x31, 0xd2, 0xb0, 0x0d, 0x74, 0x46, 0xfe,
- 0xe1, 0x07, 0x87, 0xa2, 0xc8, 0x5c, 0x2f, 0xe2, 0x36, 0x25, 0xdd, 0xfe, 0xb6, 0xdb, 0xc9, 0xe9,
- 0x68, 0x0c, 0xe6, 0x6a, 0xc7, 0x63, 0xe5, 0xe1, 0x2b, 0xb0, 0x8e, 0x7b, 0x75, 0x20, 0xe2, 0x75,
- 0x46, 0x7a, 0xdd, 0xed, 0x76, 0x72, 0xeb, 0x7b, 0x49, 0xf3, 0xd5, 0x0e, 0x47, 0x89, 0xc2, 0x02,
- 0x48, 0x37, 0x65, 0x13, 0xce, 0xf5, 0x59, 0xa9, 0xbf, 0xd1, 0xed, 0xe4, 0xd2, 0xbd, 0xbe, 0x3c,
- 0xd0, 0x9c, 0x3b, 0x2c, 0xcb, 0x46, 0x30, 0x44, 0xc1, 0x47, 0x60, 0xb1, 0xee, 0x72, 0xf1, 0x07,
- 0x22, 0x5e, 0xbb, 0xec, 0x42, 0x16, 0x86, 0x79, 0x73, 0x5d, 0xad, 0xe0, 0xe2, 0xf1, 0xc0, 0x84,
- 0x86, 0x71, 0xf0, 0xcf, 0x60, 0xa1, 0xae, 0xda, 0x3e, 0xae, 0xa7, 0xe5, 0x46, 0xbb, 0x33, 0x61,
- 0xa3, 0x45, 0x5a, 0x44, 0x73, 0x4d, 0xc9, 0x2f, 0x84, 0xc3, 0x1c, 0x0d, 0xd4, 0xe0, 0xcf, 0x41,
- 0x5a, 0x7e, 0x9c, 0x14, 0xf5, 0x79, 0x19, 0xcd, 0x8a, 0x82, 0xa7, 0x8f, 0x7b, 0xc3, 0x28, 0xb4,
- 0x87, 0xd0, 0x93, 0xd2, 0xbe, 0xbe, 0x90, 0x84, 0x9e, 0x94, 0xf6, 0x51, 0x68, 0x87, 0x2f, 0x41,
- 0x9a, 0x93, 0xa7, 0xd4, 0xf1, 0x5b, 0x3a, 0x90, 0x47, 0x6e, 0x7b, 0x42, 0xb8, 0xe5, 0x03, 0x89,
- 0x8c, 0x35, 0xdc, 0x03, 0x75, 0x65, 0x47, 0xa1, 0x24, 0xb4, 0xc0, 0x02, 0xf3, 0x9d, 0x3d, 0xfe,
- 0x9c, 0x13, 0xa6, 0x2f, 0x26, 0x6e, 0xfb, 0xb8, 0x3e, 0x0a, 0xb1, 0x71, 0x0f, 0xfd, 0xcc, 0xf4,
- 0x11, 0x68, 0x20, 0x0c, 0xff, 0xad, 0x01, 0xc8, 0x7d, 0xcf, 0xb3, 0x49, 0x83, 0x38, 0x02, 0xdb,
- 0xb2, 0xbf, 0xe7, 0x7a, 0x46, 0xfa, 0xfb, 0xcd, 0xa4, 0xf9, 0x24, 0x48, 0x71, 0xc7, 0xfd, 0x6b,
- 0x3a, 0x09, 0x45, 0x23, 0x7c, 0x06, 0xe9, 0x3c, 0xe7, 0xf2, 0xb7, 0xbe, 0x74, 0x65, 0x3a, 0x47,
- 0xbf, 0x5f, 0x06, 0xe9, 0x54, 0x76, 0x14, 0x4a, 0xc2, 0x17, 0x60, 0x93, 0x11, 0x6c, 0x9d, 0x39,
- 0x76, 0x1b, 0xb9, 0xae, 0x38, 0xa4, 0x36, 0xe1, 0x6d, 0x2e, 0x48, 0x43, 0x5f, 0x96, 0xcb, 0x9c,
- 0x55, 0xcc, 0x4d, 0x34, 0x12, 0x85, 0xc6, 0xb0, 0x61, 0x03, 0xe4, 0xc2, 0xf2, 0x10, 0x9c, 0x9d,
- 0x7e, 0x7d, 0x3a, 0xe0, 0x55, 0x6c, 0xf7, 0xba, 0x96, 0x15, 0xe9, 0xe0, 0x76, 0xb7, 0x93, 0xcb,
- 0x15, 0x27, 0x43, 0xd1, 0x55, 0x5a, 0xf0, 0x4f, 0x40, 0xc7, 0xe3, 0xfc, 0xac, 0x4a, 0x3f, 0x3f,
- 0x09, 0x6a, 0xce, 0x58, 0x07, 0x63, 0xd9, 0xd0, 0x03, 0xab, 0x38, 0xfa, 0x72, 0xe6, 0xfa, 0x9a,
- 0x3c, 0x85, 0x77, 0x27, 0xac, 0x43, 0xec, 0xb1, 0x6d, 0xea, 0x2a, 0x8d, 0xab, 0x31, 0x03, 0x47,
- 0x09, 0x75, 0xd8, 0x02, 0x10, 0xc7, 0x1f, 0xfa, 0x5c, 0x87, 0x57, 0x5e, 0x31, 0x89, 0x7f, 0x07,
- 0x06, 0x5b, 0x2d, 0x61, 0xe2, 0x68, 0x84, 0x8f, 0xe0, 0x05, 0xac, 0x8f, 0x3b, 0x30, 0xf0, 0x51,
- 0xe4, 0x0d, 0x7c, 0x2b, 0xf6, 0x06, 0x5e, 0x4b, 0xf0, 0x3e, 0xc1, 0x0b, 0xf8, 0xff, 0x1a, 0xd8,
- 0x1c, 0x5d, 0x30, 0xe0, 0x83, 0x48, 0x74, 0xb9, 0x58, 0x74, 0x2b, 0x31, 0x96, 0x8a, 0xed, 0x6f,
- 0x60, 0x59, 0x95, 0x95, 0xe8, 0x1f, 0x0c, 0x91, 0x18, 0x83, 0xfb, 0x20, 0xe8, 0x08, 0x94, 0x44,
- 0x78, 0xa4, 0x64, 0x2f, 0x1f, 0x1d, 0x43, 0x31, 0xb5, 0xfc, 0x17, 0x1a, 0xb8, 0x75, 0x65, 0x41,
- 0x80, 0x66, 0x24, 0x74, 0x23, 0x16, 0x7a, 0x76, 0xbc, 0xc0, 0xa7, 0xf9, 0x9f, 0xc1, 0xbc, 0x77,
- 0xf9, 0x2e, 0x3b, 0xf5, 0xe6, 0x5d, 0x76, 0xea, 0xed, 0xbb, 0xec, 0xd4, 0x3f, 0xbb, 0x59, 0xed,
- 0xb2, 0x9b, 0xd5, 0xde, 0x74, 0xb3, 0xda, 0xdb, 0x6e, 0x56, 0xfb, 0xb6, 0x9b, 0xd5, 0xfe, 0xf3,
- 0x5d, 0x76, 0xea, 0x2f, 0x69, 0x25, 0xf7, 0x43, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x7d, 0x0b,
- 0x1d, 0x1e, 0x14, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.proto b/vendor/k8s.io/api/policy/v1beta1/generated.proto
deleted file mode 100644
index 514868a9f..000000000
--- a/vendor/k8s.io/api/policy/v1beta1/generated.proto
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.policy.v1beta1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// AllowedFlexVolume represents a single Flexvolume that is allowed to be used.
-message AllowedFlexVolume {
- // Driver is the name of the Flexvolume driver.
- optional string driver = 1;
-}
-
-// defines the host volume conditions that will be enabled by a policy
-// for pods to use. It requires the path prefix to be defined.
-message AllowedHostPath {
- // is the path prefix that the host volume must match.
- // It does not support `*`.
- // Trailing slashes are trimmed when validating the path prefix with a host path.
- //
- // Examples:
- // `/foo` would allow `/foo`, `/foo/` and `/foo/bar`
- // `/foo` would not allow `/food` or `/etc/foo`
- optional string pathPrefix = 1;
-}
-
-// Eviction evicts a pod from its node subject to certain policies and safety constraints.
-// This is a subresource of Pod. A request to cause such an eviction is
-// created by POSTing to .../pods/<pod name>/evictions.
-message Eviction {
- // ObjectMeta describes the pod that is being evicted.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // DeleteOptions may be provided
- optional k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions deleteOptions = 2;
-}
-
-// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
-message FSGroupStrategyOptions {
- // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
- // +optional
- optional string rule = 1;
-
- // Ranges are the allowed ranges of fs groups. If you would like to force a single
- // fs group then supply a single range with the same start and end.
- // +optional
- repeated IDRange ranges = 2;
-}
-
-// Host Port Range defines a range of host ports that will be enabled by a policy
-// for pods to use. It requires both the start and end to be defined.
-message HostPortRange {
- // min is the start of the range, inclusive.
- optional int32 min = 1;
-
- // max is the end of the range, inclusive.
- optional int32 max = 2;
-}
-
-// ID Range provides a min/max of an allowed range of IDs.
-message IDRange {
- // Min is the start of the range, inclusive.
- optional int64 min = 1;
-
- // Max is the end of the range, inclusive.
- optional int64 max = 2;
-}
-
-// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
-message PodDisruptionBudget {
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired behavior of the PodDisruptionBudget.
- optional PodDisruptionBudgetSpec spec = 2;
-
- // Most recently observed status of the PodDisruptionBudget.
- optional PodDisruptionBudgetStatus status = 3;
-}
-
-// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
-message PodDisruptionBudgetList {
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- repeated PodDisruptionBudget items = 2;
-}
-
-// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
-message PodDisruptionBudgetSpec {
- // An eviction is allowed if at least "minAvailable" pods selected by
- // "selector" will still be available after the eviction, i.e. even in the
- // absence of the evicted pod. So for example you can prevent all voluntary
- // evictions by specifying "100%".
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString minAvailable = 1;
-
- // Label query over pods whose evictions are managed by the disruption
- // budget.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
-
- // An eviction is allowed if at most "maxUnavailable" pods selected by
- // "selector" are unavailable after the eviction, i.e. even in absence of
- // the evicted pod. For example, one can prevent all voluntary evictions
- // by specifying 0. This is a mutually exclusive setting with "minAvailable".
- optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 3;
-}
-
-// PodDisruptionBudgetStatus represents information about the status of a
-// PodDisruptionBudget. Status may trail the actual state of a system.
-message PodDisruptionBudgetStatus {
- // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
- // status informatio is valid only if observedGeneration equals to PDB's object generation.
- // +optional
- optional int64 observedGeneration = 1;
-
- // DisruptedPods contains information about pods whose eviction was
- // processed by the API server eviction subresource handler but has not
- // yet been observed by the PodDisruptionBudget controller.
- // A pod will be in this map from the time when the API server processed the
- // eviction request to the time when the pod is seen by PDB controller
- // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod
- // and the value is the time when the API server processed the eviction request. If
- // the deletion didn't occur and a pod is still there it will be removed from
- // the list automatically by PodDisruptionBudget controller after some time.
- // If everything goes smooth this map should be empty for the most of the time.
- // Large number of entries in the map may indicate problems with pod deletions.
- map<string, k8s.io.apimachinery.pkg.apis.meta.v1.Time> disruptedPods = 2;
-
- // Number of pod disruptions that are currently allowed.
- optional int32 disruptionsAllowed = 3;
-
- // current number of healthy pods
- optional int32 currentHealthy = 4;
-
- // minimum desired number of healthy pods
- optional int32 desiredHealthy = 5;
-
- // total number of pods counted by this disruption budget
- optional int32 expectedPods = 6;
-}
-
-// Pod Security Policy governs the ability to make requests that affect the Security Context
-// that will be applied to a pod and container.
-message PodSecurityPolicy {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // spec defines the policy enforced.
- // +optional
- optional PodSecurityPolicySpec spec = 2;
-}
-
-// Pod Security Policy List is a list of PodSecurityPolicy objects.
-message PodSecurityPolicyList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of schema objects.
- repeated PodSecurityPolicy items = 2;
-}
-
-// Pod Security Policy Spec defines the policy enforced.
-message PodSecurityPolicySpec {
- // privileged determines if a pod can request to be run as privileged.
- // +optional
- optional bool privileged = 1;
-
- // DefaultAddCapabilities is the default set of capabilities that will be added to the container
- // unless the pod spec specifically drops the capability. You may not list a capability in both
- // DefaultAddCapabilities and RequiredDropCapabilities. Capabilities added here are implicitly
- // allowed, and need not be included in the AllowedCapabilities list.
- // +optional
- repeated string defaultAddCapabilities = 2;
-
- // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
- // are required to be dropped and cannot be added.
- // +optional
- repeated string requiredDropCapabilities = 3;
-
- // AllowedCapabilities is a list of capabilities that can be requested to add to the container.
- // Capabilities in this field may be added at the pod author's discretion.
- // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
- // +optional
- repeated string allowedCapabilities = 4;
-
- // volumes is a white list of allowed volume plugins. Empty indicates that all plugins
- // may be used.
- // +optional
- repeated string volumes = 5;
-
- // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
- // +optional
- optional bool hostNetwork = 6;
-
- // hostPorts determines which host port ranges are allowed to be exposed.
- // +optional
- repeated HostPortRange hostPorts = 7;
-
- // hostPID determines if the policy allows the use of HostPID in the pod spec.
- // +optional
- optional bool hostPID = 8;
-
- // hostIPC determines if the policy allows the use of HostIPC in the pod spec.
- // +optional
- optional bool hostIPC = 9;
-
- // seLinux is the strategy that will dictate the allowable labels that may be set.
- optional SELinuxStrategyOptions seLinux = 10;
-
- // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
- optional RunAsUserStrategyOptions runAsUser = 11;
-
- // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
- optional SupplementalGroupsStrategyOptions supplementalGroups = 12;
-
- // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
- optional FSGroupStrategyOptions fsGroup = 13;
-
- // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
- // system. If the container specifically requests to run with a non-read only root file system
- // the PSP should deny the pod.
- // If set to false the container may run with a read only root file system if it wishes but it
- // will not be forced to.
- // +optional
- optional bool readOnlyRootFilesystem = 14;
-
- // DefaultAllowPrivilegeEscalation controls the default setting for whether a
- // process can gain more privileges than its parent process.
- // +optional
- optional bool defaultAllowPrivilegeEscalation = 15;
-
- // AllowPrivilegeEscalation determines if a pod can request to allow
- // privilege escalation. If unspecified, defaults to true.
- // +optional
- optional bool allowPrivilegeEscalation = 16;
-
- // is a white list of allowed host paths. Empty indicates that all host paths may be used.
- // +optional
- repeated AllowedHostPath allowedHostPaths = 17;
-
- // AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all
- // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes
- // is allowed in the "Volumes" field.
- // +optional
- repeated AllowedFlexVolume allowedFlexVolumes = 18;
-}
-
-// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.
-message RunAsUserStrategyOptions {
- // Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
- optional string rule = 1;
-
- // Ranges are the allowed ranges of uids that may be used.
- // +optional
- repeated IDRange ranges = 2;
-}
-
-// SELinux Strategy Options defines the strategy type and any options used to create the strategy.
-message SELinuxStrategyOptions {
- // type is the strategy that will dictate the allowable labels that may be set.
- optional string rule = 1;
-
- // seLinuxOptions required to run as; required for MustRunAs
- // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
- // +optional
- optional k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 2;
-}
-
-// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
-message SupplementalGroupsStrategyOptions {
- // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
- // +optional
- optional string rule = 1;
-
- // Ranges are the allowed ranges of supplemental groups. If you would like to force a single
- // supplemental group then supply a single range with the same start and end.
- // +optional
- repeated IDRange ranges = 2;
-}
-
diff --git a/vendor/k8s.io/api/policy/v1beta1/register.go b/vendor/k8s.io/api/policy/v1beta1/register.go
deleted file mode 100644
index b3efd6326..000000000
--- a/vendor/k8s.io/api/policy/v1beta1/register.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Copyright 2015 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "policy"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &PodDisruptionBudget{},
- &PodDisruptionBudgetList{},
- &PodSecurityPolicy{},
- &PodSecurityPolicyList{},
- &Eviction{},
- )
- // Add the watch version that applies
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/policy/v1beta1/types.go b/vendor/k8s.io/api/policy/v1beta1/types.go
deleted file mode 100644
index 6cea9615f..000000000
--- a/vendor/k8s.io/api/policy/v1beta1/types.go
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
-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 v1beta1
-
-import (
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
-type PodDisruptionBudgetSpec struct {
- // An eviction is allowed if at least "minAvailable" pods selected by
- // "selector" will still be available after the eviction, i.e. even in the
- // absence of the evicted pod. So for example you can prevent all voluntary
- // evictions by specifying "100%".
- MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"`
-
- // Label query over pods whose evictions are managed by the disruption
- // budget.
- Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
-
- // An eviction is allowed if at most "maxUnavailable" pods selected by
- // "selector" are unavailable after the eviction, i.e. even in absence of
- // the evicted pod. For example, one can prevent all voluntary evictions
- // by specifying 0. This is a mutually exclusive setting with "minAvailable".
- MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,3,opt,name=maxUnavailable"`
-}
-
-// PodDisruptionBudgetStatus represents information about the status of a
-// PodDisruptionBudget. Status may trail the actual state of a system.
-type PodDisruptionBudgetStatus struct {
- // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
- // status informatio is valid only if observedGeneration equals to PDB's object generation.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // DisruptedPods contains information about pods whose eviction was
- // processed by the API server eviction subresource handler but has not
- // yet been observed by the PodDisruptionBudget controller.
- // A pod will be in this map from the time when the API server processed the
- // eviction request to the time when the pod is seen by PDB controller
- // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod
- // and the value is the time when the API server processed the eviction request. If
- // the deletion didn't occur and a pod is still there it will be removed from
- // the list automatically by PodDisruptionBudget controller after some time.
- // If everything goes smooth this map should be empty for the most of the time.
- // Large number of entries in the map may indicate problems with pod deletions.
- DisruptedPods map[string]metav1.Time `json:"disruptedPods" protobuf:"bytes,2,rep,name=disruptedPods"`
-
- // Number of pod disruptions that are currently allowed.
- PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"`
-
- // current number of healthy pods
- CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,4,opt,name=currentHealthy"`
-
- // minimum desired number of healthy pods
- DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,5,opt,name=desiredHealthy"`
-
- // total number of pods counted by this disruption budget
- ExpectedPods int32 `json:"expectedPods" protobuf:"varint,6,opt,name=expectedPods"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
-type PodDisruptionBudget struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired behavior of the PodDisruptionBudget.
- Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
- // Most recently observed status of the PodDisruptionBudget.
- Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
-type PodDisruptionBudgetList struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +genclient:noVerbs
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Eviction evicts a pod from its node subject to certain policies and safety constraints.
-// This is a subresource of Pod. A request to cause such an eviction is
-// created by POSTing to .../pods/<pod name>/evictions.
-type Eviction struct {
- metav1.TypeMeta `json:",inline"`
-
- // ObjectMeta describes the pod that is being evicted.
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // DeleteOptions may be provided
- DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Pod Security Policy governs the ability to make requests that affect the Security Context
-// that will be applied to a pod and container.
-type PodSecurityPolicy struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // spec defines the policy enforced.
- // +optional
- Spec PodSecurityPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-}
-
-// Pod Security Policy Spec defines the policy enforced.
-type PodSecurityPolicySpec struct {
- // privileged determines if a pod can request to be run as privileged.
- // +optional
- Privileged bool `json:"privileged,omitempty" protobuf:"varint,1,opt,name=privileged"`
- // DefaultAddCapabilities is the default set of capabilities that will be added to the container
- // unless the pod spec specifically drops the capability. You may not list a capability in both
- // DefaultAddCapabilities and RequiredDropCapabilities. Capabilities added here are implicitly
- // allowed, and need not be included in the AllowedCapabilities list.
- // +optional
- DefaultAddCapabilities []v1.Capability `json:"defaultAddCapabilities,omitempty" protobuf:"bytes,2,rep,name=defaultAddCapabilities,casttype=k8s.io/api/core/v1.Capability"`
- // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
- // are required to be dropped and cannot be added.
- // +optional
- RequiredDropCapabilities []v1.Capability `json:"requiredDropCapabilities,omitempty" protobuf:"bytes,3,rep,name=requiredDropCapabilities,casttype=k8s.io/api/core/v1.Capability"`
- // AllowedCapabilities is a list of capabilities that can be requested to add to the container.
- // Capabilities in this field may be added at the pod author's discretion.
- // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
- // +optional
- AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/api/core/v1.Capability"`
- // volumes is a white list of allowed volume plugins. Empty indicates that all plugins
- // may be used.
- // +optional
- Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"`
- // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
- // +optional
- HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,6,opt,name=hostNetwork"`
- // hostPorts determines which host port ranges are allowed to be exposed.
- // +optional
- HostPorts []HostPortRange `json:"hostPorts,omitempty" protobuf:"bytes,7,rep,name=hostPorts"`
- // hostPID determines if the policy allows the use of HostPID in the pod spec.
- // +optional
- HostPID bool `json:"hostPID,omitempty" protobuf:"varint,8,opt,name=hostPID"`
- // hostIPC determines if the policy allows the use of HostIPC in the pod spec.
- // +optional
- HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,9,opt,name=hostIPC"`
- // seLinux is the strategy that will dictate the allowable labels that may be set.
- SELinux SELinuxStrategyOptions `json:"seLinux" protobuf:"bytes,10,opt,name=seLinux"`
- // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
- RunAsUser RunAsUserStrategyOptions `json:"runAsUser" protobuf:"bytes,11,opt,name=runAsUser"`
- // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
- SupplementalGroups SupplementalGroupsStrategyOptions `json:"supplementalGroups" protobuf:"bytes,12,opt,name=supplementalGroups"`
- // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
- FSGroup FSGroupStrategyOptions `json:"fsGroup" protobuf:"bytes,13,opt,name=fsGroup"`
- // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
- // system. If the container specifically requests to run with a non-read only root file system
- // the PSP should deny the pod.
- // If set to false the container may run with a read only root file system if it wishes but it
- // will not be forced to.
- // +optional
- ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,14,opt,name=readOnlyRootFilesystem"`
- // DefaultAllowPrivilegeEscalation controls the default setting for whether a
- // process can gain more privileges than its parent process.
- // +optional
- DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty" protobuf:"varint,15,opt,name=defaultAllowPrivilegeEscalation"`
- // AllowPrivilegeEscalation determines if a pod can request to allow
- // privilege escalation. If unspecified, defaults to true.
- // +optional
- AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty" protobuf:"varint,16,opt,name=allowPrivilegeEscalation"`
- // is a white list of allowed host paths. Empty indicates that all host paths may be used.
- // +optional
- AllowedHostPaths []AllowedHostPath `json:"allowedHostPaths,omitempty" protobuf:"bytes,17,rep,name=allowedHostPaths"`
- // AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all
- // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes
- // is allowed in the "Volumes" field.
- // +optional
- AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" protobuf:"bytes,18,rep,name=allowedFlexVolumes"`
-}
-
-// defines the host volume conditions that will be enabled by a policy
-// for pods to use. It requires the path prefix to be defined.
-type AllowedHostPath struct {
- // is the path prefix that the host volume must match.
- // It does not support `*`.
- // Trailing slashes are trimmed when validating the path prefix with a host path.
- //
- // Examples:
- // `/foo` would allow `/foo`, `/foo/` and `/foo/bar`
- // `/foo` would not allow `/food` or `/etc/foo`
- PathPrefix string `json:"pathPrefix,omitempty" protobuf:"bytes,1,rep,name=pathPrefix"`
-}
-
-// FS Type gives strong typing to different file systems that are used by volumes.
-type FSType string
-
-var (
- AzureFile FSType = "azureFile"
- Flocker FSType = "flocker"
- FlexVolume FSType = "flexVolume"
- HostPath FSType = "hostPath"
- EmptyDir FSType = "emptyDir"
- GCEPersistentDisk FSType = "gcePersistentDisk"
- AWSElasticBlockStore FSType = "awsElasticBlockStore"
- GitRepo FSType = "gitRepo"
- Secret FSType = "secret"
- NFS FSType = "nfs"
- ISCSI FSType = "iscsi"
- Glusterfs FSType = "glusterfs"
- PersistentVolumeClaim FSType = "persistentVolumeClaim"
- RBD FSType = "rbd"
- Cinder FSType = "cinder"
- CephFS FSType = "cephFS"
- DownwardAPI FSType = "downwardAPI"
- FC FSType = "fc"
- ConfigMap FSType = "configMap"
- Quobyte FSType = "quobyte"
- AzureDisk FSType = "azureDisk"
- All FSType = "*"
-)
-
-// AllowedFlexVolume represents a single Flexvolume that is allowed to be used.
-type AllowedFlexVolume struct {
- // Driver is the name of the Flexvolume driver.
- Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
-}
-
-// Host Port Range defines a range of host ports that will be enabled by a policy
-// for pods to use. It requires both the start and end to be defined.
-type HostPortRange struct {
- // min is the start of the range, inclusive.
- Min int32 `json:"min" protobuf:"varint,1,opt,name=min"`
- // max is the end of the range, inclusive.
- Max int32 `json:"max" protobuf:"varint,2,opt,name=max"`
-}
-
-// SELinux Strategy Options defines the strategy type and any options used to create the strategy.
-type SELinuxStrategyOptions struct {
- // type is the strategy that will dictate the allowable labels that may be set.
- Rule SELinuxStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=SELinuxStrategy"`
- // seLinuxOptions required to run as; required for MustRunAs
- // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
- // +optional
- SELinuxOptions *v1.SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,2,opt,name=seLinuxOptions"`
-}
-
-// SELinuxStrategy denotes strategy types for generating SELinux options for a
-// Security Context.
-type SELinuxStrategy string
-
-const (
- // container must have SELinux labels of X applied.
- SELinuxStrategyMustRunAs SELinuxStrategy = "MustRunAs"
- // container may make requests for any SELinux context labels.
- SELinuxStrategyRunAsAny SELinuxStrategy = "RunAsAny"
-)
-
-// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.
-type RunAsUserStrategyOptions struct {
- // Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
- Rule RunAsUserStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=RunAsUserStrategy"`
- // Ranges are the allowed ranges of uids that may be used.
- // +optional
- Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
-}
-
-// ID Range provides a min/max of an allowed range of IDs.
-type IDRange struct {
- // Min is the start of the range, inclusive.
- Min int64 `json:"min" protobuf:"varint,1,opt,name=min"`
- // Max is the end of the range, inclusive.
- Max int64 `json:"max" protobuf:"varint,2,opt,name=max"`
-}
-
-// RunAsUserStrategy denotes strategy types for generating RunAsUser values for a
-// Security Context.
-type RunAsUserStrategy string
-
-const (
- // container must run as a particular uid.
- RunAsUserStrategyMustRunAs RunAsUserStrategy = "MustRunAs"
- // container must run as a non-root uid
- RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategy = "MustRunAsNonRoot"
- // container may make requests for any uid.
- RunAsUserStrategyRunAsAny RunAsUserStrategy = "RunAsAny"
-)
-
-// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
-type FSGroupStrategyOptions struct {
- // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
- // +optional
- Rule FSGroupStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=FSGroupStrategyType"`
- // Ranges are the allowed ranges of fs groups. If you would like to force a single
- // fs group then supply a single range with the same start and end.
- // +optional
- Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
-}
-
-// FSGroupStrategyType denotes strategy types for generating FSGroup values for a
-// SecurityContext
-type FSGroupStrategyType string
-
-const (
- // container must have FSGroup of X applied.
- FSGroupStrategyMustRunAs FSGroupStrategyType = "MustRunAs"
- // container may make requests for any FSGroup labels.
- FSGroupStrategyRunAsAny FSGroupStrategyType = "RunAsAny"
-)
-
-// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
-type SupplementalGroupsStrategyOptions struct {
- // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
- // +optional
- Rule SupplementalGroupsStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=SupplementalGroupsStrategyType"`
- // Ranges are the allowed ranges of supplemental groups. If you would like to force a single
- // supplemental group then supply a single range with the same start and end.
- // +optional
- Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
-}
-
-// SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental
-// groups for a SecurityContext.
-type SupplementalGroupsStrategyType string
-
-const (
- // container must run as a particular gid.
- SupplementalGroupsStrategyMustRunAs SupplementalGroupsStrategyType = "MustRunAs"
- // container may make requests for any gid.
- SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny"
-)
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Pod Security Policy List is a list of PodSecurityPolicy objects.
-type PodSecurityPolicyList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of schema objects.
- Items []PodSecurityPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 8c51518d4..000000000
--- a/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_AllowedFlexVolume = map[string]string{
- "": "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.",
- "driver": "Driver is the name of the Flexvolume driver.",
-}
-
-func (AllowedFlexVolume) SwaggerDoc() map[string]string {
- return map_AllowedFlexVolume
-}
-
-var map_AllowedHostPath = map[string]string{
- "": "defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.",
- "pathPrefix": "is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`",
-}
-
-func (AllowedHostPath) SwaggerDoc() map[string]string {
- return map_AllowedHostPath
-}
-
-var map_Eviction = map[string]string{
- "": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/<pod name>/evictions.",
- "metadata": "ObjectMeta describes the pod that is being evicted.",
- "deleteOptions": "DeleteOptions may be provided",
-}
-
-func (Eviction) SwaggerDoc() map[string]string {
- return map_Eviction
-}
-
-var map_FSGroupStrategyOptions = map[string]string{
- "": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.",
- "rule": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.",
- "ranges": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end.",
-}
-
-func (FSGroupStrategyOptions) SwaggerDoc() map[string]string {
- return map_FSGroupStrategyOptions
-}
-
-var map_HostPortRange = map[string]string{
- "": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.",
- "min": "min is the start of the range, inclusive.",
- "max": "max is the end of the range, inclusive.",
-}
-
-func (HostPortRange) SwaggerDoc() map[string]string {
- return map_HostPortRange
-}
-
-var map_IDRange = map[string]string{
- "": "ID Range provides a min/max of an allowed range of IDs.",
- "min": "Min is the start of the range, inclusive.",
- "max": "Max is the end of the range, inclusive.",
-}
-
-func (IDRange) SwaggerDoc() map[string]string {
- return map_IDRange
-}
-
-var map_PodDisruptionBudget = map[string]string{
- "": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods",
- "spec": "Specification of the desired behavior of the PodDisruptionBudget.",
- "status": "Most recently observed status of the PodDisruptionBudget.",
-}
-
-func (PodDisruptionBudget) SwaggerDoc() map[string]string {
- return map_PodDisruptionBudget
-}
-
-var map_PodDisruptionBudgetList = map[string]string{
- "": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.",
-}
-
-func (PodDisruptionBudgetList) SwaggerDoc() map[string]string {
- return map_PodDisruptionBudgetList
-}
-
-var map_PodDisruptionBudgetSpec = map[string]string{
- "": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.",
- "minAvailable": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".",
- "selector": "Label query over pods whose evictions are managed by the disruption budget.",
- "maxUnavailable": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".",
-}
-
-func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string {
- return map_PodDisruptionBudgetSpec
-}
-
-var map_PodDisruptionBudgetStatus = map[string]string{
- "": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.",
- "observedGeneration": "Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation.",
- "disruptedPods": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.",
- "disruptionsAllowed": "Number of pod disruptions that are currently allowed.",
- "currentHealthy": "current number of healthy pods",
- "desiredHealthy": "minimum desired number of healthy pods",
- "expectedPods": "total number of pods counted by this disruption budget",
-}
-
-func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string {
- return map_PodDisruptionBudgetStatus
-}
-
-var map_PodSecurityPolicy = map[string]string{
- "": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "spec defines the policy enforced.",
-}
-
-func (PodSecurityPolicy) SwaggerDoc() map[string]string {
- return map_PodSecurityPolicy
-}
-
-var map_PodSecurityPolicyList = map[string]string{
- "": "Pod Security Policy List is a list of PodSecurityPolicy objects.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is a list of schema objects.",
-}
-
-func (PodSecurityPolicyList) SwaggerDoc() map[string]string {
- return map_PodSecurityPolicyList
-}
-
-var map_PodSecurityPolicySpec = map[string]string{
- "": "Pod Security Policy Spec defines the policy enforced.",
- "privileged": "privileged determines if a pod can request to be run as privileged.",
- "defaultAddCapabilities": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both DefaultAddCapabilities and RequiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the AllowedCapabilities list.",
- "requiredDropCapabilities": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.",
- "allowedCapabilities": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.",
- "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.",
- "hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.",
- "hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.",
- "hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.",
- "hostIPC": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.",
- "seLinux": "seLinux is the strategy that will dictate the allowable labels that may be set.",
- "runAsUser": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.",
- "supplementalGroups": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.",
- "fsGroup": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.",
- "readOnlyRootFilesystem": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.",
- "defaultAllowPrivilegeEscalation": "DefaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.",
- "allowPrivilegeEscalation": "AllowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.",
- "allowedHostPaths": "is a white list of allowed host paths. Empty indicates that all host paths may be used.",
- "allowedFlexVolumes": "AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"Volumes\" field.",
-}
-
-func (PodSecurityPolicySpec) SwaggerDoc() map[string]string {
- return map_PodSecurityPolicySpec
-}
-
-var map_RunAsUserStrategyOptions = map[string]string{
- "": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.",
- "rule": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set.",
- "ranges": "Ranges are the allowed ranges of uids that may be used.",
-}
-
-func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string {
- return map_RunAsUserStrategyOptions
-}
-
-var map_SELinuxStrategyOptions = map[string]string{
- "": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.",
- "rule": "type is the strategy that will dictate the allowable labels that may be set.",
- "seLinuxOptions": "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/",
-}
-
-func (SELinuxStrategyOptions) SwaggerDoc() map[string]string {
- return map_SELinuxStrategyOptions
-}
-
-var map_SupplementalGroupsStrategyOptions = map[string]string{
- "": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.",
- "rule": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.",
- "ranges": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end.",
-}
-
-func (SupplementalGroupsStrategyOptions) SwaggerDoc() map[string]string {
- return map_SupplementalGroupsStrategyOptions
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index 8a770b2f0..000000000
--- a/vendor/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,475 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- core_v1 "k8s.io/api/core/v1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- intstr "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *AllowedFlexVolume) DeepCopyInto(out *AllowedFlexVolume) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedFlexVolume.
-func (in *AllowedFlexVolume) DeepCopy() *AllowedFlexVolume {
- if in == nil {
- return nil
- }
- out := new(AllowedFlexVolume)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *AllowedHostPath) DeepCopyInto(out *AllowedHostPath) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedHostPath.
-func (in *AllowedHostPath) DeepCopy() *AllowedHostPath {
- if in == nil {
- return nil
- }
- out := new(AllowedHostPath)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Eviction) DeepCopyInto(out *Eviction) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.DeleteOptions != nil {
- in, out := &in.DeleteOptions, &out.DeleteOptions
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.DeleteOptions)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Eviction.
-func (in *Eviction) DeepCopy() *Eviction {
- if in == nil {
- return nil
- }
- out := new(Eviction)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Eviction) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *FSGroupStrategyOptions) DeepCopyInto(out *FSGroupStrategyOptions) {
- *out = *in
- if in.Ranges != nil {
- in, out := &in.Ranges, &out.Ranges
- *out = make([]IDRange, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FSGroupStrategyOptions.
-func (in *FSGroupStrategyOptions) DeepCopy() *FSGroupStrategyOptions {
- if in == nil {
- return nil
- }
- out := new(FSGroupStrategyOptions)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *HostPortRange) DeepCopyInto(out *HostPortRange) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPortRange.
-func (in *HostPortRange) DeepCopy() *HostPortRange {
- if in == nil {
- return nil
- }
- out := new(HostPortRange)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IDRange) DeepCopyInto(out *IDRange) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IDRange.
-func (in *IDRange) DeepCopy() *IDRange {
- if in == nil {
- return nil
- }
- out := new(IDRange)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodDisruptionBudget) DeepCopyInto(out *PodDisruptionBudget) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudget.
-func (in *PodDisruptionBudget) DeepCopy() *PodDisruptionBudget {
- if in == nil {
- return nil
- }
- out := new(PodDisruptionBudget)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PodDisruptionBudget) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodDisruptionBudgetList) DeepCopyInto(out *PodDisruptionBudgetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]PodDisruptionBudget, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetList.
-func (in *PodDisruptionBudgetList) DeepCopy() *PodDisruptionBudgetList {
- if in == nil {
- return nil
- }
- out := new(PodDisruptionBudgetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PodDisruptionBudgetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) {
- *out = *in
- if in.MinAvailable != nil {
- in, out := &in.MinAvailable, &out.MinAvailable
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- if in.Selector != nil {
- in, out := &in.Selector, &out.Selector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.MaxUnavailable != nil {
- in, out := &in.MaxUnavailable, &out.MaxUnavailable
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetSpec.
-func (in *PodDisruptionBudgetSpec) DeepCopy() *PodDisruptionBudgetSpec {
- if in == nil {
- return nil
- }
- out := new(PodDisruptionBudgetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodDisruptionBudgetStatus) DeepCopyInto(out *PodDisruptionBudgetStatus) {
- *out = *in
- if in.DisruptedPods != nil {
- in, out := &in.DisruptedPods, &out.DisruptedPods
- *out = make(map[string]v1.Time, len(*in))
- for key, val := range *in {
- (*out)[key] = *val.DeepCopy()
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetStatus.
-func (in *PodDisruptionBudgetStatus) DeepCopy() *PodDisruptionBudgetStatus {
- if in == nil {
- return nil
- }
- out := new(PodDisruptionBudgetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodSecurityPolicy) DeepCopyInto(out *PodSecurityPolicy) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicy.
-func (in *PodSecurityPolicy) DeepCopy() *PodSecurityPolicy {
- if in == nil {
- return nil
- }
- out := new(PodSecurityPolicy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PodSecurityPolicy) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodSecurityPolicyList) DeepCopyInto(out *PodSecurityPolicyList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]PodSecurityPolicy, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyList.
-func (in *PodSecurityPolicyList) DeepCopy() *PodSecurityPolicyList {
- if in == nil {
- return nil
- }
- out := new(PodSecurityPolicyList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PodSecurityPolicyList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodSecurityPolicySpec) DeepCopyInto(out *PodSecurityPolicySpec) {
- *out = *in
- if in.DefaultAddCapabilities != nil {
- in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities
- *out = make([]core_v1.Capability, len(*in))
- copy(*out, *in)
- }
- if in.RequiredDropCapabilities != nil {
- in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities
- *out = make([]core_v1.Capability, len(*in))
- copy(*out, *in)
- }
- if in.AllowedCapabilities != nil {
- in, out := &in.AllowedCapabilities, &out.AllowedCapabilities
- *out = make([]core_v1.Capability, len(*in))
- copy(*out, *in)
- }
- if in.Volumes != nil {
- in, out := &in.Volumes, &out.Volumes
- *out = make([]FSType, len(*in))
- copy(*out, *in)
- }
- if in.HostPorts != nil {
- in, out := &in.HostPorts, &out.HostPorts
- *out = make([]HostPortRange, len(*in))
- copy(*out, *in)
- }
- in.SELinux.DeepCopyInto(&out.SELinux)
- in.RunAsUser.DeepCopyInto(&out.RunAsUser)
- in.SupplementalGroups.DeepCopyInto(&out.SupplementalGroups)
- in.FSGroup.DeepCopyInto(&out.FSGroup)
- if in.DefaultAllowPrivilegeEscalation != nil {
- in, out := &in.DefaultAllowPrivilegeEscalation, &out.DefaultAllowPrivilegeEscalation
- if *in == nil {
- *out = nil
- } else {
- *out = new(bool)
- **out = **in
- }
- }
- if in.AllowPrivilegeEscalation != nil {
- in, out := &in.AllowPrivilegeEscalation, &out.AllowPrivilegeEscalation
- if *in == nil {
- *out = nil
- } else {
- *out = new(bool)
- **out = **in
- }
- }
- if in.AllowedHostPaths != nil {
- in, out := &in.AllowedHostPaths, &out.AllowedHostPaths
- *out = make([]AllowedHostPath, len(*in))
- copy(*out, *in)
- }
- if in.AllowedFlexVolumes != nil {
- in, out := &in.AllowedFlexVolumes, &out.AllowedFlexVolumes
- *out = make([]AllowedFlexVolume, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicySpec.
-func (in *PodSecurityPolicySpec) DeepCopy() *PodSecurityPolicySpec {
- if in == nil {
- return nil
- }
- out := new(PodSecurityPolicySpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RunAsUserStrategyOptions) DeepCopyInto(out *RunAsUserStrategyOptions) {
- *out = *in
- if in.Ranges != nil {
- in, out := &in.Ranges, &out.Ranges
- *out = make([]IDRange, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunAsUserStrategyOptions.
-func (in *RunAsUserStrategyOptions) DeepCopy() *RunAsUserStrategyOptions {
- if in == nil {
- return nil
- }
- out := new(RunAsUserStrategyOptions)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SELinuxStrategyOptions) DeepCopyInto(out *SELinuxStrategyOptions) {
- *out = *in
- if in.SELinuxOptions != nil {
- in, out := &in.SELinuxOptions, &out.SELinuxOptions
- if *in == nil {
- *out = nil
- } else {
- *out = new(core_v1.SELinuxOptions)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SELinuxStrategyOptions.
-func (in *SELinuxStrategyOptions) DeepCopy() *SELinuxStrategyOptions {
- if in == nil {
- return nil
- }
- out := new(SELinuxStrategyOptions)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SupplementalGroupsStrategyOptions) DeepCopyInto(out *SupplementalGroupsStrategyOptions) {
- *out = *in
- if in.Ranges != nil {
- in, out := &in.Ranges, &out.Ranges
- *out = make([]IDRange, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupplementalGroupsStrategyOptions.
-func (in *SupplementalGroupsStrategyOptions) DeepCopy() *SupplementalGroupsStrategyOptions {
- if in == nil {
- return nil
- }
- out := new(SupplementalGroupsStrategyOptions)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/rbac/v1/doc.go b/vendor/k8s.io/api/rbac/v1/doc.go
deleted file mode 100644
index 28ceb269b..000000000
--- a/vendor/k8s.io/api/rbac/v1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// +groupName=rbac.authorization.k8s.io
-package v1 // import "k8s.io/api/rbac/v1"
diff --git a/vendor/k8s.io/api/rbac/v1/generated.pb.go b/vendor/k8s.io/api/rbac/v1/generated.pb.go
deleted file mode 100644
index 5343731cc..000000000
--- a/vendor/k8s.io/api/rbac/v1/generated.pb.go
+++ /dev/null
@@ -1,2749 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1/generated.proto
-
- It has these top-level messages:
- AggregationRule
- ClusterRole
- ClusterRoleBinding
- ClusterRoleBindingList
- ClusterRoleList
- PolicyRule
- Role
- RoleBinding
- RoleBindingList
- RoleList
- RoleRef
- Subject
-*/
-package v1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *AggregationRule) Reset() { *m = AggregationRule{} }
-func (*AggregationRule) ProtoMessage() {}
-func (*AggregationRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *ClusterRole) Reset() { *m = ClusterRole{} }
-func (*ClusterRole) ProtoMessage() {}
-func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
-func (*ClusterRoleBinding) ProtoMessage() {}
-func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
-func (*ClusterRoleBindingList) ProtoMessage() {}
-func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
-func (*ClusterRoleList) ProtoMessage() {}
-func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *PolicyRule) Reset() { *m = PolicyRule{} }
-func (*PolicyRule) ProtoMessage() {}
-func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *Role) Reset() { *m = Role{} }
-func (*Role) ProtoMessage() {}
-func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *RoleBinding) Reset() { *m = RoleBinding{} }
-func (*RoleBinding) ProtoMessage() {}
-func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
-func (*RoleBindingList) ProtoMessage() {}
-func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *RoleList) Reset() { *m = RoleList{} }
-func (*RoleList) ProtoMessage() {}
-func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
-
-func (m *RoleRef) Reset() { *m = RoleRef{} }
-func (*RoleRef) ProtoMessage() {}
-func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *Subject) Reset() { *m = Subject{} }
-func (*Subject) ProtoMessage() {}
-func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
-
-func init() {
- proto.RegisterType((*AggregationRule)(nil), "k8s.io.api.rbac.v1.AggregationRule")
- proto.RegisterType((*ClusterRole)(nil), "k8s.io.api.rbac.v1.ClusterRole")
- proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.api.rbac.v1.ClusterRoleBinding")
- proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.api.rbac.v1.ClusterRoleBindingList")
- proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.api.rbac.v1.ClusterRoleList")
- proto.RegisterType((*PolicyRule)(nil), "k8s.io.api.rbac.v1.PolicyRule")
- proto.RegisterType((*Role)(nil), "k8s.io.api.rbac.v1.Role")
- proto.RegisterType((*RoleBinding)(nil), "k8s.io.api.rbac.v1.RoleBinding")
- proto.RegisterType((*RoleBindingList)(nil), "k8s.io.api.rbac.v1.RoleBindingList")
- proto.RegisterType((*RoleList)(nil), "k8s.io.api.rbac.v1.RoleList")
- proto.RegisterType((*RoleRef)(nil), "k8s.io.api.rbac.v1.RoleRef")
- proto.RegisterType((*Subject)(nil), "k8s.io.api.rbac.v1.Subject")
-}
-func (m *AggregationRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *AggregationRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ClusterRoleSelectors) > 0 {
- for _, msg := range m.ClusterRoleSelectors {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ClusterRole) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if m.AggregationRule != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AggregationRule.Size()))
- n2, err := m.AggregationRule.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- }
- return i, nil
-}
-
-func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- if len(m.Subjects) > 0 {
- for _, msg := range m.Subjects {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
- n4, err := m.RoleRef.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- return i, nil
-}
-
-func (m *ClusterRoleBindingList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRoleBindingList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n5, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ClusterRoleList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRoleList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n6, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *PolicyRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- dAtA[i] = 0x2a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *Role) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Role) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleBinding) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n8, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- if len(m.Subjects) > 0 {
- for _, msg := range m.Subjects {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
- n9, err := m.RoleRef.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- return i, nil
-}
-
-func (m *RoleBindingList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleBindingList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n10, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n11, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleRef) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
- i += copy(dAtA[i:], m.APIGroup)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
- i += copy(dAtA[i:], m.Kind)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- return i, nil
-}
-
-func (m *Subject) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Subject) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
- i += copy(dAtA[i:], m.Kind)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
- i += copy(dAtA[i:], m.APIGroup)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i += copy(dAtA[i:], m.Namespace)
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *AggregationRule) Size() (n int) {
- var l int
- _ = l
- if len(m.ClusterRoleSelectors) > 0 {
- for _, e := range m.ClusterRoleSelectors {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ClusterRole) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.AggregationRule != nil {
- l = m.AggregationRule.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ClusterRoleBinding) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Subjects) > 0 {
- for _, e := range m.Subjects {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.RoleRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ClusterRoleBindingList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ClusterRoleList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *PolicyRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *Role) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleBinding) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Subjects) > 0 {
- for _, e := range m.Subjects {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.RoleRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *RoleBindingList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleRef) Size() (n int) {
- var l int
- _ = l
- l = len(m.APIGroup)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *Subject) Size() (n int) {
- var l int
- _ = l
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.APIGroup)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *AggregationRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&AggregationRule{`,
- `ClusterRoleSelectors:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ClusterRoleSelectors), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRole) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRole{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
- `AggregationRule:` + strings.Replace(fmt.Sprintf("%v", this.AggregationRule), "AggregationRule", "AggregationRule", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRoleBinding) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRoleBinding{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
- `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRoleBindingList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRoleBindingList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRoleList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRoleList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PolicyRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PolicyRule{`,
- `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
- `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
- `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
- `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
- `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Role) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Role{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleBinding) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleBinding{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
- `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleBindingList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleBindingList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleRef) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleRef{`,
- `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
- `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Subject) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Subject{`,
- `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *AggregationRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: AggregationRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: AggregationRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleSelectors", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ClusterRoleSelectors = append(m.ClusterRoleSelectors, k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{})
- if err := m.ClusterRoleSelectors[len(m.ClusterRoleSelectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRole) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, PolicyRule{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AggregationRule", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.AggregationRule == nil {
- m.AggregationRule = &AggregationRule{}
- }
- if err := m.AggregationRule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Subjects = append(m.Subjects, Subject{})
- if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ClusterRoleBinding{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ClusterRole{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PolicyRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Role) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Role: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, PolicyRule{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleBinding) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Subjects = append(m.Subjects, Subject{})
- if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleBindingList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, RoleBinding{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Role{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleRef) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleRef: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroup = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Kind = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Subject) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Subject: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Kind = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroup = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Namespace = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 827 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0xcf, 0x8b, 0x23, 0x45,
- 0x18, 0x4d, 0x65, 0x12, 0x26, 0x5d, 0x31, 0xc4, 0x2d, 0x17, 0x69, 0xa2, 0x74, 0x86, 0x16, 0x24,
- 0xa0, 0x76, 0x9b, 0x5d, 0x51, 0x41, 0xf6, 0xb0, 0xbd, 0xa2, 0x0c, 0x3b, 0x8e, 0x4b, 0x2d, 0x7a,
- 0x10, 0x0f, 0x56, 0x77, 0x6a, 0x3b, 0x65, 0xfa, 0x17, 0x55, 0xd5, 0x81, 0xc5, 0x8b, 0x08, 0x1e,
- 0xbc, 0x79, 0xd4, 0xbf, 0xc0, 0x8b, 0x1e, 0xfd, 0x0b, 0xbc, 0xcc, 0x71, 0x8f, 0x7b, 0x0a, 0x4e,
- 0xfb, 0x87, 0x28, 0xfd, 0x2b, 0x9d, 0xa4, 0x3b, 0x4e, 0x4e, 0x01, 0xf1, 0x34, 0x53, 0xdf, 0xf7,
- 0xde, 0xfb, 0x5e, 0xbf, 0xa9, 0xaf, 0x06, 0x7e, 0xb0, 0x78, 0x5f, 0x18, 0x2c, 0x34, 0x17, 0xb1,
- 0x4d, 0x79, 0x40, 0x25, 0x15, 0xe6, 0x92, 0x06, 0xb3, 0x90, 0x9b, 0x45, 0x83, 0x44, 0xcc, 0xe4,
- 0x36, 0x71, 0xcc, 0xe5, 0xd4, 0x74, 0x69, 0x40, 0x39, 0x91, 0x74, 0x66, 0x44, 0x3c, 0x94, 0x21,
- 0x42, 0x39, 0xc6, 0x20, 0x11, 0x33, 0x52, 0x8c, 0xb1, 0x9c, 0x8e, 0xde, 0x72, 0x99, 0x9c, 0xc7,
- 0xb6, 0xe1, 0x84, 0xbe, 0xe9, 0x86, 0x6e, 0x68, 0x66, 0x50, 0x3b, 0x7e, 0x92, 0x9d, 0xb2, 0x43,
- 0xf6, 0x5b, 0x2e, 0x31, 0x9a, 0xd4, 0xc7, 0x10, 0x2f, 0x9a, 0x93, 0xda, 0xb0, 0xd1, 0x3b, 0x15,
- 0xd2, 0x27, 0xce, 0x9c, 0x05, 0x94, 0x3f, 0x35, 0xa3, 0x85, 0x9b, 0x16, 0x84, 0xe9, 0x53, 0x49,
- 0x1a, 0x2c, 0x8e, 0xcc, 0x7d, 0x2c, 0x1e, 0x07, 0x92, 0xf9, 0xb4, 0x46, 0x78, 0xf7, 0x26, 0x82,
- 0x70, 0xe6, 0xd4, 0x27, 0x35, 0xde, 0xdd, 0x7d, 0xbc, 0x58, 0x32, 0xcf, 0x64, 0x81, 0x14, 0x92,
- 0xef, 0x92, 0xf4, 0x9f, 0x01, 0x1c, 0xde, 0x77, 0x5d, 0x4e, 0x5d, 0x22, 0x59, 0x18, 0xe0, 0xd8,
- 0xa3, 0xe8, 0x7b, 0x00, 0x6f, 0x3b, 0x5e, 0x2c, 0x24, 0xe5, 0x38, 0xf4, 0xe8, 0x63, 0xea, 0x51,
- 0x47, 0x86, 0x5c, 0xa8, 0xe0, 0xec, 0x64, 0xd2, 0xbf, 0x73, 0xd7, 0xa8, 0x42, 0x5f, 0x0f, 0x32,
- 0xa2, 0x85, 0x9b, 0x16, 0x84, 0x91, 0xe6, 0x60, 0x2c, 0xa7, 0xc6, 0x05, 0xb1, 0xa9, 0x57, 0x72,
- 0xad, 0x57, 0xaf, 0x56, 0xe3, 0x56, 0xb2, 0x1a, 0xdf, 0x7e, 0xd0, 0x20, 0x8c, 0x1b, 0xc7, 0xe9,
- 0x3f, 0xb5, 0x61, 0x7f, 0x03, 0x8e, 0xbe, 0x82, 0xbd, 0x54, 0x7c, 0x46, 0x24, 0x51, 0xc1, 0x19,
- 0x98, 0xf4, 0xef, 0xbc, 0x7d, 0x98, 0x95, 0x4f, 0xed, 0xaf, 0xa9, 0x23, 0x3f, 0xa1, 0x92, 0x58,
- 0xa8, 0xf0, 0x01, 0xab, 0x1a, 0x5e, 0xab, 0xa2, 0x07, 0xb0, 0xcb, 0x63, 0x8f, 0x0a, 0xb5, 0x9d,
- 0x7d, 0xa9, 0x66, 0xd4, 0xaf, 0x97, 0xf1, 0x28, 0xf4, 0x98, 0xf3, 0x34, 0x0d, 0xca, 0x1a, 0x14,
- 0x62, 0xdd, 0xf4, 0x24, 0x70, 0xce, 0x45, 0x36, 0x1c, 0x92, 0xed, 0x44, 0xd5, 0x93, 0xcc, 0xed,
- 0x6b, 0x4d, 0x72, 0x3b, 0xe1, 0x5b, 0x2f, 0x25, 0xab, 0xf1, 0xee, 0x5f, 0x04, 0xef, 0x0a, 0xea,
- 0x3f, 0xb4, 0x21, 0xda, 0x88, 0xc6, 0x62, 0xc1, 0x8c, 0x05, 0xee, 0x11, 0x12, 0x3a, 0x87, 0x3d,
- 0x11, 0x67, 0x8d, 0x32, 0xa4, 0x57, 0x9a, 0xbe, 0xea, 0x71, 0x8e, 0xb1, 0x5e, 0x2c, 0xc4, 0x7a,
- 0x45, 0x41, 0xe0, 0x35, 0x1d, 0x7d, 0x04, 0x4f, 0x79, 0xe8, 0x51, 0x4c, 0x9f, 0x14, 0xf9, 0x34,
- 0x2a, 0xe1, 0x1c, 0x62, 0x0d, 0x0b, 0xa5, 0xd3, 0xa2, 0x80, 0x4b, 0xb2, 0xfe, 0x07, 0x80, 0x2f,
- 0xd7, 0xb3, 0xb8, 0x60, 0x42, 0xa2, 0x2f, 0x6b, 0x79, 0x18, 0x07, 0x5e, 0x5e, 0x26, 0xf2, 0x34,
- 0xd6, 0x1f, 0x50, 0x56, 0x36, 0xb2, 0x78, 0x08, 0xbb, 0x4c, 0x52, 0xbf, 0x0c, 0xe2, 0xf5, 0x26,
- 0xfb, 0x75, 0x63, 0xd5, 0xad, 0x39, 0x4f, 0xc9, 0x38, 0xd7, 0xd0, 0x7f, 0x07, 0x70, 0xb8, 0x01,
- 0x3e, 0x82, 0xfd, 0x0f, 0xb7, 0xed, 0x8f, 0x6f, 0xb2, 0xdf, 0xec, 0xfb, 0x6f, 0x00, 0x61, 0xb5,
- 0x12, 0x68, 0x0c, 0xbb, 0x4b, 0xca, 0xed, 0xfc, 0xad, 0x50, 0x2c, 0x25, 0xc5, 0x7f, 0x9e, 0x16,
- 0x70, 0x5e, 0x47, 0x6f, 0x40, 0x85, 0x44, 0xec, 0x63, 0x1e, 0xc6, 0x51, 0x3e, 0x59, 0xb1, 0x06,
- 0xc9, 0x6a, 0xac, 0xdc, 0x7f, 0x74, 0x9e, 0x17, 0x71, 0xd5, 0x4f, 0xc1, 0x9c, 0x8a, 0x30, 0xe6,
- 0x0e, 0x15, 0xea, 0x49, 0x05, 0xc6, 0x65, 0x11, 0x57, 0x7d, 0xf4, 0x1e, 0x1c, 0x94, 0x87, 0x4b,
- 0xe2, 0x53, 0xa1, 0x76, 0x32, 0xc2, 0xad, 0x64, 0x35, 0x1e, 0xe0, 0xcd, 0x06, 0xde, 0xc6, 0xa1,
- 0x7b, 0x70, 0x18, 0x84, 0x41, 0x09, 0xf9, 0x0c, 0x5f, 0x08, 0xb5, 0x9b, 0x51, 0xb3, 0x5d, 0xbc,
- 0xdc, 0x6e, 0xe1, 0x5d, 0xac, 0xfe, 0x1b, 0x80, 0x9d, 0xff, 0xd0, 0xfb, 0xa4, 0x7f, 0xd7, 0x86,
- 0xfd, 0xff, 0xfd, 0xa3, 0x91, 0xae, 0xdb, 0x71, 0x5f, 0x8b, 0x43, 0xd6, 0xed, 0xe6, 0x67, 0xe2,
- 0x17, 0x00, 0x7b, 0x47, 0x7a, 0x1f, 0xee, 0x6d, 0x1b, 0x56, 0xf7, 0x1a, 0x6e, 0x76, 0xfa, 0x0d,
- 0x2c, 0x53, 0x47, 0x6f, 0xc2, 0x5e, 0xb9, 0xd3, 0x99, 0x4f, 0xa5, 0x9a, 0x5b, 0xae, 0x3d, 0x5e,
- 0x23, 0xd0, 0x19, 0xec, 0x2c, 0x58, 0x30, 0x53, 0xdb, 0x19, 0xf2, 0x85, 0x02, 0xd9, 0x79, 0xc8,
- 0x82, 0x19, 0xce, 0x3a, 0x29, 0x22, 0x20, 0x7e, 0xfe, 0x6f, 0x75, 0x03, 0x91, 0x6e, 0x33, 0xce,
- 0x3a, 0xfa, 0xaf, 0x00, 0x9e, 0x16, 0xb7, 0x67, 0xad, 0x07, 0xf6, 0xea, 0x6d, 0xfa, 0x6b, 0x1f,
- 0xe2, 0xef, 0xdf, 0xa7, 0x23, 0x13, 0x2a, 0xe9, 0x4f, 0x11, 0x11, 0x87, 0xaa, 0x9d, 0x0c, 0x76,
- 0xab, 0x80, 0x29, 0x97, 0x65, 0x03, 0x57, 0x18, 0x6b, 0x72, 0x75, 0xad, 0xb5, 0x9e, 0x5d, 0x6b,
- 0xad, 0xe7, 0xd7, 0x5a, 0xeb, 0xdb, 0x44, 0x03, 0x57, 0x89, 0x06, 0x9e, 0x25, 0x1a, 0x78, 0x9e,
- 0x68, 0xe0, 0xcf, 0x44, 0x03, 0x3f, 0xfe, 0xa5, 0xb5, 0xbe, 0x68, 0x2f, 0xa7, 0xff, 0x04, 0x00,
- 0x00, 0xff, 0xff, 0x32, 0xe3, 0x23, 0xf8, 0x2e, 0x0b, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/rbac/v1/generated.proto b/vendor/k8s.io/api/rbac/v1/generated.proto
deleted file mode 100644
index 2f8d863df..000000000
--- a/vendor/k8s.io/api/rbac/v1/generated.proto
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.rbac.v1;
-
-import "k8s.io/api/rbac/v1alpha1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1";
-
-// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
-message AggregationRule {
- // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules.
- // If any of the selectors match, then the ClusterRole's permissions will be added
- // +optional
- repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1;
-}
-
-// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
-message ClusterRole {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Rules holds all the PolicyRules for this ClusterRole
- repeated PolicyRule rules = 2;
-
- // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
- // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be
- // stomped by the controller.
- // +optional
- optional AggregationRule aggregationRule = 3;
-}
-
-// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
-// and adds who information via Subject.
-message ClusterRoleBinding {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Subjects holds references to the objects the role applies to.
- repeated Subject subjects = 2;
-
- // RoleRef can only reference a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- optional RoleRef roleRef = 3;
-}
-
-// ClusterRoleBindingList is a collection of ClusterRoleBindings
-message ClusterRoleBindingList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of ClusterRoleBindings
- repeated ClusterRoleBinding items = 2;
-}
-
-// ClusterRoleList is a collection of ClusterRoles
-message ClusterRoleList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of ClusterRoles
- repeated ClusterRole items = 2;
-}
-
-// PolicyRule holds information that describes a policy rule, but does not contain information
-// about who the rule applies to or which namespace the rule applies to.
-message PolicyRule {
- // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
- repeated string verbs = 1;
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed.
- // +optional
- repeated string apiGroups = 2;
-
- // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
- // +optional
- repeated string resources = 3;
-
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
- // +optional
- repeated string resourceNames = 4;
-
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
- // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
- // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
- // +optional
- repeated string nonResourceURLs = 5;
-}
-
-// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
-message Role {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Rules holds all the PolicyRules for this Role
- repeated PolicyRule rules = 2;
-}
-
-// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
-// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
-// namespace only have effect in that namespace.
-message RoleBinding {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Subjects holds references to the objects the role applies to.
- repeated Subject subjects = 2;
-
- // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- optional RoleRef roleRef = 3;
-}
-
-// RoleBindingList is a collection of RoleBindings
-message RoleBindingList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of RoleBindings
- repeated RoleBinding items = 2;
-}
-
-// RoleList is a collection of Roles
-message RoleList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of Roles
- repeated Role items = 2;
-}
-
-// RoleRef contains information that points to the role being used
-message RoleRef {
- // APIGroup is the group for the resource being referenced
- optional string apiGroup = 1;
-
- // Kind is the type of resource being referenced
- optional string kind = 2;
-
- // Name is the name of resource being referenced
- optional string name = 3;
-}
-
-// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
-// or a value for non-objects such as user and group names.
-message Subject {
- // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
- // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
- optional string kind = 1;
-
- // APIGroup holds the API group of the referenced subject.
- // Defaults to "" for ServiceAccount subjects.
- // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
- // +optional
- optional string apiGroup = 2;
-
- // Name of the object being referenced.
- optional string name = 3;
-
- // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
- // the Authorizer should report an error.
- // +optional
- optional string namespace = 4;
-}
-
diff --git a/vendor/k8s.io/api/rbac/v1/register.go b/vendor/k8s.io/api/rbac/v1/register.go
deleted file mode 100644
index 8f1fd460a..000000000
--- a/vendor/k8s.io/api/rbac/v1/register.go
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-const GroupName = "rbac.authorization.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Role{},
- &RoleBinding{},
- &RoleBindingList{},
- &RoleList{},
-
- &ClusterRole{},
- &ClusterRoleBinding{},
- &ClusterRoleBindingList{},
- &ClusterRoleList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/rbac/v1/types.go b/vendor/k8s.io/api/rbac/v1/types.go
deleted file mode 100644
index 91990548b..000000000
--- a/vendor/k8s.io/api/rbac/v1/types.go
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// Authorization is calculated against
-// 1. evaluation of ClusterRoleBindings - short circuit on match
-// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
-// 3. deny by default
-
-const (
- APIGroupAll = "*"
- ResourceAll = "*"
- VerbAll = "*"
- NonResourceAll = "*"
-
- GroupKind = "Group"
- ServiceAccountKind = "ServiceAccount"
- UserKind = "User"
-
- // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false"
- AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate"
-)
-
-// Authorization is calculated against
-// 1. evaluation of ClusterRoleBindings - short circuit on match
-// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
-// 3. deny by default
-
-// PolicyRule holds information that describes a policy rule, but does not contain information
-// about who the rule applies to or which namespace the rule applies to.
-type PolicyRule struct {
- // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
- Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed.
- // +optional
- APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"`
- // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
- // +optional
- Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
- // +optional
- ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,4,rep,name=resourceNames"`
-
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
- // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
- // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
- // +optional
- NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"`
-}
-
-// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
-// or a value for non-objects such as user and group names.
-type Subject struct {
- // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
- // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
- Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
- // APIGroup holds the API group of the referenced subject.
- // Defaults to "" for ServiceAccount subjects.
- // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
- // +optional
- APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,2,opt.name=apiGroup"`
- // Name of the object being referenced.
- Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
- // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
- // the Authorizer should report an error.
- // +optional
- Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
-}
-
-// RoleRef contains information that points to the role being used
-type RoleRef struct {
- // APIGroup is the group for the resource being referenced
- APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`
- // Kind is the type of resource being referenced
- Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
- // Name is the name of resource being referenced
- Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
-type Role struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Rules holds all the PolicyRules for this Role
- Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
-// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
-// namespace only have effect in that namespace.
-type RoleBinding struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Subjects holds references to the objects the role applies to.
- Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
-
- // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// RoleBindingList is a collection of RoleBindings
-type RoleBindingList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of RoleBindings
- Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// RoleList is a collection of Roles
-type RoleList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of Roles
- Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
-type ClusterRole struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Rules holds all the PolicyRules for this ClusterRole
- Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
-
- // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
- // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be
- // stomped by the controller.
- // +optional
- AggregationRule *AggregationRule `json:"aggregationRule,omitempty" protobuf:"bytes,3,opt,name=aggregationRule"`
-}
-
-// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
-type AggregationRule struct {
- // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules.
- // If any of the selectors match, then the ClusterRole's permissions will be added
- // +optional
- ClusterRoleSelectors []metav1.LabelSelector `json:"clusterRoleSelectors,omitempty" protobuf:"bytes,1,rep,name=clusterRoleSelectors"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
-// and adds who information via Subject.
-type ClusterRoleBinding struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Subjects holds references to the objects the role applies to.
- Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
-
- // RoleRef can only reference a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRoleBindingList is a collection of ClusterRoleBindings
-type ClusterRoleBindingList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of ClusterRoleBindings
- Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRoleList is a collection of ClusterRoles
-type ClusterRoleList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of ClusterRoles
- Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go
deleted file mode 100644
index 280ae5a82..000000000
--- a/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-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 v1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_AggregationRule = map[string]string{
- "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole",
- "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added",
-}
-
-func (AggregationRule) SwaggerDoc() map[string]string {
- return map_AggregationRule
-}
-
-var map_ClusterRole = map[string]string{
- "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.",
- "metadata": "Standard object's metadata.",
- "rules": "Rules holds all the PolicyRules for this ClusterRole",
- "aggregationRule": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.",
-}
-
-func (ClusterRole) SwaggerDoc() map[string]string {
- return map_ClusterRole
-}
-
-var map_ClusterRoleBinding = map[string]string{
- "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
- "metadata": "Standard object's metadata.",
- "subjects": "Subjects holds references to the objects the role applies to.",
- "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
-}
-
-func (ClusterRoleBinding) SwaggerDoc() map[string]string {
- return map_ClusterRoleBinding
-}
-
-var map_ClusterRoleBindingList = map[string]string{
- "": "ClusterRoleBindingList is a collection of ClusterRoleBindings",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of ClusterRoleBindings",
-}
-
-func (ClusterRoleBindingList) SwaggerDoc() map[string]string {
- return map_ClusterRoleBindingList
-}
-
-var map_ClusterRoleList = map[string]string{
- "": "ClusterRoleList is a collection of ClusterRoles",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of ClusterRoles",
-}
-
-func (ClusterRoleList) SwaggerDoc() map[string]string {
- return map_ClusterRoleList
-}
-
-var map_PolicyRule = map[string]string{
- "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.",
- "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.",
- "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.",
- "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.",
- "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
- "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.",
-}
-
-func (PolicyRule) SwaggerDoc() map[string]string {
- return map_PolicyRule
-}
-
-var map_Role = map[string]string{
- "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.",
- "metadata": "Standard object's metadata.",
- "rules": "Rules holds all the PolicyRules for this Role",
-}
-
-func (Role) SwaggerDoc() map[string]string {
- return map_Role
-}
-
-var map_RoleBinding = map[string]string{
- "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
- "metadata": "Standard object's metadata.",
- "subjects": "Subjects holds references to the objects the role applies to.",
- "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
-}
-
-func (RoleBinding) SwaggerDoc() map[string]string {
- return map_RoleBinding
-}
-
-var map_RoleBindingList = map[string]string{
- "": "RoleBindingList is a collection of RoleBindings",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of RoleBindings",
-}
-
-func (RoleBindingList) SwaggerDoc() map[string]string {
- return map_RoleBindingList
-}
-
-var map_RoleList = map[string]string{
- "": "RoleList is a collection of Roles",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of Roles",
-}
-
-func (RoleList) SwaggerDoc() map[string]string {
- return map_RoleList
-}
-
-var map_RoleRef = map[string]string{
- "": "RoleRef contains information that points to the role being used",
- "apiGroup": "APIGroup is the group for the resource being referenced",
- "kind": "Kind is the type of resource being referenced",
- "name": "Name is the name of resource being referenced",
-}
-
-func (RoleRef) SwaggerDoc() map[string]string {
- return map_RoleRef
-}
-
-var map_Subject = map[string]string{
- "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
- "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.",
- "apiGroup": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.",
- "name": "Name of the object being referenced.",
- "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.",
-}
-
-func (Subject) SwaggerDoc() map[string]string {
- return map_Subject
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/rbac/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/rbac/v1/zz_generated.deepcopy.go
deleted file mode 100644
index 0a2a4d08e..000000000
--- a/vendor/k8s.io/api/rbac/v1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,393 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1
-
-import (
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *AggregationRule) DeepCopyInto(out *AggregationRule) {
- *out = *in
- if in.ClusterRoleSelectors != nil {
- in, out := &in.ClusterRoleSelectors, &out.ClusterRoleSelectors
- *out = make([]meta_v1.LabelSelector, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregationRule.
-func (in *AggregationRule) DeepCopy() *AggregationRule {
- if in == nil {
- return nil
- }
- out := new(AggregationRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRole) DeepCopyInto(out *ClusterRole) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]PolicyRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.AggregationRule != nil {
- in, out := &in.AggregationRule, &out.AggregationRule
- if *in == nil {
- *out = nil
- } else {
- *out = new(AggregationRule)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRole.
-func (in *ClusterRole) DeepCopy() *ClusterRole {
- if in == nil {
- return nil
- }
- out := new(ClusterRole)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRole) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRoleBinding) DeepCopyInto(out *ClusterRoleBinding) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Subjects != nil {
- in, out := &in.Subjects, &out.Subjects
- *out = make([]Subject, len(*in))
- copy(*out, *in)
- }
- out.RoleRef = in.RoleRef
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleBinding.
-func (in *ClusterRoleBinding) DeepCopy() *ClusterRoleBinding {
- if in == nil {
- return nil
- }
- out := new(ClusterRoleBinding)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRoleBinding) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRoleBindingList) DeepCopyInto(out *ClusterRoleBindingList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ClusterRoleBinding, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleBindingList.
-func (in *ClusterRoleBindingList) DeepCopy() *ClusterRoleBindingList {
- if in == nil {
- return nil
- }
- out := new(ClusterRoleBindingList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRoleBindingList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRoleList) DeepCopyInto(out *ClusterRoleList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ClusterRole, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleList.
-func (in *ClusterRoleList) DeepCopy() *ClusterRoleList {
- if in == nil {
- return nil
- }
- out := new(ClusterRoleList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRoleList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PolicyRule) DeepCopyInto(out *PolicyRule) {
- *out = *in
- if in.Verbs != nil {
- in, out := &in.Verbs, &out.Verbs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.APIGroups != nil {
- in, out := &in.APIGroups, &out.APIGroups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Resources != nil {
- in, out := &in.Resources, &out.Resources
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.ResourceNames != nil {
- in, out := &in.ResourceNames, &out.ResourceNames
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.NonResourceURLs != nil {
- in, out := &in.NonResourceURLs, &out.NonResourceURLs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRule.
-func (in *PolicyRule) DeepCopy() *PolicyRule {
- if in == nil {
- return nil
- }
- out := new(PolicyRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Role) DeepCopyInto(out *Role) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]PolicyRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Role.
-func (in *Role) DeepCopy() *Role {
- if in == nil {
- return nil
- }
- out := new(Role)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Role) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleBinding) DeepCopyInto(out *RoleBinding) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Subjects != nil {
- in, out := &in.Subjects, &out.Subjects
- *out = make([]Subject, len(*in))
- copy(*out, *in)
- }
- out.RoleRef = in.RoleRef
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBinding.
-func (in *RoleBinding) DeepCopy() *RoleBinding {
- if in == nil {
- return nil
- }
- out := new(RoleBinding)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *RoleBinding) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleBindingList) DeepCopyInto(out *RoleBindingList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]RoleBinding, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBindingList.
-func (in *RoleBindingList) DeepCopy() *RoleBindingList {
- if in == nil {
- return nil
- }
- out := new(RoleBindingList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *RoleBindingList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleList) DeepCopyInto(out *RoleList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Role, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleList.
-func (in *RoleList) DeepCopy() *RoleList {
- if in == nil {
- return nil
- }
- out := new(RoleList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *RoleList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleRef) DeepCopyInto(out *RoleRef) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleRef.
-func (in *RoleRef) DeepCopy() *RoleRef {
- if in == nil {
- return nil
- }
- out := new(RoleRef)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Subject) DeepCopyInto(out *Subject) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subject.
-func (in *Subject) DeepCopy() *Subject {
- if in == nil {
- return nil
- }
- out := new(Subject)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/rbac/v1alpha1/doc.go b/vendor/k8s.io/api/rbac/v1alpha1/doc.go
deleted file mode 100644
index 5236a477f..000000000
--- a/vendor/k8s.io/api/rbac/v1alpha1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// +groupName=rbac.authorization.k8s.io
-package v1alpha1 // import "k8s.io/api/rbac/v1alpha1"
diff --git a/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go b/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go
deleted file mode 100644
index c07cdc75d..000000000
--- a/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go
+++ /dev/null
@@ -1,2750 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1alpha1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1alpha1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1alpha1/generated.proto
-
- It has these top-level messages:
- AggregationRule
- ClusterRole
- ClusterRoleBinding
- ClusterRoleBindingList
- ClusterRoleList
- PolicyRule
- Role
- RoleBinding
- RoleBindingList
- RoleList
- RoleRef
- Subject
-*/
-package v1alpha1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *AggregationRule) Reset() { *m = AggregationRule{} }
-func (*AggregationRule) ProtoMessage() {}
-func (*AggregationRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *ClusterRole) Reset() { *m = ClusterRole{} }
-func (*ClusterRole) ProtoMessage() {}
-func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
-func (*ClusterRoleBinding) ProtoMessage() {}
-func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
-func (*ClusterRoleBindingList) ProtoMessage() {}
-func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
-func (*ClusterRoleList) ProtoMessage() {}
-func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *PolicyRule) Reset() { *m = PolicyRule{} }
-func (*PolicyRule) ProtoMessage() {}
-func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *Role) Reset() { *m = Role{} }
-func (*Role) ProtoMessage() {}
-func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *RoleBinding) Reset() { *m = RoleBinding{} }
-func (*RoleBinding) ProtoMessage() {}
-func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
-func (*RoleBindingList) ProtoMessage() {}
-func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *RoleList) Reset() { *m = RoleList{} }
-func (*RoleList) ProtoMessage() {}
-func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
-
-func (m *RoleRef) Reset() { *m = RoleRef{} }
-func (*RoleRef) ProtoMessage() {}
-func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *Subject) Reset() { *m = Subject{} }
-func (*Subject) ProtoMessage() {}
-func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
-
-func init() {
- proto.RegisterType((*AggregationRule)(nil), "k8s.io.api.rbac.v1alpha1.AggregationRule")
- proto.RegisterType((*ClusterRole)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRole")
- proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRoleBinding")
- proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRoleBindingList")
- proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRoleList")
- proto.RegisterType((*PolicyRule)(nil), "k8s.io.api.rbac.v1alpha1.PolicyRule")
- proto.RegisterType((*Role)(nil), "k8s.io.api.rbac.v1alpha1.Role")
- proto.RegisterType((*RoleBinding)(nil), "k8s.io.api.rbac.v1alpha1.RoleBinding")
- proto.RegisterType((*RoleBindingList)(nil), "k8s.io.api.rbac.v1alpha1.RoleBindingList")
- proto.RegisterType((*RoleList)(nil), "k8s.io.api.rbac.v1alpha1.RoleList")
- proto.RegisterType((*RoleRef)(nil), "k8s.io.api.rbac.v1alpha1.RoleRef")
- proto.RegisterType((*Subject)(nil), "k8s.io.api.rbac.v1alpha1.Subject")
-}
-func (m *AggregationRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *AggregationRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ClusterRoleSelectors) > 0 {
- for _, msg := range m.ClusterRoleSelectors {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ClusterRole) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if m.AggregationRule != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AggregationRule.Size()))
- n2, err := m.AggregationRule.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- }
- return i, nil
-}
-
-func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- if len(m.Subjects) > 0 {
- for _, msg := range m.Subjects {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
- n4, err := m.RoleRef.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- return i, nil
-}
-
-func (m *ClusterRoleBindingList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRoleBindingList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n5, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ClusterRoleList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRoleList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n6, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *PolicyRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- dAtA[i] = 0x2a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- dAtA[i] = 0x32
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *Role) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Role) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleBinding) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n8, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- if len(m.Subjects) > 0 {
- for _, msg := range m.Subjects {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
- n9, err := m.RoleRef.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- return i, nil
-}
-
-func (m *RoleBindingList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleBindingList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n10, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n11, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleRef) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
- i += copy(dAtA[i:], m.APIGroup)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
- i += copy(dAtA[i:], m.Kind)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- return i, nil
-}
-
-func (m *Subject) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Subject) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
- i += copy(dAtA[i:], m.Kind)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
- i += copy(dAtA[i:], m.APIVersion)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i += copy(dAtA[i:], m.Namespace)
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *AggregationRule) Size() (n int) {
- var l int
- _ = l
- if len(m.ClusterRoleSelectors) > 0 {
- for _, e := range m.ClusterRoleSelectors {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ClusterRole) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.AggregationRule != nil {
- l = m.AggregationRule.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ClusterRoleBinding) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Subjects) > 0 {
- for _, e := range m.Subjects {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.RoleRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ClusterRoleBindingList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ClusterRoleList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *PolicyRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *Role) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleBinding) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Subjects) > 0 {
- for _, e := range m.Subjects {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.RoleRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *RoleBindingList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleRef) Size() (n int) {
- var l int
- _ = l
- l = len(m.APIGroup)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *Subject) Size() (n int) {
- var l int
- _ = l
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.APIVersion)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *AggregationRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&AggregationRule{`,
- `ClusterRoleSelectors:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ClusterRoleSelectors), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRole) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRole{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
- `AggregationRule:` + strings.Replace(fmt.Sprintf("%v", this.AggregationRule), "AggregationRule", "AggregationRule", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRoleBinding) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRoleBinding{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
- `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRoleBindingList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRoleBindingList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRoleList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRoleList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PolicyRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PolicyRule{`,
- `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
- `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
- `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
- `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
- `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Role) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Role{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleBinding) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleBinding{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
- `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleBindingList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleBindingList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleRef) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleRef{`,
- `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
- `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Subject) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Subject{`,
- `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *AggregationRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: AggregationRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: AggregationRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleSelectors", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ClusterRoleSelectors = append(m.ClusterRoleSelectors, k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{})
- if err := m.ClusterRoleSelectors[len(m.ClusterRoleSelectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRole) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, PolicyRule{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AggregationRule", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.AggregationRule == nil {
- m.AggregationRule = &AggregationRule{}
- }
- if err := m.AggregationRule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Subjects = append(m.Subjects, Subject{})
- if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ClusterRoleBinding{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ClusterRole{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PolicyRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Role) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Role: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, PolicyRule{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleBinding) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Subjects = append(m.Subjects, Subject{})
- if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleBindingList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, RoleBinding{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Role{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleRef) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleRef: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroup = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Kind = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Subject) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Subject: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Kind = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIVersion = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Namespace = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1alpha1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 844 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbf, 0x8f, 0xe3, 0x44,
- 0x14, 0xce, 0x64, 0x13, 0x36, 0x99, 0x65, 0x15, 0x6e, 0x38, 0x21, 0x6b, 0x85, 0x9c, 0xc5, 0x02,
- 0xe9, 0x10, 0x87, 0xcd, 0xee, 0x21, 0xa0, 0xa1, 0x58, 0x5f, 0x81, 0x16, 0x96, 0xbd, 0x65, 0x4e,
- 0x5c, 0x81, 0x28, 0x98, 0x38, 0x73, 0xce, 0x10, 0xdb, 0x63, 0xcd, 0x8c, 0x23, 0x9d, 0x68, 0x68,
- 0x68, 0x11, 0x0d, 0x05, 0x3d, 0x2d, 0x0d, 0x94, 0xfc, 0x03, 0x4b, 0x77, 0xe5, 0x56, 0x11, 0x6b,
- 0xfe, 0x10, 0x90, 0xc7, 0x76, 0xec, 0xfc, 0x22, 0xa9, 0x22, 0x21, 0x51, 0x25, 0xf3, 0xde, 0xf7,
- 0xbe, 0xf7, 0xde, 0x37, 0xf3, 0x9e, 0xe1, 0xd9, 0xf8, 0x03, 0x69, 0x33, 0xee, 0x8c, 0x93, 0x01,
- 0x15, 0x11, 0x55, 0x54, 0x3a, 0x13, 0x1a, 0x0d, 0xb9, 0x70, 0x0a, 0x07, 0x89, 0x99, 0x23, 0x06,
- 0xc4, 0x73, 0x26, 0x27, 0x24, 0x88, 0x47, 0xe4, 0xc4, 0xf1, 0x69, 0x44, 0x05, 0x51, 0x74, 0x68,
- 0xc7, 0x82, 0x2b, 0x8e, 0x8c, 0x1c, 0x69, 0x93, 0x98, 0xd9, 0x19, 0xd2, 0x2e, 0x91, 0x47, 0x6f,
- 0xfb, 0x4c, 0x8d, 0x92, 0x81, 0xed, 0xf1, 0xd0, 0xf1, 0xb9, 0xcf, 0x1d, 0x1d, 0x30, 0x48, 0x9e,
- 0xea, 0x93, 0x3e, 0xe8, 0x7f, 0x39, 0xd1, 0xd1, 0xbb, 0x55, 0xca, 0x90, 0x78, 0x23, 0x16, 0x51,
- 0xf1, 0xcc, 0x89, 0xc7, 0x7e, 0x66, 0x90, 0x4e, 0x48, 0x15, 0x71, 0x26, 0x4b, 0xe9, 0x8f, 0x9c,
- 0x75, 0x51, 0x22, 0x89, 0x14, 0x0b, 0xe9, 0x52, 0xc0, 0x7b, 0x9b, 0x02, 0xa4, 0x37, 0xa2, 0x21,
- 0x59, 0x8a, 0x7b, 0xb0, 0x2e, 0x2e, 0x51, 0x2c, 0x70, 0x58, 0xa4, 0xa4, 0x12, 0x8b, 0x41, 0xd6,
- 0x4f, 0x00, 0xf6, 0xce, 0x7c, 0x5f, 0x50, 0x9f, 0x28, 0xc6, 0x23, 0x9c, 0x04, 0x14, 0x7d, 0x07,
- 0xe0, 0x5d, 0x2f, 0x48, 0xa4, 0xa2, 0x02, 0xf3, 0x80, 0x3e, 0xa6, 0x01, 0xf5, 0x14, 0x17, 0xd2,
- 0x00, 0xc7, 0x7b, 0xf7, 0x0e, 0x4e, 0x1f, 0xd8, 0x95, 0xa0, 0xb3, 0x44, 0x76, 0x3c, 0xf6, 0x33,
- 0x83, 0xb4, 0x33, 0x1d, 0xec, 0xc9, 0x89, 0x7d, 0x41, 0x06, 0x34, 0x28, 0x63, 0xdd, 0x57, 0xaf,
- 0xa7, 0xfd, 0x46, 0x3a, 0xed, 0xdf, 0x7d, 0xb8, 0x82, 0x18, 0xaf, 0x4c, 0x67, 0xfd, 0xdc, 0x84,
- 0x07, 0x35, 0x38, 0xfa, 0x0a, 0x76, 0x32, 0xf2, 0x21, 0x51, 0xc4, 0x00, 0xc7, 0xe0, 0xde, 0xc1,
- 0xe9, 0x3b, 0xdb, 0x95, 0xf2, 0x68, 0xf0, 0x35, 0xf5, 0xd4, 0xa7, 0x54, 0x11, 0x17, 0x15, 0x75,
- 0xc0, 0xca, 0x86, 0x67, 0xac, 0xe8, 0x1c, 0xb6, 0x45, 0x12, 0x50, 0x69, 0x34, 0x75, 0xa7, 0xaf,
- 0xdb, 0xeb, 0x9e, 0x8e, 0x7d, 0xc5, 0x03, 0xe6, 0x3d, 0xcb, 0xe4, 0x72, 0x0f, 0x0b, 0xca, 0x76,
- 0x76, 0x92, 0x38, 0x67, 0x40, 0x23, 0xd8, 0x23, 0xf3, 0xba, 0x1a, 0x7b, 0xba, 0xe6, 0x37, 0xd7,
- 0x93, 0x2e, 0x5c, 0x84, 0xfb, 0x72, 0x3a, 0xed, 0x2f, 0xde, 0x0e, 0x5e, 0xa4, 0xb5, 0x7e, 0x6c,
- 0x42, 0x54, 0x93, 0xc9, 0x65, 0xd1, 0x90, 0x45, 0xfe, 0x0e, 0xd4, 0x7a, 0x04, 0x3b, 0x32, 0xd1,
- 0x8e, 0x52, 0xb0, 0xd7, 0xd6, 0xf7, 0xf6, 0x38, 0x47, 0xba, 0x2f, 0x15, 0x94, 0x9d, 0xc2, 0x20,
- 0xf1, 0x8c, 0x04, 0x5d, 0xc0, 0x7d, 0xc1, 0x03, 0x8a, 0xe9, 0xd3, 0x42, 0xab, 0x7f, 0xe1, 0xc3,
- 0x39, 0xd0, 0xed, 0x15, 0x7c, 0xfb, 0x85, 0x01, 0x97, 0x14, 0xd6, 0x1f, 0x00, 0xbe, 0xb2, 0xac,
- 0xcb, 0x05, 0x93, 0x0a, 0x7d, 0xb9, 0xa4, 0x8d, 0xbd, 0xe5, 0xa3, 0x66, 0x32, 0x57, 0x66, 0xd6,
- 0x46, 0x69, 0xa9, 0xe9, 0xf2, 0x19, 0x6c, 0x33, 0x45, 0xc3, 0x52, 0x94, 0xfb, 0xeb, 0x9b, 0x58,
- 0x2e, 0xaf, 0x7a, 0x4d, 0xe7, 0x19, 0x05, 0xce, 0x99, 0xac, 0xdf, 0x01, 0xec, 0xd5, 0xc0, 0x3b,
- 0x68, 0xe2, 0xe3, 0xf9, 0x26, 0xde, 0xd8, 0xae, 0x89, 0xd5, 0xd5, 0xff, 0x0d, 0x20, 0xac, 0x06,
- 0x06, 0xf5, 0x61, 0x7b, 0x42, 0xc5, 0x20, 0xdf, 0x27, 0x5d, 0xb7, 0x9b, 0xe1, 0x9f, 0x64, 0x06,
- 0x9c, 0xdb, 0xd1, 0x5b, 0xb0, 0x4b, 0x62, 0xf6, 0x91, 0xe0, 0x49, 0x2c, 0x8d, 0x3d, 0x0d, 0x3a,
- 0x4c, 0xa7, 0xfd, 0xee, 0xd9, 0xd5, 0x79, 0x6e, 0xc4, 0x95, 0x3f, 0x03, 0x0b, 0x2a, 0x79, 0x22,
- 0x3c, 0x2a, 0x8d, 0x56, 0x05, 0xc6, 0xa5, 0x11, 0x57, 0x7e, 0xf4, 0x3e, 0x3c, 0x2c, 0x0f, 0x97,
- 0x24, 0xa4, 0xd2, 0x68, 0xeb, 0x80, 0x3b, 0xe9, 0xb4, 0x7f, 0x88, 0xeb, 0x0e, 0x3c, 0x8f, 0x43,
- 0x1f, 0xc2, 0x5e, 0xc4, 0xa3, 0x12, 0xf2, 0x39, 0xbe, 0x90, 0xc6, 0x0b, 0x3a, 0x54, 0xcf, 0xe8,
- 0xe5, 0xbc, 0x0b, 0x2f, 0x62, 0xad, 0xdf, 0x00, 0x6c, 0xfd, 0xe7, 0x76, 0x98, 0xf5, 0x7d, 0x13,
- 0x1e, 0xfc, 0xbf, 0x52, 0x6a, 0x2b, 0x25, 0x1b, 0xc3, 0xdd, 0xee, 0x92, 0xed, 0xc7, 0x70, 0xf3,
- 0x12, 0xf9, 0x05, 0xc0, 0xce, 0x8e, 0xb6, 0xc7, 0xc3, 0xf9, 0xb2, 0xcd, 0x0d, 0x65, 0xaf, 0xae,
- 0xf7, 0x1b, 0x58, 0xde, 0x00, 0xba, 0x0f, 0x3b, 0xe5, 0xc4, 0xeb, 0x6a, 0xbb, 0x55, 0xf6, 0x72,
- 0x29, 0xe0, 0x19, 0x02, 0x1d, 0xc3, 0xd6, 0x98, 0x45, 0x43, 0xa3, 0xa9, 0x91, 0x2f, 0x16, 0xc8,
- 0xd6, 0x27, 0x2c, 0x1a, 0x62, 0xed, 0xc9, 0x10, 0x11, 0x09, 0xf3, 0x4f, 0x72, 0x0d, 0x91, 0xcd,
- 0x3a, 0xd6, 0x1e, 0xeb, 0x57, 0x00, 0xf7, 0x8b, 0xf7, 0x34, 0xe3, 0x03, 0x6b, 0xf9, 0x4e, 0x21,
- 0x24, 0x31, 0x7b, 0x42, 0x85, 0x64, 0x3c, 0x2a, 0xf2, 0xce, 0x5e, 0xfa, 0xd9, 0xd5, 0x79, 0xe1,
- 0xc1, 0x35, 0xd4, 0xe6, 0x1a, 0x90, 0x03, 0xbb, 0xd9, 0xaf, 0x8c, 0x89, 0x47, 0x8d, 0x96, 0x86,
- 0xdd, 0x29, 0x60, 0xdd, 0xcb, 0xd2, 0x81, 0x2b, 0x8c, 0x6b, 0x5f, 0xdf, 0x9a, 0x8d, 0xe7, 0xb7,
- 0x66, 0xe3, 0xe6, 0xd6, 0x6c, 0x7c, 0x9b, 0x9a, 0xe0, 0x3a, 0x35, 0xc1, 0xf3, 0xd4, 0x04, 0x37,
- 0xa9, 0x09, 0xfe, 0x4c, 0x4d, 0xf0, 0xc3, 0x5f, 0x66, 0xe3, 0x8b, 0x4e, 0x29, 0xfe, 0x3f, 0x01,
- 0x00, 0x00, 0xff, 0xff, 0xeb, 0xcc, 0xe2, 0x61, 0x5e, 0x0b, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/rbac/v1alpha1/generated.proto b/vendor/k8s.io/api/rbac/v1alpha1/generated.proto
deleted file mode 100644
index 41a193f55..000000000
--- a/vendor/k8s.io/api/rbac/v1alpha1/generated.proto
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.rbac.v1alpha1;
-
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1alpha1";
-
-// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
-message AggregationRule {
- // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules.
- // If any of the selectors match, then the ClusterRole's permissions will be added
- // +optional
- repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1;
-}
-
-// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
-message ClusterRole {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Rules holds all the PolicyRules for this ClusterRole
- repeated PolicyRule rules = 2;
-
- // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
- // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be
- // stomped by the controller.
- // +optional
- optional AggregationRule aggregationRule = 3;
-}
-
-// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
-// and adds who information via Subject.
-message ClusterRoleBinding {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Subjects holds references to the objects the role applies to.
- repeated Subject subjects = 2;
-
- // RoleRef can only reference a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- optional RoleRef roleRef = 3;
-}
-
-// ClusterRoleBindingList is a collection of ClusterRoleBindings
-message ClusterRoleBindingList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of ClusterRoleBindings
- repeated ClusterRoleBinding items = 2;
-}
-
-// ClusterRoleList is a collection of ClusterRoles
-message ClusterRoleList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of ClusterRoles
- repeated ClusterRole items = 2;
-}
-
-// PolicyRule holds information that describes a policy rule, but does not contain information
-// about who the rule applies to or which namespace the rule applies to.
-message PolicyRule {
- // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
- repeated string verbs = 1;
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed.
- // +optional
- repeated string apiGroups = 3;
-
- // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
- // +optional
- repeated string resources = 4;
-
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
- // +optional
- repeated string resourceNames = 5;
-
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
- // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
- // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
- // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
- // +optional
- repeated string nonResourceURLs = 6;
-}
-
-// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
-message Role {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Rules holds all the PolicyRules for this Role
- repeated PolicyRule rules = 2;
-}
-
-// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
-// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
-// namespace only have effect in that namespace.
-message RoleBinding {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Subjects holds references to the objects the role applies to.
- repeated Subject subjects = 2;
-
- // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- optional RoleRef roleRef = 3;
-}
-
-// RoleBindingList is a collection of RoleBindings
-message RoleBindingList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of RoleBindings
- repeated RoleBinding items = 2;
-}
-
-// RoleList is a collection of Roles
-message RoleList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of Roles
- repeated Role items = 2;
-}
-
-// RoleRef contains information that points to the role being used
-message RoleRef {
- // APIGroup is the group for the resource being referenced
- optional string apiGroup = 1;
-
- // Kind is the type of resource being referenced
- optional string kind = 2;
-
- // Name is the name of resource being referenced
- optional string name = 3;
-}
-
-// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
-// or a value for non-objects such as user and group names.
-message Subject {
- // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
- // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
- optional string kind = 1;
-
- // APIVersion holds the API group and version of the referenced subject.
- // Defaults to "v1" for ServiceAccount subjects.
- // Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects.
- // +k8s:conversion-gen=false
- // +optional
- optional string apiVersion = 2;
-
- // Name of the object being referenced.
- optional string name = 3;
-
- // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
- // the Authorizer should report an error.
- // +optional
- optional string namespace = 4;
-}
-
diff --git a/vendor/k8s.io/api/rbac/v1alpha1/register.go b/vendor/k8s.io/api/rbac/v1alpha1/register.go
deleted file mode 100644
index 0c6977685..000000000
--- a/vendor/k8s.io/api/rbac/v1alpha1/register.go
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-const GroupName = "rbac.authorization.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Role{},
- &RoleBinding{},
- &RoleBindingList{},
- &RoleList{},
-
- &ClusterRole{},
- &ClusterRoleBinding{},
- &ClusterRoleBindingList{},
- &ClusterRoleList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/rbac/v1alpha1/types.go b/vendor/k8s.io/api/rbac/v1alpha1/types.go
deleted file mode 100644
index 843d998ec..000000000
--- a/vendor/k8s.io/api/rbac/v1alpha1/types.go
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
-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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// Authorization is calculated against
-// 1. evaluation of ClusterRoleBindings - short circuit on match
-// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
-// 3. deny by default
-
-const (
- APIGroupAll = "*"
- ResourceAll = "*"
- VerbAll = "*"
- NonResourceAll = "*"
-
- GroupKind = "Group"
- ServiceAccountKind = "ServiceAccount"
- UserKind = "User"
-
- // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false"
- AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate"
-)
-
-// Authorization is calculated against
-// 1. evaluation of ClusterRoleBindings - short circuit on match
-// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
-// 3. deny by default
-
-// PolicyRule holds information that describes a policy rule, but does not contain information
-// about who the rule applies to or which namespace the rule applies to.
-type PolicyRule struct {
- // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
- Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed.
- // +optional
- APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"`
- // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
- // +optional
- Resources []string `json:"resources,omitempty" protobuf:"bytes,4,rep,name=resources"`
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
- // +optional
- ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"`
-
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
- // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
- // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
- // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
- // +optional
- NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"`
-}
-
-// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
-// or a value for non-objects such as user and group names.
-type Subject struct {
- // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
- // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
- Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
- // APIVersion holds the API group and version of the referenced subject.
- // Defaults to "v1" for ServiceAccount subjects.
- // Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects.
- // +k8s:conversion-gen=false
- // +optional
- APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt.name=apiVersion"`
- // Name of the object being referenced.
- Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
- // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
- // the Authorizer should report an error.
- // +optional
- Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
-}
-
-// RoleRef contains information that points to the role being used
-type RoleRef struct {
- // APIGroup is the group for the resource being referenced
- APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`
- // Kind is the type of resource being referenced
- Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
- // Name is the name of resource being referenced
- Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
-type Role struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Rules holds all the PolicyRules for this Role
- Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
-// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
-// namespace only have effect in that namespace.
-type RoleBinding struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Subjects holds references to the objects the role applies to.
- Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
-
- // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// RoleBindingList is a collection of RoleBindings
-type RoleBindingList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of RoleBindings
- Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// RoleList is a collection of Roles
-type RoleList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of Roles
- Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
-type ClusterRole struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Rules holds all the PolicyRules for this ClusterRole
- Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
-
- // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
- // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be
- // stomped by the controller.
- // +optional
- AggregationRule *AggregationRule `json:"aggregationRule,omitempty" protobuf:"bytes,3,opt,name=aggregationRule"`
-}
-
-// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
-type AggregationRule struct {
- // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules.
- // If any of the selectors match, then the ClusterRole's permissions will be added
- // +optional
- ClusterRoleSelectors []metav1.LabelSelector `json:"clusterRoleSelectors,omitempty" protobuf:"bytes,1,rep,name=clusterRoleSelectors"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
-// and adds who information via Subject.
-type ClusterRoleBinding struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Subjects holds references to the objects the role applies to.
- Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
-
- // RoleRef can only reference a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRoleBindingList is a collection of ClusterRoleBindings
-type ClusterRoleBindingList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of ClusterRoleBindings
- Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRoleList is a collection of ClusterRoles
-type ClusterRoleList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of ClusterRoles
- Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go
deleted file mode 100644
index e56cd0f10..000000000
--- a/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-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
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_AggregationRule = map[string]string{
- "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole",
- "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added",
-}
-
-func (AggregationRule) SwaggerDoc() map[string]string {
- return map_AggregationRule
-}
-
-var map_ClusterRole = map[string]string{
- "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.",
- "metadata": "Standard object's metadata.",
- "rules": "Rules holds all the PolicyRules for this ClusterRole",
- "aggregationRule": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.",
-}
-
-func (ClusterRole) SwaggerDoc() map[string]string {
- return map_ClusterRole
-}
-
-var map_ClusterRoleBinding = map[string]string{
- "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
- "metadata": "Standard object's metadata.",
- "subjects": "Subjects holds references to the objects the role applies to.",
- "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
-}
-
-func (ClusterRoleBinding) SwaggerDoc() map[string]string {
- return map_ClusterRoleBinding
-}
-
-var map_ClusterRoleBindingList = map[string]string{
- "": "ClusterRoleBindingList is a collection of ClusterRoleBindings",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of ClusterRoleBindings",
-}
-
-func (ClusterRoleBindingList) SwaggerDoc() map[string]string {
- return map_ClusterRoleBindingList
-}
-
-var map_ClusterRoleList = map[string]string{
- "": "ClusterRoleList is a collection of ClusterRoles",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of ClusterRoles",
-}
-
-func (ClusterRoleList) SwaggerDoc() map[string]string {
- return map_ClusterRoleList
-}
-
-var map_PolicyRule = map[string]string{
- "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.",
- "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.",
- "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.",
- "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.",
- "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
- "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.",
-}
-
-func (PolicyRule) SwaggerDoc() map[string]string {
- return map_PolicyRule
-}
-
-var map_Role = map[string]string{
- "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.",
- "metadata": "Standard object's metadata.",
- "rules": "Rules holds all the PolicyRules for this Role",
-}
-
-func (Role) SwaggerDoc() map[string]string {
- return map_Role
-}
-
-var map_RoleBinding = map[string]string{
- "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
- "metadata": "Standard object's metadata.",
- "subjects": "Subjects holds references to the objects the role applies to.",
- "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
-}
-
-func (RoleBinding) SwaggerDoc() map[string]string {
- return map_RoleBinding
-}
-
-var map_RoleBindingList = map[string]string{
- "": "RoleBindingList is a collection of RoleBindings",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of RoleBindings",
-}
-
-func (RoleBindingList) SwaggerDoc() map[string]string {
- return map_RoleBindingList
-}
-
-var map_RoleList = map[string]string{
- "": "RoleList is a collection of Roles",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of Roles",
-}
-
-func (RoleList) SwaggerDoc() map[string]string {
- return map_RoleList
-}
-
-var map_RoleRef = map[string]string{
- "": "RoleRef contains information that points to the role being used",
- "apiGroup": "APIGroup is the group for the resource being referenced",
- "kind": "Kind is the type of resource being referenced",
- "name": "Name is the name of resource being referenced",
-}
-
-func (RoleRef) SwaggerDoc() map[string]string {
- return map_RoleRef
-}
-
-var map_Subject = map[string]string{
- "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
- "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.",
- "apiVersion": "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.",
- "name": "Name of the object being referenced.",
- "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.",
-}
-
-func (Subject) SwaggerDoc() map[string]string {
- return map_Subject
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go
deleted file mode 100644
index 562451cd6..000000000
--- a/vendor/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,393 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *AggregationRule) DeepCopyInto(out *AggregationRule) {
- *out = *in
- if in.ClusterRoleSelectors != nil {
- in, out := &in.ClusterRoleSelectors, &out.ClusterRoleSelectors
- *out = make([]v1.LabelSelector, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregationRule.
-func (in *AggregationRule) DeepCopy() *AggregationRule {
- if in == nil {
- return nil
- }
- out := new(AggregationRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRole) DeepCopyInto(out *ClusterRole) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]PolicyRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.AggregationRule != nil {
- in, out := &in.AggregationRule, &out.AggregationRule
- if *in == nil {
- *out = nil
- } else {
- *out = new(AggregationRule)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRole.
-func (in *ClusterRole) DeepCopy() *ClusterRole {
- if in == nil {
- return nil
- }
- out := new(ClusterRole)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRole) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRoleBinding) DeepCopyInto(out *ClusterRoleBinding) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Subjects != nil {
- in, out := &in.Subjects, &out.Subjects
- *out = make([]Subject, len(*in))
- copy(*out, *in)
- }
- out.RoleRef = in.RoleRef
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleBinding.
-func (in *ClusterRoleBinding) DeepCopy() *ClusterRoleBinding {
- if in == nil {
- return nil
- }
- out := new(ClusterRoleBinding)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRoleBinding) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRoleBindingList) DeepCopyInto(out *ClusterRoleBindingList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ClusterRoleBinding, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleBindingList.
-func (in *ClusterRoleBindingList) DeepCopy() *ClusterRoleBindingList {
- if in == nil {
- return nil
- }
- out := new(ClusterRoleBindingList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRoleBindingList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRoleList) DeepCopyInto(out *ClusterRoleList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ClusterRole, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleList.
-func (in *ClusterRoleList) DeepCopy() *ClusterRoleList {
- if in == nil {
- return nil
- }
- out := new(ClusterRoleList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRoleList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PolicyRule) DeepCopyInto(out *PolicyRule) {
- *out = *in
- if in.Verbs != nil {
- in, out := &in.Verbs, &out.Verbs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.APIGroups != nil {
- in, out := &in.APIGroups, &out.APIGroups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Resources != nil {
- in, out := &in.Resources, &out.Resources
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.ResourceNames != nil {
- in, out := &in.ResourceNames, &out.ResourceNames
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.NonResourceURLs != nil {
- in, out := &in.NonResourceURLs, &out.NonResourceURLs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRule.
-func (in *PolicyRule) DeepCopy() *PolicyRule {
- if in == nil {
- return nil
- }
- out := new(PolicyRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Role) DeepCopyInto(out *Role) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]PolicyRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Role.
-func (in *Role) DeepCopy() *Role {
- if in == nil {
- return nil
- }
- out := new(Role)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Role) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleBinding) DeepCopyInto(out *RoleBinding) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Subjects != nil {
- in, out := &in.Subjects, &out.Subjects
- *out = make([]Subject, len(*in))
- copy(*out, *in)
- }
- out.RoleRef = in.RoleRef
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBinding.
-func (in *RoleBinding) DeepCopy() *RoleBinding {
- if in == nil {
- return nil
- }
- out := new(RoleBinding)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *RoleBinding) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleBindingList) DeepCopyInto(out *RoleBindingList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]RoleBinding, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBindingList.
-func (in *RoleBindingList) DeepCopy() *RoleBindingList {
- if in == nil {
- return nil
- }
- out := new(RoleBindingList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *RoleBindingList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleList) DeepCopyInto(out *RoleList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Role, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleList.
-func (in *RoleList) DeepCopy() *RoleList {
- if in == nil {
- return nil
- }
- out := new(RoleList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *RoleList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleRef) DeepCopyInto(out *RoleRef) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleRef.
-func (in *RoleRef) DeepCopy() *RoleRef {
- if in == nil {
- return nil
- }
- out := new(RoleRef)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Subject) DeepCopyInto(out *Subject) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subject.
-func (in *Subject) DeepCopy() *Subject {
- if in == nil {
- return nil
- }
- out := new(Subject)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/rbac/v1beta1/doc.go b/vendor/k8s.io/api/rbac/v1beta1/doc.go
deleted file mode 100644
index 4b77c9c6b..000000000
--- a/vendor/k8s.io/api/rbac/v1beta1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// +groupName=rbac.authorization.k8s.io
-package v1beta1 // import "k8s.io/api/rbac/v1beta1"
diff --git a/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go b/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go
deleted file mode 100644
index c2525e0df..000000000
--- a/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,2750 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1beta1/generated.proto
-
- It has these top-level messages:
- AggregationRule
- ClusterRole
- ClusterRoleBinding
- ClusterRoleBindingList
- ClusterRoleList
- PolicyRule
- Role
- RoleBinding
- RoleBindingList
- RoleList
- RoleRef
- Subject
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *AggregationRule) Reset() { *m = AggregationRule{} }
-func (*AggregationRule) ProtoMessage() {}
-func (*AggregationRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *ClusterRole) Reset() { *m = ClusterRole{} }
-func (*ClusterRole) ProtoMessage() {}
-func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
-func (*ClusterRoleBinding) ProtoMessage() {}
-func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
-func (*ClusterRoleBindingList) ProtoMessage() {}
-func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
-func (*ClusterRoleList) ProtoMessage() {}
-func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *PolicyRule) Reset() { *m = PolicyRule{} }
-func (*PolicyRule) ProtoMessage() {}
-func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *Role) Reset() { *m = Role{} }
-func (*Role) ProtoMessage() {}
-func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *RoleBinding) Reset() { *m = RoleBinding{} }
-func (*RoleBinding) ProtoMessage() {}
-func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
-func (*RoleBindingList) ProtoMessage() {}
-func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
-
-func (m *RoleList) Reset() { *m = RoleList{} }
-func (*RoleList) ProtoMessage() {}
-func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
-
-func (m *RoleRef) Reset() { *m = RoleRef{} }
-func (*RoleRef) ProtoMessage() {}
-func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
-
-func (m *Subject) Reset() { *m = Subject{} }
-func (*Subject) ProtoMessage() {}
-func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
-
-func init() {
- proto.RegisterType((*AggregationRule)(nil), "k8s.io.api.rbac.v1beta1.AggregationRule")
- proto.RegisterType((*ClusterRole)(nil), "k8s.io.api.rbac.v1beta1.ClusterRole")
- proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.api.rbac.v1beta1.ClusterRoleBinding")
- proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.api.rbac.v1beta1.ClusterRoleBindingList")
- proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.api.rbac.v1beta1.ClusterRoleList")
- proto.RegisterType((*PolicyRule)(nil), "k8s.io.api.rbac.v1beta1.PolicyRule")
- proto.RegisterType((*Role)(nil), "k8s.io.api.rbac.v1beta1.Role")
- proto.RegisterType((*RoleBinding)(nil), "k8s.io.api.rbac.v1beta1.RoleBinding")
- proto.RegisterType((*RoleBindingList)(nil), "k8s.io.api.rbac.v1beta1.RoleBindingList")
- proto.RegisterType((*RoleList)(nil), "k8s.io.api.rbac.v1beta1.RoleList")
- proto.RegisterType((*RoleRef)(nil), "k8s.io.api.rbac.v1beta1.RoleRef")
- proto.RegisterType((*Subject)(nil), "k8s.io.api.rbac.v1beta1.Subject")
-}
-func (m *AggregationRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *AggregationRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ClusterRoleSelectors) > 0 {
- for _, msg := range m.ClusterRoleSelectors {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ClusterRole) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if m.AggregationRule != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AggregationRule.Size()))
- n2, err := m.AggregationRule.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- }
- return i, nil
-}
-
-func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- if len(m.Subjects) > 0 {
- for _, msg := range m.Subjects {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
- n4, err := m.RoleRef.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- return i, nil
-}
-
-func (m *ClusterRoleBindingList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRoleBindingList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n5, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ClusterRoleList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ClusterRoleList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n6, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *PolicyRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- dAtA[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- dAtA[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- dAtA[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- dAtA[i] = 0x2a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *Role) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Role) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleBinding) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n8, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- if len(m.Subjects) > 0 {
- for _, msg := range m.Subjects {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
- n9, err := m.RoleRef.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- return i, nil
-}
-
-func (m *RoleBindingList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleBindingList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n10, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n11, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleRef) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
- i += copy(dAtA[i:], m.APIGroup)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
- i += copy(dAtA[i:], m.Kind)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- return i, nil
-}
-
-func (m *Subject) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Subject) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
- i += copy(dAtA[i:], m.Kind)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
- i += copy(dAtA[i:], m.APIGroup)
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i += copy(dAtA[i:], m.Namespace)
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *AggregationRule) Size() (n int) {
- var l int
- _ = l
- if len(m.ClusterRoleSelectors) > 0 {
- for _, e := range m.ClusterRoleSelectors {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ClusterRole) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.AggregationRule != nil {
- l = m.AggregationRule.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ClusterRoleBinding) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Subjects) > 0 {
- for _, e := range m.Subjects {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.RoleRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ClusterRoleBindingList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ClusterRoleList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *PolicyRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *Role) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleBinding) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Subjects) > 0 {
- for _, e := range m.Subjects {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.RoleRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *RoleBindingList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleRef) Size() (n int) {
- var l int
- _ = l
- l = len(m.APIGroup)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *Subject) Size() (n int) {
- var l int
- _ = l
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.APIGroup)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *AggregationRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&AggregationRule{`,
- `ClusterRoleSelectors:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ClusterRoleSelectors), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRole) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRole{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
- `AggregationRule:` + strings.Replace(fmt.Sprintf("%v", this.AggregationRule), "AggregationRule", "AggregationRule", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRoleBinding) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRoleBinding{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
- `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRoleBindingList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRoleBindingList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterRoleList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterRoleList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PolicyRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PolicyRule{`,
- `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
- `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
- `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
- `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
- `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Role) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Role{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleBinding) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleBinding{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
- `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleBindingList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleBindingList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *RoleRef) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RoleRef{`,
- `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
- `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Subject) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Subject{`,
- `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *AggregationRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: AggregationRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: AggregationRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleSelectors", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ClusterRoleSelectors = append(m.ClusterRoleSelectors, k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{})
- if err := m.ClusterRoleSelectors[len(m.ClusterRoleSelectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRole) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, PolicyRule{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AggregationRule", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.AggregationRule == nil {
- m.AggregationRule = &AggregationRule{}
- }
- if err := m.AggregationRule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Subjects = append(m.Subjects, Subject{})
- if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ClusterRoleBinding{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ClusterRole{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PolicyRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Role) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Role: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, PolicyRule{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleBinding) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Subjects = append(m.Subjects, Subject{})
- if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleBindingList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, RoleBinding{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Role{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleRef) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleRef: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroup = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Kind = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Subject) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Subject: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Kind = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroup = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Namespace = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 833 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbf, 0x8f, 0xe3, 0x44,
- 0x14, 0xce, 0x64, 0x13, 0x6d, 0x3c, 0xcb, 0x2a, 0xdc, 0x70, 0x02, 0x6b, 0x05, 0xce, 0x2a, 0x50,
- 0x44, 0x3a, 0xce, 0x66, 0xef, 0x10, 0xd0, 0x20, 0x71, 0xa6, 0x80, 0xd5, 0x2d, 0x61, 0x35, 0x27,
- 0x28, 0x10, 0x05, 0x63, 0x67, 0xce, 0x19, 0xe2, 0x5f, 0x9a, 0x19, 0x47, 0x3a, 0xd1, 0xd0, 0xd0,
- 0x51, 0x20, 0x51, 0xd1, 0x52, 0x53, 0x51, 0xf2, 0x17, 0xa4, 0xbc, 0xf2, 0xaa, 0x88, 0x35, 0x7f,
- 0x08, 0x68, 0xfc, 0x23, 0x4e, 0xe2, 0xf8, 0x2e, 0x55, 0x24, 0xa4, 0xab, 0x76, 0xe7, 0xbd, 0xef,
- 0x7d, 0xef, 0x7b, 0x9f, 0x67, 0x5e, 0xe0, 0x27, 0xb3, 0x8f, 0x84, 0xc9, 0x22, 0x6b, 0x96, 0x38,
- 0x94, 0x87, 0x54, 0x52, 0x61, 0xcd, 0x69, 0x38, 0x89, 0xb8, 0x55, 0x24, 0x48, 0xcc, 0x2c, 0xee,
- 0x10, 0xd7, 0x9a, 0x5f, 0x38, 0x54, 0x92, 0x0b, 0xcb, 0xa3, 0x21, 0xe5, 0x44, 0xd2, 0x89, 0x19,
- 0xf3, 0x48, 0x46, 0xe8, 0x8d, 0x1c, 0x68, 0x92, 0x98, 0x99, 0x0a, 0x68, 0x16, 0xc0, 0xb3, 0xbb,
- 0x1e, 0x93, 0xd3, 0xc4, 0x31, 0xdd, 0x28, 0xb0, 0xbc, 0xc8, 0x8b, 0xac, 0x0c, 0xef, 0x24, 0x8f,
- 0xb3, 0x53, 0x76, 0xc8, 0xfe, 0xcb, 0x79, 0xce, 0x46, 0xf5, 0x86, 0xc4, 0x8f, 0xa7, 0xf5, 0x8e,
- 0x67, 0xef, 0x57, 0xc8, 0x80, 0xb8, 0x53, 0x16, 0x52, 0xfe, 0xc4, 0x8a, 0x67, 0x9e, 0x0a, 0x08,
- 0x2b, 0xa0, 0x92, 0x58, 0xf3, 0x7a, 0x95, 0xd5, 0x54, 0xc5, 0x93, 0x50, 0xb2, 0x80, 0xd6, 0x0a,
- 0x3e, 0x78, 0x51, 0x81, 0x70, 0xa7, 0x34, 0x20, 0xb5, 0xba, 0xfb, 0x4d, 0x75, 0x89, 0x64, 0xbe,
- 0xc5, 0x42, 0x29, 0x24, 0xdf, 0x2e, 0x1a, 0xfe, 0x06, 0x60, 0xff, 0x81, 0xe7, 0x71, 0xea, 0x11,
- 0xc9, 0xa2, 0x10, 0x27, 0x3e, 0x45, 0x3f, 0x01, 0x78, 0xdb, 0xf5, 0x13, 0x21, 0x29, 0xc7, 0x91,
- 0x4f, 0x1f, 0x51, 0x9f, 0xba, 0x32, 0xe2, 0x42, 0x07, 0xe7, 0x47, 0xa3, 0x93, 0x7b, 0xf7, 0xcd,
- 0xca, 0xf9, 0x55, 0x23, 0x33, 0x9e, 0x79, 0x2a, 0x20, 0x4c, 0xe5, 0x83, 0x39, 0xbf, 0x30, 0xaf,
- 0x88, 0x43, 0xfd, 0xb2, 0xd6, 0x7e, 0x73, 0xb1, 0x1c, 0xb4, 0xd2, 0xe5, 0xe0, 0xf6, 0xa7, 0x3b,
- 0x88, 0xf1, 0xce, 0x76, 0xc3, 0xdf, 0xdb, 0xf0, 0x64, 0x0d, 0x8e, 0xbe, 0x83, 0x3d, 0x45, 0x3e,
- 0x21, 0x92, 0xe8, 0xe0, 0x1c, 0x8c, 0x4e, 0xee, 0xbd, 0xb7, 0x9f, 0x94, 0x2f, 0x9d, 0xef, 0xa9,
- 0x2b, 0xbf, 0xa0, 0x92, 0xd8, 0xa8, 0xd0, 0x01, 0xab, 0x18, 0x5e, 0xb1, 0xa2, 0xcf, 0x61, 0x97,
- 0x27, 0x3e, 0x15, 0x7a, 0x3b, 0x9b, 0xf4, 0x6d, 0xb3, 0xe1, 0x8e, 0x99, 0xd7, 0x91, 0xcf, 0xdc,
- 0x27, 0xca, 0x2d, 0xfb, 0xb4, 0x60, 0xec, 0xaa, 0x93, 0xc0, 0x39, 0x01, 0xf2, 0x60, 0x9f, 0x6c,
- 0xda, 0xaa, 0x1f, 0x65, 0x92, 0x47, 0x8d, 0x9c, 0x5b, 0x9f, 0xc1, 0x7e, 0x2d, 0x5d, 0x0e, 0xb6,
- 0xbf, 0x0d, 0xde, 0x66, 0x1d, 0xfe, 0xda, 0x86, 0x68, 0xcd, 0x24, 0x9b, 0x85, 0x13, 0x16, 0x7a,
- 0x07, 0xf0, 0x6a, 0x0c, 0x7b, 0x22, 0xc9, 0x12, 0xa5, 0x5d, 0xe7, 0x8d, 0xa3, 0x3d, 0xca, 0x81,
- 0xf6, 0xab, 0x05, 0x63, 0xaf, 0x08, 0x08, 0xbc, 0xe2, 0x40, 0x0f, 0xe1, 0x31, 0x8f, 0x7c, 0x8a,
- 0xe9, 0xe3, 0xc2, 0xa9, 0x66, 0x3a, 0x9c, 0xe3, 0xec, 0x7e, 0x41, 0x77, 0x5c, 0x04, 0x70, 0xc9,
- 0x30, 0x5c, 0x00, 0xf8, 0x7a, 0xdd, 0x95, 0x2b, 0x26, 0x24, 0xfa, 0xb6, 0xe6, 0x8c, 0xb9, 0xe7,
- 0x85, 0x66, 0x22, 0xf7, 0x65, 0x35, 0x45, 0x19, 0x59, 0x73, 0xe5, 0x1a, 0x76, 0x99, 0xa4, 0x41,
- 0x69, 0xc9, 0x9d, 0xc6, 0x19, 0xea, 0xea, 0xaa, 0x9b, 0x74, 0xa9, 0x18, 0x70, 0x4e, 0x34, 0xfc,
- 0x0b, 0xc0, 0xfe, 0x1a, 0xf8, 0x00, 0x33, 0x5c, 0x6e, 0xce, 0xf0, 0xce, 0x5e, 0x33, 0xec, 0x16,
- 0xff, 0x2f, 0x80, 0xb0, 0x7a, 0x2b, 0x68, 0x00, 0xbb, 0x73, 0xca, 0x9d, 0x7c, 0x93, 0x68, 0xb6,
- 0xa6, 0xf0, 0x5f, 0xab, 0x00, 0xce, 0xe3, 0xe8, 0x0e, 0xd4, 0x48, 0xcc, 0x3e, 0xe3, 0x51, 0x12,
- 0xe7, 0xed, 0x35, 0xfb, 0x34, 0x5d, 0x0e, 0xb4, 0x07, 0xd7, 0x97, 0x79, 0x10, 0x57, 0x79, 0x05,
- 0xe6, 0x54, 0x44, 0x09, 0x77, 0xa9, 0xd0, 0x8f, 0x2a, 0x30, 0x2e, 0x83, 0xb8, 0xca, 0xa3, 0x0f,
- 0xe1, 0x69, 0x79, 0x18, 0x93, 0x80, 0x0a, 0xbd, 0x93, 0x15, 0xdc, 0x4a, 0x97, 0x83, 0x53, 0xbc,
- 0x9e, 0xc0, 0x9b, 0x38, 0xf4, 0x31, 0xec, 0x87, 0x51, 0x58, 0x42, 0xbe, 0xc2, 0x57, 0x42, 0xef,
- 0x66, 0xa5, 0xd9, 0xfb, 0x1c, 0x6f, 0xa6, 0xf0, 0x36, 0x76, 0xf8, 0x27, 0x80, 0x9d, 0xff, 0xdb,
- 0xf6, 0x1a, 0xfe, 0xdc, 0x86, 0x27, 0x2f, 0xb7, 0xc9, 0x6a, 0x9b, 0xa8, 0x27, 0x78, 0xd8, 0x35,
- 0xb2, 0xf7, 0x13, 0x7c, 0xf1, 0xfe, 0xf8, 0x03, 0xc0, 0xde, 0x81, 0x16, 0x87, 0xbd, 0xa9, 0xfa,
- 0xad, 0xe7, 0xab, 0xde, 0x2d, 0xf7, 0x07, 0x58, 0xfa, 0x8f, 0xde, 0x85, 0xbd, 0xf2, 0xb1, 0x67,
- 0x62, 0xb5, 0xaa, 0x79, 0xb9, 0x0f, 0xf0, 0x0a, 0x81, 0xce, 0x61, 0x67, 0xc6, 0xc2, 0x89, 0xde,
- 0xce, 0x90, 0xaf, 0x14, 0xc8, 0xce, 0x43, 0x16, 0x4e, 0x70, 0x96, 0x51, 0x88, 0x90, 0x04, 0xf9,
- 0x0f, 0xf1, 0x1a, 0x42, 0x3d, 0x73, 0x9c, 0x65, 0x94, 0x57, 0xc7, 0xc5, 0x65, 0x5a, 0xf1, 0x81,
- 0x46, 0xbe, 0x75, 0x7d, 0xed, 0x7d, 0xf4, 0x3d, 0xbf, 0x3b, 0xb2, 0xa0, 0xa6, 0xfe, 0x8a, 0x98,
- 0xb8, 0x54, 0xef, 0x64, 0xb0, 0x5b, 0x05, 0x4c, 0x1b, 0x97, 0x09, 0x5c, 0x61, 0xec, 0xbb, 0x8b,
- 0x1b, 0xa3, 0xf5, 0xf4, 0xc6, 0x68, 0x3d, 0xbb, 0x31, 0x5a, 0x3f, 0xa6, 0x06, 0x58, 0xa4, 0x06,
- 0x78, 0x9a, 0x1a, 0xe0, 0x59, 0x6a, 0x80, 0xbf, 0x53, 0x03, 0xfc, 0xf2, 0x8f, 0xd1, 0xfa, 0xe6,
- 0xb8, 0x70, 0xfd, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x99, 0xaf, 0xff, 0x74, 0x0b, 0x00,
- 0x00,
-}
diff --git a/vendor/k8s.io/api/rbac/v1beta1/generated.proto b/vendor/k8s.io/api/rbac/v1beta1/generated.proto
deleted file mode 100644
index aa9960b8e..000000000
--- a/vendor/k8s.io/api/rbac/v1beta1/generated.proto
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.rbac.v1beta1;
-
-import "k8s.io/api/rbac/v1alpha1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
-message AggregationRule {
- // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules.
- // If any of the selectors match, then the ClusterRole's permissions will be added
- // +optional
- repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1;
-}
-
-// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
-message ClusterRole {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Rules holds all the PolicyRules for this ClusterRole
- repeated PolicyRule rules = 2;
-
- // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
- // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be
- // stomped by the controller.
- // +optional
- optional AggregationRule aggregationRule = 3;
-}
-
-// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
-// and adds who information via Subject.
-message ClusterRoleBinding {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Subjects holds references to the objects the role applies to.
- repeated Subject subjects = 2;
-
- // RoleRef can only reference a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- optional RoleRef roleRef = 3;
-}
-
-// ClusterRoleBindingList is a collection of ClusterRoleBindings
-message ClusterRoleBindingList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of ClusterRoleBindings
- repeated ClusterRoleBinding items = 2;
-}
-
-// ClusterRoleList is a collection of ClusterRoles
-message ClusterRoleList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of ClusterRoles
- repeated ClusterRole items = 2;
-}
-
-// PolicyRule holds information that describes a policy rule, but does not contain information
-// about who the rule applies to or which namespace the rule applies to.
-message PolicyRule {
- // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
- repeated string verbs = 1;
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed.
- // +optional
- repeated string apiGroups = 2;
-
- // Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups.
- // '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.
- // +optional
- repeated string resources = 3;
-
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
- // +optional
- repeated string resourceNames = 4;
-
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
- // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
- // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
- // +optional
- repeated string nonResourceURLs = 5;
-}
-
-// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
-message Role {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Rules holds all the PolicyRules for this Role
- repeated PolicyRule rules = 2;
-}
-
-// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
-// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
-// namespace only have effect in that namespace.
-message RoleBinding {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Subjects holds references to the objects the role applies to.
- repeated Subject subjects = 2;
-
- // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- optional RoleRef roleRef = 3;
-}
-
-// RoleBindingList is a collection of RoleBindings
-message RoleBindingList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of RoleBindings
- repeated RoleBinding items = 2;
-}
-
-// RoleList is a collection of Roles
-message RoleList {
- // Standard object's metadata.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of Roles
- repeated Role items = 2;
-}
-
-// RoleRef contains information that points to the role being used
-message RoleRef {
- // APIGroup is the group for the resource being referenced
- optional string apiGroup = 1;
-
- // Kind is the type of resource being referenced
- optional string kind = 2;
-
- // Name is the name of resource being referenced
- optional string name = 3;
-}
-
-// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
-// or a value for non-objects such as user and group names.
-message Subject {
- // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
- // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
- optional string kind = 1;
-
- // APIGroup holds the API group of the referenced subject.
- // Defaults to "" for ServiceAccount subjects.
- // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
- // +optional
- optional string apiGroup = 2;
-
- // Name of the object being referenced.
- optional string name = 3;
-
- // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
- // the Authorizer should report an error.
- // +optional
- optional string namespace = 4;
-}
-
diff --git a/vendor/k8s.io/api/rbac/v1beta1/register.go b/vendor/k8s.io/api/rbac/v1beta1/register.go
deleted file mode 100644
index c8526a656..000000000
--- a/vendor/k8s.io/api/rbac/v1beta1/register.go
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-const GroupName = "rbac.authorization.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Role{},
- &RoleBinding{},
- &RoleBindingList{},
- &RoleList{},
-
- &ClusterRole{},
- &ClusterRoleBinding{},
- &ClusterRoleBindingList{},
- &ClusterRoleList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/rbac/v1beta1/types.go b/vendor/k8s.io/api/rbac/v1beta1/types.go
deleted file mode 100644
index 091fc1dc9..000000000
--- a/vendor/k8s.io/api/rbac/v1beta1/types.go
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// Authorization is calculated against
-// 1. evaluation of ClusterRoleBindings - short circuit on match
-// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
-// 3. deny by default
-
-const (
- APIGroupAll = "*"
- ResourceAll = "*"
- VerbAll = "*"
- NonResourceAll = "*"
-
- GroupKind = "Group"
- ServiceAccountKind = "ServiceAccount"
- UserKind = "User"
-
- // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false"
- AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate"
-)
-
-// Authorization is calculated against
-// 1. evaluation of ClusterRoleBindings - short circuit on match
-// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
-// 3. deny by default
-
-// PolicyRule holds information that describes a policy rule, but does not contain information
-// about who the rule applies to or which namespace the rule applies to.
-type PolicyRule struct {
- // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
- Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed.
- // +optional
- APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"`
- // Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups.
- // '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.
- // +optional
- Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
- // +optional
- ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,4,rep,name=resourceNames"`
-
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
- // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
- // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
- // +optional
- NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"`
-}
-
-// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
-// or a value for non-objects such as user and group names.
-type Subject struct {
- // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
- // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
- Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
- // APIGroup holds the API group of the referenced subject.
- // Defaults to "" for ServiceAccount subjects.
- // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
- // +optional
- APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,2,opt.name=apiGroup"`
- // Name of the object being referenced.
- Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
- // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
- // the Authorizer should report an error.
- // +optional
- Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
-}
-
-// RoleRef contains information that points to the role being used
-type RoleRef struct {
- // APIGroup is the group for the resource being referenced
- APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`
- // Kind is the type of resource being referenced
- Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
- // Name is the name of resource being referenced
- Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
-type Role struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Rules holds all the PolicyRules for this Role
- Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
-// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
-// namespace only have effect in that namespace.
-type RoleBinding struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Subjects holds references to the objects the role applies to.
- Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
-
- // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// RoleBindingList is a collection of RoleBindings
-type RoleBindingList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of RoleBindings
- Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// RoleList is a collection of Roles
-type RoleList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of Roles
- Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
-type ClusterRole struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Rules holds all the PolicyRules for this ClusterRole
- Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
- // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
- // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be
- // stomped by the controller.
- // +optional
- AggregationRule *AggregationRule `json:"aggregationRule,omitempty" protobuf:"bytes,3,opt,name=aggregationRule"`
-}
-
-// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
-type AggregationRule struct {
- // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules.
- // If any of the selectors match, then the ClusterRole's permissions will be added
- // +optional
- ClusterRoleSelectors []metav1.LabelSelector `json:"clusterRoleSelectors,omitempty" protobuf:"bytes,1,rep,name=clusterRoleSelectors"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
-// and adds who information via Subject.
-type ClusterRoleBinding struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Subjects holds references to the objects the role applies to.
- Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
-
- // RoleRef can only reference a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRoleBindingList is a collection of ClusterRoleBindings
-type ClusterRoleBindingList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of ClusterRoleBindings
- Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ClusterRoleList is a collection of ClusterRoles
-type ClusterRoleList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of ClusterRoles
- Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 6180d6d43..000000000
--- a/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_AggregationRule = map[string]string{
- "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole",
- "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added",
-}
-
-func (AggregationRule) SwaggerDoc() map[string]string {
- return map_AggregationRule
-}
-
-var map_ClusterRole = map[string]string{
- "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.",
- "metadata": "Standard object's metadata.",
- "rules": "Rules holds all the PolicyRules for this ClusterRole",
- "aggregationRule": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.",
-}
-
-func (ClusterRole) SwaggerDoc() map[string]string {
- return map_ClusterRole
-}
-
-var map_ClusterRoleBinding = map[string]string{
- "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
- "metadata": "Standard object's metadata.",
- "subjects": "Subjects holds references to the objects the role applies to.",
- "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
-}
-
-func (ClusterRoleBinding) SwaggerDoc() map[string]string {
- return map_ClusterRoleBinding
-}
-
-var map_ClusterRoleBindingList = map[string]string{
- "": "ClusterRoleBindingList is a collection of ClusterRoleBindings",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of ClusterRoleBindings",
-}
-
-func (ClusterRoleBindingList) SwaggerDoc() map[string]string {
- return map_ClusterRoleBindingList
-}
-
-var map_ClusterRoleList = map[string]string{
- "": "ClusterRoleList is a collection of ClusterRoles",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of ClusterRoles",
-}
-
-func (ClusterRoleList) SwaggerDoc() map[string]string {
- return map_ClusterRoleList
-}
-
-var map_PolicyRule = map[string]string{
- "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.",
- "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.",
- "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.",
- "resources": "Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.",
- "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
- "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.",
-}
-
-func (PolicyRule) SwaggerDoc() map[string]string {
- return map_PolicyRule
-}
-
-var map_Role = map[string]string{
- "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.",
- "metadata": "Standard object's metadata.",
- "rules": "Rules holds all the PolicyRules for this Role",
-}
-
-func (Role) SwaggerDoc() map[string]string {
- return map_Role
-}
-
-var map_RoleBinding = map[string]string{
- "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
- "metadata": "Standard object's metadata.",
- "subjects": "Subjects holds references to the objects the role applies to.",
- "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
-}
-
-func (RoleBinding) SwaggerDoc() map[string]string {
- return map_RoleBinding
-}
-
-var map_RoleBindingList = map[string]string{
- "": "RoleBindingList is a collection of RoleBindings",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of RoleBindings",
-}
-
-func (RoleBindingList) SwaggerDoc() map[string]string {
- return map_RoleBindingList
-}
-
-var map_RoleList = map[string]string{
- "": "RoleList is a collection of Roles",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of Roles",
-}
-
-func (RoleList) SwaggerDoc() map[string]string {
- return map_RoleList
-}
-
-var map_RoleRef = map[string]string{
- "": "RoleRef contains information that points to the role being used",
- "apiGroup": "APIGroup is the group for the resource being referenced",
- "kind": "Kind is the type of resource being referenced",
- "name": "Name is the name of resource being referenced",
-}
-
-func (RoleRef) SwaggerDoc() map[string]string {
- return map_RoleRef
-}
-
-var map_Subject = map[string]string{
- "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
- "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.",
- "apiGroup": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.",
- "name": "Name of the object being referenced.",
- "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.",
-}
-
-func (Subject) SwaggerDoc() map[string]string {
- return map_Subject
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index 0ef823a07..000000000
--- a/vendor/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,393 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *AggregationRule) DeepCopyInto(out *AggregationRule) {
- *out = *in
- if in.ClusterRoleSelectors != nil {
- in, out := &in.ClusterRoleSelectors, &out.ClusterRoleSelectors
- *out = make([]v1.LabelSelector, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregationRule.
-func (in *AggregationRule) DeepCopy() *AggregationRule {
- if in == nil {
- return nil
- }
- out := new(AggregationRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRole) DeepCopyInto(out *ClusterRole) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]PolicyRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.AggregationRule != nil {
- in, out := &in.AggregationRule, &out.AggregationRule
- if *in == nil {
- *out = nil
- } else {
- *out = new(AggregationRule)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRole.
-func (in *ClusterRole) DeepCopy() *ClusterRole {
- if in == nil {
- return nil
- }
- out := new(ClusterRole)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRole) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRoleBinding) DeepCopyInto(out *ClusterRoleBinding) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Subjects != nil {
- in, out := &in.Subjects, &out.Subjects
- *out = make([]Subject, len(*in))
- copy(*out, *in)
- }
- out.RoleRef = in.RoleRef
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleBinding.
-func (in *ClusterRoleBinding) DeepCopy() *ClusterRoleBinding {
- if in == nil {
- return nil
- }
- out := new(ClusterRoleBinding)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRoleBinding) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRoleBindingList) DeepCopyInto(out *ClusterRoleBindingList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ClusterRoleBinding, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleBindingList.
-func (in *ClusterRoleBindingList) DeepCopy() *ClusterRoleBindingList {
- if in == nil {
- return nil
- }
- out := new(ClusterRoleBindingList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRoleBindingList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ClusterRoleList) DeepCopyInto(out *ClusterRoleList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ClusterRole, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleList.
-func (in *ClusterRoleList) DeepCopy() *ClusterRoleList {
- if in == nil {
- return nil
- }
- out := new(ClusterRoleList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ClusterRoleList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PolicyRule) DeepCopyInto(out *PolicyRule) {
- *out = *in
- if in.Verbs != nil {
- in, out := &in.Verbs, &out.Verbs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.APIGroups != nil {
- in, out := &in.APIGroups, &out.APIGroups
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Resources != nil {
- in, out := &in.Resources, &out.Resources
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.ResourceNames != nil {
- in, out := &in.ResourceNames, &out.ResourceNames
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.NonResourceURLs != nil {
- in, out := &in.NonResourceURLs, &out.NonResourceURLs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRule.
-func (in *PolicyRule) DeepCopy() *PolicyRule {
- if in == nil {
- return nil
- }
- out := new(PolicyRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Role) DeepCopyInto(out *Role) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]PolicyRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Role.
-func (in *Role) DeepCopy() *Role {
- if in == nil {
- return nil
- }
- out := new(Role)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Role) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleBinding) DeepCopyInto(out *RoleBinding) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Subjects != nil {
- in, out := &in.Subjects, &out.Subjects
- *out = make([]Subject, len(*in))
- copy(*out, *in)
- }
- out.RoleRef = in.RoleRef
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBinding.
-func (in *RoleBinding) DeepCopy() *RoleBinding {
- if in == nil {
- return nil
- }
- out := new(RoleBinding)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *RoleBinding) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleBindingList) DeepCopyInto(out *RoleBindingList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]RoleBinding, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBindingList.
-func (in *RoleBindingList) DeepCopy() *RoleBindingList {
- if in == nil {
- return nil
- }
- out := new(RoleBindingList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *RoleBindingList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleList) DeepCopyInto(out *RoleList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Role, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleList.
-func (in *RoleList) DeepCopy() *RoleList {
- if in == nil {
- return nil
- }
- out := new(RoleList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *RoleList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *RoleRef) DeepCopyInto(out *RoleRef) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleRef.
-func (in *RoleRef) DeepCopy() *RoleRef {
- if in == nil {
- return nil
- }
- out := new(RoleRef)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Subject) DeepCopyInto(out *Subject) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subject.
-func (in *Subject) DeepCopy() *Subject {
- if in == nil {
- return nil
- }
- out := new(Subject)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/doc.go b/vendor/k8s.io/api/scheduling/v1alpha1/doc.go
deleted file mode 100644
index e10d07ff7..000000000
--- a/vendor/k8s.io/api/scheduling/v1alpha1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// +groupName=scheduling.k8s.io
-package v1alpha1 // import "k8s.io/api/scheduling/v1alpha1"
diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go b/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go
deleted file mode 100644
index 39c0b9e6a..000000000
--- a/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go
+++ /dev/null
@@ -1,641 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1alpha1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto
-
- It has these top-level messages:
- PriorityClass
- PriorityClassList
-*/
-package v1alpha1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *PriorityClass) Reset() { *m = PriorityClass{} }
-func (*PriorityClass) ProtoMessage() {}
-func (*PriorityClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *PriorityClassList) Reset() { *m = PriorityClassList{} }
-func (*PriorityClassList) ProtoMessage() {}
-func (*PriorityClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func init() {
- proto.RegisterType((*PriorityClass)(nil), "k8s.io.api.scheduling.v1alpha1.PriorityClass")
- proto.RegisterType((*PriorityClassList)(nil), "k8s.io.api.scheduling.v1alpha1.PriorityClassList")
-}
-func (m *PriorityClass) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PriorityClass) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x10
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Value))
- dAtA[i] = 0x18
- i++
- if m.GlobalDefault {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description)))
- i += copy(dAtA[i:], m.Description)
- return i, nil
-}
-
-func (m *PriorityClassList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PriorityClassList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n2, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *PriorityClass) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.Value))
- n += 2
- l = len(m.Description)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *PriorityClassList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *PriorityClass) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PriorityClass{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
- `GlobalDefault:` + fmt.Sprintf("%v", this.GlobalDefault) + `,`,
- `Description:` + fmt.Sprintf("%v", this.Description) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PriorityClassList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PriorityClassList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PriorityClass", "PriorityClass", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *PriorityClass) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PriorityClass: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PriorityClass: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
- }
- m.Value = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Value |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field GlobalDefault", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.GlobalDefault = bool(v != 0)
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Description = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PriorityClassList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PriorityClassList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PriorityClassList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, PriorityClass{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 460 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x8b, 0xd3, 0x40,
- 0x18, 0xc6, 0x33, 0x5d, 0x0b, 0x75, 0x4a, 0x41, 0x23, 0x42, 0xe8, 0x61, 0x36, 0xac, 0x97, 0x5c,
- 0x76, 0xc6, 0xae, 0x7f, 0x10, 0xbc, 0xc5, 0x85, 0x45, 0x50, 0x94, 0x1c, 0x3c, 0x88, 0x07, 0x27,
- 0xc9, 0x6c, 0x3a, 0x36, 0xc9, 0x84, 0x99, 0x37, 0x81, 0xbd, 0x79, 0xf6, 0xe4, 0x97, 0x12, 0x7a,
- 0xdc, 0xe3, 0x9e, 0x16, 0x1b, 0xbf, 0x88, 0x24, 0x4d, 0x37, 0xad, 0x65, 0xd5, 0x5b, 0xe6, 0x79,
- 0x9f, 0xdf, 0x33, 0xf3, 0x3e, 0x04, 0x9f, 0x2d, 0x5e, 0x18, 0x2a, 0x15, 0x5b, 0x94, 0xa1, 0xd0,
- 0xb9, 0x00, 0x61, 0x58, 0x25, 0xf2, 0x58, 0x69, 0xd6, 0x0d, 0x78, 0x21, 0x99, 0x89, 0xe6, 0x22,
- 0x2e, 0x53, 0x99, 0x27, 0xac, 0x9a, 0xf1, 0xb4, 0x98, 0xf3, 0x19, 0x4b, 0x44, 0x2e, 0x34, 0x07,
- 0x11, 0xd3, 0x42, 0x2b, 0x50, 0x36, 0x59, 0xfb, 0x29, 0x2f, 0x24, 0xed, 0xfd, 0x74, 0xe3, 0x9f,
- 0x1e, 0x27, 0x12, 0xe6, 0x65, 0x48, 0x23, 0x95, 0xb1, 0x44, 0x25, 0x8a, 0xb5, 0x58, 0x58, 0x9e,
- 0xb7, 0xa7, 0xf6, 0xd0, 0x7e, 0xad, 0xe3, 0xa6, 0x4f, 0xfb, 0xeb, 0x33, 0x1e, 0xcd, 0x65, 0x2e,
- 0xf4, 0x05, 0x2b, 0x16, 0x49, 0x23, 0x18, 0x96, 0x09, 0xe0, 0xac, 0xda, 0x7b, 0xc4, 0x94, 0xdd,
- 0x46, 0xe9, 0x32, 0x07, 0x99, 0x89, 0x3d, 0xe0, 0xf9, 0xbf, 0x80, 0x66, 0x95, 0x8c, 0xef, 0x71,
- 0x4f, 0x6e, 0xe3, 0x4a, 0x90, 0x29, 0x93, 0x39, 0x18, 0xd0, 0x7f, 0x42, 0x47, 0xdf, 0x06, 0x78,
- 0xf2, 0x5e, 0x4b, 0xa5, 0x25, 0x5c, 0xbc, 0x4a, 0xb9, 0x31, 0xf6, 0x67, 0x3c, 0x6a, 0x56, 0x89,
- 0x39, 0x70, 0x07, 0xb9, 0xc8, 0x1b, 0x9f, 0x3c, 0xa6, 0x7d, 0x8f, 0x37, 0xc9, 0xb4, 0x58, 0x24,
- 0x8d, 0x60, 0x68, 0xe3, 0xa6, 0xd5, 0x8c, 0xbe, 0x0b, 0xbf, 0x88, 0x08, 0xde, 0x0a, 0xe0, 0xbe,
- 0xbd, 0xbc, 0x3e, 0xb4, 0xea, 0xeb, 0x43, 0xdc, 0x6b, 0xc1, 0x4d, 0xaa, 0xfd, 0x08, 0x0f, 0x2b,
- 0x9e, 0x96, 0xc2, 0x19, 0xb8, 0xc8, 0x1b, 0xfa, 0x93, 0xce, 0x3c, 0xfc, 0xd0, 0x88, 0xc1, 0x7a,
- 0x66, 0xbf, 0xc4, 0x93, 0x24, 0x55, 0x21, 0x4f, 0x4f, 0xc5, 0x39, 0x2f, 0x53, 0x70, 0x0e, 0x5c,
- 0xe4, 0x8d, 0xfc, 0x87, 0x9d, 0x79, 0x72, 0xb6, 0x3d, 0x0c, 0x76, 0xbd, 0xf6, 0x33, 0x3c, 0x8e,
- 0x85, 0x89, 0xb4, 0x2c, 0x40, 0xaa, 0xdc, 0xb9, 0xe3, 0x22, 0xef, 0xae, 0xff, 0xa0, 0x43, 0xc7,
- 0xa7, 0xfd, 0x28, 0xd8, 0xf6, 0x1d, 0xfd, 0x40, 0xf8, 0xfe, 0x4e, 0x19, 0x6f, 0xa4, 0x01, 0xfb,
- 0xd3, 0x5e, 0x21, 0xf4, 0xff, 0x0a, 0x69, 0xe8, 0xb6, 0x8e, 0x7b, 0xdd, 0xcd, 0xa3, 0x8d, 0xb2,
- 0x55, 0x46, 0x80, 0x87, 0x12, 0x44, 0x66, 0x9c, 0x81, 0x7b, 0xe0, 0x8d, 0x4f, 0x8e, 0xe9, 0xdf,
- 0xff, 0x59, 0xba, 0xf3, 0xbe, 0xbe, 0xbb, 0xd7, 0x4d, 0x46, 0xb0, 0x8e, 0xf2, 0xe9, 0x72, 0x45,
- 0xac, 0xcb, 0x15, 0xb1, 0xae, 0x56, 0xc4, 0xfa, 0x5a, 0x13, 0xb4, 0xac, 0x09, 0xba, 0xac, 0x09,
- 0xba, 0xaa, 0x09, 0xfa, 0x59, 0x13, 0xf4, 0xfd, 0x17, 0xb1, 0x3e, 0x8e, 0x36, 0x99, 0xbf, 0x03,
- 0x00, 0x00, 0xff, 0xff, 0x44, 0x05, 0xba, 0x7b, 0x71, 0x03, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto b/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto
deleted file mode 100644
index e964a76dd..000000000
--- a/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.scheduling.v1alpha1;
-
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1alpha1";
-
-// PriorityClass defines mapping from a priority class name to the priority
-// integer value. The value can be any valid integer.
-message PriorityClass {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // The value of this priority class. This is the actual priority that pods
- // receive when they have the name of this class in their pod spec.
- optional int32 value = 2;
-
- // globalDefault specifies whether this PriorityClass should be considered as
- // the default priority for pods that do not have any priority class.
- // Only one PriorityClass can be marked as `globalDefault`. However, if more than
- // one PriorityClasses exists with their `globalDefault` field set to true,
- // the smallest value of such global default PriorityClasses will be used as the default priority.
- // +optional
- optional bool globalDefault = 3;
-
- // description is an arbitrary string that usually provides guidelines on
- // when this priority class should be used.
- // +optional
- optional string description = 4;
-}
-
-// PriorityClassList is a collection of priority classes.
-message PriorityClassList {
- // Standard list metadata
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // items is the list of PriorityClasses
- repeated PriorityClass items = 2;
-}
-
diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/register.go b/vendor/k8s.io/api/scheduling/v1alpha1/register.go
deleted file mode 100644
index 24689f0ad..000000000
--- a/vendor/k8s.io/api/scheduling/v1alpha1/register.go
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-Copyright 2017 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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "scheduling.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &PriorityClass{},
- &PriorityClassList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/types.go b/vendor/k8s.io/api/scheduling/v1alpha1/types.go
deleted file mode 100644
index 21e3df0af..000000000
--- a/vendor/k8s.io/api/scheduling/v1alpha1/types.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright 2017 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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// PriorityClass defines mapping from a priority class name to the priority
-// integer value. The value can be any valid integer.
-type PriorityClass struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // The value of this priority class. This is the actual priority that pods
- // receive when they have the name of this class in their pod spec.
- Value int32 `json:"value" protobuf:"bytes,2,opt,name=value"`
-
- // globalDefault specifies whether this PriorityClass should be considered as
- // the default priority for pods that do not have any priority class.
- // Only one PriorityClass can be marked as `globalDefault`. However, if more than
- // one PriorityClasses exists with their `globalDefault` field set to true,
- // the smallest value of such global default PriorityClasses will be used as the default priority.
- // +optional
- GlobalDefault bool `json:"globalDefault,omitempty" protobuf:"bytes,3,opt,name=globalDefault"`
-
- // description is an arbitrary string that usually provides guidelines on
- // when this priority class should be used.
- // +optional
- Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// PriorityClassList is a collection of priority classes.
-type PriorityClassList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // items is the list of PriorityClasses
- Items []PriorityClass `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go
deleted file mode 100644
index 9080dd9d6..000000000
--- a/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-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
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_PriorityClass = map[string]string{
- "": "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.",
- "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.",
- "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.",
-}
-
-func (PriorityClass) SwaggerDoc() map[string]string {
- return map_PriorityClass
-}
-
-var map_PriorityClassList = map[string]string{
- "": "PriorityClassList is a collection of priority classes.",
- "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "items is the list of PriorityClasses",
-}
-
-func (PriorityClassList) SwaggerDoc() map[string]string {
- return map_PriorityClassList
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/scheduling/v1alpha1/zz_generated.deepcopy.go
deleted file mode 100644
index 51f8d0473..000000000
--- a/vendor/k8s.io/api/scheduling/v1alpha1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PriorityClass) DeepCopyInto(out *PriorityClass) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PriorityClass.
-func (in *PriorityClass) DeepCopy() *PriorityClass {
- if in == nil {
- return nil
- }
- out := new(PriorityClass)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PriorityClass) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PriorityClassList) DeepCopyInto(out *PriorityClassList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]PriorityClass, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PriorityClassList.
-func (in *PriorityClassList) DeepCopy() *PriorityClassList {
- if in == nil {
- return nil
- }
- out := new(PriorityClassList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PriorityClassList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
diff --git a/vendor/k8s.io/api/settings/v1alpha1/doc.go b/vendor/k8s.io/api/settings/v1alpha1/doc.go
deleted file mode 100644
index 05a62c569..000000000
--- a/vendor/k8s.io/api/settings/v1alpha1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-
-// +groupName=settings.k8s.io
-package v1alpha1 // import "k8s.io/api/settings/v1alpha1"
diff --git a/vendor/k8s.io/api/settings/v1alpha1/generated.pb.go b/vendor/k8s.io/api/settings/v1alpha1/generated.pb.go
deleted file mode 100644
index bfc6a5a11..000000000
--- a/vendor/k8s.io/api/settings/v1alpha1/generated.pb.go
+++ /dev/null
@@ -1,930 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/settings/v1alpha1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1alpha1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/settings/v1alpha1/generated.proto
-
- It has these top-level messages:
- PodPreset
- PodPresetList
- PodPresetSpec
-*/
-package v1alpha1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *PodPreset) Reset() { *m = PodPreset{} }
-func (*PodPreset) ProtoMessage() {}
-func (*PodPreset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *PodPresetList) Reset() { *m = PodPresetList{} }
-func (*PodPresetList) ProtoMessage() {}
-func (*PodPresetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *PodPresetSpec) Reset() { *m = PodPresetSpec{} }
-func (*PodPresetSpec) ProtoMessage() {}
-func (*PodPresetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func init() {
- proto.RegisterType((*PodPreset)(nil), "k8s.io.api.settings.v1alpha1.PodPreset")
- proto.RegisterType((*PodPresetList)(nil), "k8s.io.api.settings.v1alpha1.PodPresetList")
- proto.RegisterType((*PodPresetSpec)(nil), "k8s.io.api.settings.v1alpha1.PodPresetSpec")
-}
-func (m *PodPreset) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodPreset) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- return i, nil
-}
-
-func (m *PodPresetList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodPresetList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n3, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *PodPresetSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PodPresetSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
- n4, err := m.Selector.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- if len(m.Env) > 0 {
- for _, msg := range m.Env {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.EnvFrom) > 0 {
- for _, msg := range m.EnvFrom {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.Volumes) > 0 {
- for _, msg := range m.Volumes {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.VolumeMounts) > 0 {
- for _, msg := range m.VolumeMounts {
- dAtA[i] = 0x2a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *PodPreset) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *PodPresetList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *PodPresetSpec) Size() (n int) {
- var l int
- _ = l
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Env) > 0 {
- for _, e := range m.Env {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.EnvFrom) > 0 {
- for _, e := range m.EnvFrom {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Volumes) > 0 {
- for _, e := range m.Volumes {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.VolumeMounts) > 0 {
- for _, e := range m.VolumeMounts {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *PodPreset) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodPreset{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodPresetSpec", "PodPresetSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodPresetList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodPresetList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodPreset", "PodPreset", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PodPresetSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PodPresetSpec{`,
- `Selector:` + strings.Replace(strings.Replace(this.Selector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
- `Env:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Env), "EnvVar", "k8s_io_api_core_v1.EnvVar", 1), `&`, ``, 1) + `,`,
- `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "k8s_io_api_core_v1.EnvFromSource", 1), `&`, ``, 1) + `,`,
- `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Volume", "k8s_io_api_core_v1.Volume", 1), `&`, ``, 1) + `,`,
- `VolumeMounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeMounts), "VolumeMount", "k8s_io_api_core_v1.VolumeMount", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *PodPreset) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodPreset: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodPreset: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodPresetList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodPresetList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodPresetList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, PodPreset{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodPresetSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodPresetSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodPresetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Env = append(m.Env, k8s_io_api_core_v1.EnvVar{})
- if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.EnvFrom = append(m.EnvFrom, k8s_io_api_core_v1.EnvFromSource{})
- if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Volumes = append(m.Volumes, k8s_io_api_core_v1.Volume{})
- if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field VolumeMounts", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.VolumeMounts = append(m.VolumeMounts, k8s_io_api_core_v1.VolumeMount{})
- if err := m.VolumeMounts[len(m.VolumeMounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/settings/v1alpha1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 556 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x8e, 0xd2, 0x4e,
- 0x1c, 0xc7, 0xe9, 0xb2, 0x04, 0xfe, 0x03, 0x9b, 0xbf, 0x69, 0x3c, 0x34, 0xc4, 0x94, 0x95, 0x8b,
- 0x9b, 0x18, 0x67, 0x64, 0xd7, 0x18, 0xbd, 0x36, 0xc1, 0xc4, 0x04, 0xe2, 0xa6, 0x24, 0x9b, 0x68,
- 0x3c, 0x38, 0x94, 0x9f, 0xa5, 0x42, 0x67, 0x9a, 0x99, 0x69, 0x13, 0x6f, 0x3e, 0x82, 0x2f, 0xe0,
- 0x93, 0xe8, 0x03, 0x70, 0xdc, 0xe3, 0x9e, 0x36, 0x52, 0x5f, 0xc4, 0x4c, 0x99, 0x02, 0x8a, 0x28,
- 0xb7, 0xce, 0x8f, 0xef, 0xe7, 0x33, 0xbf, 0x2f, 0x2d, 0xea, 0xcf, 0x9e, 0x49, 0x1c, 0x71, 0x32,
- 0x4b, 0xc7, 0x20, 0x18, 0x28, 0x90, 0x24, 0x03, 0x36, 0xe1, 0x82, 0x98, 0x1f, 0x68, 0x12, 0x11,
- 0x09, 0x4a, 0x45, 0x2c, 0x94, 0x24, 0xeb, 0xd1, 0x79, 0x32, 0xa5, 0x3d, 0x12, 0x02, 0x03, 0x41,
- 0x15, 0x4c, 0x70, 0x22, 0xb8, 0xe2, 0xf6, 0xbd, 0x55, 0x1a, 0xd3, 0x24, 0xc2, 0x65, 0x1a, 0x97,
- 0xe9, 0xf6, 0xa3, 0x30, 0x52, 0xd3, 0x74, 0x8c, 0x03, 0x1e, 0x93, 0x90, 0x87, 0x9c, 0x14, 0xd0,
- 0x38, 0x7d, 0x5f, 0x9c, 0x8a, 0x43, 0xf1, 0xb4, 0x92, 0xb5, 0xbb, 0x5b, 0x57, 0x07, 0x5c, 0x00,
- 0xc9, 0x76, 0x2e, 0x6c, 0x3f, 0xd9, 0x64, 0x62, 0x1a, 0x4c, 0x23, 0x06, 0xe2, 0x23, 0x49, 0x66,
- 0xa1, 0x1e, 0x48, 0x12, 0x83, 0xa2, 0x7f, 0xa2, 0xc8, 0x3e, 0x4a, 0xa4, 0x4c, 0x45, 0x31, 0xec,
- 0x00, 0x4f, 0xff, 0x05, 0xc8, 0x60, 0x0a, 0x31, 0xdd, 0xe1, 0x2e, 0xf6, 0x71, 0xa9, 0x8a, 0xe6,
- 0x24, 0x62, 0x4a, 0x2a, 0xf1, 0x3b, 0xd4, 0xfd, 0x66, 0xa1, 0xff, 0x2e, 0xf9, 0xe4, 0x52, 0x80,
- 0x04, 0x65, 0xbf, 0x43, 0x0d, 0x5d, 0x63, 0x42, 0x15, 0x75, 0xac, 0x53, 0xeb, 0xac, 0x79, 0xfe,
- 0x18, 0x6f, 0xfe, 0xe5, 0xb5, 0x15, 0x27, 0xb3, 0x50, 0x0f, 0x24, 0xd6, 0x69, 0x9c, 0xf5, 0xf0,
- 0xab, 0xf1, 0x07, 0x08, 0xd4, 0x10, 0x14, 0xf5, 0xec, 0xc5, 0x6d, 0xa7, 0x92, 0xdf, 0x76, 0xd0,
- 0x66, 0xe6, 0xaf, 0xad, 0xf6, 0x10, 0x1d, 0xcb, 0x04, 0x02, 0xe7, 0xa8, 0xb0, 0x3f, 0xc4, 0x7f,
- 0x7b, 0x87, 0x78, 0xbd, 0xd8, 0x28, 0x81, 0xc0, 0x6b, 0x19, 0xf1, 0xb1, 0x3e, 0xf9, 0x85, 0xa6,
- 0xfb, 0xd5, 0x42, 0x27, 0xeb, 0xd4, 0x20, 0x92, 0xca, 0x7e, 0xbb, 0x53, 0x01, 0x1f, 0x56, 0x41,
- 0xd3, 0x45, 0x81, 0x3b, 0xe6, 0x9e, 0x46, 0x39, 0xd9, 0x5a, 0x7f, 0x80, 0x6a, 0x91, 0x82, 0x58,
- 0x3a, 0x47, 0xa7, 0xd5, 0xb3, 0xe6, 0xf9, 0x83, 0x03, 0xf7, 0xf7, 0x4e, 0x8c, 0xb3, 0xf6, 0x52,
- 0xd3, 0xfe, 0x4a, 0xd2, 0xfd, 0x52, 0xdd, 0xda, 0x5e, 0xb7, 0xb2, 0x29, 0x6a, 0x48, 0x98, 0x43,
- 0xa0, 0xb8, 0x30, 0xdb, 0x5f, 0x1c, 0xb8, 0x3d, 0x1d, 0xc3, 0x7c, 0x64, 0xd0, 0x4d, 0x85, 0x72,
- 0xe2, 0xaf, 0xb5, 0xf6, 0x73, 0x54, 0x05, 0x96, 0x99, 0x02, 0xed, 0xed, 0x02, 0xfa, 0xbb, 0xd7,
- 0xae, 0x3e, 0xcb, 0xae, 0xa8, 0xf0, 0x9a, 0x46, 0x52, 0xed, 0xb3, 0xcc, 0xd7, 0x8c, 0x3d, 0x40,
- 0x75, 0x60, 0xd9, 0x0b, 0xc1, 0x63, 0xa7, 0x5a, 0xe0, 0xf7, 0xf7, 0xe0, 0x3a, 0x32, 0xe2, 0xa9,
- 0x08, 0xc0, 0xfb, 0xdf, 0x58, 0xea, 0x66, 0xec, 0x97, 0x0a, 0xbb, 0x8f, 0xea, 0x19, 0x9f, 0xa7,
- 0x31, 0x48, 0xe7, 0x78, 0xff, 0x32, 0x57, 0x45, 0x64, 0xa3, 0x59, 0x9d, 0xa5, 0x5f, 0xb2, 0xf6,
- 0x6b, 0xd4, 0x5a, 0x3d, 0x0e, 0x79, 0xca, 0x94, 0x74, 0x6a, 0x85, 0xab, 0xb3, 0xdf, 0x55, 0xe4,
- 0xbc, 0xbb, 0x46, 0xd8, 0xda, 0x1a, 0x4a, 0xff, 0x17, 0x95, 0x87, 0x17, 0x4b, 0xb7, 0x72, 0xbd,
- 0x74, 0x2b, 0x37, 0x4b, 0xb7, 0xf2, 0x29, 0x77, 0xad, 0x45, 0xee, 0x5a, 0xd7, 0xb9, 0x6b, 0xdd,
- 0xe4, 0xae, 0xf5, 0x3d, 0x77, 0xad, 0xcf, 0x3f, 0xdc, 0xca, 0x9b, 0x46, 0xf9, 0xbe, 0x7f, 0x06,
- 0x00, 0x00, 0xff, 0xff, 0x0e, 0x35, 0x98, 0xb5, 0xd9, 0x04, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/settings/v1alpha1/generated.proto b/vendor/k8s.io/api/settings/v1alpha1/generated.proto
deleted file mode 100644
index 098e8dd9b..000000000
--- a/vendor/k8s.io/api/settings/v1alpha1/generated.proto
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.settings.v1alpha1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1alpha1";
-
-// PodPreset is a policy resource that defines additional runtime
-// requirements for a Pod.
-message PodPreset {
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // +optional
- optional PodPresetSpec spec = 2;
-}
-
-// PodPresetList is a list of PodPreset objects.
-message PodPresetList {
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is a list of schema objects.
- repeated PodPreset items = 2;
-}
-
-// PodPresetSpec is a description of a pod preset.
-message PodPresetSpec {
- // Selector is a label query over a set of resources, in this case pods.
- // Required.
- optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
-
- // Env defines the collection of EnvVar to inject into containers.
- // +optional
- repeated k8s.io.api.core.v1.EnvVar env = 2;
-
- // EnvFrom defines the collection of EnvFromSource to inject into containers.
- // +optional
- repeated k8s.io.api.core.v1.EnvFromSource envFrom = 3;
-
- // Volumes defines the collection of Volume to inject into the pod.
- // +optional
- repeated k8s.io.api.core.v1.Volume volumes = 4;
-
- // VolumeMounts defines the collection of VolumeMount to inject into containers.
- // +optional
- repeated k8s.io.api.core.v1.VolumeMount volumeMounts = 5;
-}
-
diff --git a/vendor/k8s.io/api/settings/v1alpha1/register.go b/vendor/k8s.io/api/settings/v1alpha1/register.go
deleted file mode 100644
index eee278d95..000000000
--- a/vendor/k8s.io/api/settings/v1alpha1/register.go
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-Copyright 2017 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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "settings.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &PodPreset{},
- &PodPresetList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/settings/v1alpha1/types.go b/vendor/k8s.io/api/settings/v1alpha1/types.go
deleted file mode 100644
index 506aacf4a..000000000
--- a/vendor/k8s.io/api/settings/v1alpha1/types.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2017 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 (
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// PodPreset is a policy resource that defines additional runtime
-// requirements for a Pod.
-type PodPreset struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // +optional
- Spec PodPresetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-}
-
-// PodPresetSpec is a description of a pod preset.
-type PodPresetSpec struct {
- // Selector is a label query over a set of resources, in this case pods.
- // Required.
- Selector metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
-
- // Env defines the collection of EnvVar to inject into containers.
- // +optional
- Env []v1.EnvVar `json:"env,omitempty" protobuf:"bytes,2,rep,name=env"`
- // EnvFrom defines the collection of EnvFromSource to inject into containers.
- // +optional
- EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,3,rep,name=envFrom"`
- // Volumes defines the collection of Volume to inject into the pod.
- // +optional
- Volumes []v1.Volume `json:"volumes,omitempty" protobuf:"bytes,4,rep,name=volumes"`
- // VolumeMounts defines the collection of VolumeMount to inject into containers.
- // +optional
- VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty" protobuf:"bytes,5,rep,name=volumeMounts"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// PodPresetList is a list of PodPreset objects.
-type PodPresetList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of schema objects.
- Items []PodPreset `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/vendor/k8s.io/api/settings/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/settings/v1alpha1/types_swagger_doc_generated.go
deleted file mode 100644
index 2a89e5566..000000000
--- a/vendor/k8s.io/api/settings/v1alpha1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-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
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_PodPreset = map[string]string{
- "": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.",
-}
-
-func (PodPreset) SwaggerDoc() map[string]string {
- return map_PodPreset
-}
-
-var map_PodPresetList = map[string]string{
- "": "PodPresetList is a list of PodPreset objects.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is a list of schema objects.",
-}
-
-func (PodPresetList) SwaggerDoc() map[string]string {
- return map_PodPresetList
-}
-
-var map_PodPresetSpec = map[string]string{
- "": "PodPresetSpec is a description of a pod preset.",
- "selector": "Selector is a label query over a set of resources, in this case pods. Required.",
- "env": "Env defines the collection of EnvVar to inject into containers.",
- "envFrom": "EnvFrom defines the collection of EnvFromSource to inject into containers.",
- "volumes": "Volumes defines the collection of Volume to inject into the pod.",
- "volumeMounts": "VolumeMounts defines the collection of VolumeMount to inject into containers.",
-}
-
-func (PodPresetSpec) SwaggerDoc() map[string]string {
- return map_PodPresetSpec
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/settings/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/settings/v1alpha1/zz_generated.deepcopy.go
deleted file mode 100644
index 3fe7f6ca4..000000000
--- a/vendor/k8s.io/api/settings/v1alpha1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- v1 "k8s.io/api/core/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodPreset) DeepCopyInto(out *PodPreset) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPreset.
-func (in *PodPreset) DeepCopy() *PodPreset {
- if in == nil {
- return nil
- }
- out := new(PodPreset)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PodPreset) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodPresetList) DeepCopyInto(out *PodPresetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]PodPreset, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPresetList.
-func (in *PodPresetList) DeepCopy() *PodPresetList {
- if in == nil {
- return nil
- }
- out := new(PodPresetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PodPresetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PodPresetSpec) DeepCopyInto(out *PodPresetSpec) {
- *out = *in
- in.Selector.DeepCopyInto(&out.Selector)
- if in.Env != nil {
- in, out := &in.Env, &out.Env
- *out = make([]v1.EnvVar, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.EnvFrom != nil {
- in, out := &in.EnvFrom, &out.EnvFrom
- *out = make([]v1.EnvFromSource, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Volumes != nil {
- in, out := &in.Volumes, &out.Volumes
- *out = make([]v1.Volume, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.VolumeMounts != nil {
- in, out := &in.VolumeMounts, &out.VolumeMounts
- *out = make([]v1.VolumeMount, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPresetSpec.
-func (in *PodPresetSpec) DeepCopy() *PodPresetSpec {
- if in == nil {
- return nil
- }
- out := new(PodPresetSpec)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/storage/v1/doc.go b/vendor/k8s.io/api/storage/v1/doc.go
deleted file mode 100644
index 8f4a4045c..000000000
--- a/vendor/k8s.io/api/storage/v1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +groupName=storage.k8s.io
-// +k8s:openapi-gen=true
-package v1
diff --git a/vendor/k8s.io/api/storage/v1/generated.pb.go b/vendor/k8s.io/api/storage/v1/generated.pb.go
deleted file mode 100644
index 31988b70d..000000000
--- a/vendor/k8s.io/api/storage/v1/generated.pb.go
+++ /dev/null
@@ -1,926 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/storage/v1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/storage/v1/generated.proto
-
- It has these top-level messages:
- StorageClass
- StorageClassList
-*/
-package v1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *StorageClass) Reset() { *m = StorageClass{} }
-func (*StorageClass) ProtoMessage() {}
-func (*StorageClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *StorageClassList) Reset() { *m = StorageClassList{} }
-func (*StorageClassList) ProtoMessage() {}
-func (*StorageClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func init() {
- proto.RegisterType((*StorageClass)(nil), "k8s.io.api.storage.v1.StorageClass")
- proto.RegisterType((*StorageClassList)(nil), "k8s.io.api.storage.v1.StorageClassList")
-}
-func (m *StorageClass) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provisioner)))
- i += copy(dAtA[i:], m.Provisioner)
- if len(m.Parameters) > 0 {
- keysForParameters := make([]string, 0, len(m.Parameters))
- for k := range m.Parameters {
- keysForParameters = append(keysForParameters, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
- for _, k := range keysForParameters {
- dAtA[i] = 0x1a
- i++
- v := m.Parameters[string(k)]
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
- i += copy(dAtA[i:], v)
- }
- }
- if m.ReclaimPolicy != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ReclaimPolicy)))
- i += copy(dAtA[i:], *m.ReclaimPolicy)
- }
- if len(m.MountOptions) > 0 {
- for _, s := range m.MountOptions {
- dAtA[i] = 0x2a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if m.AllowVolumeExpansion != nil {
- dAtA[i] = 0x30
- i++
- if *m.AllowVolumeExpansion {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.VolumeBindingMode != nil {
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VolumeBindingMode)))
- i += copy(dAtA[i:], *m.VolumeBindingMode)
- }
- return i, nil
-}
-
-func (m *StorageClassList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StorageClassList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n2, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *StorageClass) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Provisioner)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Parameters) > 0 {
- for k, v := range m.Parameters {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- if m.ReclaimPolicy != nil {
- l = len(*m.ReclaimPolicy)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if len(m.MountOptions) > 0 {
- for _, s := range m.MountOptions {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.AllowVolumeExpansion != nil {
- n += 2
- }
- if m.VolumeBindingMode != nil {
- l = len(*m.VolumeBindingMode)
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *StorageClassList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *StorageClass) String() string {
- if this == nil {
- return "nil"
- }
- keysForParameters := make([]string, 0, len(this.Parameters))
- for k := range this.Parameters {
- keysForParameters = append(keysForParameters, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
- mapStringForParameters := "map[string]string{"
- for _, k := range keysForParameters {
- mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k])
- }
- mapStringForParameters += "}"
- s := strings.Join([]string{`&StorageClass{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`,
- `Parameters:` + mapStringForParameters + `,`,
- `ReclaimPolicy:` + valueToStringGenerated(this.ReclaimPolicy) + `,`,
- `MountOptions:` + fmt.Sprintf("%v", this.MountOptions) + `,`,
- `AllowVolumeExpansion:` + valueToStringGenerated(this.AllowVolumeExpansion) + `,`,
- `VolumeBindingMode:` + valueToStringGenerated(this.VolumeBindingMode) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StorageClassList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StorageClassList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StorageClass", "StorageClass", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *StorageClass) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StorageClass: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StorageClass: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Provisioner", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Provisioner = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.Parameters == nil {
- m.Parameters = make(map[string]string)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapvalue uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapvalue := int(stringLenmapvalue)
- if intStringLenmapvalue < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapvalue := iNdEx + intStringLenmapvalue
- if postStringIndexmapvalue > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
- iNdEx = postStringIndexmapvalue
- m.Parameters[mapkey] = mapvalue
- } else {
- var mapvalue string
- m.Parameters[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReclaimPolicy", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := k8s_io_api_core_v1.PersistentVolumeReclaimPolicy(dAtA[iNdEx:postIndex])
- m.ReclaimPolicy = &s
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MountOptions", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MountOptions = append(m.MountOptions, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowVolumeExpansion", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.AllowVolumeExpansion = &b
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field VolumeBindingMode", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := VolumeBindingMode(dAtA[iNdEx:postIndex])
- m.VolumeBindingMode = &s
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StorageClassList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StorageClassList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StorageClassList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, StorageClass{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/storage/v1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 623 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4f, 0x6f, 0xd3, 0x3c,
- 0x18, 0x6f, 0xda, 0xb7, 0x2f, 0x9b, 0xbb, 0x89, 0x2e, 0x0c, 0x29, 0xea, 0x21, 0xa9, 0xc6, 0xa5,
- 0x9a, 0x84, 0xb3, 0x6e, 0x03, 0x4d, 0x48, 0x20, 0x11, 0x34, 0x09, 0xa4, 0x4d, 0xab, 0x82, 0x34,
- 0x21, 0xc4, 0x01, 0x37, 0x7d, 0xc8, 0x4c, 0x13, 0x3b, 0xb2, 0x9d, 0x40, 0x6f, 0x7c, 0x04, 0xce,
- 0x7c, 0x14, 0x3e, 0xc1, 0x8e, 0x3b, 0xee, 0x14, 0xb1, 0xf0, 0x2d, 0x76, 0x42, 0x49, 0xca, 0x9a,
- 0xad, 0x9d, 0xd8, 0x2d, 0xfe, 0xfd, 0xb3, 0x9f, 0x27, 0x3f, 0xf4, 0x62, 0xbc, 0x27, 0x31, 0xe5,
- 0xf6, 0x38, 0x1e, 0x82, 0x60, 0xa0, 0x40, 0xda, 0x09, 0xb0, 0x11, 0x17, 0xf6, 0x94, 0x20, 0x11,
- 0xb5, 0xa5, 0xe2, 0x82, 0xf8, 0x60, 0x27, 0x7d, 0xdb, 0x07, 0x06, 0x82, 0x28, 0x18, 0xe1, 0x48,
- 0x70, 0xc5, 0xf5, 0x87, 0xa5, 0x0c, 0x93, 0x88, 0xe2, 0xa9, 0x0c, 0x27, 0xfd, 0xce, 0x63, 0x9f,
- 0xaa, 0x93, 0x78, 0x88, 0x3d, 0x1e, 0xda, 0x3e, 0xf7, 0xb9, 0x5d, 0xa8, 0x87, 0xf1, 0xa7, 0xe2,
- 0x54, 0x1c, 0x8a, 0xaf, 0x32, 0xa5, 0xb3, 0xb9, 0xf0, 0xb2, 0x21, 0x28, 0x32, 0x77, 0x63, 0x67,
- 0x77, 0xa6, 0x0d, 0x89, 0x77, 0x42, 0x19, 0x88, 0x89, 0x1d, 0x8d, 0xfd, 0x1c, 0x90, 0x76, 0x08,
- 0x8a, 0x2c, 0x78, 0x67, 0xc7, 0xbe, 0xcd, 0x25, 0x62, 0xa6, 0x68, 0x08, 0x73, 0x86, 0xa7, 0xff,
- 0x32, 0x48, 0xef, 0x04, 0x42, 0x32, 0xe7, 0xdb, 0xb9, 0xcd, 0x17, 0x2b, 0x1a, 0xd8, 0x94, 0x29,
- 0xa9, 0xc4, 0x4d, 0xd3, 0xc6, 0x8f, 0x26, 0x5a, 0x79, 0x5b, 0xce, 0xfd, 0x2a, 0x20, 0x52, 0xea,
- 0x1f, 0xd1, 0x52, 0x3e, 0xc9, 0x88, 0x28, 0x62, 0x68, 0x5d, 0xad, 0xd7, 0xda, 0xde, 0xc2, 0xb3,
- 0x4d, 0x5f, 0x05, 0xe3, 0x68, 0xec, 0xe7, 0x80, 0xc4, 0xb9, 0x1a, 0x27, 0x7d, 0x7c, 0x34, 0xfc,
- 0x0c, 0x9e, 0x3a, 0x04, 0x45, 0x1c, 0xfd, 0x34, 0xb5, 0x6a, 0x59, 0x6a, 0xa1, 0x19, 0xe6, 0x5e,
- 0xa5, 0xea, 0x4f, 0x50, 0x2b, 0x12, 0x3c, 0xa1, 0x92, 0x72, 0x06, 0xc2, 0xa8, 0x77, 0xb5, 0xde,
- 0xb2, 0xf3, 0x60, 0x6a, 0x69, 0x0d, 0x66, 0x94, 0x5b, 0xd5, 0xe9, 0x3e, 0x42, 0x11, 0x11, 0x24,
- 0x04, 0x05, 0x42, 0x1a, 0x8d, 0x6e, 0xa3, 0xd7, 0xda, 0xde, 0xc1, 0x0b, 0x4b, 0x80, 0xab, 0x13,
- 0xe1, 0xc1, 0x95, 0x6b, 0x9f, 0x29, 0x31, 0x99, 0xbd, 0x6e, 0x46, 0xb8, 0x95, 0x68, 0x7d, 0x8c,
- 0x56, 0x05, 0x78, 0x01, 0xa1, 0xe1, 0x80, 0x07, 0xd4, 0x9b, 0x18, 0xff, 0x15, 0x2f, 0xdc, 0xcf,
- 0x52, 0x6b, 0xd5, 0xad, 0x12, 0x97, 0xa9, 0xb5, 0x55, 0xa9, 0x8f, 0xc7, 0x45, 0xde, 0x1d, 0x3c,
- 0x00, 0x21, 0xa9, 0x54, 0xc0, 0xd4, 0x31, 0x0f, 0xe2, 0x10, 0xae, 0x79, 0xdc, 0xeb, 0xd9, 0xfa,
- 0x2e, 0x5a, 0x09, 0x79, 0xcc, 0xd4, 0x51, 0xa4, 0x28, 0x67, 0xd2, 0x68, 0x76, 0x1b, 0xbd, 0x65,
- 0xa7, 0x9d, 0xa5, 0xd6, 0xca, 0x61, 0x05, 0x77, 0xaf, 0xa9, 0xf4, 0x03, 0xb4, 0x4e, 0x82, 0x80,
- 0x7f, 0x29, 0x2f, 0xd8, 0xff, 0x1a, 0x11, 0x96, 0x6f, 0xc9, 0xf8, 0xbf, 0xab, 0xf5, 0x96, 0x1c,
- 0x23, 0x4b, 0xad, 0xf5, 0x97, 0x0b, 0x78, 0x77, 0xa1, 0x4b, 0x7f, 0x87, 0xd6, 0x92, 0x02, 0x72,
- 0x28, 0x1b, 0x51, 0xe6, 0x1f, 0xf2, 0x11, 0x18, 0xf7, 0x8a, 0xa1, 0x37, 0xb3, 0xd4, 0x5a, 0x3b,
- 0xbe, 0x49, 0x5e, 0x2e, 0x02, 0xdd, 0xf9, 0x90, 0xce, 0x73, 0x74, 0xff, 0xc6, 0xf6, 0xf5, 0x36,
- 0x6a, 0x8c, 0x61, 0x52, 0x54, 0x6b, 0xd9, 0xcd, 0x3f, 0xf5, 0x75, 0xd4, 0x4c, 0x48, 0x10, 0x43,
- 0xd9, 0x04, 0xb7, 0x3c, 0x3c, 0xab, 0xef, 0x69, 0x1b, 0x3f, 0x35, 0xd4, 0xae, 0xfe, 0xca, 0x03,
- 0x2a, 0x95, 0xfe, 0x61, 0xae, 0xa0, 0xf8, 0x6e, 0x05, 0xcd, 0xdd, 0x45, 0x3d, 0xdb, 0xd3, 0x02,
- 0x2c, 0xfd, 0x45, 0x2a, 0xe5, 0x7c, 0x8d, 0x9a, 0x54, 0x41, 0x28, 0x8d, 0x7a, 0x51, 0xb0, 0x47,
- 0x77, 0x28, 0x98, 0xb3, 0x3a, 0xcd, 0x6b, 0xbe, 0xc9, 0x9d, 0x6e, 0x19, 0xe0, 0xf4, 0x4e, 0x2f,
- 0xcc, 0xda, 0xd9, 0x85, 0x59, 0x3b, 0xbf, 0x30, 0x6b, 0xdf, 0x32, 0x53, 0x3b, 0xcd, 0x4c, 0xed,
- 0x2c, 0x33, 0xb5, 0xf3, 0xcc, 0xd4, 0x7e, 0x65, 0xa6, 0xf6, 0xfd, 0xb7, 0x59, 0x7b, 0x5f, 0x4f,
- 0xfa, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xee, 0x56, 0xcc, 0xfd, 0x0a, 0x05, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/storage/v1/generated.proto b/vendor/k8s.io/api/storage/v1/generated.proto
deleted file mode 100644
index 72b3ceb83..000000000
--- a/vendor/k8s.io/api/storage/v1/generated.proto
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.storage.v1;
-
-import "k8s.io/api/storage/v1beta1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1";
-
-// StorageClass describes the parameters for a class of storage for
-// which PersistentVolumes can be dynamically provisioned.
-//
-// StorageClasses are non-namespaced; the name of the storage class
-// according to etcd is in ObjectMeta.Name.
-message StorageClass {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Provisioner indicates the type of the provisioner.
- optional string provisioner = 2;
-
- // Parameters holds the parameters for the provisioner that should
- // create volumes of this storage class.
- // +optional
- map<string, string> parameters = 3;
-
- // Dynamically provisioned PersistentVolumes of this storage class are
- // created with this reclaimPolicy. Defaults to Delete.
- // +optional
- optional string reclaimPolicy = 4;
-
- // Dynamically provisioned PersistentVolumes of this storage class are
- // created with these mountOptions, e.g. ["ro", "soft"]. Not validated -
- // mount of the PVs will simply fail if one is invalid.
- // +optional
- repeated string mountOptions = 5;
-
- // AllowVolumeExpansion shows whether the storage class allow volume expand
- // +optional
- optional bool allowVolumeExpansion = 6;
-
- // VolumeBindingMode indicates how PersistentVolumeClaims should be
- // provisioned and bound. When unset, VolumeBindingImmediate is used.
- // This field is alpha-level and is only honored by servers that enable
- // the VolumeScheduling feature.
- // +optional
- optional string volumeBindingMode = 7;
-}
-
-// StorageClassList is a collection of storage classes.
-message StorageClassList {
- // Standard list metadata
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of StorageClasses
- repeated StorageClass items = 2;
-}
-
diff --git a/vendor/k8s.io/api/storage/v1/register.go b/vendor/k8s.io/api/storage/v1/register.go
deleted file mode 100644
index c058add84..000000000
--- a/vendor/k8s.io/api/storage/v1/register.go
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "storage.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &StorageClass{},
- &StorageClassList{},
- )
-
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/storage/v1/types.go b/vendor/k8s.io/api/storage/v1/types.go
deleted file mode 100644
index 288d40abb..000000000
--- a/vendor/k8s.io/api/storage/v1/types.go
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// StorageClass describes the parameters for a class of storage for
-// which PersistentVolumes can be dynamically provisioned.
-//
-// StorageClasses are non-namespaced; the name of the storage class
-// according to etcd is in ObjectMeta.Name.
-type StorageClass struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Provisioner indicates the type of the provisioner.
- Provisioner string `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"`
-
- // Parameters holds the parameters for the provisioner that should
- // create volumes of this storage class.
- // +optional
- Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
-
- // Dynamically provisioned PersistentVolumes of this storage class are
- // created with this reclaimPolicy. Defaults to Delete.
- // +optional
- ReclaimPolicy *v1.PersistentVolumeReclaimPolicy `json:"reclaimPolicy,omitempty" protobuf:"bytes,4,opt,name=reclaimPolicy,casttype=k8s.io/api/core/v1.PersistentVolumeReclaimPolicy"`
-
- // Dynamically provisioned PersistentVolumes of this storage class are
- // created with these mountOptions, e.g. ["ro", "soft"]. Not validated -
- // mount of the PVs will simply fail if one is invalid.
- // +optional
- MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,5,opt,name=mountOptions"`
-
- // AllowVolumeExpansion shows whether the storage class allow volume expand
- // +optional
- AllowVolumeExpansion *bool `json:"allowVolumeExpansion,omitempty" protobuf:"varint,6,opt,name=allowVolumeExpansion"`
-
- // VolumeBindingMode indicates how PersistentVolumeClaims should be
- // provisioned and bound. When unset, VolumeBindingImmediate is used.
- // This field is alpha-level and is only honored by servers that enable
- // the VolumeScheduling feature.
- // +optional
- VolumeBindingMode *VolumeBindingMode `json:"volumeBindingMode,omitempty" protobuf:"bytes,7,opt,name=volumeBindingMode"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// StorageClassList is a collection of storage classes.
-type StorageClassList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of StorageClasses
- Items []StorageClass `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// VolumeBindingMode indicates how PersistentVolumeClaims should be bound.
-type VolumeBindingMode string
-
-const (
- // VolumeBindingImmediate indicates that PersistentVolumeClaims should be
- // immediately provisioned and bound. This is the default mode.
- VolumeBindingImmediate VolumeBindingMode = "Immediate"
-
- // VolumeBindingWaitForFirstConsumer indicates that PersistentVolumeClaims
- // should not be provisioned and bound until the first Pod is created that
- // references the PeristentVolumeClaim. The volume provisioning and
- // binding will occur during Pod scheduing.
- VolumeBindingWaitForFirstConsumer VolumeBindingMode = "WaitForFirstConsumer"
-)
diff --git a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go
deleted file mode 100644
index 3eb9bdab7..000000000
--- a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-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 v1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_StorageClass = map[string]string{
- "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "provisioner": "Provisioner indicates the type of the provisioner.",
- "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.",
- "reclaimPolicy": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.",
- "mountOptions": "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.",
- "allowVolumeExpansion": "AllowVolumeExpansion shows whether the storage class allow volume expand",
- "volumeBindingMode": "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is alpha-level and is only honored by servers that enable the VolumeScheduling feature.",
-}
-
-func (StorageClass) SwaggerDoc() map[string]string {
- return map_StorageClass
-}
-
-var map_StorageClassList = map[string]string{
- "": "StorageClassList is a collection of storage classes.",
- "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is the list of StorageClasses",
-}
-
-func (StorageClassList) SwaggerDoc() map[string]string {
- return map_StorageClassList
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go
deleted file mode 100644
index ccab05ccc..000000000
--- a/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1
-
-import (
- core_v1 "k8s.io/api/core/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StorageClass) DeepCopyInto(out *StorageClass) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Parameters != nil {
- in, out := &in.Parameters, &out.Parameters
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- }
- if in.ReclaimPolicy != nil {
- in, out := &in.ReclaimPolicy, &out.ReclaimPolicy
- if *in == nil {
- *out = nil
- } else {
- *out = new(core_v1.PersistentVolumeReclaimPolicy)
- **out = **in
- }
- }
- if in.MountOptions != nil {
- in, out := &in.MountOptions, &out.MountOptions
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.AllowVolumeExpansion != nil {
- in, out := &in.AllowVolumeExpansion, &out.AllowVolumeExpansion
- if *in == nil {
- *out = nil
- } else {
- *out = new(bool)
- **out = **in
- }
- }
- if in.VolumeBindingMode != nil {
- in, out := &in.VolumeBindingMode, &out.VolumeBindingMode
- if *in == nil {
- *out = nil
- } else {
- *out = new(VolumeBindingMode)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClass.
-func (in *StorageClass) DeepCopy() *StorageClass {
- if in == nil {
- return nil
- }
- out := new(StorageClass)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *StorageClass) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StorageClassList) DeepCopyInto(out *StorageClassList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]StorageClass, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassList.
-func (in *StorageClassList) DeepCopy() *StorageClassList {
- if in == nil {
- return nil
- }
- out := new(StorageClassList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *StorageClassList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
diff --git a/vendor/k8s.io/api/storage/v1alpha1/doc.go b/vendor/k8s.io/api/storage/v1alpha1/doc.go
deleted file mode 100644
index aa94aff7f..000000000
--- a/vendor/k8s.io/api/storage/v1alpha1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package,register
-// +groupName=storage.k8s.io
-// +k8s:openapi-gen=true
-package v1alpha1 // import "k8s.io/api/storage/v1alpha1"
diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go b/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go
deleted file mode 100644
index 586a1b672..000000000
--- a/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go
+++ /dev/null
@@ -1,1523 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/storage/v1alpha1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1alpha1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/storage/v1alpha1/generated.proto
-
- It has these top-level messages:
- VolumeAttachment
- VolumeAttachmentList
- VolumeAttachmentSource
- VolumeAttachmentSpec
- VolumeAttachmentStatus
- VolumeError
-*/
-package v1alpha1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} }
-func (*VolumeAttachment) ProtoMessage() {}
-func (*VolumeAttachment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} }
-func (*VolumeAttachmentList) ProtoMessage() {}
-func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} }
-func (*VolumeAttachmentSource) ProtoMessage() {}
-func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} }
-func (*VolumeAttachmentSpec) ProtoMessage() {}
-func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} }
-func (*VolumeAttachmentStatus) ProtoMessage() {}
-func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *VolumeError) Reset() { *m = VolumeError{} }
-func (*VolumeError) ProtoMessage() {}
-func (*VolumeError) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func init() {
- proto.RegisterType((*VolumeAttachment)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachment")
- proto.RegisterType((*VolumeAttachmentList)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentList")
- proto.RegisterType((*VolumeAttachmentSource)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentSource")
- proto.RegisterType((*VolumeAttachmentSpec)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentSpec")
- proto.RegisterType((*VolumeAttachmentStatus)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentStatus")
- proto.RegisterType((*VolumeError)(nil), "k8s.io.api.storage.v1alpha1.VolumeError")
-}
-func (m *VolumeAttachment) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeAttachment) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *VolumeAttachmentList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeAttachmentList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n4, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *VolumeAttachmentSource) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeAttachmentSource) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.PersistentVolumeName != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PersistentVolumeName)))
- i += copy(dAtA[i:], *m.PersistentVolumeName)
- }
- return i, nil
-}
-
-func (m *VolumeAttachmentSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeAttachmentSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Attacher)))
- i += copy(dAtA[i:], m.Attacher)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Source.Size()))
- n5, err := m.Source.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName)))
- i += copy(dAtA[i:], m.NodeName)
- return i, nil
-}
-
-func (m *VolumeAttachmentStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeAttachmentStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- if m.Attached {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if len(m.AttachmentMetadata) > 0 {
- keysForAttachmentMetadata := make([]string, 0, len(m.AttachmentMetadata))
- for k := range m.AttachmentMetadata {
- keysForAttachmentMetadata = append(keysForAttachmentMetadata, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata)
- for _, k := range keysForAttachmentMetadata {
- dAtA[i] = 0x12
- i++
- v := m.AttachmentMetadata[string(k)]
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
- i += copy(dAtA[i:], v)
- }
- }
- if m.AttachError != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AttachError.Size()))
- n6, err := m.AttachError.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- }
- if m.DetachError != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DetachError.Size()))
- n7, err := m.DetachError.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- }
- return i, nil
-}
-
-func (m *VolumeError) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeError) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Time.Size()))
- n8, err := m.Time.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *VolumeAttachment) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *VolumeAttachmentList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *VolumeAttachmentSource) Size() (n int) {
- var l int
- _ = l
- if m.PersistentVolumeName != nil {
- l = len(*m.PersistentVolumeName)
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *VolumeAttachmentSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Attacher)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Source.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.NodeName)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *VolumeAttachmentStatus) Size() (n int) {
- var l int
- _ = l
- n += 2
- if len(m.AttachmentMetadata) > 0 {
- for k, v := range m.AttachmentMetadata {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- if m.AttachError != nil {
- l = m.AttachError.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.DetachError != nil {
- l = m.DetachError.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *VolumeError) Size() (n int) {
- var l int
- _ = l
- l = m.Time.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *VolumeAttachment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&VolumeAttachment{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "VolumeAttachmentSpec", "VolumeAttachmentSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "VolumeAttachmentStatus", "VolumeAttachmentStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeAttachmentList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&VolumeAttachmentList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "VolumeAttachment", "VolumeAttachment", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeAttachmentSource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&VolumeAttachmentSource{`,
- `PersistentVolumeName:` + valueToStringGenerated(this.PersistentVolumeName) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeAttachmentSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&VolumeAttachmentSpec{`,
- `Attacher:` + fmt.Sprintf("%v", this.Attacher) + `,`,
- `Source:` + strings.Replace(strings.Replace(this.Source.String(), "VolumeAttachmentSource", "VolumeAttachmentSource", 1), `&`, ``, 1) + `,`,
- `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeAttachmentStatus) String() string {
- if this == nil {
- return "nil"
- }
- keysForAttachmentMetadata := make([]string, 0, len(this.AttachmentMetadata))
- for k := range this.AttachmentMetadata {
- keysForAttachmentMetadata = append(keysForAttachmentMetadata, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata)
- mapStringForAttachmentMetadata := "map[string]string{"
- for _, k := range keysForAttachmentMetadata {
- mapStringForAttachmentMetadata += fmt.Sprintf("%v: %v,", k, this.AttachmentMetadata[k])
- }
- mapStringForAttachmentMetadata += "}"
- s := strings.Join([]string{`&VolumeAttachmentStatus{`,
- `Attached:` + fmt.Sprintf("%v", this.Attached) + `,`,
- `AttachmentMetadata:` + mapStringForAttachmentMetadata + `,`,
- `AttachError:` + strings.Replace(fmt.Sprintf("%v", this.AttachError), "VolumeError", "VolumeError", 1) + `,`,
- `DetachError:` + strings.Replace(fmt.Sprintf("%v", this.DetachError), "VolumeError", "VolumeError", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeError) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&VolumeError{`,
- `Time:` + strings.Replace(strings.Replace(this.Time.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *VolumeAttachment) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeAttachment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeAttachment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeAttachmentList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeAttachmentList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeAttachmentList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, VolumeAttachment{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeAttachmentSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeAttachmentSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeAttachmentSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PersistentVolumeName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.PersistentVolumeName = &s
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeAttachmentSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeAttachmentSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeAttachmentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Attacher", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Attacher = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NodeName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeAttachmentStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeAttachmentStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeAttachmentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Attached", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Attached = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AttachmentMetadata", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.AttachmentMetadata == nil {
- m.AttachmentMetadata = make(map[string]string)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapvalue uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapvalue := int(stringLenmapvalue)
- if intStringLenmapvalue < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapvalue := iNdEx + intStringLenmapvalue
- if postStringIndexmapvalue > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
- iNdEx = postStringIndexmapvalue
- m.AttachmentMetadata[mapkey] = mapvalue
- } else {
- var mapvalue string
- m.AttachmentMetadata[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AttachError", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.AttachError == nil {
- m.AttachError = &VolumeError{}
- }
- if err := m.AttachError.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DetachError", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.DetachError == nil {
- m.DetachError = &VolumeError{}
- }
- if err := m.DetachError.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeError) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeError: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeError: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Time.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/storage/v1alpha1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 745 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x3d, 0x6f, 0xdb, 0x46,
- 0x18, 0xc7, 0x45, 0x49, 0xb6, 0xe5, 0x53, 0x5f, 0x8c, 0x83, 0xd0, 0x0a, 0x2a, 0x40, 0x19, 0x9a,
- 0xdc, 0xa2, 0x3e, 0x56, 0x76, 0x51, 0x18, 0xdd, 0x44, 0xd8, 0x43, 0x51, 0xcb, 0x2d, 0xe8, 0xa2,
- 0x43, 0xdb, 0xa1, 0x27, 0xf2, 0x31, 0x45, 0x4b, 0x7c, 0xc1, 0xdd, 0x51, 0x88, 0xb7, 0x4c, 0x99,
- 0xb3, 0xe5, 0x1b, 0xe4, 0xb3, 0x68, 0x8b, 0x47, 0x4f, 0x42, 0xcc, 0x7c, 0x8b, 0x2c, 0x09, 0x78,
- 0x3c, 0x89, 0xb2, 0x29, 0x25, 0xb6, 0x37, 0x3e, 0xcf, 0x3d, 0xff, 0xdf, 0xf3, 0x76, 0x47, 0x74,
- 0x3c, 0x3a, 0xe2, 0xc4, 0x0b, 0x8d, 0x51, 0x3c, 0x00, 0x16, 0x80, 0x00, 0x6e, 0x4c, 0x20, 0x70,
- 0x42, 0x66, 0xa8, 0x03, 0x1a, 0x79, 0x06, 0x17, 0x21, 0xa3, 0x2e, 0x18, 0x93, 0x2e, 0x1d, 0x47,
- 0x43, 0xda, 0x35, 0x5c, 0x08, 0x80, 0x51, 0x01, 0x0e, 0x89, 0x58, 0x28, 0x42, 0xfc, 0x5d, 0x16,
- 0x4c, 0x68, 0xe4, 0x11, 0x15, 0x4c, 0xe6, 0xc1, 0xad, 0x7d, 0xd7, 0x13, 0xc3, 0x78, 0x40, 0xec,
- 0xd0, 0x37, 0xdc, 0xd0, 0x0d, 0x0d, 0xa9, 0x19, 0xc4, 0x17, 0xd2, 0x92, 0x86, 0xfc, 0xca, 0x58,
- 0xad, 0x7e, 0x9e, 0x18, 0x9e, 0x09, 0x08, 0xb8, 0x17, 0x06, 0x7c, 0x9f, 0x46, 0x1e, 0x07, 0x36,
- 0x01, 0x66, 0x44, 0x23, 0x37, 0x3d, 0xe3, 0x77, 0x03, 0x8c, 0x49, 0x77, 0x00, 0xa2, 0x58, 0x5a,
- 0xeb, 0xe7, 0x1c, 0xe7, 0x53, 0x7b, 0xe8, 0x05, 0xc0, 0xae, 0x72, 0x86, 0x0f, 0x82, 0x1a, 0x93,
- 0xa2, 0xca, 0x58, 0xa7, 0x62, 0x71, 0x20, 0x3c, 0x1f, 0x0a, 0x82, 0x5f, 0x3e, 0x27, 0xe0, 0xf6,
- 0x10, 0x7c, 0x5a, 0xd0, 0x1d, 0xae, 0xd3, 0xc5, 0xc2, 0x1b, 0x1b, 0x5e, 0x20, 0xb8, 0x60, 0xf7,
- 0x45, 0x9d, 0xd7, 0x65, 0xb4, 0xf3, 0x77, 0x38, 0x8e, 0x7d, 0xe8, 0x09, 0x41, 0xed, 0xa1, 0x0f,
- 0x81, 0xc0, 0xff, 0xa3, 0x5a, 0xda, 0x8d, 0x43, 0x05, 0x6d, 0x6a, 0xbb, 0xda, 0x5e, 0xfd, 0xe0,
- 0x27, 0x92, 0xaf, 0x65, 0x01, 0x27, 0xd1, 0xc8, 0x4d, 0x1d, 0x9c, 0xa4, 0xd1, 0x64, 0xd2, 0x25,
- 0x7f, 0x0c, 0x2e, 0xc1, 0x16, 0x7d, 0x10, 0xd4, 0xc4, 0xd3, 0x59, 0xbb, 0x94, 0xcc, 0xda, 0x28,
- 0xf7, 0x59, 0x0b, 0x2a, 0x3e, 0x47, 0x55, 0x1e, 0x81, 0xdd, 0x2c, 0x4b, 0x7a, 0x97, 0x7c, 0x62,
- 0xe9, 0xe4, 0x7e, 0x79, 0xe7, 0x11, 0xd8, 0xe6, 0x17, 0x0a, 0x5f, 0x4d, 0x2d, 0x4b, 0xc2, 0xf0,
- 0xbf, 0x68, 0x93, 0x0b, 0x2a, 0x62, 0xde, 0xac, 0x48, 0xec, 0xe1, 0xe3, 0xb0, 0x52, 0x6a, 0x7e,
- 0xa5, 0xc0, 0x9b, 0x99, 0x6d, 0x29, 0x64, 0x67, 0xaa, 0xa1, 0xc6, 0x7d, 0xc9, 0xa9, 0xc7, 0x05,
- 0xfe, 0xaf, 0x30, 0x2c, 0xf2, 0xb0, 0x61, 0xa5, 0x6a, 0x39, 0xaa, 0x1d, 0x95, 0xb2, 0x36, 0xf7,
- 0x2c, 0x0d, 0xca, 0x42, 0x1b, 0x9e, 0x00, 0x9f, 0x37, 0xcb, 0xbb, 0x95, 0xbd, 0xfa, 0xc1, 0xfe,
- 0xa3, 0x5a, 0x32, 0xbf, 0x54, 0xe4, 0x8d, 0xdf, 0x52, 0x86, 0x95, 0xa1, 0x3a, 0x17, 0xe8, 0x9b,
- 0x42, 0xf3, 0x61, 0xcc, 0x6c, 0xc0, 0xa7, 0xa8, 0x11, 0x01, 0xe3, 0x1e, 0x17, 0x10, 0x88, 0x2c,
- 0xe6, 0x8c, 0xfa, 0x20, 0xfb, 0xda, 0x36, 0x9b, 0xc9, 0xac, 0xdd, 0xf8, 0x73, 0xc5, 0xb9, 0xb5,
- 0x52, 0xd5, 0x79, 0xb3, 0x62, 0x64, 0xe9, 0xba, 0xf0, 0x8f, 0xa8, 0x46, 0xa5, 0x07, 0x98, 0x42,
- 0x2f, 0x46, 0xd0, 0x53, 0x7e, 0x6b, 0x11, 0x21, 0xd7, 0x2a, 0xcb, 0x53, 0xb7, 0xe5, 0x91, 0x6b,
- 0x95, 0xd2, 0xa5, 0xb5, 0x4a, 0xdb, 0x52, 0xc8, 0xb4, 0x94, 0x20, 0x74, 0xb2, 0x2e, 0x2b, 0x77,
- 0x4b, 0x39, 0x53, 0x7e, 0x6b, 0x11, 0xd1, 0xf9, 0x50, 0x59, 0x31, 0x3a, 0x79, 0x3f, 0x96, 0x7a,
- 0x72, 0x64, 0x4f, 0xb5, 0x42, 0x4f, 0xce, 0xa2, 0x27, 0x07, 0xbf, 0xd2, 0x10, 0xa6, 0x0b, 0x44,
- 0x7f, 0x7e, 0x7f, 0xb2, 0x25, 0xff, 0xfe, 0x84, 0x7b, 0x4b, 0x7a, 0x05, 0xda, 0x49, 0x20, 0xd8,
- 0x95, 0xd9, 0x52, 0x55, 0xe0, 0x62, 0x80, 0xb5, 0xa2, 0x04, 0x7c, 0x89, 0xea, 0x99, 0xf7, 0x84,
- 0xb1, 0x90, 0xa9, 0x97, 0xb4, 0xf7, 0x80, 0x8a, 0x64, 0xbc, 0xa9, 0x27, 0xb3, 0x76, 0xbd, 0x97,
- 0x03, 0xde, 0xcf, 0xda, 0xf5, 0xa5, 0x73, 0x6b, 0x19, 0x9e, 0xe6, 0x72, 0x20, 0xcf, 0x55, 0x7d,
- 0x4a, 0xae, 0x63, 0x58, 0x9f, 0x6b, 0x09, 0xde, 0x3a, 0x41, 0xdf, 0xae, 0x19, 0x11, 0xde, 0x41,
- 0x95, 0x11, 0x5c, 0x65, 0x37, 0xd1, 0x4a, 0x3f, 0x71, 0x03, 0x6d, 0x4c, 0xe8, 0x38, 0xce, 0x6e,
- 0xdc, 0xb6, 0x95, 0x19, 0xbf, 0x96, 0x8f, 0xb4, 0xce, 0x0b, 0x0d, 0x2d, 0xe7, 0xc0, 0xa7, 0xa8,
- 0x9a, 0xfe, 0x93, 0xd5, 0xcb, 0xff, 0xe1, 0x61, 0x2f, 0xff, 0x2f, 0xcf, 0x87, 0xfc, 0x0f, 0x96,
- 0x5a, 0x96, 0xa4, 0xe0, 0xef, 0xd1, 0x96, 0x0f, 0x9c, 0x53, 0x57, 0x65, 0x36, 0xbf, 0x56, 0x41,
- 0x5b, 0xfd, 0xcc, 0x6d, 0xcd, 0xcf, 0x4d, 0x32, 0xbd, 0xd5, 0x4b, 0xd7, 0xb7, 0x7a, 0xe9, 0xe6,
- 0x56, 0x2f, 0x3d, 0x4f, 0x74, 0x6d, 0x9a, 0xe8, 0xda, 0x75, 0xa2, 0x6b, 0x37, 0x89, 0xae, 0xbd,
- 0x4d, 0x74, 0xed, 0xe5, 0x3b, 0xbd, 0xf4, 0x4f, 0x6d, 0x3e, 0xb8, 0x8f, 0x01, 0x00, 0x00, 0xff,
- 0xff, 0x68, 0x82, 0x7b, 0x73, 0x9e, 0x07, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.proto b/vendor/k8s.io/api/storage/v1alpha1/generated.proto
deleted file mode 100644
index 289ef5f3e..000000000
--- a/vendor/k8s.io/api/storage/v1alpha1/generated.proto
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.storage.v1alpha1;
-
-import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1alpha1";
-
-// VolumeAttachment captures the intent to attach or detach the specified volume
-// to/from the specified node.
-//
-// VolumeAttachment objects are non-namespaced.
-message VolumeAttachment {
- // Standard object metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired attach/detach volume behavior.
- // Populated by the Kubernetes system.
- optional VolumeAttachmentSpec spec = 2;
-
- // Status of the VolumeAttachment request.
- // Populated by the entity completing the attach or detach
- // operation, i.e. the external-attacher.
- // +optional
- optional VolumeAttachmentStatus status = 3;
-}
-
-// VolumeAttachmentList is a collection of VolumeAttachment objects.
-message VolumeAttachmentList {
- // Standard list metadata
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of VolumeAttachments
- repeated VolumeAttachment items = 2;
-}
-
-// VolumeAttachmentSource represents a volume that should be attached.
-// Right now only PersistenVolumes can be attached via external attacher,
-// in future we may allow also inline volumes in pods.
-// Exactly one member can be set.
-message VolumeAttachmentSource {
- // Name of the persistent volume to attach.
- // +optional
- optional string persistentVolumeName = 1;
-}
-
-// VolumeAttachmentSpec is the specification of a VolumeAttachment request.
-message VolumeAttachmentSpec {
- // Attacher indicates the name of the volume driver that MUST handle this
- // request. This is the name returned by GetPluginName().
- optional string attacher = 1;
-
- // Source represents the volume that should be attached.
- optional VolumeAttachmentSource source = 2;
-
- // The node that the volume should be attached to.
- optional string nodeName = 3;
-}
-
-// VolumeAttachmentStatus is the status of a VolumeAttachment request.
-message VolumeAttachmentStatus {
- // Indicates the volume is successfully attached.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- optional bool attached = 1;
-
- // Upon successful attach, this field is populated with any
- // information returned by the attach operation that must be passed
- // into subsequent WaitForAttach or Mount calls.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- // +optional
- map<string, string> attachmentMetadata = 2;
-
- // The last error encountered during attach operation, if any.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- // +optional
- optional VolumeError attachError = 3;
-
- // The last error encountered during detach operation, if any.
- // This field must only be set by the entity completing the detach
- // operation, i.e. the external-attacher.
- // +optional
- optional VolumeError detachError = 4;
-}
-
-// VolumeError captures an error encountered during a volume operation.
-message VolumeError {
- // Time the error was encountered.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1;
-
- // String detailing the error encountered during Attach or Detach operation.
- // This string maybe logged, so it should not contain sensitive
- // information.
- // +optional
- optional string message = 2;
-}
-
diff --git a/vendor/k8s.io/api/storage/v1alpha1/register.go b/vendor/k8s.io/api/storage/v1alpha1/register.go
deleted file mode 100644
index 7b81ee49c..000000000
--- a/vendor/k8s.io/api/storage/v1alpha1/register.go
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-Copyright 2017 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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "storage.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- AddToScheme = SchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &VolumeAttachment{},
- &VolumeAttachmentList{},
- )
-
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/storage/v1alpha1/types.go b/vendor/k8s.io/api/storage/v1alpha1/types.go
deleted file mode 100644
index 964bb5f7b..000000000
--- a/vendor/k8s.io/api/storage/v1alpha1/types.go
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-Copyright 2017 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 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// VolumeAttachment captures the intent to attach or detach the specified volume
-// to/from the specified node.
-//
-// VolumeAttachment objects are non-namespaced.
-type VolumeAttachment struct {
- metav1.TypeMeta `json:",inline"`
-
- // Standard object metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired attach/detach volume behavior.
- // Populated by the Kubernetes system.
- Spec VolumeAttachmentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status of the VolumeAttachment request.
- // Populated by the entity completing the attach or detach
- // operation, i.e. the external-attacher.
- // +optional
- Status VolumeAttachmentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// VolumeAttachmentList is a collection of VolumeAttachment objects.
-type VolumeAttachmentList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of VolumeAttachments
- Items []VolumeAttachment `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// VolumeAttachmentSpec is the specification of a VolumeAttachment request.
-type VolumeAttachmentSpec struct {
- // Attacher indicates the name of the volume driver that MUST handle this
- // request. This is the name returned by GetPluginName().
- Attacher string `json:"attacher" protobuf:"bytes,1,opt,name=attacher"`
-
- // Source represents the volume that should be attached.
- Source VolumeAttachmentSource `json:"source" protobuf:"bytes,2,opt,name=source"`
-
- // The node that the volume should be attached to.
- NodeName string `json:"nodeName" protobuf:"bytes,3,opt,name=nodeName"`
-}
-
-// VolumeAttachmentSource represents a volume that should be attached.
-// Right now only PersistenVolumes can be attached via external attacher,
-// in future we may allow also inline volumes in pods.
-// Exactly one member can be set.
-type VolumeAttachmentSource struct {
- // Name of the persistent volume to attach.
- // +optional
- PersistentVolumeName *string `json:"persistentVolumeName,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeName"`
-
- // Placeholder for *VolumeSource to accommodate inline volumes in pods.
-}
-
-// VolumeAttachmentStatus is the status of a VolumeAttachment request.
-type VolumeAttachmentStatus struct {
- // Indicates the volume is successfully attached.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- Attached bool `json:"attached" protobuf:"varint,1,opt,name=attached"`
-
- // Upon successful attach, this field is populated with any
- // information returned by the attach operation that must be passed
- // into subsequent WaitForAttach or Mount calls.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- // +optional
- AttachmentMetadata map[string]string `json:"attachmentMetadata,omitempty" protobuf:"bytes,2,rep,name=attachmentMetadata"`
-
- // The last error encountered during attach operation, if any.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- // +optional
- AttachError *VolumeError `json:"attachError,omitempty" protobuf:"bytes,3,opt,name=attachError,casttype=VolumeError"`
-
- // The last error encountered during detach operation, if any.
- // This field must only be set by the entity completing the detach
- // operation, i.e. the external-attacher.
- // +optional
- DetachError *VolumeError `json:"detachError,omitempty" protobuf:"bytes,4,opt,name=detachError,casttype=VolumeError"`
-}
-
-// VolumeError captures an error encountered during a volume operation.
-type VolumeError struct {
- // Time the error was encountered.
- // +optional
- Time metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"`
-
- // String detailing the error encountered during Attach or Detach operation.
- // This string maybe logged, so it should not contain sensitive
- // information.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
-}
diff --git a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go
deleted file mode 100644
index faca8e939..000000000
--- a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-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
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_VolumeAttachment = map[string]string{
- "": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.",
- "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.",
- "status": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.",
-}
-
-func (VolumeAttachment) SwaggerDoc() map[string]string {
- return map_VolumeAttachment
-}
-
-var map_VolumeAttachmentList = map[string]string{
- "": "VolumeAttachmentList is a collection of VolumeAttachment objects.",
- "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is the list of VolumeAttachments",
-}
-
-func (VolumeAttachmentList) SwaggerDoc() map[string]string {
- return map_VolumeAttachmentList
-}
-
-var map_VolumeAttachmentSource = map[string]string{
- "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.",
- "persistentVolumeName": "Name of the persistent volume to attach.",
-}
-
-func (VolumeAttachmentSource) SwaggerDoc() map[string]string {
- return map_VolumeAttachmentSource
-}
-
-var map_VolumeAttachmentSpec = map[string]string{
- "": "VolumeAttachmentSpec is the specification of a VolumeAttachment request.",
- "attacher": "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().",
- "source": "Source represents the volume that should be attached.",
- "nodeName": "The node that the volume should be attached to.",
-}
-
-func (VolumeAttachmentSpec) SwaggerDoc() map[string]string {
- return map_VolumeAttachmentSpec
-}
-
-var map_VolumeAttachmentStatus = map[string]string{
- "": "VolumeAttachmentStatus is the status of a VolumeAttachment request.",
- "attached": "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.",
- "attachmentMetadata": "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.",
- "attachError": "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.",
- "detachError": "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.",
-}
-
-func (VolumeAttachmentStatus) SwaggerDoc() map[string]string {
- return map_VolumeAttachmentStatus
-}
-
-var map_VolumeError = map[string]string{
- "": "VolumeError captures an error encountered during a volume operation.",
- "time": "Time the error was encountered.",
- "message": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.",
-}
-
-func (VolumeError) SwaggerDoc() map[string]string {
- return map_VolumeError
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go
deleted file mode 100644
index 04221c67c..000000000
--- a/vendor/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,186 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeAttachment) DeepCopyInto(out *VolumeAttachment) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachment.
-func (in *VolumeAttachment) DeepCopy() *VolumeAttachment {
- if in == nil {
- return nil
- }
- out := new(VolumeAttachment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *VolumeAttachment) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeAttachmentList) DeepCopyInto(out *VolumeAttachmentList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]VolumeAttachment, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentList.
-func (in *VolumeAttachmentList) DeepCopy() *VolumeAttachmentList {
- if in == nil {
- return nil
- }
- out := new(VolumeAttachmentList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *VolumeAttachmentList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeAttachmentSource) DeepCopyInto(out *VolumeAttachmentSource) {
- *out = *in
- if in.PersistentVolumeName != nil {
- in, out := &in.PersistentVolumeName, &out.PersistentVolumeName
- if *in == nil {
- *out = nil
- } else {
- *out = new(string)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentSource.
-func (in *VolumeAttachmentSource) DeepCopy() *VolumeAttachmentSource {
- if in == nil {
- return nil
- }
- out := new(VolumeAttachmentSource)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeAttachmentSpec) DeepCopyInto(out *VolumeAttachmentSpec) {
- *out = *in
- in.Source.DeepCopyInto(&out.Source)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentSpec.
-func (in *VolumeAttachmentSpec) DeepCopy() *VolumeAttachmentSpec {
- if in == nil {
- return nil
- }
- out := new(VolumeAttachmentSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeAttachmentStatus) DeepCopyInto(out *VolumeAttachmentStatus) {
- *out = *in
- if in.AttachmentMetadata != nil {
- in, out := &in.AttachmentMetadata, &out.AttachmentMetadata
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- }
- if in.AttachError != nil {
- in, out := &in.AttachError, &out.AttachError
- if *in == nil {
- *out = nil
- } else {
- *out = new(VolumeError)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.DetachError != nil {
- in, out := &in.DetachError, &out.DetachError
- if *in == nil {
- *out = nil
- } else {
- *out = new(VolumeError)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentStatus.
-func (in *VolumeAttachmentStatus) DeepCopy() *VolumeAttachmentStatus {
- if in == nil {
- return nil
- }
- out := new(VolumeAttachmentStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeError) DeepCopyInto(out *VolumeError) {
- *out = *in
- in.Time.DeepCopyInto(&out.Time)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeError.
-func (in *VolumeError) DeepCopy() *VolumeError {
- if in == nil {
- return nil
- }
- out := new(VolumeError)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/api/storage/v1beta1/doc.go b/vendor/k8s.io/api/storage/v1beta1/doc.go
deleted file mode 100644
index 8957a4cf2..000000000
--- a/vendor/k8s.io/api/storage/v1beta1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +groupName=storage.k8s.io
-// +k8s:openapi-gen=true
-package v1beta1 // import "k8s.io/api/storage/v1beta1"
diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.pb.go b/vendor/k8s.io/api/storage/v1beta1/generated.pb.go
deleted file mode 100644
index 425d0e717..000000000
--- a/vendor/k8s.io/api/storage/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,2211 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/api/storage/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/api/storage/v1beta1/generated.proto
-
- It has these top-level messages:
- StorageClass
- StorageClassList
- VolumeAttachment
- VolumeAttachmentList
- VolumeAttachmentSource
- VolumeAttachmentSpec
- VolumeAttachmentStatus
- VolumeError
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_api_core_v1 "k8s.io/api/core/v1"
-
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *StorageClass) Reset() { *m = StorageClass{} }
-func (*StorageClass) ProtoMessage() {}
-func (*StorageClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *StorageClassList) Reset() { *m = StorageClassList{} }
-func (*StorageClassList) ProtoMessage() {}
-func (*StorageClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} }
-func (*VolumeAttachment) ProtoMessage() {}
-func (*VolumeAttachment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} }
-func (*VolumeAttachmentList) ProtoMessage() {}
-func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} }
-func (*VolumeAttachmentSource) ProtoMessage() {}
-func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} }
-func (*VolumeAttachmentSpec) ProtoMessage() {}
-func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
-
-func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} }
-func (*VolumeAttachmentStatus) ProtoMessage() {}
-func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
-
-func (m *VolumeError) Reset() { *m = VolumeError{} }
-func (*VolumeError) ProtoMessage() {}
-func (*VolumeError) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
-
-func init() {
- proto.RegisterType((*StorageClass)(nil), "k8s.io.api.storage.v1beta1.StorageClass")
- proto.RegisterType((*StorageClassList)(nil), "k8s.io.api.storage.v1beta1.StorageClassList")
- proto.RegisterType((*VolumeAttachment)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachment")
- proto.RegisterType((*VolumeAttachmentList)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachmentList")
- proto.RegisterType((*VolumeAttachmentSource)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachmentSource")
- proto.RegisterType((*VolumeAttachmentSpec)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachmentSpec")
- proto.RegisterType((*VolumeAttachmentStatus)(nil), "k8s.io.api.storage.v1beta1.VolumeAttachmentStatus")
- proto.RegisterType((*VolumeError)(nil), "k8s.io.api.storage.v1beta1.VolumeError")
-}
-func (m *StorageClass) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provisioner)))
- i += copy(dAtA[i:], m.Provisioner)
- if len(m.Parameters) > 0 {
- keysForParameters := make([]string, 0, len(m.Parameters))
- for k := range m.Parameters {
- keysForParameters = append(keysForParameters, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
- for _, k := range keysForParameters {
- dAtA[i] = 0x1a
- i++
- v := m.Parameters[string(k)]
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
- i += copy(dAtA[i:], v)
- }
- }
- if m.ReclaimPolicy != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ReclaimPolicy)))
- i += copy(dAtA[i:], *m.ReclaimPolicy)
- }
- if len(m.MountOptions) > 0 {
- for _, s := range m.MountOptions {
- dAtA[i] = 0x2a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if m.AllowVolumeExpansion != nil {
- dAtA[i] = 0x30
- i++
- if *m.AllowVolumeExpansion {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.VolumeBindingMode != nil {
- dAtA[i] = 0x3a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VolumeBindingMode)))
- i += copy(dAtA[i:], *m.VolumeBindingMode)
- }
- return i, nil
-}
-
-func (m *StorageClassList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *StorageClassList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n2, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *VolumeAttachment) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeAttachment) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
- n4, err := m.Spec.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
- n5, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- return i, nil
-}
-
-func (m *VolumeAttachmentList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeAttachmentList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
- n6, err := m.ListMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *VolumeAttachmentSource) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeAttachmentSource) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.PersistentVolumeName != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PersistentVolumeName)))
- i += copy(dAtA[i:], *m.PersistentVolumeName)
- }
- return i, nil
-}
-
-func (m *VolumeAttachmentSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeAttachmentSpec) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Attacher)))
- i += copy(dAtA[i:], m.Attacher)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Source.Size()))
- n7, err := m.Source.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName)))
- i += copy(dAtA[i:], m.NodeName)
- return i, nil
-}
-
-func (m *VolumeAttachmentStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeAttachmentStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0x8
- i++
- if m.Attached {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- if len(m.AttachmentMetadata) > 0 {
- keysForAttachmentMetadata := make([]string, 0, len(m.AttachmentMetadata))
- for k := range m.AttachmentMetadata {
- keysForAttachmentMetadata = append(keysForAttachmentMetadata, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata)
- for _, k := range keysForAttachmentMetadata {
- dAtA[i] = 0x12
- i++
- v := m.AttachmentMetadata[string(k)]
- mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
- i += copy(dAtA[i:], v)
- }
- }
- if m.AttachError != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.AttachError.Size()))
- n8, err := m.AttachError.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- }
- if m.DetachError != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.DetachError.Size()))
- n9, err := m.DetachError.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- }
- return i, nil
-}
-
-func (m *VolumeError) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *VolumeError) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.Time.Size()))
- n10, err := m.Time.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- dAtA[i] = 0x12
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i += copy(dAtA[i:], m.Message)
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *StorageClass) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Provisioner)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Parameters) > 0 {
- for k, v := range m.Parameters {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- if m.ReclaimPolicy != nil {
- l = len(*m.ReclaimPolicy)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if len(m.MountOptions) > 0 {
- for _, s := range m.MountOptions {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.AllowVolumeExpansion != nil {
- n += 2
- }
- if m.VolumeBindingMode != nil {
- l = len(*m.VolumeBindingMode)
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *StorageClassList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *VolumeAttachment) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *VolumeAttachmentList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *VolumeAttachmentSource) Size() (n int) {
- var l int
- _ = l
- if m.PersistentVolumeName != nil {
- l = len(*m.PersistentVolumeName)
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *VolumeAttachmentSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Attacher)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Source.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.NodeName)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *VolumeAttachmentStatus) Size() (n int) {
- var l int
- _ = l
- n += 2
- if len(m.AttachmentMetadata) > 0 {
- for k, v := range m.AttachmentMetadata {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- if m.AttachError != nil {
- l = m.AttachError.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.DetachError != nil {
- l = m.DetachError.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *VolumeError) Size() (n int) {
- var l int
- _ = l
- l = m.Time.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *StorageClass) String() string {
- if this == nil {
- return "nil"
- }
- keysForParameters := make([]string, 0, len(this.Parameters))
- for k := range this.Parameters {
- keysForParameters = append(keysForParameters, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
- mapStringForParameters := "map[string]string{"
- for _, k := range keysForParameters {
- mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k])
- }
- mapStringForParameters += "}"
- s := strings.Join([]string{`&StorageClass{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`,
- `Parameters:` + mapStringForParameters + `,`,
- `ReclaimPolicy:` + valueToStringGenerated(this.ReclaimPolicy) + `,`,
- `MountOptions:` + fmt.Sprintf("%v", this.MountOptions) + `,`,
- `AllowVolumeExpansion:` + valueToStringGenerated(this.AllowVolumeExpansion) + `,`,
- `VolumeBindingMode:` + valueToStringGenerated(this.VolumeBindingMode) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *StorageClassList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StorageClassList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StorageClass", "StorageClass", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeAttachment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&VolumeAttachment{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "VolumeAttachmentSpec", "VolumeAttachmentSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "VolumeAttachmentStatus", "VolumeAttachmentStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeAttachmentList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&VolumeAttachmentList{`,
- `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "VolumeAttachment", "VolumeAttachment", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeAttachmentSource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&VolumeAttachmentSource{`,
- `PersistentVolumeName:` + valueToStringGenerated(this.PersistentVolumeName) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeAttachmentSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&VolumeAttachmentSpec{`,
- `Attacher:` + fmt.Sprintf("%v", this.Attacher) + `,`,
- `Source:` + strings.Replace(strings.Replace(this.Source.String(), "VolumeAttachmentSource", "VolumeAttachmentSource", 1), `&`, ``, 1) + `,`,
- `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeAttachmentStatus) String() string {
- if this == nil {
- return "nil"
- }
- keysForAttachmentMetadata := make([]string, 0, len(this.AttachmentMetadata))
- for k := range this.AttachmentMetadata {
- keysForAttachmentMetadata = append(keysForAttachmentMetadata, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata)
- mapStringForAttachmentMetadata := "map[string]string{"
- for _, k := range keysForAttachmentMetadata {
- mapStringForAttachmentMetadata += fmt.Sprintf("%v: %v,", k, this.AttachmentMetadata[k])
- }
- mapStringForAttachmentMetadata += "}"
- s := strings.Join([]string{`&VolumeAttachmentStatus{`,
- `Attached:` + fmt.Sprintf("%v", this.Attached) + `,`,
- `AttachmentMetadata:` + mapStringForAttachmentMetadata + `,`,
- `AttachError:` + strings.Replace(fmt.Sprintf("%v", this.AttachError), "VolumeError", "VolumeError", 1) + `,`,
- `DetachError:` + strings.Replace(fmt.Sprintf("%v", this.DetachError), "VolumeError", "VolumeError", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *VolumeError) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&VolumeError{`,
- `Time:` + strings.Replace(strings.Replace(this.Time.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *StorageClass) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StorageClass: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StorageClass: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Provisioner", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Provisioner = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.Parameters == nil {
- m.Parameters = make(map[string]string)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapvalue uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapvalue := int(stringLenmapvalue)
- if intStringLenmapvalue < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapvalue := iNdEx + intStringLenmapvalue
- if postStringIndexmapvalue > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
- iNdEx = postStringIndexmapvalue
- m.Parameters[mapkey] = mapvalue
- } else {
- var mapvalue string
- m.Parameters[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReclaimPolicy", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := k8s_io_api_core_v1.PersistentVolumeReclaimPolicy(dAtA[iNdEx:postIndex])
- m.ReclaimPolicy = &s
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MountOptions", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.MountOptions = append(m.MountOptions, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowVolumeExpansion", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.AllowVolumeExpansion = &b
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field VolumeBindingMode", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := VolumeBindingMode(dAtA[iNdEx:postIndex])
- m.VolumeBindingMode = &s
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *StorageClassList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StorageClassList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StorageClassList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, StorageClass{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeAttachment) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeAttachment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeAttachment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeAttachmentList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeAttachmentList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeAttachmentList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, VolumeAttachment{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeAttachmentSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeAttachmentSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeAttachmentSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PersistentVolumeName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.PersistentVolumeName = &s
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeAttachmentSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeAttachmentSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeAttachmentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Attacher", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Attacher = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NodeName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeAttachmentStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeAttachmentStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeAttachmentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Attached", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Attached = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AttachmentMetadata", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.AttachmentMetadata == nil {
- m.AttachmentMetadata = make(map[string]string)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapvalue uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapvalue := int(stringLenmapvalue)
- if intStringLenmapvalue < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapvalue := iNdEx + intStringLenmapvalue
- if postStringIndexmapvalue > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
- iNdEx = postStringIndexmapvalue
- m.AttachmentMetadata[mapkey] = mapvalue
- } else {
- var mapvalue string
- m.AttachmentMetadata[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AttachError", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.AttachError == nil {
- m.AttachError = &VolumeError{}
- }
- if err := m.AttachError.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DetachError", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.DetachError == nil {
- m.DetachError = &VolumeError{}
- }
- if err := m.DetachError.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *VolumeError) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VolumeError: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeError: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Time.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Message = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/storage/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 977 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x6f, 0x1b, 0x45,
- 0x14, 0xcf, 0xc6, 0xf9, 0x1c, 0x27, 0x34, 0x1d, 0x22, 0xb0, 0x7c, 0x58, 0x47, 0xbe, 0x60, 0xaa,
- 0x66, 0xb7, 0x09, 0x05, 0x45, 0x48, 0x1c, 0xb2, 0x25, 0x07, 0x50, 0xdc, 0x86, 0x29, 0xaa, 0x50,
- 0xc5, 0x81, 0xc9, 0xee, 0xab, 0x33, 0xd8, 0xfb, 0xa1, 0x99, 0x59, 0xd3, 0xdc, 0x38, 0x71, 0xe6,
- 0xc4, 0x95, 0x0b, 0xff, 0x07, 0x47, 0x72, 0x42, 0x3d, 0xf6, 0x64, 0x91, 0xe5, 0xbf, 0x88, 0x38,
- 0xa0, 0x99, 0x9d, 0x78, 0xd7, 0x5e, 0x5b, 0x4d, 0x7a, 0xe8, 0x2d, 0xf3, 0xde, 0xfb, 0xfd, 0xde,
- 0xd7, 0xef, 0xad, 0x83, 0x1e, 0xf5, 0x0f, 0x84, 0xc3, 0x62, 0xb7, 0x9f, 0x9e, 0x02, 0x8f, 0x40,
- 0x82, 0x70, 0x87, 0x10, 0x05, 0x31, 0x77, 0x8d, 0x83, 0x26, 0xcc, 0x15, 0x32, 0xe6, 0xb4, 0x07,
- 0xee, 0x70, 0xef, 0x14, 0x24, 0xdd, 0x73, 0x7b, 0x10, 0x01, 0xa7, 0x12, 0x02, 0x27, 0xe1, 0xb1,
- 0x8c, 0x71, 0x33, 0x8f, 0x75, 0x68, 0xc2, 0x1c, 0x13, 0xeb, 0x98, 0xd8, 0xe6, 0x6e, 0x8f, 0xc9,
- 0xb3, 0xf4, 0xd4, 0xf1, 0xe3, 0xd0, 0xed, 0xc5, 0xbd, 0xd8, 0xd5, 0x90, 0xd3, 0xf4, 0x85, 0x7e,
- 0xe9, 0x87, 0xfe, 0x2b, 0xa7, 0x6a, 0xb6, 0x4b, 0x69, 0xfd, 0x98, 0xab, 0x9c, 0xd3, 0xe9, 0x9a,
- 0xdd, 0x22, 0x06, 0x5e, 0x4a, 0x88, 0x04, 0x8b, 0x23, 0xb1, 0x4b, 0x13, 0x26, 0x80, 0x0f, 0x81,
- 0xbb, 0x49, 0xbf, 0xa7, 0x7c, 0x62, 0x32, 0x60, 0x5e, 0xf5, 0xcd, 0x87, 0x05, 0x5d, 0x48, 0xfd,
- 0x33, 0x16, 0x01, 0x3f, 0x2f, 0x38, 0x42, 0x90, 0x74, 0x56, 0x11, 0xee, 0x3c, 0x14, 0x4f, 0x23,
- 0xc9, 0x42, 0xa8, 0x00, 0x3e, 0x7b, 0x13, 0x40, 0xf8, 0x67, 0x10, 0xd2, 0x0a, 0xee, 0x93, 0x79,
- 0xb8, 0x54, 0xb2, 0x81, 0xcb, 0x22, 0x29, 0x24, 0x9f, 0x06, 0xb5, 0x7f, 0x5f, 0x46, 0x1b, 0x4f,
- 0xf3, 0x4d, 0x3c, 0x1a, 0x50, 0x21, 0xf0, 0x0f, 0x68, 0x4d, 0x75, 0x12, 0x50, 0x49, 0x1b, 0xd6,
- 0x8e, 0xd5, 0xa9, 0xef, 0x3f, 0x70, 0x8a, 0xad, 0x8d, 0x89, 0x9d, 0xa4, 0xdf, 0x53, 0x06, 0xe1,
- 0xa8, 0x68, 0x67, 0xb8, 0xe7, 0x3c, 0x39, 0xfd, 0x11, 0x7c, 0xd9, 0x05, 0x49, 0x3d, 0x7c, 0x31,
- 0x6a, 0x2d, 0x64, 0xa3, 0x16, 0x2a, 0x6c, 0x64, 0xcc, 0x8a, 0x3f, 0x45, 0xf5, 0x84, 0xc7, 0x43,
- 0xa6, 0x86, 0x0d, 0xbc, 0xb1, 0xb8, 0x63, 0x75, 0xd6, 0xbd, 0xf7, 0x0d, 0xa4, 0x7e, 0x52, 0xb8,
- 0x48, 0x39, 0x0e, 0x0f, 0x10, 0x4a, 0x28, 0xa7, 0x21, 0x48, 0xe0, 0xa2, 0x51, 0xdb, 0xa9, 0x75,
- 0xea, 0xfb, 0x07, 0xce, 0x7c, 0x41, 0x39, 0xe5, 0xb6, 0x9c, 0x93, 0x31, 0xf4, 0x28, 0x92, 0xfc,
- 0xbc, 0x28, 0xb1, 0x70, 0x90, 0x12, 0x3f, 0xee, 0xa3, 0x4d, 0x0e, 0xfe, 0x80, 0xb2, 0xf0, 0x24,
- 0x1e, 0x30, 0xff, 0xbc, 0xb1, 0xa4, 0xcb, 0x3c, 0xca, 0x46, 0xad, 0x4d, 0x52, 0x76, 0x5c, 0x8d,
- 0x5a, 0x0f, 0xaa, 0x52, 0x74, 0x4e, 0x80, 0x0b, 0x26, 0x24, 0x44, 0xf2, 0x59, 0x3c, 0x48, 0x43,
- 0x98, 0xc0, 0x90, 0x49, 0x6e, 0xfc, 0x10, 0x6d, 0x84, 0x71, 0x1a, 0xc9, 0x27, 0x89, 0x54, 0x02,
- 0x6c, 0x2c, 0xef, 0xd4, 0x3a, 0xeb, 0xde, 0x56, 0x36, 0x6a, 0x6d, 0x74, 0x4b, 0x76, 0x32, 0x11,
- 0x85, 0x8f, 0xd1, 0x36, 0x1d, 0x0c, 0xe2, 0x9f, 0xf2, 0x04, 0x47, 0x2f, 0x13, 0xaa, 0xf5, 0xdb,
- 0x58, 0xd9, 0xb1, 0x3a, 0x6b, 0x5e, 0x23, 0x1b, 0xb5, 0xb6, 0x0f, 0x67, 0xf8, 0xc9, 0x4c, 0x14,
- 0xfe, 0x0e, 0xdd, 0x1d, 0x6a, 0x93, 0xc7, 0xa2, 0x80, 0x45, 0xbd, 0x6e, 0x1c, 0x40, 0x63, 0x55,
- 0x37, 0x7d, 0x2f, 0x1b, 0xb5, 0xee, 0x3e, 0x9b, 0x76, 0x5e, 0xcd, 0x32, 0x92, 0x2a, 0x49, 0xf3,
- 0x0b, 0x74, 0x67, 0x6a, 0xfa, 0x78, 0x0b, 0xd5, 0xfa, 0x70, 0xae, 0xf5, 0xb5, 0x4e, 0xd4, 0x9f,
- 0x78, 0x1b, 0x2d, 0x0f, 0xe9, 0x20, 0x85, 0x5c, 0x0e, 0x24, 0x7f, 0x7c, 0xbe, 0x78, 0x60, 0xb5,
- 0xff, 0xb4, 0xd0, 0x56, 0x79, 0x95, 0xc7, 0x4c, 0x48, 0xfc, 0x7d, 0x45, 0xa5, 0xce, 0xcd, 0x54,
- 0xaa, 0xd0, 0x5a, 0xa3, 0x5b, 0x46, 0x00, 0x6b, 0xd7, 0x96, 0x92, 0x42, 0xbb, 0x68, 0x99, 0x49,
- 0x08, 0x45, 0x63, 0x51, 0xab, 0xac, 0x73, 0x53, 0x95, 0x79, 0x9b, 0x86, 0x74, 0xf9, 0x2b, 0x05,
- 0x27, 0x39, 0x4b, 0xfb, 0x8f, 0x45, 0xb4, 0x95, 0x4f, 0xea, 0x50, 0x4a, 0xea, 0x9f, 0x85, 0x10,
- 0xc9, 0x77, 0x70, 0x67, 0x04, 0x2d, 0x89, 0x04, 0x7c, 0x3d, 0xd1, 0x49, 0xf6, 0x4a, 0x13, 0xd3,
- 0xd5, 0x3d, 0x4d, 0xc0, 0xf7, 0x36, 0x0c, 0xfb, 0x92, 0x7a, 0x11, 0xcd, 0x85, 0x9f, 0xa3, 0x15,
- 0x21, 0xa9, 0x4c, 0xd5, 0x01, 0x2a, 0xd6, 0xfd, 0x5b, 0xb1, 0x6a, 0xa4, 0xf7, 0x9e, 0xe1, 0x5d,
- 0xc9, 0xdf, 0xc4, 0x30, 0xb6, 0xff, 0xb2, 0xd0, 0xf6, 0x34, 0xe4, 0x1d, 0x2c, 0xfb, 0x9b, 0xc9,
- 0x65, 0xdf, 0xbf, 0x4d, 0x47, 0x73, 0x16, 0xfe, 0x02, 0x7d, 0x50, 0xe9, 0x3d, 0x4e, 0xb9, 0x0f,
- 0xea, 0x66, 0x93, 0xa9, 0x2f, 0xc3, 0x63, 0x1a, 0x42, 0x7e, 0x09, 0xf9, 0xcd, 0x9e, 0xcc, 0xf0,
- 0x93, 0x99, 0xa8, 0xf6, 0xdf, 0x33, 0x26, 0xa6, 0x96, 0x85, 0xef, 0xa3, 0x35, 0xaa, 0x2d, 0xc0,
- 0x0d, 0xf5, 0x78, 0x02, 0x87, 0xc6, 0x4e, 0xc6, 0x11, 0x7a, 0xa9, 0xba, 0x3c, 0x23, 0x95, 0xdb,
- 0x2d, 0x55, 0x23, 0x4b, 0x4b, 0xd5, 0x6f, 0x62, 0x18, 0x55, 0x25, 0x51, 0x1c, 0xe4, 0x4d, 0xd6,
- 0x26, 0x2b, 0x79, 0x6c, 0xec, 0x64, 0x1c, 0xd1, 0xfe, 0xaf, 0x36, 0x63, 0x72, 0x5a, 0x1d, 0xa5,
- 0x96, 0x02, 0xdd, 0xd2, 0x5a, 0xa5, 0xa5, 0x60, 0xdc, 0x52, 0x80, 0x7f, 0xb3, 0x10, 0xa6, 0x63,
- 0x8a, 0xee, 0xb5, 0x7a, 0xf2, 0x15, 0x7f, 0x7d, 0x7b, 0xd1, 0x3a, 0x87, 0x15, 0xb2, 0xfc, 0x77,
- 0xa4, 0x69, 0x8a, 0xc0, 0xd5, 0x00, 0x32, 0xa3, 0x02, 0xcc, 0x50, 0x3d, 0xb7, 0x1e, 0x71, 0x1e,
- 0x73, 0x73, 0x45, 0x1f, 0xbd, 0xb9, 0x20, 0x1d, 0xee, 0xd9, 0xea, 0x17, 0xf2, 0xb0, 0xc0, 0x5f,
- 0x8d, 0x5a, 0xf5, 0x92, 0x9f, 0x94, 0xb9, 0x55, 0xaa, 0x00, 0x8a, 0x54, 0x4b, 0x6f, 0x91, 0xea,
- 0x4b, 0x98, 0x9f, 0xaa, 0xc4, 0xdd, 0x3c, 0x42, 0x1f, 0xce, 0x19, 0xd0, 0xad, 0x3e, 0xf5, 0xbf,
- 0x58, 0xa8, 0x9c, 0x03, 0x1f, 0xa3, 0x25, 0xf5, 0x0f, 0x8f, 0x39, 0xfa, 0x7b, 0x37, 0x3b, 0xfa,
- 0x6f, 0x59, 0x08, 0xc5, 0xb7, 0x4b, 0xbd, 0x88, 0x66, 0xc1, 0x1f, 0xa3, 0xd5, 0x10, 0x84, 0xa0,
- 0x3d, 0x93, 0xd9, 0xbb, 0x63, 0x82, 0x56, 0xbb, 0xb9, 0x99, 0x5c, 0xfb, 0xbd, 0xdd, 0x8b, 0x4b,
- 0x7b, 0xe1, 0xd5, 0xa5, 0xbd, 0xf0, 0xfa, 0xd2, 0x5e, 0xf8, 0x39, 0xb3, 0xad, 0x8b, 0xcc, 0xb6,
- 0x5e, 0x65, 0xb6, 0xf5, 0x3a, 0xb3, 0xad, 0x7f, 0x32, 0xdb, 0xfa, 0xf5, 0x5f, 0x7b, 0xe1, 0xf9,
- 0xaa, 0x99, 0xdb, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x7f, 0x8a, 0x3b, 0x1c, 0x0b, 0x00,
- 0x00,
-}
diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.proto b/vendor/k8s.io/api/storage/v1beta1/generated.proto
deleted file mode 100644
index 1c6db8d41..000000000
--- a/vendor/k8s.io/api/storage/v1beta1/generated.proto
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.api.storage.v1beta1;
-
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto";
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// StorageClass describes the parameters for a class of storage for
-// which PersistentVolumes can be dynamically provisioned.
-//
-// StorageClasses are non-namespaced; the name of the storage class
-// according to etcd is in ObjectMeta.Name.
-message StorageClass {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Provisioner indicates the type of the provisioner.
- optional string provisioner = 2;
-
- // Parameters holds the parameters for the provisioner that should
- // create volumes of this storage class.
- // +optional
- map<string, string> parameters = 3;
-
- // Dynamically provisioned PersistentVolumes of this storage class are
- // created with this reclaimPolicy. Defaults to Delete.
- // +optional
- optional string reclaimPolicy = 4;
-
- // Dynamically provisioned PersistentVolumes of this storage class are
- // created with these mountOptions, e.g. ["ro", "soft"]. Not validated -
- // mount of the PVs will simply fail if one is invalid.
- // +optional
- repeated string mountOptions = 5;
-
- // AllowVolumeExpansion shows whether the storage class allow volume expand
- // +optional
- optional bool allowVolumeExpansion = 6;
-
- // VolumeBindingMode indicates how PersistentVolumeClaims should be
- // provisioned and bound. When unset, VolumeBindingImmediate is used.
- // This field is alpha-level and is only honored by servers that enable
- // the VolumeScheduling feature.
- // +optional
- optional string volumeBindingMode = 7;
-}
-
-// StorageClassList is a collection of storage classes.
-message StorageClassList {
- // Standard list metadata
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of StorageClasses
- repeated StorageClass items = 2;
-}
-
-// VolumeAttachment captures the intent to attach or detach the specified volume
-// to/from the specified node.
-//
-// VolumeAttachment objects are non-namespaced.
-message VolumeAttachment {
- // Standard object metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Specification of the desired attach/detach volume behavior.
- // Populated by the Kubernetes system.
- optional VolumeAttachmentSpec spec = 2;
-
- // Status of the VolumeAttachment request.
- // Populated by the entity completing the attach or detach
- // operation, i.e. the external-attacher.
- // +optional
- optional VolumeAttachmentStatus status = 3;
-}
-
-// VolumeAttachmentList is a collection of VolumeAttachment objects.
-message VolumeAttachmentList {
- // Standard list metadata
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of VolumeAttachments
- repeated VolumeAttachment items = 2;
-}
-
-// VolumeAttachmentSource represents a volume that should be attached.
-// Right now only PersistenVolumes can be attached via external attacher,
-// in future we may allow also inline volumes in pods.
-// Exactly one member can be set.
-message VolumeAttachmentSource {
- // Name of the persistent volume to attach.
- // +optional
- optional string persistentVolumeName = 1;
-}
-
-// VolumeAttachmentSpec is the specification of a VolumeAttachment request.
-message VolumeAttachmentSpec {
- // Attacher indicates the name of the volume driver that MUST handle this
- // request. This is the name returned by GetPluginName().
- optional string attacher = 1;
-
- // Source represents the volume that should be attached.
- optional VolumeAttachmentSource source = 2;
-
- // The node that the volume should be attached to.
- optional string nodeName = 3;
-}
-
-// VolumeAttachmentStatus is the status of a VolumeAttachment request.
-message VolumeAttachmentStatus {
- // Indicates the volume is successfully attached.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- optional bool attached = 1;
-
- // Upon successful attach, this field is populated with any
- // information returned by the attach operation that must be passed
- // into subsequent WaitForAttach or Mount calls.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- // +optional
- map<string, string> attachmentMetadata = 2;
-
- // The last error encountered during attach operation, if any.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- // +optional
- optional VolumeError attachError = 3;
-
- // The last error encountered during detach operation, if any.
- // This field must only be set by the entity completing the detach
- // operation, i.e. the external-attacher.
- // +optional
- optional VolumeError detachError = 4;
-}
-
-// VolumeError captures an error encountered during a volume operation.
-message VolumeError {
- // Time the error was encountered.
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1;
-
- // String detailing the error encountered during Attach or Detach operation.
- // This string maybe logged, so it should not contain sensitive
- // information.
- // +optional
- optional string message = 2;
-}
-
diff --git a/vendor/k8s.io/api/storage/v1beta1/register.go b/vendor/k8s.io/api/storage/v1beta1/register.go
deleted file mode 100644
index 06b0f3d52..000000000
--- a/vendor/k8s.io/api/storage/v1beta1/register.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Copyright 2015 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "storage.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &StorageClass{},
- &StorageClassList{},
-
- &VolumeAttachment{},
- &VolumeAttachmentList{},
- )
-
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/api/storage/v1beta1/types.go b/vendor/k8s.io/api/storage/v1beta1/types.go
deleted file mode 100644
index 99c9e4594..000000000
--- a/vendor/k8s.io/api/storage/v1beta1/types.go
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
-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 v1beta1
-
-import (
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// StorageClass describes the parameters for a class of storage for
-// which PersistentVolumes can be dynamically provisioned.
-//
-// StorageClasses are non-namespaced; the name of the storage class
-// according to etcd is in ObjectMeta.Name.
-type StorageClass struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Provisioner indicates the type of the provisioner.
- Provisioner string `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"`
-
- // Parameters holds the parameters for the provisioner that should
- // create volumes of this storage class.
- // +optional
- Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
-
- // Dynamically provisioned PersistentVolumes of this storage class are
- // created with this reclaimPolicy. Defaults to Delete.
- // +optional
- ReclaimPolicy *v1.PersistentVolumeReclaimPolicy `json:"reclaimPolicy,omitempty" protobuf:"bytes,4,opt,name=reclaimPolicy,casttype=k8s.io/api/core/v1.PersistentVolumeReclaimPolicy"`
-
- // Dynamically provisioned PersistentVolumes of this storage class are
- // created with these mountOptions, e.g. ["ro", "soft"]. Not validated -
- // mount of the PVs will simply fail if one is invalid.
- // +optional
- MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,5,opt,name=mountOptions"`
-
- // AllowVolumeExpansion shows whether the storage class allow volume expand
- // +optional
- AllowVolumeExpansion *bool `json:"allowVolumeExpansion,omitempty" protobuf:"varint,6,opt,name=allowVolumeExpansion"`
-
- // VolumeBindingMode indicates how PersistentVolumeClaims should be
- // provisioned and bound. When unset, VolumeBindingImmediate is used.
- // This field is alpha-level and is only honored by servers that enable
- // the VolumeScheduling feature.
- // +optional
- VolumeBindingMode *VolumeBindingMode `json:"volumeBindingMode,omitempty" protobuf:"bytes,7,opt,name=volumeBindingMode"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// StorageClassList is a collection of storage classes.
-type StorageClassList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of StorageClasses
- Items []StorageClass `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// VolumeBindingMode indicates how PersistentVolumeClaims should be bound.
-type VolumeBindingMode string
-
-const (
- // VolumeBindingImmediate indicates that PersistentVolumeClaims should be
- // immediately provisioned and bound. This is the default mode.
- VolumeBindingImmediate VolumeBindingMode = "Immediate"
-
- // VolumeBindingWaitForFirstConsumer indicates that PersistentVolumeClaims
- // should not be provisioned and bound until the first Pod is created that
- // references the PeristentVolumeClaim. The volume provisioning and
- // binding will occur during Pod scheduing.
- VolumeBindingWaitForFirstConsumer VolumeBindingMode = "WaitForFirstConsumer"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// VolumeAttachment captures the intent to attach or detach the specified volume
-// to/from the specified node.
-//
-// VolumeAttachment objects are non-namespaced.
-type VolumeAttachment struct {
- metav1.TypeMeta `json:",inline"`
-
- // Standard object metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Specification of the desired attach/detach volume behavior.
- // Populated by the Kubernetes system.
- Spec VolumeAttachmentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status of the VolumeAttachment request.
- // Populated by the entity completing the attach or detach
- // operation, i.e. the external-attacher.
- // +optional
- Status VolumeAttachmentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// VolumeAttachmentList is a collection of VolumeAttachment objects.
-type VolumeAttachmentList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard list metadata
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is the list of VolumeAttachments
- Items []VolumeAttachment `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// VolumeAttachmentSpec is the specification of a VolumeAttachment request.
-type VolumeAttachmentSpec struct {
- // Attacher indicates the name of the volume driver that MUST handle this
- // request. This is the name returned by GetPluginName().
- Attacher string `json:"attacher" protobuf:"bytes,1,opt,name=attacher"`
-
- // Source represents the volume that should be attached.
- Source VolumeAttachmentSource `json:"source" protobuf:"bytes,2,opt,name=source"`
-
- // The node that the volume should be attached to.
- NodeName string `json:"nodeName" protobuf:"bytes,3,opt,name=nodeName"`
-}
-
-// VolumeAttachmentSource represents a volume that should be attached.
-// Right now only PersistenVolumes can be attached via external attacher,
-// in future we may allow also inline volumes in pods.
-// Exactly one member can be set.
-type VolumeAttachmentSource struct {
- // Name of the persistent volume to attach.
- // +optional
- PersistentVolumeName *string `json:"persistentVolumeName,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeName"`
-
- // Placeholder for *VolumeSource to accommodate inline volumes in pods.
-}
-
-// VolumeAttachmentStatus is the status of a VolumeAttachment request.
-type VolumeAttachmentStatus struct {
- // Indicates the volume is successfully attached.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- Attached bool `json:"attached" protobuf:"varint,1,opt,name=attached"`
-
- // Upon successful attach, this field is populated with any
- // information returned by the attach operation that must be passed
- // into subsequent WaitForAttach or Mount calls.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- // +optional
- AttachmentMetadata map[string]string `json:"attachmentMetadata,omitempty" protobuf:"bytes,2,rep,name=attachmentMetadata"`
-
- // The last error encountered during attach operation, if any.
- // This field must only be set by the entity completing the attach
- // operation, i.e. the external-attacher.
- // +optional
- AttachError *VolumeError `json:"attachError,omitempty" protobuf:"bytes,3,opt,name=attachError,casttype=VolumeError"`
-
- // The last error encountered during detach operation, if any.
- // This field must only be set by the entity completing the detach
- // operation, i.e. the external-attacher.
- // +optional
- DetachError *VolumeError `json:"detachError,omitempty" protobuf:"bytes,4,opt,name=detachError,casttype=VolumeError"`
-}
-
-// VolumeError captures an error encountered during a volume operation.
-type VolumeError struct {
- // Time the error was encountered.
- // +optional
- Time metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"`
-
- // String detailing the error encountered during Attach or Detach operation.
- // This string maybe logged, so it should not contain sensitive
- // information.
- // +optional
- Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
-}
diff --git a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index c9c20c453..000000000
--- a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_StorageClass = map[string]string{
- "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "provisioner": "Provisioner indicates the type of the provisioner.",
- "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.",
- "reclaimPolicy": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.",
- "mountOptions": "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.",
- "allowVolumeExpansion": "AllowVolumeExpansion shows whether the storage class allow volume expand",
- "volumeBindingMode": "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is alpha-level and is only honored by servers that enable the VolumeScheduling feature.",
-}
-
-func (StorageClass) SwaggerDoc() map[string]string {
- return map_StorageClass
-}
-
-var map_StorageClassList = map[string]string{
- "": "StorageClassList is a collection of storage classes.",
- "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is the list of StorageClasses",
-}
-
-func (StorageClassList) SwaggerDoc() map[string]string {
- return map_StorageClassList
-}
-
-var map_VolumeAttachment = map[string]string{
- "": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.",
- "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "spec": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.",
- "status": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.",
-}
-
-func (VolumeAttachment) SwaggerDoc() map[string]string {
- return map_VolumeAttachment
-}
-
-var map_VolumeAttachmentList = map[string]string{
- "": "VolumeAttachmentList is a collection of VolumeAttachment objects.",
- "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
- "items": "Items is the list of VolumeAttachments",
-}
-
-func (VolumeAttachmentList) SwaggerDoc() map[string]string {
- return map_VolumeAttachmentList
-}
-
-var map_VolumeAttachmentSource = map[string]string{
- "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.",
- "persistentVolumeName": "Name of the persistent volume to attach.",
-}
-
-func (VolumeAttachmentSource) SwaggerDoc() map[string]string {
- return map_VolumeAttachmentSource
-}
-
-var map_VolumeAttachmentSpec = map[string]string{
- "": "VolumeAttachmentSpec is the specification of a VolumeAttachment request.",
- "attacher": "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().",
- "source": "Source represents the volume that should be attached.",
- "nodeName": "The node that the volume should be attached to.",
-}
-
-func (VolumeAttachmentSpec) SwaggerDoc() map[string]string {
- return map_VolumeAttachmentSpec
-}
-
-var map_VolumeAttachmentStatus = map[string]string{
- "": "VolumeAttachmentStatus is the status of a VolumeAttachment request.",
- "attached": "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.",
- "attachmentMetadata": "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.",
- "attachError": "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.",
- "detachError": "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.",
-}
-
-func (VolumeAttachmentStatus) SwaggerDoc() map[string]string {
- return map_VolumeAttachmentStatus
-}
-
-var map_VolumeError = map[string]string{
- "": "VolumeError captures an error encountered during a volume operation.",
- "time": "Time the error was encountered.",
- "message": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.",
-}
-
-func (VolumeError) SwaggerDoc() map[string]string {
- return map_VolumeError
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index 9a6a7266d..000000000
--- a/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,285 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- v1 "k8s.io/api/core/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StorageClass) DeepCopyInto(out *StorageClass) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Parameters != nil {
- in, out := &in.Parameters, &out.Parameters
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- }
- if in.ReclaimPolicy != nil {
- in, out := &in.ReclaimPolicy, &out.ReclaimPolicy
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.PersistentVolumeReclaimPolicy)
- **out = **in
- }
- }
- if in.MountOptions != nil {
- in, out := &in.MountOptions, &out.MountOptions
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.AllowVolumeExpansion != nil {
- in, out := &in.AllowVolumeExpansion, &out.AllowVolumeExpansion
- if *in == nil {
- *out = nil
- } else {
- *out = new(bool)
- **out = **in
- }
- }
- if in.VolumeBindingMode != nil {
- in, out := &in.VolumeBindingMode, &out.VolumeBindingMode
- if *in == nil {
- *out = nil
- } else {
- *out = new(VolumeBindingMode)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClass.
-func (in *StorageClass) DeepCopy() *StorageClass {
- if in == nil {
- return nil
- }
- out := new(StorageClass)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *StorageClass) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *StorageClassList) DeepCopyInto(out *StorageClassList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]StorageClass, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassList.
-func (in *StorageClassList) DeepCopy() *StorageClassList {
- if in == nil {
- return nil
- }
- out := new(StorageClassList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *StorageClassList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeAttachment) DeepCopyInto(out *VolumeAttachment) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachment.
-func (in *VolumeAttachment) DeepCopy() *VolumeAttachment {
- if in == nil {
- return nil
- }
- out := new(VolumeAttachment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *VolumeAttachment) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeAttachmentList) DeepCopyInto(out *VolumeAttachmentList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]VolumeAttachment, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentList.
-func (in *VolumeAttachmentList) DeepCopy() *VolumeAttachmentList {
- if in == nil {
- return nil
- }
- out := new(VolumeAttachmentList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *VolumeAttachmentList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeAttachmentSource) DeepCopyInto(out *VolumeAttachmentSource) {
- *out = *in
- if in.PersistentVolumeName != nil {
- in, out := &in.PersistentVolumeName, &out.PersistentVolumeName
- if *in == nil {
- *out = nil
- } else {
- *out = new(string)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentSource.
-func (in *VolumeAttachmentSource) DeepCopy() *VolumeAttachmentSource {
- if in == nil {
- return nil
- }
- out := new(VolumeAttachmentSource)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeAttachmentSpec) DeepCopyInto(out *VolumeAttachmentSpec) {
- *out = *in
- in.Source.DeepCopyInto(&out.Source)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentSpec.
-func (in *VolumeAttachmentSpec) DeepCopy() *VolumeAttachmentSpec {
- if in == nil {
- return nil
- }
- out := new(VolumeAttachmentSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeAttachmentStatus) DeepCopyInto(out *VolumeAttachmentStatus) {
- *out = *in
- if in.AttachmentMetadata != nil {
- in, out := &in.AttachmentMetadata, &out.AttachmentMetadata
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- }
- if in.AttachError != nil {
- in, out := &in.AttachError, &out.AttachError
- if *in == nil {
- *out = nil
- } else {
- *out = new(VolumeError)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.DetachError != nil {
- in, out := &in.DetachError, &out.DetachError
- if *in == nil {
- *out = nil
- } else {
- *out = new(VolumeError)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentStatus.
-func (in *VolumeAttachmentStatus) DeepCopy() *VolumeAttachmentStatus {
- if in == nil {
- return nil
- }
- out := new(VolumeAttachmentStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *VolumeError) DeepCopyInto(out *VolumeError) {
- *out = *in
- in.Time.DeepCopyInto(&out.Time)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeError.
-func (in *VolumeError) DeepCopy() *VolumeError {
- if in == nil {
- return nil
- }
- out := new(VolumeError)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/apiextensions-apiserver/LICENSE b/vendor/k8s.io/apiextensions-apiserver/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/vendor/k8s.io/apiextensions-apiserver/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/vendor/k8s.io/apiextensions-apiserver/README.md b/vendor/k8s.io/apiextensions-apiserver/README.md
deleted file mode 100644
index be75b9ba4..000000000
--- a/vendor/k8s.io/apiextensions-apiserver/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# apiextensions-apiserver
-
-Implements: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/thirdpartyresources.md
-
-It provides an API for registering `CustomResourceDefinitions`.
-
-## Purpose
-
-This API server provides the implementation for `CustomResourceDefinitions` which is included as
-delegate server inside of `kube-apiserver`.
-
-
-## Compatibility
-
-HEAD of this repo will match HEAD of k8s.io/apiserver, k8s.io/apimachinery, and k8s.io/client-go.
-
-## Where does it come from?
-
-`apiextensions-apiserver` is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiextensions-apiserver.
-Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here.
diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go b/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go
deleted file mode 100644
index b80e80ac3..000000000
--- a/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-Copyright 2017 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 features
-
-import (
- utilfeature "k8s.io/apiserver/pkg/util/feature"
-)
-
-const (
- // Every feature gate should add method here following this template:
- //
- // // owner: @username
- // // alpha: v1.4
- // MyFeature() bool
-
- // owner: @sttts, @nikhita
- // alpha: v1.8
- // beta: v1.9
- //
- // CustomResourceValidation is a list of validation methods for CustomResources
- CustomResourceValidation utilfeature.Feature = "CustomResourceValidation"
-
- // owner: @sttts, @nikhita
- // alpha: v1.10
- //
- // CustomResourceSubresources defines the subresources for CustomResources
- CustomResourceSubresources utilfeature.Feature = "CustomResourceSubresources"
-)
-
-func init() {
- utilfeature.DefaultFeatureGate.Add(defaultKubernetesFeatureGates)
-}
-
-// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
-// To add a new feature, define a key for it above and add it here. The features will be
-// available throughout Kubernetes binaries.
-var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureSpec{
- CustomResourceValidation: {Default: true, PreRelease: utilfeature.Beta},
- CustomResourceSubresources: {Default: false, PreRelease: utilfeature.Alpha},
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go b/vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go
deleted file mode 100644
index f02fa8e43..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-Copyright 2014 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 equality
-
-import (
- "k8s.io/apimachinery/pkg/api/resource"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/conversion"
- "k8s.io/apimachinery/pkg/fields"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// Semantic can do semantic deep equality checks for api objects.
-// Example: apiequality.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true
-var Semantic = conversion.EqualitiesOrDie(
- func(a, b resource.Quantity) bool {
- // Ignore formatting, only care that numeric value stayed the same.
- // TODO: if we decide it's important, it should be safe to start comparing the format.
- //
- // Uninitialized quantities are equivalent to 0 quantities.
- return a.Cmp(b) == 0
- },
- func(a, b metav1.MicroTime) bool {
- return a.UTC() == b.UTC()
- },
- func(a, b metav1.Time) bool {
- return a.UTC() == b.UTC()
- },
- func(a, b labels.Selector) bool {
- return a.String() == b.String()
- },
- func(a, b fields.Selector) bool {
- return a.String() == b.String()
- },
-)
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go b/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go
deleted file mode 100644
index b6d42acf8..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2014 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 meta provides functions for retrieving API metadata from objects
-// belonging to the Kubernetes API
-package meta // import "k8s.io/apimachinery/pkg/api/meta"
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/errors.go b/vendor/k8s.io/apimachinery/pkg/api/meta/errors.go
deleted file mode 100644
index cbf5d0263..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/errors.go
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-Copyright 2014 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 meta
-
-import (
- "fmt"
-
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/util/sets"
-)
-
-// AmbiguousResourceError is returned if the RESTMapper finds multiple matches for a resource
-type AmbiguousResourceError struct {
- PartialResource schema.GroupVersionResource
-
- MatchingResources []schema.GroupVersionResource
- MatchingKinds []schema.GroupVersionKind
-}
-
-func (e *AmbiguousResourceError) Error() string {
- switch {
- case len(e.MatchingKinds) > 0 && len(e.MatchingResources) > 0:
- return fmt.Sprintf("%v matches multiple resources %v and kinds %v", e.PartialResource, e.MatchingResources, e.MatchingKinds)
- case len(e.MatchingKinds) > 0:
- return fmt.Sprintf("%v matches multiple kinds %v", e.PartialResource, e.MatchingKinds)
- case len(e.MatchingResources) > 0:
- return fmt.Sprintf("%v matches multiple resources %v", e.PartialResource, e.MatchingResources)
- }
- return fmt.Sprintf("%v matches multiple resources or kinds", e.PartialResource)
-}
-
-// AmbiguousKindError is returned if the RESTMapper finds multiple matches for a kind
-type AmbiguousKindError struct {
- PartialKind schema.GroupVersionKind
-
- MatchingResources []schema.GroupVersionResource
- MatchingKinds []schema.GroupVersionKind
-}
-
-func (e *AmbiguousKindError) Error() string {
- switch {
- case len(e.MatchingKinds) > 0 && len(e.MatchingResources) > 0:
- return fmt.Sprintf("%v matches multiple resources %v and kinds %v", e.PartialKind, e.MatchingResources, e.MatchingKinds)
- case len(e.MatchingKinds) > 0:
- return fmt.Sprintf("%v matches multiple kinds %v", e.PartialKind, e.MatchingKinds)
- case len(e.MatchingResources) > 0:
- return fmt.Sprintf("%v matches multiple resources %v", e.PartialKind, e.MatchingResources)
- }
- return fmt.Sprintf("%v matches multiple resources or kinds", e.PartialKind)
-}
-
-func IsAmbiguousError(err error) bool {
- if err == nil {
- return false
- }
- switch err.(type) {
- case *AmbiguousResourceError, *AmbiguousKindError:
- return true
- default:
- return false
- }
-}
-
-// NoResourceMatchError is returned if the RESTMapper can't find any match for a resource
-type NoResourceMatchError struct {
- PartialResource schema.GroupVersionResource
-}
-
-func (e *NoResourceMatchError) Error() string {
- return fmt.Sprintf("no matches for %v", e.PartialResource)
-}
-
-// NoKindMatchError is returned if the RESTMapper can't find any match for a kind
-type NoKindMatchError struct {
- // GroupKind is the API group and kind that was searched
- GroupKind schema.GroupKind
- // SearchedVersions is the optional list of versions the search was restricted to
- SearchedVersions []string
-}
-
-func (e *NoKindMatchError) Error() string {
- searchedVersions := sets.NewString()
- for _, v := range e.SearchedVersions {
- searchedVersions.Insert(schema.GroupVersion{Group: e.GroupKind.Group, Version: v}.String())
- }
-
- switch len(searchedVersions) {
- case 0:
- return fmt.Sprintf("no matches for kind %q in group %q", e.GroupKind.Kind, e.GroupKind.Group)
- case 1:
- return fmt.Sprintf("no matches for kind %q in version %q", e.GroupKind.Kind, searchedVersions.List()[0])
- default:
- return fmt.Sprintf("no matches for kind %q in versions %q", e.GroupKind.Kind, searchedVersions.List())
- }
-}
-
-func IsNoMatchError(err error) bool {
- if err == nil {
- return false
- }
- switch err.(type) {
- case *NoResourceMatchError, *NoKindMatchError:
- return true
- default:
- return false
- }
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go
deleted file mode 100644
index fd2210022..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-Copyright 2014 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 meta
-
-import (
- "fmt"
-
- "k8s.io/apimachinery/pkg/runtime/schema"
- utilerrors "k8s.io/apimachinery/pkg/util/errors"
-)
-
-// FirstHitRESTMapper is a wrapper for multiple RESTMappers which returns the
-// first successful result for the singular requests
-type FirstHitRESTMapper struct {
- MultiRESTMapper
-}
-
-func (m FirstHitRESTMapper) String() string {
- return fmt.Sprintf("FirstHitRESTMapper{\n\t%v\n}", m.MultiRESTMapper)
-}
-
-func (m FirstHitRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
- errors := []error{}
- for _, t := range m.MultiRESTMapper {
- ret, err := t.ResourceFor(resource)
- if err == nil {
- return ret, nil
- }
- errors = append(errors, err)
- }
-
- return schema.GroupVersionResource{}, collapseAggregateErrors(errors)
-}
-
-func (m FirstHitRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
- errors := []error{}
- for _, t := range m.MultiRESTMapper {
- ret, err := t.KindFor(resource)
- if err == nil {
- return ret, nil
- }
- errors = append(errors, err)
- }
-
- return schema.GroupVersionKind{}, collapseAggregateErrors(errors)
-}
-
-// RESTMapping provides the REST mapping for the resource based on the
-// kind and version. This implementation supports multiple REST schemas and
-// return the first match.
-func (m FirstHitRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) {
- errors := []error{}
- for _, t := range m.MultiRESTMapper {
- ret, err := t.RESTMapping(gk, versions...)
- if err == nil {
- return ret, nil
- }
- errors = append(errors, err)
- }
-
- return nil, collapseAggregateErrors(errors)
-}
-
-// collapseAggregateErrors returns the minimal errors. it handles empty as nil, handles one item in a list
-// by returning the item, and collapses all NoMatchErrors to a single one (since they should all be the same)
-func collapseAggregateErrors(errors []error) error {
- if len(errors) == 0 {
- return nil
- }
- if len(errors) == 1 {
- return errors[0]
- }
-
- allNoMatchErrors := true
- for _, err := range errors {
- allNoMatchErrors = allNoMatchErrors && IsNoMatchError(err)
- }
- if allNoMatchErrors {
- return errors[0]
- }
-
- return utilerrors.NewAggregate(errors)
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/help.go b/vendor/k8s.io/apimachinery/pkg/api/meta/help.go
deleted file mode 100644
index c70b3d2b6..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/help.go
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
-Copyright 2015 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 meta
-
-import (
- "fmt"
- "reflect"
-
- "k8s.io/apimachinery/pkg/conversion"
- "k8s.io/apimachinery/pkg/runtime"
-)
-
-// IsListType returns true if the provided Object has a slice called Items
-func IsListType(obj runtime.Object) bool {
- // if we're a runtime.Unstructured, check whether this is a list.
- // TODO: refactor GetItemsPtr to use an interface that returns []runtime.Object
- if unstructured, ok := obj.(runtime.Unstructured); ok {
- return unstructured.IsList()
- }
-
- _, err := GetItemsPtr(obj)
- return err == nil
-}
-
-// GetItemsPtr returns a pointer to the list object's Items member.
-// If 'list' doesn't have an Items member, it's not really a list type
-// and an error will be returned.
-// This function will either return a pointer to a slice, or an error, but not both.
-func GetItemsPtr(list runtime.Object) (interface{}, error) {
- v, err := conversion.EnforcePtr(list)
- if err != nil {
- return nil, err
- }
-
- items := v.FieldByName("Items")
- if !items.IsValid() {
- return nil, fmt.Errorf("no Items field in %#v", list)
- }
- switch items.Kind() {
- case reflect.Interface, reflect.Ptr:
- target := reflect.TypeOf(items.Interface()).Elem()
- if target.Kind() != reflect.Slice {
- return nil, fmt.Errorf("items: Expected slice, got %s", target.Kind())
- }
- return items.Interface(), nil
- case reflect.Slice:
- return items.Addr().Interface(), nil
- default:
- return nil, fmt.Errorf("items: Expected slice, got %s", items.Kind())
- }
-}
-
-// EachListItem invokes fn on each runtime.Object in the list. Any error immediately terminates
-// the loop.
-func EachListItem(obj runtime.Object, fn func(runtime.Object) error) error {
- if unstructured, ok := obj.(runtime.Unstructured); ok {
- return unstructured.EachListItem(fn)
- }
- // TODO: Change to an interface call?
- itemsPtr, err := GetItemsPtr(obj)
- if err != nil {
- return err
- }
- items, err := conversion.EnforcePtr(itemsPtr)
- if err != nil {
- return err
- }
- len := items.Len()
- if len == 0 {
- return nil
- }
- takeAddr := false
- if elemType := items.Type().Elem(); elemType.Kind() != reflect.Ptr && elemType.Kind() != reflect.Interface {
- if !items.Index(0).CanAddr() {
- return fmt.Errorf("unable to take address of items in %T for EachListItem", obj)
- }
- takeAddr = true
- }
-
- for i := 0; i < len; i++ {
- raw := items.Index(i)
- if takeAddr {
- raw = raw.Addr()
- }
- switch item := raw.Interface().(type) {
- case *runtime.RawExtension:
- if err := fn(item.Object); err != nil {
- return err
- }
- case runtime.Object:
- if err := fn(item); err != nil {
- return err
- }
- default:
- obj, ok := item.(runtime.Object)
- if !ok {
- return fmt.Errorf("%v: item[%v]: Expected object, got %#v(%s)", obj, i, raw.Interface(), raw.Kind())
- }
- if err := fn(obj); err != nil {
- return err
- }
- }
- }
- return nil
-}
-
-// ExtractList returns obj's Items element as an array of runtime.Objects.
-// Returns an error if obj is not a List type (does not have an Items member).
-func ExtractList(obj runtime.Object) ([]runtime.Object, error) {
- itemsPtr, err := GetItemsPtr(obj)
- if err != nil {
- return nil, err
- }
- items, err := conversion.EnforcePtr(itemsPtr)
- if err != nil {
- return nil, err
- }
- list := make([]runtime.Object, items.Len())
- for i := range list {
- raw := items.Index(i)
- switch item := raw.Interface().(type) {
- case runtime.RawExtension:
- switch {
- case item.Object != nil:
- list[i] = item.Object
- case item.Raw != nil:
- // TODO: Set ContentEncoding and ContentType correctly.
- list[i] = &runtime.Unknown{Raw: item.Raw}
- default:
- list[i] = nil
- }
- case runtime.Object:
- list[i] = item
- default:
- var found bool
- if list[i], found = raw.Addr().Interface().(runtime.Object); !found {
- return nil, fmt.Errorf("%v: item[%v]: Expected object, got %#v(%s)", obj, i, raw.Interface(), raw.Kind())
- }
- }
- }
- return list, nil
-}
-
-// objectSliceType is the type of a slice of Objects
-var objectSliceType = reflect.TypeOf([]runtime.Object{})
-
-// SetList sets the given list object's Items member have the elements given in
-// objects.
-// Returns an error if list is not a List type (does not have an Items member),
-// or if any of the objects are not of the right type.
-func SetList(list runtime.Object, objects []runtime.Object) error {
- itemsPtr, err := GetItemsPtr(list)
- if err != nil {
- return err
- }
- items, err := conversion.EnforcePtr(itemsPtr)
- if err != nil {
- return err
- }
- if items.Type() == objectSliceType {
- items.Set(reflect.ValueOf(objects))
- return nil
- }
- slice := reflect.MakeSlice(items.Type(), len(objects), len(objects))
- for i := range objects {
- dest := slice.Index(i)
- if dest.Type() == reflect.TypeOf(runtime.RawExtension{}) {
- dest = dest.FieldByName("Object")
- }
-
- // check to see if you're directly assignable
- if reflect.TypeOf(objects[i]).AssignableTo(dest.Type()) {
- dest.Set(reflect.ValueOf(objects[i]))
- continue
- }
-
- src, err := conversion.EnforcePtr(objects[i])
- if err != nil {
- return err
- }
- if src.Type().AssignableTo(dest.Type()) {
- dest.Set(src)
- } else if src.Type().ConvertibleTo(dest.Type()) {
- dest.Set(src.Convert(dest.Type()))
- } else {
- return fmt.Errorf("item[%d]: can't assign or convert %v into %v", i, src.Type(), dest.Type())
- }
- }
- items.Set(slice)
- return nil
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go b/vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go
deleted file mode 100644
index 5dc9d89e6..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
-Copyright 2014 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 meta
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/types"
-)
-
-// VersionInterfaces contains the interfaces one should use for dealing with types of a particular version.
-type VersionInterfaces struct {
- runtime.ObjectConvertor
- MetadataAccessor
-}
-
-type ListMetaAccessor interface {
- GetListMeta() List
-}
-
-// List lets you work with list metadata from any of the versioned or
-// internal API objects. Attempting to set or retrieve a field on an object that does
-// not support that field will be a no-op and return a default value.
-type List metav1.ListInterface
-
-// Type exposes the type and APIVersion of versioned or internal API objects.
-type Type metav1.Type
-
-// MetadataAccessor lets you work with object and list metadata from any of the versioned or
-// internal API objects. Attempting to set or retrieve a field on an object that does
-// not support that field (Name, UID, Namespace on lists) will be a no-op and return
-// a default value.
-//
-// MetadataAccessor exposes Interface in a way that can be used with multiple objects.
-type MetadataAccessor interface {
- APIVersion(obj runtime.Object) (string, error)
- SetAPIVersion(obj runtime.Object, version string) error
-
- Kind(obj runtime.Object) (string, error)
- SetKind(obj runtime.Object, kind string) error
-
- Namespace(obj runtime.Object) (string, error)
- SetNamespace(obj runtime.Object, namespace string) error
-
- Name(obj runtime.Object) (string, error)
- SetName(obj runtime.Object, name string) error
-
- GenerateName(obj runtime.Object) (string, error)
- SetGenerateName(obj runtime.Object, name string) error
-
- UID(obj runtime.Object) (types.UID, error)
- SetUID(obj runtime.Object, uid types.UID) error
-
- SelfLink(obj runtime.Object) (string, error)
- SetSelfLink(obj runtime.Object, selfLink string) error
-
- Labels(obj runtime.Object) (map[string]string, error)
- SetLabels(obj runtime.Object, labels map[string]string) error
-
- Annotations(obj runtime.Object) (map[string]string, error)
- SetAnnotations(obj runtime.Object, annotations map[string]string) error
-
- Continue(obj runtime.Object) (string, error)
- SetContinue(obj runtime.Object, c string) error
-
- runtime.ResourceVersioner
-}
-
-type RESTScopeName string
-
-const (
- RESTScopeNameNamespace RESTScopeName = "namespace"
- RESTScopeNameRoot RESTScopeName = "root"
-)
-
-// RESTScope contains the information needed to deal with REST resources that are in a resource hierarchy
-type RESTScope interface {
- // Name of the scope
- Name() RESTScopeName
- // ParamName is the optional name of the parameter that should be inserted in the resource url
- // If empty, no param will be inserted
- ParamName() string
- // ArgumentName is the optional name that should be used for the variable holding the value.
- ArgumentName() string
- // ParamDescription is the optional description to use to document the parameter in api documentation
- ParamDescription() string
-}
-
-// RESTMapping contains the information needed to deal with objects of a specific
-// resource and kind in a RESTful manner.
-type RESTMapping struct {
- // Resource is a string representing the name of this resource as a REST client would see it
- Resource string
-
- GroupVersionKind schema.GroupVersionKind
-
- // Scope contains the information needed to deal with REST Resources that are in a resource hierarchy
- Scope RESTScope
-
- runtime.ObjectConvertor
- MetadataAccessor
-}
-
-// RESTMapper allows clients to map resources to kind, and map kind and version
-// to interfaces for manipulating those objects. It is primarily intended for
-// consumers of Kubernetes compatible REST APIs as defined in docs/devel/api-conventions.md.
-//
-// The Kubernetes API provides versioned resources and object kinds which are scoped
-// to API groups. In other words, kinds and resources should not be assumed to be
-// unique across groups.
-//
-// TODO: split into sub-interfaces
-type RESTMapper interface {
- // KindFor takes a partial resource and returns the single match. Returns an error if there are multiple matches
- KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)
-
- // KindsFor takes a partial resource and returns the list of potential kinds in priority order
- KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
-
- // ResourceFor takes a partial resource and returns the single match. Returns an error if there are multiple matches
- ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
-
- // ResourcesFor takes a partial resource and returns the list of potential resource in priority order
- ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)
-
- // RESTMapping identifies a preferred resource mapping for the provided group kind.
- RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error)
- // RESTMappings returns all resource mappings for the provided group kind if no
- // version search is provided. Otherwise identifies a preferred resource mapping for
- // the provided version(s).
- RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error)
-
- ResourceSingularizer(resource string) (singular string, err error)
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/lazy.go b/vendor/k8s.io/apimachinery/pkg/api/meta/lazy.go
deleted file mode 100644
index 7f92f39a4..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/lazy.go
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-Copyright 2017 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 meta
-
-import (
- "sync"
-
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// lazyObject defers loading the mapper and typer until necessary.
-type lazyObject struct {
- loader func() (RESTMapper, runtime.ObjectTyper, error)
-
- lock sync.Mutex
- loaded bool
- err error
- mapper RESTMapper
- typer runtime.ObjectTyper
-}
-
-// NewLazyObjectLoader handles unrecoverable errors when creating a RESTMapper / ObjectTyper by
-// returning those initialization errors when the interface methods are invoked. This defers the
-// initialization and any server calls until a client actually needs to perform the action.
-func NewLazyObjectLoader(fn func() (RESTMapper, runtime.ObjectTyper, error)) (RESTMapper, runtime.ObjectTyper) {
- obj := &lazyObject{loader: fn}
- return obj, obj
-}
-
-// init lazily loads the mapper and typer, returning an error if initialization has failed.
-func (o *lazyObject) init() error {
- o.lock.Lock()
- defer o.lock.Unlock()
- if o.loaded {
- return o.err
- }
- o.mapper, o.typer, o.err = o.loader()
- o.loaded = true
- return o.err
-}
-
-var _ RESTMapper = &lazyObject{}
-var _ runtime.ObjectTyper = &lazyObject{}
-
-func (o *lazyObject) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
- if err := o.init(); err != nil {
- return schema.GroupVersionKind{}, err
- }
- return o.mapper.KindFor(resource)
-}
-
-func (o *lazyObject) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error) {
- if err := o.init(); err != nil {
- return []schema.GroupVersionKind{}, err
- }
- return o.mapper.KindsFor(resource)
-}
-
-func (o *lazyObject) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error) {
- if err := o.init(); err != nil {
- return schema.GroupVersionResource{}, err
- }
- return o.mapper.ResourceFor(input)
-}
-
-func (o *lazyObject) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) {
- if err := o.init(); err != nil {
- return []schema.GroupVersionResource{}, err
- }
- return o.mapper.ResourcesFor(input)
-}
-
-func (o *lazyObject) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) {
- if err := o.init(); err != nil {
- return nil, err
- }
- return o.mapper.RESTMapping(gk, versions...)
-}
-
-func (o *lazyObject) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) {
- if err := o.init(); err != nil {
- return nil, err
- }
- return o.mapper.RESTMappings(gk, versions...)
-}
-
-func (o *lazyObject) ResourceSingularizer(resource string) (singular string, err error) {
- if err := o.init(); err != nil {
- return "", err
- }
- return o.mapper.ResourceSingularizer(resource)
-}
-
-func (o *lazyObject) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) {
- if err := o.init(); err != nil {
- return nil, false, err
- }
- return o.typer.ObjectKinds(obj)
-}
-
-func (o *lazyObject) Recognizes(gvk schema.GroupVersionKind) bool {
- if err := o.init(); err != nil {
- return false
- }
- return o.typer.Recognizes(gvk)
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go
deleted file mode 100644
index b9670071c..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go
+++ /dev/null
@@ -1,653 +0,0 @@
-/*
-Copyright 2014 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 meta
-
-import (
- "fmt"
- "reflect"
-
- "github.com/golang/glog"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1"
- "k8s.io/apimachinery/pkg/conversion"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/types"
-)
-
-// errNotList is returned when an object implements the Object style interfaces but not the List style
-// interfaces.
-var errNotList = fmt.Errorf("object does not implement the List interfaces")
-
-var errNotCommon = fmt.Errorf("object does not implement the common interface for accessing the SelfLink")
-
-// CommonAccessor returns a Common interface for the provided object or an error if the object does
-// not provide List.
-// TODO: return bool instead of error
-func CommonAccessor(obj interface{}) (metav1.Common, error) {
- switch t := obj.(type) {
- case List:
- return t, nil
- case metav1.ListInterface:
- return t, nil
- case ListMetaAccessor:
- if m := t.GetListMeta(); m != nil {
- return m, nil
- }
- return nil, errNotCommon
- case metav1.ListMetaAccessor:
- if m := t.GetListMeta(); m != nil {
- return m, nil
- }
- return nil, errNotCommon
- case metav1.Object:
- return t, nil
- case metav1.ObjectMetaAccessor:
- if m := t.GetObjectMeta(); m != nil {
- return m, nil
- }
- return nil, errNotCommon
- default:
- return nil, errNotCommon
- }
-}
-
-// ListAccessor returns a List interface for the provided object or an error if the object does
-// not provide List.
-// IMPORTANT: Objects are NOT a superset of lists. Do not use this check to determine whether an
-// object *is* a List.
-// TODO: return bool instead of error
-func ListAccessor(obj interface{}) (List, error) {
- switch t := obj.(type) {
- case List:
- return t, nil
- case metav1.ListInterface:
- return t, nil
- case ListMetaAccessor:
- if m := t.GetListMeta(); m != nil {
- return m, nil
- }
- return nil, errNotList
- case metav1.ListMetaAccessor:
- if m := t.GetListMeta(); m != nil {
- return m, nil
- }
- return nil, errNotList
- default:
- return nil, errNotList
- }
-}
-
-// errNotObject is returned when an object implements the List style interfaces but not the Object style
-// interfaces.
-var errNotObject = fmt.Errorf("object does not implement the Object interfaces")
-
-// Accessor takes an arbitrary object pointer and returns meta.Interface.
-// obj must be a pointer to an API type. An error is returned if the minimum
-// required fields are missing. Fields that are not required return the default
-// value and are a no-op if set.
-// TODO: return bool instead of error
-func Accessor(obj interface{}) (metav1.Object, error) {
- switch t := obj.(type) {
- case metav1.Object:
- return t, nil
- case metav1.ObjectMetaAccessor:
- if m := t.GetObjectMeta(); m != nil {
- return m, nil
- }
- return nil, errNotObject
- default:
- return nil, errNotObject
- }
-}
-
-// AsPartialObjectMetadata takes the metav1 interface and returns a partial object.
-// TODO: consider making this solely a conversion action.
-func AsPartialObjectMetadata(m metav1.Object) *metav1beta1.PartialObjectMetadata {
- switch t := m.(type) {
- case *metav1.ObjectMeta:
- return &metav1beta1.PartialObjectMetadata{ObjectMeta: *t}
- default:
- return &metav1beta1.PartialObjectMetadata{
- ObjectMeta: metav1.ObjectMeta{
- Name: m.GetName(),
- GenerateName: m.GetGenerateName(),
- Namespace: m.GetNamespace(),
- SelfLink: m.GetSelfLink(),
- UID: m.GetUID(),
- ResourceVersion: m.GetResourceVersion(),
- Generation: m.GetGeneration(),
- CreationTimestamp: m.GetCreationTimestamp(),
- DeletionTimestamp: m.GetDeletionTimestamp(),
- DeletionGracePeriodSeconds: m.GetDeletionGracePeriodSeconds(),
- Labels: m.GetLabels(),
- Annotations: m.GetAnnotations(),
- OwnerReferences: m.GetOwnerReferences(),
- Finalizers: m.GetFinalizers(),
- ClusterName: m.GetClusterName(),
- Initializers: m.GetInitializers(),
- },
- }
- }
-}
-
-// TypeAccessor returns an interface that allows retrieving and modifying the APIVersion
-// and Kind of an in-memory internal object.
-// TODO: this interface is used to test code that does not have ObjectMeta or ListMeta
-// in round tripping (objects which can use apiVersion/kind, but do not fit the Kube
-// api conventions).
-func TypeAccessor(obj interface{}) (Type, error) {
- if typed, ok := obj.(runtime.Object); ok {
- return objectAccessor{typed}, nil
- }
- v, err := conversion.EnforcePtr(obj)
- if err != nil {
- return nil, err
- }
- t := v.Type()
- if v.Kind() != reflect.Struct {
- return nil, fmt.Errorf("expected struct, but got %v: %v (%#v)", v.Kind(), t, v.Interface())
- }
-
- typeMeta := v.FieldByName("TypeMeta")
- if !typeMeta.IsValid() {
- return nil, fmt.Errorf("struct %v lacks embedded TypeMeta type", t)
- }
- a := &genericAccessor{}
- if err := extractFromTypeMeta(typeMeta, a); err != nil {
- return nil, fmt.Errorf("unable to find type fields on %#v: %v", typeMeta, err)
- }
- return a, nil
-}
-
-type objectAccessor struct {
- runtime.Object
-}
-
-func (obj objectAccessor) GetKind() string {
- return obj.GetObjectKind().GroupVersionKind().Kind
-}
-
-func (obj objectAccessor) SetKind(kind string) {
- gvk := obj.GetObjectKind().GroupVersionKind()
- gvk.Kind = kind
- obj.GetObjectKind().SetGroupVersionKind(gvk)
-}
-
-func (obj objectAccessor) GetAPIVersion() string {
- return obj.GetObjectKind().GroupVersionKind().GroupVersion().String()
-}
-
-func (obj objectAccessor) SetAPIVersion(version string) {
- gvk := obj.GetObjectKind().GroupVersionKind()
- gv, err := schema.ParseGroupVersion(version)
- if err != nil {
- gv = schema.GroupVersion{Version: version}
- }
- gvk.Group, gvk.Version = gv.Group, gv.Version
- obj.GetObjectKind().SetGroupVersionKind(gvk)
-}
-
-// NewAccessor returns a MetadataAccessor that can retrieve
-// or manipulate resource version on objects derived from core API
-// metadata concepts.
-func NewAccessor() MetadataAccessor {
- return resourceAccessor{}
-}
-
-// resourceAccessor implements ResourceVersioner and SelfLinker.
-type resourceAccessor struct{}
-
-func (resourceAccessor) Kind(obj runtime.Object) (string, error) {
- return objectAccessor{obj}.GetKind(), nil
-}
-
-func (resourceAccessor) SetKind(obj runtime.Object, kind string) error {
- objectAccessor{obj}.SetKind(kind)
- return nil
-}
-
-func (resourceAccessor) APIVersion(obj runtime.Object) (string, error) {
- return objectAccessor{obj}.GetAPIVersion(), nil
-}
-
-func (resourceAccessor) SetAPIVersion(obj runtime.Object, version string) error {
- objectAccessor{obj}.SetAPIVersion(version)
- return nil
-}
-
-func (resourceAccessor) Namespace(obj runtime.Object) (string, error) {
- accessor, err := Accessor(obj)
- if err != nil {
- return "", err
- }
- return accessor.GetNamespace(), nil
-}
-
-func (resourceAccessor) SetNamespace(obj runtime.Object, namespace string) error {
- accessor, err := Accessor(obj)
- if err != nil {
- return err
- }
- accessor.SetNamespace(namespace)
- return nil
-}
-
-func (resourceAccessor) Name(obj runtime.Object) (string, error) {
- accessor, err := Accessor(obj)
- if err != nil {
- return "", err
- }
- return accessor.GetName(), nil
-}
-
-func (resourceAccessor) SetName(obj runtime.Object, name string) error {
- accessor, err := Accessor(obj)
- if err != nil {
- return err
- }
- accessor.SetName(name)
- return nil
-}
-
-func (resourceAccessor) GenerateName(obj runtime.Object) (string, error) {
- accessor, err := Accessor(obj)
- if err != nil {
- return "", err
- }
- return accessor.GetGenerateName(), nil
-}
-
-func (resourceAccessor) SetGenerateName(obj runtime.Object, name string) error {
- accessor, err := Accessor(obj)
- if err != nil {
- return err
- }
- accessor.SetGenerateName(name)
- return nil
-}
-
-func (resourceAccessor) UID(obj runtime.Object) (types.UID, error) {
- accessor, err := Accessor(obj)
- if err != nil {
- return "", err
- }
- return accessor.GetUID(), nil
-}
-
-func (resourceAccessor) SetUID(obj runtime.Object, uid types.UID) error {
- accessor, err := Accessor(obj)
- if err != nil {
- return err
- }
- accessor.SetUID(uid)
- return nil
-}
-
-func (resourceAccessor) SelfLink(obj runtime.Object) (string, error) {
- accessor, err := CommonAccessor(obj)
- if err != nil {
- return "", err
- }
- return accessor.GetSelfLink(), nil
-}
-
-func (resourceAccessor) SetSelfLink(obj runtime.Object, selfLink string) error {
- accessor, err := CommonAccessor(obj)
- if err != nil {
- return err
- }
- accessor.SetSelfLink(selfLink)
- return nil
-}
-
-func (resourceAccessor) Labels(obj runtime.Object) (map[string]string, error) {
- accessor, err := Accessor(obj)
- if err != nil {
- return nil, err
- }
- return accessor.GetLabels(), nil
-}
-
-func (resourceAccessor) SetLabels(obj runtime.Object, labels map[string]string) error {
- accessor, err := Accessor(obj)
- if err != nil {
- return err
- }
- accessor.SetLabels(labels)
- return nil
-}
-
-func (resourceAccessor) Annotations(obj runtime.Object) (map[string]string, error) {
- accessor, err := Accessor(obj)
- if err != nil {
- return nil, err
- }
- return accessor.GetAnnotations(), nil
-}
-
-func (resourceAccessor) SetAnnotations(obj runtime.Object, annotations map[string]string) error {
- accessor, err := Accessor(obj)
- if err != nil {
- return err
- }
- accessor.SetAnnotations(annotations)
- return nil
-}
-
-func (resourceAccessor) ResourceVersion(obj runtime.Object) (string, error) {
- accessor, err := CommonAccessor(obj)
- if err != nil {
- return "", err
- }
- return accessor.GetResourceVersion(), nil
-}
-
-func (resourceAccessor) SetResourceVersion(obj runtime.Object, version string) error {
- accessor, err := CommonAccessor(obj)
- if err != nil {
- return err
- }
- accessor.SetResourceVersion(version)
- return nil
-}
-
-func (resourceAccessor) Continue(obj runtime.Object) (string, error) {
- accessor, err := ListAccessor(obj)
- if err != nil {
- return "", err
- }
- return accessor.GetContinue(), nil
-}
-
-func (resourceAccessor) SetContinue(obj runtime.Object, version string) error {
- accessor, err := ListAccessor(obj)
- if err != nil {
- return err
- }
- accessor.SetContinue(version)
- return nil
-}
-
-// extractFromOwnerReference extracts v to o. v is the OwnerReferences field of an object.
-func extractFromOwnerReference(v reflect.Value, o *metav1.OwnerReference) error {
- if err := runtime.Field(v, "APIVersion", &o.APIVersion); err != nil {
- return err
- }
- if err := runtime.Field(v, "Kind", &o.Kind); err != nil {
- return err
- }
- if err := runtime.Field(v, "Name", &o.Name); err != nil {
- return err
- }
- if err := runtime.Field(v, "UID", &o.UID); err != nil {
- return err
- }
- var controllerPtr *bool
- if err := runtime.Field(v, "Controller", &controllerPtr); err != nil {
- return err
- }
- if controllerPtr != nil {
- controller := *controllerPtr
- o.Controller = &controller
- }
- var blockOwnerDeletionPtr *bool
- if err := runtime.Field(v, "BlockOwnerDeletion", &blockOwnerDeletionPtr); err != nil {
- return err
- }
- if blockOwnerDeletionPtr != nil {
- block := *blockOwnerDeletionPtr
- o.BlockOwnerDeletion = &block
- }
- return nil
-}
-
-// setOwnerReference sets v to o. v is the OwnerReferences field of an object.
-func setOwnerReference(v reflect.Value, o *metav1.OwnerReference) error {
- if err := runtime.SetField(o.APIVersion, v, "APIVersion"); err != nil {
- return err
- }
- if err := runtime.SetField(o.Kind, v, "Kind"); err != nil {
- return err
- }
- if err := runtime.SetField(o.Name, v, "Name"); err != nil {
- return err
- }
- if err := runtime.SetField(o.UID, v, "UID"); err != nil {
- return err
- }
- if o.Controller != nil {
- controller := *(o.Controller)
- if err := runtime.SetField(&controller, v, "Controller"); err != nil {
- return err
- }
- }
- if o.BlockOwnerDeletion != nil {
- block := *(o.BlockOwnerDeletion)
- if err := runtime.SetField(&block, v, "BlockOwnerDeletion"); err != nil {
- return err
- }
- }
- return nil
-}
-
-// genericAccessor contains pointers to strings that can modify an arbitrary
-// struct and implements the Accessor interface.
-type genericAccessor struct {
- namespace *string
- name *string
- generateName *string
- uid *types.UID
- apiVersion *string
- kind *string
- resourceVersion *string
- selfLink *string
- creationTimestamp *metav1.Time
- deletionTimestamp **metav1.Time
- labels *map[string]string
- annotations *map[string]string
- ownerReferences reflect.Value
- finalizers *[]string
-}
-
-func (a genericAccessor) GetNamespace() string {
- if a.namespace == nil {
- return ""
- }
- return *a.namespace
-}
-
-func (a genericAccessor) SetNamespace(namespace string) {
- if a.namespace == nil {
- return
- }
- *a.namespace = namespace
-}
-
-func (a genericAccessor) GetName() string {
- if a.name == nil {
- return ""
- }
- return *a.name
-}
-
-func (a genericAccessor) SetName(name string) {
- if a.name == nil {
- return
- }
- *a.name = name
-}
-
-func (a genericAccessor) GetGenerateName() string {
- if a.generateName == nil {
- return ""
- }
- return *a.generateName
-}
-
-func (a genericAccessor) SetGenerateName(generateName string) {
- if a.generateName == nil {
- return
- }
- *a.generateName = generateName
-}
-
-func (a genericAccessor) GetUID() types.UID {
- if a.uid == nil {
- return ""
- }
- return *a.uid
-}
-
-func (a genericAccessor) SetUID(uid types.UID) {
- if a.uid == nil {
- return
- }
- *a.uid = uid
-}
-
-func (a genericAccessor) GetAPIVersion() string {
- return *a.apiVersion
-}
-
-func (a genericAccessor) SetAPIVersion(version string) {
- *a.apiVersion = version
-}
-
-func (a genericAccessor) GetKind() string {
- return *a.kind
-}
-
-func (a genericAccessor) SetKind(kind string) {
- *a.kind = kind
-}
-
-func (a genericAccessor) GetResourceVersion() string {
- return *a.resourceVersion
-}
-
-func (a genericAccessor) SetResourceVersion(version string) {
- *a.resourceVersion = version
-}
-
-func (a genericAccessor) GetSelfLink() string {
- return *a.selfLink
-}
-
-func (a genericAccessor) SetSelfLink(selfLink string) {
- *a.selfLink = selfLink
-}
-
-func (a genericAccessor) GetCreationTimestamp() metav1.Time {
- return *a.creationTimestamp
-}
-
-func (a genericAccessor) SetCreationTimestamp(timestamp metav1.Time) {
- *a.creationTimestamp = timestamp
-}
-
-func (a genericAccessor) GetDeletionTimestamp() *metav1.Time {
- return *a.deletionTimestamp
-}
-
-func (a genericAccessor) SetDeletionTimestamp(timestamp *metav1.Time) {
- *a.deletionTimestamp = timestamp
-}
-
-func (a genericAccessor) GetLabels() map[string]string {
- if a.labels == nil {
- return nil
- }
- return *a.labels
-}
-
-func (a genericAccessor) SetLabels(labels map[string]string) {
- *a.labels = labels
-}
-
-func (a genericAccessor) GetAnnotations() map[string]string {
- if a.annotations == nil {
- return nil
- }
- return *a.annotations
-}
-
-func (a genericAccessor) SetAnnotations(annotations map[string]string) {
- if a.annotations == nil {
- emptyAnnotations := make(map[string]string)
- a.annotations = &emptyAnnotations
- }
- *a.annotations = annotations
-}
-
-func (a genericAccessor) GetFinalizers() []string {
- if a.finalizers == nil {
- return nil
- }
- return *a.finalizers
-}
-
-func (a genericAccessor) SetFinalizers(finalizers []string) {
- *a.finalizers = finalizers
-}
-
-func (a genericAccessor) GetOwnerReferences() []metav1.OwnerReference {
- var ret []metav1.OwnerReference
- s := a.ownerReferences
- if s.Kind() != reflect.Ptr || s.Elem().Kind() != reflect.Slice {
- glog.Errorf("expect %v to be a pointer to slice", s)
- return ret
- }
- s = s.Elem()
- // Set the capacity to one element greater to avoid copy if the caller later append an element.
- ret = make([]metav1.OwnerReference, s.Len(), s.Len()+1)
- for i := 0; i < s.Len(); i++ {
- if err := extractFromOwnerReference(s.Index(i), &ret[i]); err != nil {
- glog.Errorf("extractFromOwnerReference failed: %v", err)
- return ret
- }
- }
- return ret
-}
-
-func (a genericAccessor) SetOwnerReferences(references []metav1.OwnerReference) {
- s := a.ownerReferences
- if s.Kind() != reflect.Ptr || s.Elem().Kind() != reflect.Slice {
- glog.Errorf("expect %v to be a pointer to slice", s)
- }
- s = s.Elem()
- newReferences := reflect.MakeSlice(s.Type(), len(references), len(references))
- for i := 0; i < len(references); i++ {
- if err := setOwnerReference(newReferences.Index(i), &references[i]); err != nil {
- glog.Errorf("setOwnerReference failed: %v", err)
- return
- }
- }
- s.Set(newReferences)
-}
-
-// extractFromTypeMeta extracts pointers to version and kind fields from an object
-func extractFromTypeMeta(v reflect.Value, a *genericAccessor) error {
- if err := runtime.FieldPtr(v, "APIVersion", &a.apiVersion); err != nil {
- return err
- }
- if err := runtime.FieldPtr(v, "Kind", &a.kind); err != nil {
- return err
- }
- return nil
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go
deleted file mode 100644
index 6b01bf197..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
-Copyright 2014 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 meta
-
-import (
- "fmt"
- "strings"
-
- "k8s.io/apimachinery/pkg/runtime/schema"
- utilerrors "k8s.io/apimachinery/pkg/util/errors"
-)
-
-// MultiRESTMapper is a wrapper for multiple RESTMappers.
-type MultiRESTMapper []RESTMapper
-
-func (m MultiRESTMapper) String() string {
- nested := []string{}
- for _, t := range m {
- currString := fmt.Sprintf("%v", t)
- splitStrings := strings.Split(currString, "\n")
- nested = append(nested, strings.Join(splitStrings, "\n\t"))
- }
-
- return fmt.Sprintf("MultiRESTMapper{\n\t%s\n}", strings.Join(nested, "\n\t"))
-}
-
-// ResourceSingularizer converts a REST resource name from plural to singular (e.g., from pods to pod)
-// This implementation supports multiple REST schemas and return the first match.
-func (m MultiRESTMapper) ResourceSingularizer(resource string) (singular string, err error) {
- for _, t := range m {
- singular, err = t.ResourceSingularizer(resource)
- if err == nil {
- return
- }
- }
- return
-}
-
-func (m MultiRESTMapper) ResourcesFor(resource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) {
- allGVRs := []schema.GroupVersionResource{}
- for _, t := range m {
- gvrs, err := t.ResourcesFor(resource)
- // ignore "no match" errors, but any other error percolates back up
- if IsNoMatchError(err) {
- continue
- }
- if err != nil {
- return nil, err
- }
-
- // walk the existing values to de-dup
- for _, curr := range gvrs {
- found := false
- for _, existing := range allGVRs {
- if curr == existing {
- found = true
- break
- }
- }
-
- if !found {
- allGVRs = append(allGVRs, curr)
- }
- }
- }
-
- if len(allGVRs) == 0 {
- return nil, &NoResourceMatchError{PartialResource: resource}
- }
-
- return allGVRs, nil
-}
-
-func (m MultiRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) {
- allGVKs := []schema.GroupVersionKind{}
- for _, t := range m {
- gvks, err := t.KindsFor(resource)
- // ignore "no match" errors, but any other error percolates back up
- if IsNoMatchError(err) {
- continue
- }
- if err != nil {
- return nil, err
- }
-
- // walk the existing values to de-dup
- for _, curr := range gvks {
- found := false
- for _, existing := range allGVKs {
- if curr == existing {
- found = true
- break
- }
- }
-
- if !found {
- allGVKs = append(allGVKs, curr)
- }
- }
- }
-
- if len(allGVKs) == 0 {
- return nil, &NoResourceMatchError{PartialResource: resource}
- }
-
- return allGVKs, nil
-}
-
-func (m MultiRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
- resources, err := m.ResourcesFor(resource)
- if err != nil {
- return schema.GroupVersionResource{}, err
- }
- if len(resources) == 1 {
- return resources[0], nil
- }
-
- return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources}
-}
-
-func (m MultiRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
- kinds, err := m.KindsFor(resource)
- if err != nil {
- return schema.GroupVersionKind{}, err
- }
- if len(kinds) == 1 {
- return kinds[0], nil
- }
-
- return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds}
-}
-
-// RESTMapping provides the REST mapping for the resource based on the
-// kind and version. This implementation supports multiple REST schemas and
-// return the first match.
-func (m MultiRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) {
- allMappings := []*RESTMapping{}
- errors := []error{}
-
- for _, t := range m {
- currMapping, err := t.RESTMapping(gk, versions...)
- // ignore "no match" errors, but any other error percolates back up
- if IsNoMatchError(err) {
- continue
- }
- if err != nil {
- errors = append(errors, err)
- continue
- }
-
- allMappings = append(allMappings, currMapping)
- }
-
- // if we got exactly one mapping, then use it even if other requested failed
- if len(allMappings) == 1 {
- return allMappings[0], nil
- }
- if len(allMappings) > 1 {
- var kinds []schema.GroupVersionKind
- for _, m := range allMappings {
- kinds = append(kinds, m.GroupVersionKind)
- }
- return nil, &AmbiguousKindError{PartialKind: gk.WithVersion(""), MatchingKinds: kinds}
- }
- if len(errors) > 0 {
- return nil, utilerrors.NewAggregate(errors)
- }
- return nil, &NoKindMatchError{GroupKind: gk, SearchedVersions: versions}
-}
-
-// RESTMappings returns all possible RESTMappings for the provided group kind, or an error
-// if the type is not recognized.
-func (m MultiRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) {
- var allMappings []*RESTMapping
- var errors []error
-
- for _, t := range m {
- currMappings, err := t.RESTMappings(gk, versions...)
- // ignore "no match" errors, but any other error percolates back up
- if IsNoMatchError(err) {
- continue
- }
- if err != nil {
- errors = append(errors, err)
- continue
- }
- allMappings = append(allMappings, currMappings...)
- }
- if len(errors) > 0 {
- return nil, utilerrors.NewAggregate(errors)
- }
- if len(allMappings) == 0 {
- return nil, &NoKindMatchError{GroupKind: gk, SearchedVersions: versions}
- }
- return allMappings, nil
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/priority.go b/vendor/k8s.io/apimachinery/pkg/api/meta/priority.go
deleted file mode 100644
index df28e64ff..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/priority.go
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
-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 meta
-
-import (
- "fmt"
-
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-const (
- AnyGroup = "*"
- AnyVersion = "*"
- AnyResource = "*"
- AnyKind = "*"
-)
-
-// PriorityRESTMapper is a wrapper for automatically choosing a particular Resource or Kind
-// when multiple matches are possible
-type PriorityRESTMapper struct {
- // Delegate is the RESTMapper to use to locate all the Kind and Resource matches
- Delegate RESTMapper
-
- // ResourcePriority is a list of priority patterns to apply to matching resources.
- // The list of all matching resources is narrowed based on the patterns until only one remains.
- // A pattern with no matches is skipped. A pattern with more than one match uses its
- // matches as the list to continue matching against.
- ResourcePriority []schema.GroupVersionResource
-
- // KindPriority is a list of priority patterns to apply to matching kinds.
- // The list of all matching kinds is narrowed based on the patterns until only one remains.
- // A pattern with no matches is skipped. A pattern with more than one match uses its
- // matches as the list to continue matching against.
- KindPriority []schema.GroupVersionKind
-}
-
-func (m PriorityRESTMapper) String() string {
- return fmt.Sprintf("PriorityRESTMapper{\n\t%v\n\t%v\n\t%v\n}", m.ResourcePriority, m.KindPriority, m.Delegate)
-}
-
-// ResourceFor finds all resources, then passes them through the ResourcePriority patterns to find a single matching hit.
-func (m PriorityRESTMapper) ResourceFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
- originalGVRs, err := m.Delegate.ResourcesFor(partiallySpecifiedResource)
- if err != nil {
- return schema.GroupVersionResource{}, err
- }
- if len(originalGVRs) == 1 {
- return originalGVRs[0], nil
- }
-
- remainingGVRs := append([]schema.GroupVersionResource{}, originalGVRs...)
- for _, pattern := range m.ResourcePriority {
- matchedGVRs := []schema.GroupVersionResource{}
- for _, gvr := range remainingGVRs {
- if resourceMatches(pattern, gvr) {
- matchedGVRs = append(matchedGVRs, gvr)
- }
- }
-
- switch len(matchedGVRs) {
- case 0:
- // if you have no matches, then nothing matched this pattern just move to the next
- continue
- case 1:
- // one match, return
- return matchedGVRs[0], nil
- default:
- // more than one match, use the matched hits as the list moving to the next pattern.
- // this way you can have a series of selection criteria
- remainingGVRs = matchedGVRs
- }
- }
-
- return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingResources: originalGVRs}
-}
-
-// KindFor finds all kinds, then passes them through the KindPriority patterns to find a single matching hit.
-func (m PriorityRESTMapper) KindFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
- originalGVKs, err := m.Delegate.KindsFor(partiallySpecifiedResource)
- if err != nil {
- return schema.GroupVersionKind{}, err
- }
- if len(originalGVKs) == 1 {
- return originalGVKs[0], nil
- }
-
- remainingGVKs := append([]schema.GroupVersionKind{}, originalGVKs...)
- for _, pattern := range m.KindPriority {
- matchedGVKs := []schema.GroupVersionKind{}
- for _, gvr := range remainingGVKs {
- if kindMatches(pattern, gvr) {
- matchedGVKs = append(matchedGVKs, gvr)
- }
- }
-
- switch len(matchedGVKs) {
- case 0:
- // if you have no matches, then nothing matched this pattern just move to the next
- continue
- case 1:
- // one match, return
- return matchedGVKs[0], nil
- default:
- // more than one match, use the matched hits as the list moving to the next pattern.
- // this way you can have a series of selection criteria
- remainingGVKs = matchedGVKs
- }
- }
-
- return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingKinds: originalGVKs}
-}
-
-func resourceMatches(pattern schema.GroupVersionResource, resource schema.GroupVersionResource) bool {
- if pattern.Group != AnyGroup && pattern.Group != resource.Group {
- return false
- }
- if pattern.Version != AnyVersion && pattern.Version != resource.Version {
- return false
- }
- if pattern.Resource != AnyResource && pattern.Resource != resource.Resource {
- return false
- }
-
- return true
-}
-
-func kindMatches(pattern schema.GroupVersionKind, kind schema.GroupVersionKind) bool {
- if pattern.Group != AnyGroup && pattern.Group != kind.Group {
- return false
- }
- if pattern.Version != AnyVersion && pattern.Version != kind.Version {
- return false
- }
- if pattern.Kind != AnyKind && pattern.Kind != kind.Kind {
- return false
- }
-
- return true
-}
-
-func (m PriorityRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (mapping *RESTMapping, err error) {
- mappings, err := m.Delegate.RESTMappings(gk, versions...)
- if err != nil {
- return nil, err
- }
-
- // any versions the user provides take priority
- priorities := m.KindPriority
- if len(versions) > 0 {
- priorities = make([]schema.GroupVersionKind, 0, len(m.KindPriority)+len(versions))
- for _, version := range versions {
- gv := schema.GroupVersion{
- Version: version,
- Group: gk.Group,
- }
- priorities = append(priorities, gv.WithKind(AnyKind))
- }
- priorities = append(priorities, m.KindPriority...)
- }
-
- remaining := append([]*RESTMapping{}, mappings...)
- for _, pattern := range priorities {
- var matching []*RESTMapping
- for _, m := range remaining {
- if kindMatches(pattern, m.GroupVersionKind) {
- matching = append(matching, m)
- }
- }
-
- switch len(matching) {
- case 0:
- // if you have no matches, then nothing matched this pattern just move to the next
- continue
- case 1:
- // one match, return
- return matching[0], nil
- default:
- // more than one match, use the matched hits as the list moving to the next pattern.
- // this way you can have a series of selection criteria
- remaining = matching
- }
- }
- if len(remaining) == 1 {
- return remaining[0], nil
- }
-
- var kinds []schema.GroupVersionKind
- for _, m := range mappings {
- kinds = append(kinds, m.GroupVersionKind)
- }
- return nil, &AmbiguousKindError{PartialKind: gk.WithVersion(""), MatchingKinds: kinds}
-}
-
-func (m PriorityRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) {
- return m.Delegate.RESTMappings(gk, versions...)
-}
-
-func (m PriorityRESTMapper) ResourceSingularizer(resource string) (singular string, err error) {
- return m.Delegate.ResourceSingularizer(resource)
-}
-
-func (m PriorityRESTMapper) ResourcesFor(partiallySpecifiedResource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) {
- return m.Delegate.ResourcesFor(partiallySpecifiedResource)
-}
-
-func (m PriorityRESTMapper) KindsFor(partiallySpecifiedResource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) {
- return m.Delegate.KindsFor(partiallySpecifiedResource)
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go
deleted file mode 100644
index ff945acd1..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go
+++ /dev/null
@@ -1,548 +0,0 @@
-/*
-Copyright 2014 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.
-*/
-
-// TODO: move everything in this file to pkg/api/rest
-package meta
-
-import (
- "fmt"
- "sort"
- "strings"
-
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// Implements RESTScope interface
-type restScope struct {
- name RESTScopeName
- paramName string
- argumentName string
- paramDescription string
-}
-
-func (r *restScope) Name() RESTScopeName {
- return r.name
-}
-func (r *restScope) ParamName() string {
- return r.paramName
-}
-func (r *restScope) ArgumentName() string {
- return r.argumentName
-}
-func (r *restScope) ParamDescription() string {
- return r.paramDescription
-}
-
-var RESTScopeNamespace = &restScope{
- name: RESTScopeNameNamespace,
- paramName: "namespaces",
- argumentName: "namespace",
- paramDescription: "object name and auth scope, such as for teams and projects",
-}
-
-var RESTScopeRoot = &restScope{
- name: RESTScopeNameRoot,
-}
-
-// DefaultRESTMapper exposes mappings between the types defined in a
-// runtime.Scheme. It assumes that all types defined the provided scheme
-// can be mapped with the provided MetadataAccessor and Codec interfaces.
-//
-// The resource name of a Kind is defined as the lowercase,
-// English-plural version of the Kind string.
-// When converting from resource to Kind, the singular version of the
-// resource name is also accepted for convenience.
-//
-// TODO: Only accept plural for some operations for increased control?
-// (`get pod bar` vs `get pods bar`)
-type DefaultRESTMapper struct {
- defaultGroupVersions []schema.GroupVersion
-
- resourceToKind map[schema.GroupVersionResource]schema.GroupVersionKind
- kindToPluralResource map[schema.GroupVersionKind]schema.GroupVersionResource
- kindToScope map[schema.GroupVersionKind]RESTScope
- singularToPlural map[schema.GroupVersionResource]schema.GroupVersionResource
- pluralToSingular map[schema.GroupVersionResource]schema.GroupVersionResource
-
- interfacesFunc VersionInterfacesFunc
-}
-
-func (m *DefaultRESTMapper) String() string {
- return fmt.Sprintf("DefaultRESTMapper{kindToPluralResource=%v}", m.kindToPluralResource)
-}
-
-var _ RESTMapper = &DefaultRESTMapper{}
-
-// VersionInterfacesFunc returns the appropriate typer, and metadata accessor for a
-// given api version, or an error if no such api version exists.
-type VersionInterfacesFunc func(version schema.GroupVersion) (*VersionInterfaces, error)
-
-// NewDefaultRESTMapper initializes a mapping between Kind and APIVersion
-// to a resource name and back based on the objects in a runtime.Scheme
-// and the Kubernetes API conventions. Takes a group name, a priority list of the versions
-// to search when an object has no default version (set empty to return an error),
-// and a function that retrieves the correct metadata for a given version.
-func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion, f VersionInterfacesFunc) *DefaultRESTMapper {
- resourceToKind := make(map[schema.GroupVersionResource]schema.GroupVersionKind)
- kindToPluralResource := make(map[schema.GroupVersionKind]schema.GroupVersionResource)
- kindToScope := make(map[schema.GroupVersionKind]RESTScope)
- singularToPlural := make(map[schema.GroupVersionResource]schema.GroupVersionResource)
- pluralToSingular := make(map[schema.GroupVersionResource]schema.GroupVersionResource)
- // TODO: verify name mappings work correctly when versions differ
-
- return &DefaultRESTMapper{
- resourceToKind: resourceToKind,
- kindToPluralResource: kindToPluralResource,
- kindToScope: kindToScope,
- defaultGroupVersions: defaultGroupVersions,
- singularToPlural: singularToPlural,
- pluralToSingular: pluralToSingular,
- interfacesFunc: f,
- }
-}
-
-func (m *DefaultRESTMapper) Add(kind schema.GroupVersionKind, scope RESTScope) {
- plural, singular := UnsafeGuessKindToResource(kind)
- m.AddSpecific(kind, plural, singular, scope)
-}
-
-func (m *DefaultRESTMapper) AddSpecific(kind schema.GroupVersionKind, plural, singular schema.GroupVersionResource, scope RESTScope) {
- m.singularToPlural[singular] = plural
- m.pluralToSingular[plural] = singular
-
- m.resourceToKind[singular] = kind
- m.resourceToKind[plural] = kind
-
- m.kindToPluralResource[kind] = plural
- m.kindToScope[kind] = scope
-}
-
-// unpluralizedSuffixes is a list of resource suffixes that are the same plural and singular
-// This is only is only necessary because some bits of code are lazy and don't actually use the RESTMapper like they should.
-// TODO eliminate this so that different callers can correctly map to resources. This probably means updating all
-// callers to use the RESTMapper they mean.
-var unpluralizedSuffixes = []string{
- "endpoints",
-}
-
-// UnsafeGuessKindToResource converts Kind to a resource name.
-// Broken. This method only "sort of" works when used outside of this package. It assumes that Kinds and Resources match
-// and they aren't guaranteed to do so.
-func UnsafeGuessKindToResource(kind schema.GroupVersionKind) ( /*plural*/ schema.GroupVersionResource /*singular*/, schema.GroupVersionResource) {
- kindName := kind.Kind
- if len(kindName) == 0 {
- return schema.GroupVersionResource{}, schema.GroupVersionResource{}
- }
- singularName := strings.ToLower(kindName)
- singular := kind.GroupVersion().WithResource(singularName)
-
- for _, skip := range unpluralizedSuffixes {
- if strings.HasSuffix(singularName, skip) {
- return singular, singular
- }
- }
-
- switch string(singularName[len(singularName)-1]) {
- case "s":
- return kind.GroupVersion().WithResource(singularName + "es"), singular
- case "y":
- return kind.GroupVersion().WithResource(strings.TrimSuffix(singularName, "y") + "ies"), singular
- }
-
- return kind.GroupVersion().WithResource(singularName + "s"), singular
-}
-
-// ResourceSingularizer implements RESTMapper
-// It converts a resource name from plural to singular (e.g., from pods to pod)
-func (m *DefaultRESTMapper) ResourceSingularizer(resourceType string) (string, error) {
- partialResource := schema.GroupVersionResource{Resource: resourceType}
- resources, err := m.ResourcesFor(partialResource)
- if err != nil {
- return resourceType, err
- }
-
- singular := schema.GroupVersionResource{}
- for _, curr := range resources {
- currSingular, ok := m.pluralToSingular[curr]
- if !ok {
- continue
- }
- if singular.Empty() {
- singular = currSingular
- continue
- }
-
- if currSingular.Resource != singular.Resource {
- return resourceType, fmt.Errorf("multiple possible singular resources (%v) found for %v", resources, resourceType)
- }
- }
-
- if singular.Empty() {
- return resourceType, fmt.Errorf("no singular of resource %v has been defined", resourceType)
- }
-
- return singular.Resource, nil
-}
-
-// coerceResourceForMatching makes the resource lower case and converts internal versions to unspecified (legacy behavior)
-func coerceResourceForMatching(resource schema.GroupVersionResource) schema.GroupVersionResource {
- resource.Resource = strings.ToLower(resource.Resource)
- if resource.Version == runtime.APIVersionInternal {
- resource.Version = ""
- }
-
- return resource
-}
-
-func (m *DefaultRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) {
- resource := coerceResourceForMatching(input)
-
- hasResource := len(resource.Resource) > 0
- hasGroup := len(resource.Group) > 0
- hasVersion := len(resource.Version) > 0
-
- if !hasResource {
- return nil, fmt.Errorf("a resource must be present, got: %v", resource)
- }
-
- ret := []schema.GroupVersionResource{}
- switch {
- case hasGroup && hasVersion:
- // fully qualified. Find the exact match
- for plural, singular := range m.pluralToSingular {
- if singular == resource {
- ret = append(ret, plural)
- break
- }
- if plural == resource {
- ret = append(ret, plural)
- break
- }
- }
-
- case hasGroup:
- // given a group, prefer an exact match. If you don't find one, resort to a prefix match on group
- foundExactMatch := false
- requestedGroupResource := resource.GroupResource()
- for plural, singular := range m.pluralToSingular {
- if singular.GroupResource() == requestedGroupResource {
- foundExactMatch = true
- ret = append(ret, plural)
- }
- if plural.GroupResource() == requestedGroupResource {
- foundExactMatch = true
- ret = append(ret, plural)
- }
- }
-
- // if you didn't find an exact match, match on group prefixing. This allows storageclass.storage to match
- // storageclass.storage.k8s.io
- if !foundExactMatch {
- for plural, singular := range m.pluralToSingular {
- if !strings.HasPrefix(plural.Group, requestedGroupResource.Group) {
- continue
- }
- if singular.Resource == requestedGroupResource.Resource {
- ret = append(ret, plural)
- }
- if plural.Resource == requestedGroupResource.Resource {
- ret = append(ret, plural)
- }
- }
-
- }
-
- case hasVersion:
- for plural, singular := range m.pluralToSingular {
- if singular.Version == resource.Version && singular.Resource == resource.Resource {
- ret = append(ret, plural)
- }
- if plural.Version == resource.Version && plural.Resource == resource.Resource {
- ret = append(ret, plural)
- }
- }
-
- default:
- for plural, singular := range m.pluralToSingular {
- if singular.Resource == resource.Resource {
- ret = append(ret, plural)
- }
- if plural.Resource == resource.Resource {
- ret = append(ret, plural)
- }
- }
- }
-
- if len(ret) == 0 {
- return nil, &NoResourceMatchError{PartialResource: resource}
- }
-
- sort.Sort(resourceByPreferredGroupVersion{ret, m.defaultGroupVersions})
- return ret, nil
-}
-
-func (m *DefaultRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
- resources, err := m.ResourcesFor(resource)
- if err != nil {
- return schema.GroupVersionResource{}, err
- }
- if len(resources) == 1 {
- return resources[0], nil
- }
-
- return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources}
-}
-
-func (m *DefaultRESTMapper) KindsFor(input schema.GroupVersionResource) ([]schema.GroupVersionKind, error) {
- resource := coerceResourceForMatching(input)
-
- hasResource := len(resource.Resource) > 0
- hasGroup := len(resource.Group) > 0
- hasVersion := len(resource.Version) > 0
-
- if !hasResource {
- return nil, fmt.Errorf("a resource must be present, got: %v", resource)
- }
-
- ret := []schema.GroupVersionKind{}
- switch {
- // fully qualified. Find the exact match
- case hasGroup && hasVersion:
- kind, exists := m.resourceToKind[resource]
- if exists {
- ret = append(ret, kind)
- }
-
- case hasGroup:
- foundExactMatch := false
- requestedGroupResource := resource.GroupResource()
- for currResource, currKind := range m.resourceToKind {
- if currResource.GroupResource() == requestedGroupResource {
- foundExactMatch = true
- ret = append(ret, currKind)
- }
- }
-
- // if you didn't find an exact match, match on group prefixing. This allows storageclass.storage to match
- // storageclass.storage.k8s.io
- if !foundExactMatch {
- for currResource, currKind := range m.resourceToKind {
- if !strings.HasPrefix(currResource.Group, requestedGroupResource.Group) {
- continue
- }
- if currResource.Resource == requestedGroupResource.Resource {
- ret = append(ret, currKind)
- }
- }
-
- }
-
- case hasVersion:
- for currResource, currKind := range m.resourceToKind {
- if currResource.Version == resource.Version && currResource.Resource == resource.Resource {
- ret = append(ret, currKind)
- }
- }
-
- default:
- for currResource, currKind := range m.resourceToKind {
- if currResource.Resource == resource.Resource {
- ret = append(ret, currKind)
- }
- }
- }
-
- if len(ret) == 0 {
- return nil, &NoResourceMatchError{PartialResource: input}
- }
-
- sort.Sort(kindByPreferredGroupVersion{ret, m.defaultGroupVersions})
- return ret, nil
-}
-
-func (m *DefaultRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
- kinds, err := m.KindsFor(resource)
- if err != nil {
- return schema.GroupVersionKind{}, err
- }
- if len(kinds) == 1 {
- return kinds[0], nil
- }
-
- return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds}
-}
-
-type kindByPreferredGroupVersion struct {
- list []schema.GroupVersionKind
- sortOrder []schema.GroupVersion
-}
-
-func (o kindByPreferredGroupVersion) Len() int { return len(o.list) }
-func (o kindByPreferredGroupVersion) Swap(i, j int) { o.list[i], o.list[j] = o.list[j], o.list[i] }
-func (o kindByPreferredGroupVersion) Less(i, j int) bool {
- lhs := o.list[i]
- rhs := o.list[j]
- if lhs == rhs {
- return false
- }
-
- if lhs.GroupVersion() == rhs.GroupVersion() {
- return lhs.Kind < rhs.Kind
- }
-
- // otherwise, the difference is in the GroupVersion, so we need to sort with respect to the preferred order
- lhsIndex := -1
- rhsIndex := -1
-
- for i := range o.sortOrder {
- if o.sortOrder[i] == lhs.GroupVersion() {
- lhsIndex = i
- }
- if o.sortOrder[i] == rhs.GroupVersion() {
- rhsIndex = i
- }
- }
-
- if rhsIndex == -1 {
- return true
- }
-
- return lhsIndex < rhsIndex
-}
-
-type resourceByPreferredGroupVersion struct {
- list []schema.GroupVersionResource
- sortOrder []schema.GroupVersion
-}
-
-func (o resourceByPreferredGroupVersion) Len() int { return len(o.list) }
-func (o resourceByPreferredGroupVersion) Swap(i, j int) { o.list[i], o.list[j] = o.list[j], o.list[i] }
-func (o resourceByPreferredGroupVersion) Less(i, j int) bool {
- lhs := o.list[i]
- rhs := o.list[j]
- if lhs == rhs {
- return false
- }
-
- if lhs.GroupVersion() == rhs.GroupVersion() {
- return lhs.Resource < rhs.Resource
- }
-
- // otherwise, the difference is in the GroupVersion, so we need to sort with respect to the preferred order
- lhsIndex := -1
- rhsIndex := -1
-
- for i := range o.sortOrder {
- if o.sortOrder[i] == lhs.GroupVersion() {
- lhsIndex = i
- }
- if o.sortOrder[i] == rhs.GroupVersion() {
- rhsIndex = i
- }
- }
-
- if rhsIndex == -1 {
- return true
- }
-
- return lhsIndex < rhsIndex
-}
-
-// RESTMapping returns a struct representing the resource path and conversion interfaces a
-// RESTClient should use to operate on the provided group/kind in order of versions. If a version search
-// order is not provided, the search order provided to DefaultRESTMapper will be used to resolve which
-// version should be used to access the named group/kind.
-func (m *DefaultRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) {
- mappings, err := m.RESTMappings(gk, versions...)
- if err != nil {
- return nil, err
- }
- if len(mappings) == 0 {
- return nil, &NoKindMatchError{GroupKind: gk, SearchedVersions: versions}
- }
- // since we rely on RESTMappings method
- // take the first match and return to the caller
- // as this was the existing behavior.
- return mappings[0], nil
-}
-
-// RESTMappings returns the RESTMappings for the provided group kind. If a version search order
-// is not provided, the search order provided to DefaultRESTMapper will be used.
-func (m *DefaultRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) {
- mappings := make([]*RESTMapping, 0)
- potentialGVK := make([]schema.GroupVersionKind, 0)
- hadVersion := false
-
- // Pick an appropriate version
- for _, version := range versions {
- if len(version) == 0 || version == runtime.APIVersionInternal {
- continue
- }
- currGVK := gk.WithVersion(version)
- hadVersion = true
- if _, ok := m.kindToPluralResource[currGVK]; ok {
- potentialGVK = append(potentialGVK, currGVK)
- break
- }
- }
- // Use the default preferred versions
- if !hadVersion && len(potentialGVK) == 0 {
- for _, gv := range m.defaultGroupVersions {
- if gv.Group != gk.Group {
- continue
- }
- potentialGVK = append(potentialGVK, gk.WithVersion(gv.Version))
- }
- }
-
- if len(potentialGVK) == 0 {
- return nil, &NoKindMatchError{GroupKind: gk, SearchedVersions: versions}
- }
-
- for _, gvk := range potentialGVK {
- //Ensure we have a REST mapping
- res, ok := m.kindToPluralResource[gvk]
- if !ok {
- continue
- }
-
- // Ensure we have a REST scope
- scope, ok := m.kindToScope[gvk]
- if !ok {
- return nil, fmt.Errorf("the provided version %q and kind %q cannot be mapped to a supported scope", gvk.GroupVersion(), gvk.Kind)
- }
-
- interfaces, err := m.interfacesFunc(gvk.GroupVersion())
- if err != nil {
- return nil, fmt.Errorf("the provided version %q has no relevant versions: %v", gvk.GroupVersion().String(), err)
- }
-
- mappings = append(mappings, &RESTMapping{
- Resource: res.Resource,
- GroupVersionKind: gvk,
- Scope: scope,
-
- ObjectConvertor: interfaces.ObjectConvertor,
- MetadataAccessor: interfaces.MetadataAccessor,
- })
- }
-
- if len(mappings) == 0 {
- return nil, &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Group: gk.Group, Resource: gk.Kind}}
- }
- return mappings, nil
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go b/vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go
deleted file mode 100644
index 4e13efea3..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-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 meta
-
-import (
- "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// InterfacesForUnstructuredConversion returns VersionInterfaces suitable for
-// dealing with unstructured.Unstructured objects and supports conversion
-// from typed objects (provided by parent) to untyped objects.
-func InterfacesForUnstructuredConversion(parent VersionInterfacesFunc) VersionInterfacesFunc {
- return func(version schema.GroupVersion) (*VersionInterfaces, error) {
- if i, err := parent(version); err == nil {
- return &VersionInterfaces{
- ObjectConvertor: i.ObjectConvertor,
- MetadataAccessor: NewAccessor(),
- }, nil
- }
- return InterfacesForUnstructured(version)
- }
-}
-
-// InterfacesForUnstructured returns VersionInterfaces suitable for
-// dealing with unstructured.Unstructured objects. It will return errors for
-// other conversions.
-func InterfacesForUnstructured(schema.GroupVersion) (*VersionInterfaces, error) {
- return &VersionInterfaces{
- ObjectConvertor: &unstructured.UnstructuredObjectConverter{},
- MetadataAccessor: NewAccessor(),
- }, nil
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/doc.go b/vendor/k8s.io/apimachinery/pkg/api/validation/doc.go
deleted file mode 100644
index 9f20152e4..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/validation/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2017 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 validation contains generic api type validation functions.
-package validation // import "k8s.io/apimachinery/pkg/api/validation"
diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/generic.go b/vendor/k8s.io/apimachinery/pkg/api/validation/generic.go
deleted file mode 100644
index 348cdc087..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/validation/generic.go
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-Copyright 2014 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 validation
-
-import (
- "strings"
-
- "k8s.io/apimachinery/pkg/util/validation"
- "k8s.io/apimachinery/pkg/util/validation/field"
-)
-
-const IsNegativeErrorMsg string = `must be greater than or equal to 0`
-
-// ValidateNameFunc validates that the provided name is valid for a given resource type.
-// Not all resources have the same validation rules for names. Prefix is true
-// if the name will have a value appended to it. If the name is not valid,
-// this returns a list of descriptions of individual characteristics of the
-// value that were not valid. Otherwise this returns an empty list or nil.
-type ValidateNameFunc func(name string, prefix bool) []string
-
-// NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain.
-func NameIsDNSSubdomain(name string, prefix bool) []string {
- if prefix {
- name = maskTrailingDash(name)
- }
- return validation.IsDNS1123Subdomain(name)
-}
-
-// NameIsDNSLabel is a ValidateNameFunc for names that must be a DNS 1123 label.
-func NameIsDNSLabel(name string, prefix bool) []string {
- if prefix {
- name = maskTrailingDash(name)
- }
- return validation.IsDNS1123Label(name)
-}
-
-// NameIsDNS1035Label is a ValidateNameFunc for names that must be a DNS 952 label.
-func NameIsDNS1035Label(name string, prefix bool) []string {
- if prefix {
- name = maskTrailingDash(name)
- }
- return validation.IsDNS1035Label(name)
-}
-
-// ValidateNamespaceName can be used to check whether the given namespace name is valid.
-// Prefix indicates this name will be used as part of generation, in which case
-// trailing dashes are allowed.
-var ValidateNamespaceName = NameIsDNSLabel
-
-// ValidateServiceAccountName can be used to check whether the given service account name is valid.
-// Prefix indicates this name will be used as part of generation, in which case
-// trailing dashes are allowed.
-var ValidateServiceAccountName = NameIsDNSSubdomain
-
-// maskTrailingDash replaces the final character of a string with a subdomain safe
-// value if is a dash.
-func maskTrailingDash(name string) string {
- if strings.HasSuffix(name, "-") {
- return name[:len(name)-2] + "a"
- }
- return name
-}
-
-// Validates that given value is not negative.
-func ValidateNonnegativeField(value int64, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- if value < 0 {
- allErrs = append(allErrs, field.Invalid(fldPath, value, IsNegativeErrorMsg))
- }
- return allErrs
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go
deleted file mode 100644
index 3c32a937a..000000000
--- a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
-Copyright 2014 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 validation
-
-import (
- "fmt"
- "strings"
-
- apiequality "k8s.io/apimachinery/pkg/api/equality"
- "k8s.io/apimachinery/pkg/api/meta"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- v1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/util/sets"
- "k8s.io/apimachinery/pkg/util/validation"
- "k8s.io/apimachinery/pkg/util/validation/field"
-)
-
-// TODO: delete this global variable when we enable the validation of common
-// fields by default.
-var RepairMalformedUpdates bool = true
-
-const FieldImmutableErrorMsg string = `field is immutable`
-
-const totalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB
-
-// BannedOwners is a black list of object that are not allowed to be owners.
-var BannedOwners = map[schema.GroupVersionKind]struct{}{
- {Group: "", Version: "v1", Kind: "Event"}: {},
-}
-
-// ValidateClusterName can be used to check whether the given cluster name is valid.
-var ValidateClusterName = NameIsDNS1035Label
-
-// ValidateAnnotations validates that a set of annotations are correctly defined.
-func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- var totalSize int64
- for k, v := range annotations {
- for _, msg := range validation.IsQualifiedName(strings.ToLower(k)) {
- allErrs = append(allErrs, field.Invalid(fldPath, k, msg))
- }
- totalSize += (int64)(len(k)) + (int64)(len(v))
- }
- if totalSize > (int64)(totalAnnotationSizeLimitB) {
- allErrs = append(allErrs, field.TooLong(fldPath, "", totalAnnotationSizeLimitB))
- }
- return allErrs
-}
-
-func validateOwnerReference(ownerReference metav1.OwnerReference, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- gvk := schema.FromAPIVersionAndKind(ownerReference.APIVersion, ownerReference.Kind)
- // gvk.Group is empty for the legacy group.
- if len(gvk.Version) == 0 {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("apiVersion"), ownerReference.APIVersion, "version must not be empty"))
- }
- if len(gvk.Kind) == 0 {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("kind"), ownerReference.Kind, "kind must not be empty"))
- }
- if len(ownerReference.Name) == 0 {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), ownerReference.Name, "name must not be empty"))
- }
- if len(ownerReference.UID) == 0 {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("uid"), ownerReference.UID, "uid must not be empty"))
- }
- if _, ok := BannedOwners[gvk]; ok {
- allErrs = append(allErrs, field.Invalid(fldPath, ownerReference, fmt.Sprintf("%s is disallowed from being an owner", gvk)))
- }
- return allErrs
-}
-
-func ValidateOwnerReferences(ownerReferences []metav1.OwnerReference, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- controllerName := ""
- for _, ref := range ownerReferences {
- allErrs = append(allErrs, validateOwnerReference(ref, fldPath)...)
- if ref.Controller != nil && *ref.Controller {
- if controllerName != "" {
- allErrs = append(allErrs, field.Invalid(fldPath, ownerReferences,
- fmt.Sprintf("Only one reference can have Controller set to true. Found \"true\" in references for %v and %v", controllerName, ref.Name)))
- } else {
- controllerName = ref.Name
- }
- }
- }
- return allErrs
-}
-
-// Validate finalizer names
-func ValidateFinalizerName(stringValue string, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- for _, msg := range validation.IsQualifiedName(stringValue) {
- allErrs = append(allErrs, field.Invalid(fldPath, stringValue, msg))
- }
-
- return allErrs
-}
-
-func ValidateNoNewFinalizers(newFinalizers []string, oldFinalizers []string, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- extra := sets.NewString(newFinalizers...).Difference(sets.NewString(oldFinalizers...))
- if len(extra) != 0 {
- allErrs = append(allErrs, field.Forbidden(fldPath, fmt.Sprintf("no new finalizers can be added if the object is being deleted, found new finalizers %#v", extra.List())))
- }
- return allErrs
-}
-
-func ValidateImmutableField(newVal, oldVal interface{}, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- if !apiequality.Semantic.DeepEqual(oldVal, newVal) {
- allErrs = append(allErrs, field.Invalid(fldPath, newVal, FieldImmutableErrorMsg))
- }
- return allErrs
-}
-
-// ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already
-// been performed.
-// It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before.
-func ValidateObjectMeta(objMeta *metav1.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList {
- metadata, err := meta.Accessor(objMeta)
- if err != nil {
- allErrs := field.ErrorList{}
- allErrs = append(allErrs, field.Invalid(fldPath, objMeta, err.Error()))
- return allErrs
- }
- return ValidateObjectMetaAccessor(metadata, requiresNamespace, nameFn, fldPath)
-}
-
-// ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already
-// been performed.
-// It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before.
-func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if len(meta.GetGenerateName()) != 0 {
- for _, msg := range nameFn(meta.GetGenerateName(), true) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("generateName"), meta.GetGenerateName(), msg))
- }
- }
- // If the generated name validates, but the calculated value does not, it's a problem with generation, and we
- // report it here. This may confuse users, but indicates a programming bug and still must be validated.
- // If there are multiple fields out of which one is required then add an or as a separator
- if len(meta.GetName()) == 0 {
- allErrs = append(allErrs, field.Required(fldPath.Child("name"), "name or generateName is required"))
- } else {
- for _, msg := range nameFn(meta.GetName(), false) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), meta.GetName(), msg))
- }
- }
- if requiresNamespace {
- if len(meta.GetNamespace()) == 0 {
- allErrs = append(allErrs, field.Required(fldPath.Child("namespace"), ""))
- } else {
- for _, msg := range ValidateNamespaceName(meta.GetNamespace(), false) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("namespace"), meta.GetNamespace(), msg))
- }
- }
- } else {
- if len(meta.GetNamespace()) != 0 {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("namespace"), "not allowed on this type"))
- }
- }
- if len(meta.GetClusterName()) != 0 {
- for _, msg := range ValidateClusterName(meta.GetClusterName(), false) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterName"), meta.GetClusterName(), msg))
- }
- }
- allErrs = append(allErrs, ValidateNonnegativeField(meta.GetGeneration(), fldPath.Child("generation"))...)
- allErrs = append(allErrs, v1validation.ValidateLabels(meta.GetLabels(), fldPath.Child("labels"))...)
- allErrs = append(allErrs, ValidateAnnotations(meta.GetAnnotations(), fldPath.Child("annotations"))...)
- allErrs = append(allErrs, ValidateOwnerReferences(meta.GetOwnerReferences(), fldPath.Child("ownerReferences"))...)
- allErrs = append(allErrs, ValidateInitializers(meta.GetInitializers(), fldPath.Child("initializers"))...)
- allErrs = append(allErrs, ValidateFinalizers(meta.GetFinalizers(), fldPath.Child("finalizers"))...)
- return allErrs
-}
-
-func ValidateInitializers(initializers *metav1.Initializers, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if initializers == nil {
- return allErrs
- }
- for i, initializer := range initializers.Pending {
- allErrs = append(allErrs, validation.IsFullyQualifiedName(fldPath.Child("pending").Index(i).Child("name"), initializer.Name)...)
- }
- allErrs = append(allErrs, validateInitializersResult(initializers.Result, fldPath.Child("result"))...)
- return allErrs
-}
-
-func validateInitializersResult(result *metav1.Status, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if result == nil {
- return allErrs
- }
- switch result.Status {
- case metav1.StatusFailure:
- default:
- allErrs = append(allErrs, field.Invalid(fldPath.Child("status"), result.Status, "must be 'Failure'"))
- }
- return allErrs
-}
-
-// ValidateFinalizers tests if the finalizers name are valid, and if there are conflicting finalizers.
-func ValidateFinalizers(finalizers []string, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- hasFinalizerOrphanDependents := false
- hasFinalizerDeleteDependents := false
- for _, finalizer := range finalizers {
- allErrs = append(allErrs, ValidateFinalizerName(finalizer, fldPath)...)
- if finalizer == metav1.FinalizerOrphanDependents {
- hasFinalizerOrphanDependents = true
- }
- if finalizer == metav1.FinalizerDeleteDependents {
- hasFinalizerDeleteDependents = true
- }
- }
- if hasFinalizerDeleteDependents && hasFinalizerOrphanDependents {
- allErrs = append(allErrs, field.Invalid(fldPath, finalizers, fmt.Sprintf("finalizer %s and %s cannot be both set", metav1.FinalizerOrphanDependents, metav1.FinalizerDeleteDependents)))
- }
- return allErrs
-}
-
-// ValidateObjectMetaUpdate validates an object's metadata when updated
-func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *field.Path) field.ErrorList {
- newMetadata, err := meta.Accessor(newMeta)
- if err != nil {
- allErrs := field.ErrorList{}
- allErrs = append(allErrs, field.Invalid(fldPath, newMeta, err.Error()))
- return allErrs
- }
- oldMetadata, err := meta.Accessor(oldMeta)
- if err != nil {
- allErrs := field.ErrorList{}
- allErrs = append(allErrs, field.Invalid(fldPath, oldMeta, err.Error()))
- return allErrs
- }
- return ValidateObjectMetaAccessorUpdate(newMetadata, oldMetadata, fldPath)
-}
-
-func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- if !RepairMalformedUpdates && newMeta.GetUID() != oldMeta.GetUID() {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("uid"), newMeta.GetUID(), "field is immutable"))
- }
- // in the event it is left empty, set it, to allow clients more flexibility
- // TODO: remove the following code that repairs the update request when we retire the clients that modify the immutable fields.
- // Please do not copy this pattern elsewhere; validation functions should not be modifying the objects they are passed!
- if RepairMalformedUpdates {
- if len(newMeta.GetUID()) == 0 {
- newMeta.SetUID(oldMeta.GetUID())
- }
- // ignore changes to timestamp
- if oldCreationTime := oldMeta.GetCreationTimestamp(); oldCreationTime.IsZero() {
- oldMeta.SetCreationTimestamp(newMeta.GetCreationTimestamp())
- } else {
- newMeta.SetCreationTimestamp(oldMeta.GetCreationTimestamp())
- }
- // an object can never remove a deletion timestamp or clear/change grace period seconds
- if !oldMeta.GetDeletionTimestamp().IsZero() {
- newMeta.SetDeletionTimestamp(oldMeta.GetDeletionTimestamp())
- }
- if oldMeta.GetDeletionGracePeriodSeconds() != nil && newMeta.GetDeletionGracePeriodSeconds() == nil {
- newMeta.SetDeletionGracePeriodSeconds(oldMeta.GetDeletionGracePeriodSeconds())
- }
- }
-
- // TODO: needs to check if newMeta==nil && oldMeta !=nil after the repair logic is removed.
- if newMeta.GetDeletionGracePeriodSeconds() != nil && (oldMeta.GetDeletionGracePeriodSeconds() == nil || *newMeta.GetDeletionGracePeriodSeconds() != *oldMeta.GetDeletionGracePeriodSeconds()) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("deletionGracePeriodSeconds"), newMeta.GetDeletionGracePeriodSeconds(), "field is immutable; may only be changed via deletion"))
- }
- if newMeta.GetDeletionTimestamp() != nil && (oldMeta.GetDeletionTimestamp() == nil || !newMeta.GetDeletionTimestamp().Equal(oldMeta.GetDeletionTimestamp())) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("deletionTimestamp"), newMeta.GetDeletionTimestamp(), "field is immutable; may only be changed via deletion"))
- }
-
- // Finalizers cannot be added if the object is already being deleted.
- if oldMeta.GetDeletionTimestamp() != nil {
- allErrs = append(allErrs, ValidateNoNewFinalizers(newMeta.GetFinalizers(), oldMeta.GetFinalizers(), fldPath.Child("finalizers"))...)
- }
-
- // Reject updates that don't specify a resource version
- if len(newMeta.GetResourceVersion()) == 0 {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("resourceVersion"), newMeta.GetResourceVersion(), "must be specified for an update"))
- }
-
- // Generation shouldn't be decremented
- if newMeta.GetGeneration() < oldMeta.GetGeneration() {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("generation"), newMeta.GetGeneration(), "must not be decremented"))
- }
-
- allErrs = append(allErrs, ValidateInitializersUpdate(newMeta.GetInitializers(), oldMeta.GetInitializers(), fldPath.Child("initializers"))...)
-
- allErrs = append(allErrs, ValidateImmutableField(newMeta.GetName(), oldMeta.GetName(), fldPath.Child("name"))...)
- allErrs = append(allErrs, ValidateImmutableField(newMeta.GetNamespace(), oldMeta.GetNamespace(), fldPath.Child("namespace"))...)
- allErrs = append(allErrs, ValidateImmutableField(newMeta.GetUID(), oldMeta.GetUID(), fldPath.Child("uid"))...)
- allErrs = append(allErrs, ValidateImmutableField(newMeta.GetCreationTimestamp(), oldMeta.GetCreationTimestamp(), fldPath.Child("creationTimestamp"))...)
- allErrs = append(allErrs, ValidateImmutableField(newMeta.GetClusterName(), oldMeta.GetClusterName(), fldPath.Child("clusterName"))...)
-
- allErrs = append(allErrs, v1validation.ValidateLabels(newMeta.GetLabels(), fldPath.Child("labels"))...)
- allErrs = append(allErrs, ValidateAnnotations(newMeta.GetAnnotations(), fldPath.Child("annotations"))...)
- allErrs = append(allErrs, ValidateOwnerReferences(newMeta.GetOwnerReferences(), fldPath.Child("ownerReferences"))...)
-
- return allErrs
-}
-
-// ValidateInitializersUpdate checks the update of the metadata initializers field
-func ValidateInitializersUpdate(newInit, oldInit *metav1.Initializers, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- switch {
- case oldInit == nil && newInit != nil:
- // Initializers may not be set on new objects
- allErrs = append(allErrs, field.Invalid(fldPath, nil, "field is immutable once initialization has completed"))
- case oldInit != nil && newInit == nil:
- // this is a valid transition and means initialization was successful
- case oldInit != nil && newInit != nil:
- // validate changes to initializers
- switch {
- case oldInit.Result == nil && newInit.Result != nil:
- // setting a result is allowed
- allErrs = append(allErrs, validateInitializersResult(newInit.Result, fldPath.Child("result"))...)
- case oldInit.Result != nil:
- // setting Result implies permanent failure, and all future updates will be prevented
- allErrs = append(allErrs, ValidateImmutableField(newInit.Result, oldInit.Result, fldPath.Child("result"))...)
- default:
- // leaving the result nil is allowed
- }
- }
- return allErrs
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go
deleted file mode 100644
index 4e38cc8c5..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-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 announced contains tools for announcing API group factories. This is
-// distinct from registration (in the 'registered' package) in that it's safe
-// to announce every possible group linked in, but only groups requested at
-// runtime should be registered. This package contains both a registry, and
-// factory code (which was formerly copy-pasta in every install package).
-package announced
-
-import (
- "fmt"
-
- "k8s.io/apimachinery/pkg/apimachinery/registered"
- "k8s.io/apimachinery/pkg/runtime"
-)
-
-// APIGroupFactoryRegistry allows for groups and versions to announce themselves,
-// which simply makes them available and doesn't take other actions. Later,
-// users of the registry can select which groups and versions they'd actually
-// like to register with an APIRegistrationManager.
-//
-// (Right now APIRegistrationManager has separate 'registration' and 'enabled'
-// concepts-- APIGroupFactory is going to take over the former function;
-// they will overlap until the refactoring is finished.)
-//
-// The key is the group name. After initialization, this should be treated as
-// read-only. It is implemented as a map from group name to group factory, and
-// it is safe to use this knowledge to manually pick out groups to register
-// (e.g., for testing).
-type APIGroupFactoryRegistry map[string]*GroupMetaFactory
-
-func (gar APIGroupFactoryRegistry) group(groupName string) *GroupMetaFactory {
- gmf, ok := gar[groupName]
- if !ok {
- gmf = &GroupMetaFactory{VersionArgs: map[string]*GroupVersionFactoryArgs{}}
- gar[groupName] = gmf
- }
- return gmf
-}
-
-// AnnounceGroupVersion adds the particular arguments for this group version to the group factory.
-func (gar APIGroupFactoryRegistry) AnnounceGroupVersion(gvf *GroupVersionFactoryArgs) error {
- gmf := gar.group(gvf.GroupName)
- if _, ok := gmf.VersionArgs[gvf.VersionName]; ok {
- return fmt.Errorf("version %q in group %q has already been announced", gvf.VersionName, gvf.GroupName)
- }
- gmf.VersionArgs[gvf.VersionName] = gvf
- return nil
-}
-
-// AnnounceGroup adds the group-wide arguments to the group factory.
-func (gar APIGroupFactoryRegistry) AnnounceGroup(args *GroupMetaFactoryArgs) error {
- gmf := gar.group(args.GroupName)
- if gmf.GroupArgs != nil {
- return fmt.Errorf("group %q has already been announced", args.GroupName)
- }
- gmf.GroupArgs = args
- return nil
-}
-
-// RegisterAndEnableAll throws every factory at the specified API registration
-// manager, and lets it decide which to register. (If you want to do this a la
-// cart, you may look through gar itself-- it's just a map.)
-func (gar APIGroupFactoryRegistry) RegisterAndEnableAll(m *registered.APIRegistrationManager, scheme *runtime.Scheme) error {
- for groupName, gmf := range gar {
- if err := gmf.Register(m); err != nil {
- return fmt.Errorf("error registering %v: %v", groupName, err)
- }
- if err := gmf.Enable(m, scheme); err != nil {
- return fmt.Errorf("error enabling %v: %v", groupName, err)
- }
- }
- return nil
-}
-
-// AnnouncePreconstructedFactory announces a factory which you've manually assembled.
-// You may call this instead of calling AnnounceGroup and AnnounceGroupVersion.
-func (gar APIGroupFactoryRegistry) AnnouncePreconstructedFactory(gmf *GroupMetaFactory) error {
- name := gmf.GroupArgs.GroupName
- if _, exists := gar[name]; exists {
- return fmt.Errorf("the group %q has already been announced.", name)
- }
- gar[name] = gmf
- return nil
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go
deleted file mode 100644
index 154ed08f5..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
-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 announced
-
-import (
- "fmt"
-
- "github.com/golang/glog"
-
- "k8s.io/apimachinery/pkg/api/meta"
- "k8s.io/apimachinery/pkg/apimachinery"
- "k8s.io/apimachinery/pkg/apimachinery/registered"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/util/sets"
-)
-
-type SchemeFunc func(*runtime.Scheme) error
-type VersionToSchemeFunc map[string]SchemeFunc
-
-// GroupVersionFactoryArgs contains all the per-version parts of a GroupMetaFactory.
-type GroupVersionFactoryArgs struct {
- GroupName string
- VersionName string
-
- AddToScheme SchemeFunc
-}
-
-// GroupMetaFactoryArgs contains the group-level args of a GroupMetaFactory.
-type GroupMetaFactoryArgs struct {
- // GroupName is the name of the API-Group
- //
- // example: 'servicecatalog.k8s.io'
- GroupName string
- VersionPreferenceOrder []string
- // RootScopedKinds are resources that are not namespaced.
- RootScopedKinds sets.String // nil is allowed
- IgnoredKinds sets.String // nil is allowed
-
- // May be nil if there are no internal objects.
- AddInternalObjectsToScheme SchemeFunc
-}
-
-// NewGroupMetaFactory builds the args for you. This is for if you're
-// constructing a factory all at once and not using the registry.
-func NewGroupMetaFactory(groupArgs *GroupMetaFactoryArgs, versions VersionToSchemeFunc) *GroupMetaFactory {
- gmf := &GroupMetaFactory{
- GroupArgs: groupArgs,
- VersionArgs: map[string]*GroupVersionFactoryArgs{},
- }
- for v, f := range versions {
- gmf.VersionArgs[v] = &GroupVersionFactoryArgs{
- GroupName: groupArgs.GroupName,
- VersionName: v,
- AddToScheme: f,
- }
- }
- return gmf
-}
-
-// Announce adds this Group factory to the global factory registry. It should
-// only be called if you constructed the GroupMetaFactory yourself via
-// NewGroupMetaFactory.
-// Note that this will panic on an error, since it's expected that you'll be
-// calling this at initialization time and any error is a result of a
-// programmer importing the wrong set of packages. If this assumption doesn't
-// work for you, just call DefaultGroupFactoryRegistry.AnnouncePreconstructedFactory
-// yourself.
-func (gmf *GroupMetaFactory) Announce(groupFactoryRegistry APIGroupFactoryRegistry) *GroupMetaFactory {
- if err := groupFactoryRegistry.AnnouncePreconstructedFactory(gmf); err != nil {
- panic(err)
- }
- return gmf
-}
-
-// GroupMetaFactory has the logic for actually assembling and registering a group.
-//
-// There are two ways of obtaining one of these.
-// 1. You can announce your group and versions separately, and then let the
-// GroupFactoryRegistry assemble this object for you. (This allows group and
-// versions to be imported separately, without referencing each other, to
-// keep import trees small.)
-// 2. You can call NewGroupMetaFactory(), which is mostly a drop-in replacement
-// for the old, bad way of doing things. You can then call .Announce() to
-// announce your constructed factory to any code that would like to do
-// things the new, better way.
-//
-// Note that GroupMetaFactory actually does construct GroupMeta objects, but
-// currently it does so in a way that's very entangled with an
-// APIRegistrationManager. It's a TODO item to cleanly separate that interface.
-type GroupMetaFactory struct {
- GroupArgs *GroupMetaFactoryArgs
- // map of version name to version factory
- VersionArgs map[string]*GroupVersionFactoryArgs
-
- // assembled by Register()
- prioritizedVersionList []schema.GroupVersion
-}
-
-// Register constructs the finalized prioritized version list and sanity checks
-// the announced group & versions. Then it calls register.
-func (gmf *GroupMetaFactory) Register(m *registered.APIRegistrationManager) error {
- if gmf.GroupArgs == nil {
- return fmt.Errorf("partially announced groups are not allowed, only got versions: %#v", gmf.VersionArgs)
- }
- if len(gmf.VersionArgs) == 0 {
- return fmt.Errorf("group %v announced but no versions announced", gmf.GroupArgs.GroupName)
- }
-
- pvSet := sets.NewString(gmf.GroupArgs.VersionPreferenceOrder...)
- if pvSet.Len() != len(gmf.GroupArgs.VersionPreferenceOrder) {
- return fmt.Errorf("preference order for group %v has duplicates: %v", gmf.GroupArgs.GroupName, gmf.GroupArgs.VersionPreferenceOrder)
- }
- prioritizedVersions := []schema.GroupVersion{}
- for _, v := range gmf.GroupArgs.VersionPreferenceOrder {
- prioritizedVersions = append(
- prioritizedVersions,
- schema.GroupVersion{
- Group: gmf.GroupArgs.GroupName,
- Version: v,
- },
- )
- }
-
- // Go through versions that weren't explicitly prioritized.
- unprioritizedVersions := []schema.GroupVersion{}
- for _, v := range gmf.VersionArgs {
- if v.GroupName != gmf.GroupArgs.GroupName {
- return fmt.Errorf("found %v/%v in group %v?", v.GroupName, v.VersionName, gmf.GroupArgs.GroupName)
- }
- if pvSet.Has(v.VersionName) {
- pvSet.Delete(v.VersionName)
- continue
- }
- unprioritizedVersions = append(unprioritizedVersions, schema.GroupVersion{Group: v.GroupName, Version: v.VersionName})
- }
- if len(unprioritizedVersions) > 1 {
- glog.Warningf("group %v has multiple unprioritized versions: %#v. They will have an arbitrary preference order!", gmf.GroupArgs.GroupName, unprioritizedVersions)
- }
- if pvSet.Len() != 0 {
- return fmt.Errorf("group %v has versions in the priority list that were never announced: %s", gmf.GroupArgs.GroupName, pvSet)
- }
- prioritizedVersions = append(prioritizedVersions, unprioritizedVersions...)
- m.RegisterVersions(prioritizedVersions)
- gmf.prioritizedVersionList = prioritizedVersions
- return nil
-}
-
-func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersions []schema.GroupVersion, groupMeta *apimachinery.GroupMeta) meta.RESTMapper {
- // the list of kinds that are scoped at the root of the api hierarchy
- // if a kind is not enumerated here, it is assumed to have a namespace scope
- rootScoped := sets.NewString()
- if gmf.GroupArgs.RootScopedKinds != nil {
- rootScoped = gmf.GroupArgs.RootScopedKinds
- }
- ignoredKinds := sets.NewString()
- if gmf.GroupArgs.IgnoredKinds != nil {
- ignoredKinds = gmf.GroupArgs.IgnoredKinds
- }
-
- mapper := meta.NewDefaultRESTMapper(externalVersions, groupMeta.InterfacesFor)
- for _, gv := range externalVersions {
- for kind := range scheme.KnownTypes(gv) {
- if ignoredKinds.Has(kind) {
- continue
- }
- scope := meta.RESTScopeNamespace
- if rootScoped.Has(kind) {
- scope = meta.RESTScopeRoot
- }
- mapper.Add(gv.WithKind(kind), scope)
- }
- }
-
- return mapper
-}
-
-// Enable enables group versions that are allowed, adds methods to the scheme, etc.
-func (gmf *GroupMetaFactory) Enable(m *registered.APIRegistrationManager, scheme *runtime.Scheme) error {
- externalVersions := []schema.GroupVersion{}
- for _, v := range gmf.prioritizedVersionList {
- if !m.IsAllowedVersion(v) {
- continue
- }
- externalVersions = append(externalVersions, v)
- if err := m.EnableVersions(v); err != nil {
- return err
- }
- gmf.VersionArgs[v.Version].AddToScheme(scheme)
- }
- if len(externalVersions) == 0 {
- glog.V(4).Infof("No version is registered for group %v", gmf.GroupArgs.GroupName)
- return nil
- }
-
- if gmf.GroupArgs.AddInternalObjectsToScheme != nil {
- gmf.GroupArgs.AddInternalObjectsToScheme(scheme)
- }
-
- preferredExternalVersion := externalVersions[0]
- accessor := meta.NewAccessor()
-
- groupMeta := &apimachinery.GroupMeta{
- GroupVersion: preferredExternalVersion,
- GroupVersions: externalVersions,
- SelfLinker: runtime.SelfLinker(accessor),
- }
- for _, v := range externalVersions {
- gvf := gmf.VersionArgs[v.Version]
- if err := groupMeta.AddVersionInterfaces(
- schema.GroupVersion{Group: gvf.GroupName, Version: gvf.VersionName},
- &meta.VersionInterfaces{
- ObjectConvertor: scheme,
- MetadataAccessor: accessor,
- },
- ); err != nil {
- return err
- }
- }
- groupMeta.InterfacesFor = groupMeta.DefaultInterfacesFor
- groupMeta.RESTMapper = gmf.newRESTMapper(scheme, externalVersions, groupMeta)
-
- if err := m.RegisterGroup(*groupMeta); err != nil {
- return err
- }
- return nil
-}
-
-// RegisterAndEnable is provided only to allow this code to get added in multiple steps.
-// It's really bad that this is called in init() methods, but supporting this
-// temporarily lets us do the change incrementally.
-func (gmf *GroupMetaFactory) RegisterAndEnable(registry *registered.APIRegistrationManager, scheme *runtime.Scheme) error {
- if err := gmf.Register(registry); err != nil {
- return err
- }
- if err := gmf.Enable(registry, scheme); err != nil {
- return err
- }
-
- return nil
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go
deleted file mode 100644
index b238454b2..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2014 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 apimachinery contains the generic API machinery code that
-// is common to both server and clients.
-// This package should never import specific API objects.
-package apimachinery // import "k8s.io/apimachinery/pkg/apimachinery"
diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go
deleted file mode 100644
index 0da94f50f..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
-Copyright 2015 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 to keep track of API Versions that can be registered and are enabled in a Scheme.
-package registered
-
-import (
- "fmt"
- "sort"
- "strings"
-
- "github.com/golang/glog"
-
- "k8s.io/apimachinery/pkg/api/meta"
- "k8s.io/apimachinery/pkg/apimachinery"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/util/sets"
-)
-
-// APIRegistrationManager provides the concept of what API groups are enabled.
-//
-// TODO: currently, it also provides a "registered" concept. But it's wrong to
-// have both concepts in the same object. Therefore the "announced" package is
-// going to take over the registered concept. After all the install packages
-// are switched to using the announce package instead of this package, then we
-// can combine the registered/enabled concepts in this object. Simplifying this
-// isn't easy right now because there are so many callers of this package.
-type APIRegistrationManager struct {
- // registeredGroupVersions stores all API group versions for which RegisterGroup is called.
- registeredVersions map[schema.GroupVersion]struct{}
-
- // enabledVersions represents all enabled API versions. It should be a
- // subset of registeredVersions. Please call EnableVersions() to add
- // enabled versions.
- enabledVersions map[schema.GroupVersion]struct{}
-
- // map of group meta for all groups.
- groupMetaMap map[string]*apimachinery.GroupMeta
-
- // envRequestedVersions represents the versions requested via the
- // KUBE_API_VERSIONS environment variable. The install package of each group
- // checks this list before add their versions to the latest package and
- // Scheme. This list is small and order matters, so represent as a slice
- envRequestedVersions []schema.GroupVersion
-}
-
-// NewAPIRegistrationManager constructs a new manager. The argument ought to be
-// the value of the KUBE_API_VERSIONS env var, or a value of this which you
-// wish to test.
-func NewAPIRegistrationManager(kubeAPIVersions string) (*APIRegistrationManager, error) {
- m := &APIRegistrationManager{
- registeredVersions: map[schema.GroupVersion]struct{}{},
- enabledVersions: map[schema.GroupVersion]struct{}{},
- groupMetaMap: map[string]*apimachinery.GroupMeta{},
- envRequestedVersions: []schema.GroupVersion{},
- }
-
- if len(kubeAPIVersions) != 0 {
- for _, version := range strings.Split(kubeAPIVersions, ",") {
- gv, err := schema.ParseGroupVersion(version)
- if err != nil {
- return nil, fmt.Errorf("invalid api version: %s in KUBE_API_VERSIONS: %s.",
- version, kubeAPIVersions)
- }
- m.envRequestedVersions = append(m.envRequestedVersions, gv)
- }
- }
- return m, nil
-}
-
-func NewOrDie(kubeAPIVersions string) *APIRegistrationManager {
- m, err := NewAPIRegistrationManager(kubeAPIVersions)
- if err != nil {
- glog.Fatalf("Could not construct version manager: %v (KUBE_API_VERSIONS=%q)", err, kubeAPIVersions)
- }
- return m
-}
-
-// RegisterVersions adds the given group versions to the list of registered group versions.
-func (m *APIRegistrationManager) RegisterVersions(availableVersions []schema.GroupVersion) {
- for _, v := range availableVersions {
- m.registeredVersions[v] = struct{}{}
- }
-}
-
-// RegisterGroup adds the given group to the list of registered groups.
-func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error {
- groupName := groupMeta.GroupVersion.Group
- if _, found := m.groupMetaMap[groupName]; found {
- return fmt.Errorf("group %q is already registered in groupsMap: %v", groupName, m.groupMetaMap)
- }
- m.groupMetaMap[groupName] = &groupMeta
- return nil
-}
-
-// EnableVersions adds the versions for the given group to the list of enabled versions.
-// Note that the caller should call RegisterGroup before calling this method.
-// The caller of this function is responsible to add the versions to scheme and RESTMapper.
-func (m *APIRegistrationManager) EnableVersions(versions ...schema.GroupVersion) error {
- var unregisteredVersions []schema.GroupVersion
- for _, v := range versions {
- if _, found := m.registeredVersions[v]; !found {
- unregisteredVersions = append(unregisteredVersions, v)
- }
- m.enabledVersions[v] = struct{}{}
- }
- if len(unregisteredVersions) != 0 {
- return fmt.Errorf("Please register versions before enabling them: %v", unregisteredVersions)
- }
- return nil
-}
-
-// IsAllowedVersion returns if the version is allowed by the KUBE_API_VERSIONS
-// environment variable. If the environment variable is empty, then it always
-// returns true.
-func (m *APIRegistrationManager) IsAllowedVersion(v schema.GroupVersion) bool {
- if len(m.envRequestedVersions) == 0 {
- return true
- }
- for _, envGV := range m.envRequestedVersions {
- if v == envGV {
- return true
- }
- }
- return false
-}
-
-// IsEnabledVersion returns if a version is enabled.
-func (m *APIRegistrationManager) IsEnabledVersion(v schema.GroupVersion) bool {
- _, found := m.enabledVersions[v]
- return found
-}
-
-// EnabledVersions returns all enabled versions. Groups are randomly ordered, but versions within groups
-// are priority order from best to worst
-func (m *APIRegistrationManager) EnabledVersions() []schema.GroupVersion {
- ret := []schema.GroupVersion{}
- for _, groupMeta := range m.groupMetaMap {
- for _, version := range groupMeta.GroupVersions {
- if m.IsEnabledVersion(version) {
- ret = append(ret, version)
- }
- }
- }
- return ret
-}
-
-// EnabledVersionsForGroup returns all enabled versions for a group in order of best to worst
-func (m *APIRegistrationManager) EnabledVersionsForGroup(group string) []schema.GroupVersion {
- groupMeta, ok := m.groupMetaMap[group]
- if !ok {
- return []schema.GroupVersion{}
- }
-
- ret := []schema.GroupVersion{}
- for _, version := range groupMeta.GroupVersions {
- if m.IsEnabledVersion(version) {
- ret = append(ret, version)
- }
- }
- return ret
-}
-
-// Group returns the metadata of a group if the group is registered, otherwise
-// an error is returned.
-func (m *APIRegistrationManager) Group(group string) (*apimachinery.GroupMeta, error) {
- groupMeta, found := m.groupMetaMap[group]
- if !found {
- return nil, fmt.Errorf("group %v has not been registered", group)
- }
- groupMetaCopy := *groupMeta
- return &groupMetaCopy, nil
-}
-
-// IsRegistered takes a string and determines if it's one of the registered groups
-func (m *APIRegistrationManager) IsRegistered(group string) bool {
- _, found := m.groupMetaMap[group]
- return found
-}
-
-// IsRegisteredVersion returns if a version is registered.
-func (m *APIRegistrationManager) IsRegisteredVersion(v schema.GroupVersion) bool {
- _, found := m.registeredVersions[v]
- return found
-}
-
-// RegisteredGroupVersions returns all registered group versions.
-func (m *APIRegistrationManager) RegisteredGroupVersions() []schema.GroupVersion {
- ret := []schema.GroupVersion{}
- for groupVersion := range m.registeredVersions {
- ret = append(ret, groupVersion)
- }
- return ret
-}
-
-// InterfacesFor is a union meta.VersionInterfacesFunc func for all registered types
-func (m *APIRegistrationManager) InterfacesFor(version schema.GroupVersion) (*meta.VersionInterfaces, error) {
- groupMeta, err := m.Group(version.Group)
- if err != nil {
- return nil, err
- }
- return groupMeta.InterfacesFor(version)
-}
-
-// TODO: This is an expedient function, because we don't check if a Group is
-// supported throughout the code base. We will abandon this function and
-// checking the error returned by the Group() function.
-func (m *APIRegistrationManager) GroupOrDie(group string) *apimachinery.GroupMeta {
- groupMeta, found := m.groupMetaMap[group]
- if !found {
- if group == "" {
- panic("The legacy v1 API is not registered.")
- } else {
- panic(fmt.Sprintf("Group %s is not registered.", group))
- }
- }
- groupMetaCopy := *groupMeta
- return &groupMetaCopy
-}
-
-// RESTMapper returns a union RESTMapper of all known types with priorities chosen in the following order:
-// 1. if KUBE_API_VERSIONS is specified, then KUBE_API_VERSIONS in order, OR
-// 1. legacy kube group preferred version, extensions preferred version, metrics perferred version, legacy
-// kube any version, extensions any version, metrics any version, all other groups alphabetical preferred version,
-// all other groups alphabetical.
-func (m *APIRegistrationManager) RESTMapper(versionPatterns ...schema.GroupVersion) meta.RESTMapper {
- unionMapper := meta.MultiRESTMapper{}
- unionedGroups := sets.NewString()
- for enabledVersion := range m.enabledVersions {
- if !unionedGroups.Has(enabledVersion.Group) {
- unionedGroups.Insert(enabledVersion.Group)
- groupMeta := m.groupMetaMap[enabledVersion.Group]
- unionMapper = append(unionMapper, groupMeta.RESTMapper)
- }
- }
-
- if len(versionPatterns) != 0 {
- resourcePriority := []schema.GroupVersionResource{}
- kindPriority := []schema.GroupVersionKind{}
- for _, versionPriority := range versionPatterns {
- resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource))
- kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind))
- }
-
- return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority}
- }
-
- if len(m.envRequestedVersions) != 0 {
- resourcePriority := []schema.GroupVersionResource{}
- kindPriority := []schema.GroupVersionKind{}
-
- for _, versionPriority := range m.envRequestedVersions {
- resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource))
- kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind))
- }
-
- return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority}
- }
-
- prioritizedGroups := []string{"", "extensions", "metrics"}
- resourcePriority, kindPriority := m.prioritiesForGroups(prioritizedGroups...)
-
- prioritizedGroupsSet := sets.NewString(prioritizedGroups...)
- remainingGroups := sets.String{}
- for enabledVersion := range m.enabledVersions {
- if !prioritizedGroupsSet.Has(enabledVersion.Group) {
- remainingGroups.Insert(enabledVersion.Group)
- }
- }
-
- remainingResourcePriority, remainingKindPriority := m.prioritiesForGroups(remainingGroups.List()...)
- resourcePriority = append(resourcePriority, remainingResourcePriority...)
- kindPriority = append(kindPriority, remainingKindPriority...)
-
- return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority}
-}
-
-// prioritiesForGroups returns the resource and kind priorities for a PriorityRESTMapper, preferring the preferred version of each group first,
-// then any non-preferred version of the group second.
-func (m *APIRegistrationManager) prioritiesForGroups(groups ...string) ([]schema.GroupVersionResource, []schema.GroupVersionKind) {
- resourcePriority := []schema.GroupVersionResource{}
- kindPriority := []schema.GroupVersionKind{}
-
- for _, group := range groups {
- availableVersions := m.EnabledVersionsForGroup(group)
- if len(availableVersions) > 0 {
- resourcePriority = append(resourcePriority, availableVersions[0].WithResource(meta.AnyResource))
- kindPriority = append(kindPriority, availableVersions[0].WithKind(meta.AnyKind))
- }
- }
- for _, group := range groups {
- resourcePriority = append(resourcePriority, schema.GroupVersionResource{Group: group, Version: meta.AnyVersion, Resource: meta.AnyResource})
- kindPriority = append(kindPriority, schema.GroupVersionKind{Group: group, Version: meta.AnyVersion, Kind: meta.AnyKind})
- }
-
- return resourcePriority, kindPriority
-}
-
-// AllPreferredGroupVersions returns the preferred versions of all registered
-// groups in the form of "group1/version1,group2/version2,..."
-func (m *APIRegistrationManager) AllPreferredGroupVersions() string {
- if len(m.groupMetaMap) == 0 {
- return ""
- }
- var defaults []string
- for _, groupMeta := range m.groupMetaMap {
- defaults = append(defaults, groupMeta.GroupVersion.String())
- }
- sort.Strings(defaults)
- return strings.Join(defaults, ",")
-}
-
-// ValidateEnvRequestedVersions returns a list of versions that are requested in
-// the KUBE_API_VERSIONS environment variable, but not enabled.
-func (m *APIRegistrationManager) ValidateEnvRequestedVersions() []schema.GroupVersion {
- var missingVersions []schema.GroupVersion
- for _, v := range m.envRequestedVersions {
- if _, found := m.enabledVersions[v]; !found {
- missingVersions = append(missingVersions, v)
- }
- }
- return missingVersions
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/types.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/types.go
deleted file mode 100644
index baca784fa..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apimachinery/types.go
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-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 apimachinery
-
-import (
- "fmt"
-
- "k8s.io/apimachinery/pkg/api/meta"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupMeta stores the metadata of a group.
-type GroupMeta struct {
- // GroupVersion represents the preferred version of the group.
- GroupVersion schema.GroupVersion
-
- // GroupVersions is Group + all versions in that group.
- GroupVersions []schema.GroupVersion
-
- // SelfLinker can set or get the SelfLink field of all API types.
- // TODO: when versioning changes, make this part of each API definition.
- // TODO(lavalamp): Combine SelfLinker & ResourceVersioner interfaces, force all uses
- // to go through the InterfacesFor method below.
- SelfLinker runtime.SelfLinker
-
- // RESTMapper provides the default mapping between REST paths and the objects declared in a Scheme and all known
- // versions.
- RESTMapper meta.RESTMapper
-
- // InterfacesFor returns the default Codec and ResourceVersioner for a given version
- // string, or an error if the version is not known.
- // TODO: make this stop being a func pointer and always use the default
- // function provided below once every place that populates this field has been changed.
- InterfacesFor func(version schema.GroupVersion) (*meta.VersionInterfaces, error)
-
- // InterfacesByVersion stores the per-version interfaces.
- InterfacesByVersion map[schema.GroupVersion]*meta.VersionInterfaces
-}
-
-// DefaultInterfacesFor returns the default Codec and ResourceVersioner for a given version
-// string, or an error if the version is not known.
-// TODO: Remove the "Default" prefix.
-func (gm *GroupMeta) DefaultInterfacesFor(version schema.GroupVersion) (*meta.VersionInterfaces, error) {
- if v, ok := gm.InterfacesByVersion[version]; ok {
- return v, nil
- }
- return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, gm.GroupVersions)
-}
-
-// AddVersionInterfaces adds the given version to the group. Only call during
-// init, after that GroupMeta objects should be immutable. Not thread safe.
-// (If you use this, be sure to set .InterfacesFor = .DefaultInterfacesFor)
-// TODO: remove the "Interfaces" suffix and make this also maintain the
-// .GroupVersions member.
-func (gm *GroupMeta) AddVersionInterfaces(version schema.GroupVersion, interfaces *meta.VersionInterfaces) error {
- if e, a := gm.GroupVersion.Group, version.Group; a != e {
- return fmt.Errorf("got a version in group %v, but am in group %v", a, e)
- }
- if gm.InterfacesByVersion == nil {
- gm.InterfacesByVersion = make(map[schema.GroupVersion]*meta.VersionInterfaces)
- }
- gm.InterfacesByVersion[version] = interfaces
-
- // TODO: refactor to make the below error not possible, this function
- // should *set* GroupVersions rather than depend on it.
- for _, v := range gm.GroupVersions {
- if v == version {
- return nil
- }
- }
- return fmt.Errorf("added a version interface without the corresponding version %v being in the list %#v", version, gm.GroupVersions)
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go
deleted file mode 100644
index 1ea8c137b..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-Copyright 2017 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 (
- "fmt"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/conversion"
- "k8s.io/apimachinery/pkg/util/validation/field"
-)
-
-func Convert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, out *metav1.ListOptions, s conversion.Scope) error {
- if err := metav1.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
- return err
- }
- if err := metav1.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil {
- return err
- }
- out.IncludeUninitialized = in.IncludeUninitialized
- out.ResourceVersion = in.ResourceVersion
- out.TimeoutSeconds = in.TimeoutSeconds
- out.Watch = in.Watch
- out.Limit = in.Limit
- out.Continue = in.Continue
- return nil
-}
-
-func Convert_v1_ListOptions_To_internalversion_ListOptions(in *metav1.ListOptions, out *ListOptions, s conversion.Scope) error {
- if err := metav1.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil {
- return err
- }
- if err := metav1.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil {
- return err
- }
- out.IncludeUninitialized = in.IncludeUninitialized
- out.ResourceVersion = in.ResourceVersion
- out.TimeoutSeconds = in.TimeoutSeconds
- out.Watch = in.Watch
- out.Limit = in.Limit
- out.Continue = in.Continue
- return nil
-}
-
-func Convert_map_to_v1_LabelSelector(in *map[string]string, out *metav1.LabelSelector, s conversion.Scope) error {
- if in == nil {
- return nil
- }
- out = new(metav1.LabelSelector)
- for labelKey, labelValue := range *in {
- metav1.AddLabelToSelector(out, labelKey, labelValue)
- }
- return nil
-}
-
-func Convert_v1_LabelSelector_to_map(in *metav1.LabelSelector, out *map[string]string, s conversion.Scope) error {
- var err error
- *out, err = metav1.LabelSelectorAsMap(in)
- if err != nil {
- err = field.Invalid(field.NewPath("labelSelector"), *in, fmt.Sprintf("cannot convert to old selector: %v", err))
- }
- return err
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/doc.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/doc.go
deleted file mode 100644
index 1e85c5c43..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:conversion-gen=k8s.io/apimachinery/pkg/apis/meta/v1
-
-package internalversion
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go
deleted file mode 100644
index 4bde90b3f..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-Copyright 2017 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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/runtime/serializer"
-)
-
-// GroupName is the group name for this API.
-const GroupName = "meta.k8s.io"
-
-// Scheme is the registry for any type that adheres to the meta API spec.
-var scheme = runtime.NewScheme()
-
-var (
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder runtime.SchemeBuilder
- localSchemeBuilder = &SchemeBuilder
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Codecs provides access to encoding and decoding for the scheme.
-var Codecs = serializer.NewCodecFactory(scheme)
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
-
-// ParameterCodec handles versioning of objects that are converted to query parameters.
-var ParameterCodec = runtime.NewParameterCodec(scheme)
-
-// Kind takes an unqualified kind and returns a Group qualified GroupKind
-func Kind(kind string) schema.GroupKind {
- return SchemeGroupVersion.WithKind(kind).GroupKind()
-}
-
-// addToGroupVersion registers common meta types into schemas.
-func addToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) error {
- if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil {
- return err
- }
- scheme.AddConversionFuncs(
- metav1.Convert_string_To_labels_Selector,
- metav1.Convert_labels_Selector_To_string,
-
- metav1.Convert_string_To_fields_Selector,
- metav1.Convert_fields_Selector_To_string,
-
- Convert_map_to_v1_LabelSelector,
- Convert_v1_LabelSelector_to_map,
-
- Convert_internalversion_ListOptions_To_v1_ListOptions,
- Convert_v1_ListOptions_To_internalversion_ListOptions,
- )
- // ListOptions is the only options struct which needs conversion (it exposes labels and fields
- // as selectors for convenience). The other types have only a single representation today.
- scheme.AddKnownTypes(SchemeGroupVersion,
- &ListOptions{},
- &metav1.GetOptions{},
- &metav1.ExportOptions{},
- &metav1.DeleteOptions{},
- )
- scheme.AddKnownTypes(SchemeGroupVersion,
- &metav1beta1.Table{},
- &metav1beta1.TableOptions{},
- &metav1beta1.PartialObjectMetadata{},
- &metav1beta1.PartialObjectMetadataList{},
- )
- scheme.AddKnownTypes(metav1beta1.SchemeGroupVersion,
- &metav1beta1.Table{},
- &metav1beta1.TableOptions{},
- &metav1beta1.PartialObjectMetadata{},
- &metav1beta1.PartialObjectMetadataList{},
- )
- // Allow delete options to be decoded across all version in this scheme (we may want to be more clever than this)
- scheme.AddUnversionedTypes(SchemeGroupVersion, &metav1.DeleteOptions{})
- metav1.AddToGroupVersion(scheme, metav1.SchemeGroupVersion)
- return nil
-}
-
-// Unlike other API groups, meta internal knows about all meta external versions, but keeps
-// the logic for conversion private.
-func init() {
- if err := addToGroupVersion(scheme, SchemeGroupVersion); err != nil {
- panic(err)
- }
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go
deleted file mode 100644
index 2f6740d36..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2017 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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/fields"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/apimachinery/pkg/runtime"
-)
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ListOptions is the query options to a standard REST list call.
-type ListOptions struct {
- metav1.TypeMeta
-
- // A selector based on labels
- LabelSelector labels.Selector
- // A selector based on fields
- FieldSelector fields.Selector
- // If true, partially initialized resources are included in the response.
- // +optional
- IncludeUninitialized bool
- // If true, watch for changes to this list
- Watch bool
- // When specified with a watch call, shows changes that occur after that particular version of a resource.
- // Defaults to changes from the beginning of history.
- // When specified for list:
- // - if unset, then the result is returned from remote storage based on quorum-read flag;
- // - if it's 0, then we simply return what we currently have in cache, no guarantee;
- // - if set to non zero, then the result is at least as fresh as given rv.
- ResourceVersion string
- // Timeout for the list/watch call.
- TimeoutSeconds *int64
- // Limit specifies the maximum number of results to return from the server. The server may
- // not support this field on all resource types, but if it does and more results remain it
- // will set the continue field on the returned list object.
- Limit int64
- // Continue is a token returned by the server that lets a client retrieve chunks of results
- // from the server by specifying limit. The server may reject requests for continuation tokens
- // it does not recognize and will return a 410 error if the token can no longer be used because
- // it has expired.
- Continue string
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// List holds a list of objects, which may not be known by the server.
-type List struct {
- metav1.TypeMeta
- // +optional
- metav1.ListMeta
-
- Items []runtime.Object
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go
deleted file mode 100644
index 247577b0c..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was autogenerated by conversion-gen. Do not edit it manually!
-
-package internalversion
-
-import (
- unsafe "unsafe"
-
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- conversion "k8s.io/apimachinery/pkg/conversion"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-func init() {
- localSchemeBuilder.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_internalversion_List_To_v1_List,
- Convert_v1_List_To_internalversion_List,
- Convert_internalversion_ListOptions_To_v1_ListOptions,
- Convert_v1_ListOptions_To_internalversion_ListOptions,
- )
-}
-
-func autoConvert_internalversion_List_To_v1_List(in *List, out *v1.List, s conversion.Scope) error {
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]runtime.RawExtension, len(*in))
- for i := range *in {
- if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-// Convert_internalversion_List_To_v1_List is an autogenerated conversion function.
-func Convert_internalversion_List_To_v1_List(in *List, out *v1.List, s conversion.Scope) error {
- return autoConvert_internalversion_List_To_v1_List(in, out, s)
-}
-
-func autoConvert_v1_List_To_internalversion_List(in *v1.List, out *List, s conversion.Scope) error {
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]runtime.Object, len(*in))
- for i := range *in {
- if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-// Convert_v1_List_To_internalversion_List is an autogenerated conversion function.
-func Convert_v1_List_To_internalversion_List(in *v1.List, out *List, s conversion.Scope) error {
- return autoConvert_v1_List_To_internalversion_List(in, out, s)
-}
-
-func autoConvert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, out *v1.ListOptions, s conversion.Scope) error {
- if err := v1.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil {
- return err
- }
- if err := v1.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
- return err
- }
- out.IncludeUninitialized = in.IncludeUninitialized
- out.Watch = in.Watch
- out.ResourceVersion = in.ResourceVersion
- out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
- out.Limit = in.Limit
- out.Continue = in.Continue
- return nil
-}
-
-func autoConvert_v1_ListOptions_To_internalversion_ListOptions(in *v1.ListOptions, out *ListOptions, s conversion.Scope) error {
- if err := v1.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil {
- return err
- }
- if err := v1.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil {
- return err
- }
- out.IncludeUninitialized = in.IncludeUninitialized
- out.Watch = in.Watch
- out.ResourceVersion = in.ResourceVersion
- out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
- out.Limit = in.Limit
- out.Continue = in.Continue
- return nil
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go
deleted file mode 100644
index 2bc1c3f96..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was autogenerated by deepcopy-gen. Do not edit it manually!
-
-package internalversion
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *List) DeepCopyInto(out *List) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]runtime.Object, len(*in))
- for i := range *in {
- if (*in)[i] == nil {
- (*out)[i] = nil
- } else {
- (*out)[i] = (*in)[i].DeepCopyObject()
- }
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new List.
-func (in *List) DeepCopy() *List {
- if in == nil {
- return nil
- }
- out := new(List)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *List) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- } else {
- return nil
- }
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ListOptions) DeepCopyInto(out *ListOptions) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- if in.LabelSelector == nil {
- out.LabelSelector = nil
- } else {
- out.LabelSelector = in.LabelSelector.DeepCopySelector()
- }
- if in.FieldSelector == nil {
- out.FieldSelector = nil
- } else {
- out.FieldSelector = in.FieldSelector.DeepCopySelector()
- }
- if in.TimeoutSeconds != nil {
- in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
- if *in == nil {
- *out = nil
- } else {
- *out = new(int64)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListOptions.
-func (in *ListOptions) DeepCopy() *ListOptions {
- if in == nil {
- return nil
- }
- out := new(ListOptions)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ListOptions) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- } else {
- return nil
- }
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go
deleted file mode 100644
index 08705ac84..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go
+++ /dev/null
@@ -1,475 +0,0 @@
-/*
-Copyright 2015 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 unstructured
-
-import (
- gojson "encoding/json"
- "errors"
- "fmt"
- "io"
- "strings"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/apimachinery/pkg/util/json"
-)
-
-// NestedFieldCopy returns a deep copy of the value of a nested field.
-// Returns false if the value is missing.
-// No error is returned for a nil field.
-func NestedFieldCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) {
- val, found, err := nestedFieldNoCopy(obj, fields...)
- if !found || err != nil {
- return nil, found, err
- }
- return runtime.DeepCopyJSONValue(val), true, nil
-}
-
-func nestedFieldNoCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) {
- var val interface{} = obj
-
- for i, field := range fields {
- if m, ok := val.(map[string]interface{}); ok {
- val, ok = m[field]
- if !ok {
- return nil, false, nil
- }
- } else {
- return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected map[string]interface{}", jsonPath(fields[:i+1]), val, val)
- }
- }
- return val, true, nil
-}
-
-// NestedString returns the string value of a nested field.
-// Returns false if value is not found and an error if not a string.
-func NestedString(obj map[string]interface{}, fields ...string) (string, bool, error) {
- val, found, err := nestedFieldNoCopy(obj, fields...)
- if !found || err != nil {
- return "", found, err
- }
- s, ok := val.(string)
- if !ok {
- return "", false, fmt.Errorf("%v accessor error: %v is of the type %T, expected string", jsonPath(fields), val, val)
- }
- return s, true, nil
-}
-
-// NestedBool returns the bool value of a nested field.
-// Returns false if value is not found and an error if not a bool.
-func NestedBool(obj map[string]interface{}, fields ...string) (bool, bool, error) {
- val, found, err := nestedFieldNoCopy(obj, fields...)
- if !found || err != nil {
- return false, found, err
- }
- b, ok := val.(bool)
- if !ok {
- return false, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected bool", jsonPath(fields), val, val)
- }
- return b, true, nil
-}
-
-// NestedFloat64 returns the float64 value of a nested field.
-// Returns false if value is not found and an error if not a float64.
-func NestedFloat64(obj map[string]interface{}, fields ...string) (float64, bool, error) {
- val, found, err := nestedFieldNoCopy(obj, fields...)
- if !found || err != nil {
- return 0, found, err
- }
- f, ok := val.(float64)
- if !ok {
- return 0, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected float64", jsonPath(fields), val, val)
- }
- return f, true, nil
-}
-
-// NestedInt64 returns the int64 value of a nested field.
-// Returns false if value is not found and an error if not an int64.
-func NestedInt64(obj map[string]interface{}, fields ...string) (int64, bool, error) {
- val, found, err := nestedFieldNoCopy(obj, fields...)
- if !found || err != nil {
- return 0, found, err
- }
- i, ok := val.(int64)
- if !ok {
- return 0, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected int64", jsonPath(fields), val, val)
- }
- return i, true, nil
-}
-
-// NestedStringSlice returns a copy of []string value of a nested field.
-// Returns false if value is not found and an error if not a []interface{} or contains non-string items in the slice.
-func NestedStringSlice(obj map[string]interface{}, fields ...string) ([]string, bool, error) {
- val, found, err := nestedFieldNoCopy(obj, fields...)
- if !found || err != nil {
- return nil, found, err
- }
- m, ok := val.([]interface{})
- if !ok {
- return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected []interface{}", jsonPath(fields), val, val)
- }
- strSlice := make([]string, 0, len(m))
- for _, v := range m {
- if str, ok := v.(string); ok {
- strSlice = append(strSlice, str)
- } else {
- return nil, false, fmt.Errorf("%v accessor error: contains non-string key in the slice: %v is of the type %T, expected string", jsonPath(fields), v, v)
- }
- }
- return strSlice, true, nil
-}
-
-// NestedSlice returns a deep copy of []interface{} value of a nested field.
-// Returns false if value is not found and an error if not a []interface{}.
-func NestedSlice(obj map[string]interface{}, fields ...string) ([]interface{}, bool, error) {
- val, found, err := nestedFieldNoCopy(obj, fields...)
- if !found || err != nil {
- return nil, found, err
- }
- _, ok := val.([]interface{})
- if !ok {
- return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected []interface{}", jsonPath(fields), val, val)
- }
- return runtime.DeepCopyJSONValue(val).([]interface{}), true, nil
-}
-
-// NestedStringMap returns a copy of map[string]string value of a nested field.
-// Returns false if value is not found and an error if not a map[string]interface{} or contains non-string values in the map.
-func NestedStringMap(obj map[string]interface{}, fields ...string) (map[string]string, bool, error) {
- m, found, err := nestedMapNoCopy(obj, fields...)
- if !found || err != nil {
- return nil, found, err
- }
- strMap := make(map[string]string, len(m))
- for k, v := range m {
- if str, ok := v.(string); ok {
- strMap[k] = str
- } else {
- return nil, false, fmt.Errorf("%v accessor error: contains non-string key in the map: %v is of the type %T, expected string", jsonPath(fields), v, v)
- }
- }
- return strMap, true, nil
-}
-
-// NestedMap returns a deep copy of map[string]interface{} value of a nested field.
-// Returns false if value is not found and an error if not a map[string]interface{}.
-func NestedMap(obj map[string]interface{}, fields ...string) (map[string]interface{}, bool, error) {
- m, found, err := nestedMapNoCopy(obj, fields...)
- if !found || err != nil {
- return nil, found, err
- }
- return runtime.DeepCopyJSON(m), true, nil
-}
-
-// nestedMapNoCopy returns a map[string]interface{} value of a nested field.
-// Returns false if value is not found and an error if not a map[string]interface{}.
-func nestedMapNoCopy(obj map[string]interface{}, fields ...string) (map[string]interface{}, bool, error) {
- val, found, err := nestedFieldNoCopy(obj, fields...)
- if !found || err != nil {
- return nil, found, err
- }
- m, ok := val.(map[string]interface{})
- if !ok {
- return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected map[string]interface{}", jsonPath(fields), val, val)
- }
- return m, true, nil
-}
-
-// SetNestedField sets the value of a nested field to a deep copy of the value provided.
-// Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}.
-func SetNestedField(obj map[string]interface{}, value interface{}, fields ...string) error {
- return setNestedFieldNoCopy(obj, runtime.DeepCopyJSONValue(value), fields...)
-}
-
-func setNestedFieldNoCopy(obj map[string]interface{}, value interface{}, fields ...string) error {
- m := obj
-
- for i, field := range fields[:len(fields)-1] {
- if val, ok := m[field]; ok {
- if valMap, ok := val.(map[string]interface{}); ok {
- m = valMap
- } else {
- return fmt.Errorf("value cannot be set because %v is not a map[string]interface{}", jsonPath(fields[:i+1]))
- }
- } else {
- newVal := make(map[string]interface{})
- m[field] = newVal
- m = newVal
- }
- }
- m[fields[len(fields)-1]] = value
- return nil
-}
-
-// SetNestedStringSlice sets the string slice value of a nested field.
-// Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}.
-func SetNestedStringSlice(obj map[string]interface{}, value []string, fields ...string) error {
- m := make([]interface{}, 0, len(value)) // convert []string into []interface{}
- for _, v := range value {
- m = append(m, v)
- }
- return setNestedFieldNoCopy(obj, m, fields...)
-}
-
-// SetNestedSlice sets the slice value of a nested field.
-// Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}.
-func SetNestedSlice(obj map[string]interface{}, value []interface{}, fields ...string) error {
- return SetNestedField(obj, value, fields...)
-}
-
-// SetNestedStringMap sets the map[string]string value of a nested field.
-// Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}.
-func SetNestedStringMap(obj map[string]interface{}, value map[string]string, fields ...string) error {
- m := make(map[string]interface{}, len(value)) // convert map[string]string into map[string]interface{}
- for k, v := range value {
- m[k] = v
- }
- return setNestedFieldNoCopy(obj, m, fields...)
-}
-
-// SetNestedMap sets the map[string]interface{} value of a nested field.
-// Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}.
-func SetNestedMap(obj map[string]interface{}, value map[string]interface{}, fields ...string) error {
- return SetNestedField(obj, value, fields...)
-}
-
-// RemoveNestedField removes the nested field from the obj.
-func RemoveNestedField(obj map[string]interface{}, fields ...string) {
- m := obj
- for _, field := range fields[:len(fields)-1] {
- if x, ok := m[field].(map[string]interface{}); ok {
- m = x
- } else {
- return
- }
- }
- delete(m, fields[len(fields)-1])
-}
-
-func getNestedString(obj map[string]interface{}, fields ...string) string {
- val, found, err := NestedString(obj, fields...)
- if !found || err != nil {
- return ""
- }
- return val
-}
-
-func jsonPath(fields []string) string {
- return "." + strings.Join(fields, ".")
-}
-
-func extractOwnerReference(v map[string]interface{}) metav1.OwnerReference {
- // though this field is a *bool, but when decoded from JSON, it's
- // unmarshalled as bool.
- var controllerPtr *bool
- if controller, found, err := NestedBool(v, "controller"); err == nil && found {
- controllerPtr = &controller
- }
- var blockOwnerDeletionPtr *bool
- if blockOwnerDeletion, found, err := NestedBool(v, "blockOwnerDeletion"); err == nil && found {
- blockOwnerDeletionPtr = &blockOwnerDeletion
- }
- return metav1.OwnerReference{
- Kind: getNestedString(v, "kind"),
- Name: getNestedString(v, "name"),
- APIVersion: getNestedString(v, "apiVersion"),
- UID: types.UID(getNestedString(v, "uid")),
- Controller: controllerPtr,
- BlockOwnerDeletion: blockOwnerDeletionPtr,
- }
-}
-
-// UnstructuredJSONScheme is capable of converting JSON data into the Unstructured
-// type, which can be used for generic access to objects without a predefined scheme.
-// TODO: move into serializer/json.
-var UnstructuredJSONScheme runtime.Codec = unstructuredJSONScheme{}
-
-type unstructuredJSONScheme struct{}
-
-func (s unstructuredJSONScheme) Decode(data []byte, _ *schema.GroupVersionKind, obj runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {
- var err error
- if obj != nil {
- err = s.decodeInto(data, obj)
- } else {
- obj, err = s.decode(data)
- }
-
- if err != nil {
- return nil, nil, err
- }
-
- gvk := obj.GetObjectKind().GroupVersionKind()
- if len(gvk.Kind) == 0 {
- return nil, &gvk, runtime.NewMissingKindErr(string(data))
- }
-
- return obj, &gvk, nil
-}
-
-func (unstructuredJSONScheme) Encode(obj runtime.Object, w io.Writer) error {
- switch t := obj.(type) {
- case *Unstructured:
- return json.NewEncoder(w).Encode(t.Object)
- case *UnstructuredList:
- items := make([]interface{}, 0, len(t.Items))
- for _, i := range t.Items {
- items = append(items, i.Object)
- }
- listObj := make(map[string]interface{}, len(t.Object)+1)
- for k, v := range t.Object { // Make a shallow copy
- listObj[k] = v
- }
- listObj["items"] = items
- return json.NewEncoder(w).Encode(listObj)
- case *runtime.Unknown:
- // TODO: Unstructured needs to deal with ContentType.
- _, err := w.Write(t.Raw)
- return err
- default:
- return json.NewEncoder(w).Encode(t)
- }
-}
-
-func (s unstructuredJSONScheme) decode(data []byte) (runtime.Object, error) {
- type detector struct {
- Items gojson.RawMessage
- }
- var det detector
- if err := json.Unmarshal(data, &det); err != nil {
- return nil, err
- }
-
- if det.Items != nil {
- list := &UnstructuredList{}
- err := s.decodeToList(data, list)
- return list, err
- }
-
- // No Items field, so it wasn't a list.
- unstruct := &Unstructured{}
- err := s.decodeToUnstructured(data, unstruct)
- return unstruct, err
-}
-
-func (s unstructuredJSONScheme) decodeInto(data []byte, obj runtime.Object) error {
- switch x := obj.(type) {
- case *Unstructured:
- return s.decodeToUnstructured(data, x)
- case *UnstructuredList:
- return s.decodeToList(data, x)
- case *runtime.VersionedObjects:
- o, err := s.decode(data)
- if err == nil {
- x.Objects = []runtime.Object{o}
- }
- return err
- default:
- return json.Unmarshal(data, x)
- }
-}
-
-func (unstructuredJSONScheme) decodeToUnstructured(data []byte, unstruct *Unstructured) error {
- m := make(map[string]interface{})
- if err := json.Unmarshal(data, &m); err != nil {
- return err
- }
-
- unstruct.Object = m
-
- return nil
-}
-
-func (s unstructuredJSONScheme) decodeToList(data []byte, list *UnstructuredList) error {
- type decodeList struct {
- Items []gojson.RawMessage
- }
-
- var dList decodeList
- if err := json.Unmarshal(data, &dList); err != nil {
- return err
- }
-
- if err := json.Unmarshal(data, &list.Object); err != nil {
- return err
- }
-
- // For typed lists, e.g., a PodList, API server doesn't set each item's
- // APIVersion and Kind. We need to set it.
- listAPIVersion := list.GetAPIVersion()
- listKind := list.GetKind()
- itemKind := strings.TrimSuffix(listKind, "List")
-
- delete(list.Object, "items")
- list.Items = make([]Unstructured, 0, len(dList.Items))
- for _, i := range dList.Items {
- unstruct := &Unstructured{}
- if err := s.decodeToUnstructured([]byte(i), unstruct); err != nil {
- return err
- }
- // This is hacky. Set the item's Kind and APIVersion to those inferred
- // from the List.
- if len(unstruct.GetKind()) == 0 && len(unstruct.GetAPIVersion()) == 0 {
- unstruct.SetKind(itemKind)
- unstruct.SetAPIVersion(listAPIVersion)
- }
- list.Items = append(list.Items, *unstruct)
- }
- return nil
-}
-
-// UnstructuredObjectConverter is an ObjectConverter for use with
-// Unstructured objects. Since it has no schema or type information,
-// it will only succeed for no-op conversions. This is provided as a
-// sane implementation for APIs that require an object converter.
-type UnstructuredObjectConverter struct{}
-
-func (UnstructuredObjectConverter) Convert(in, out, context interface{}) error {
- unstructIn, ok := in.(*Unstructured)
- if !ok {
- return fmt.Errorf("input type %T in not valid for unstructured conversion", in)
- }
-
- unstructOut, ok := out.(*Unstructured)
- if !ok {
- return fmt.Errorf("output type %T in not valid for unstructured conversion", out)
- }
-
- // maybe deep copy the map? It is documented in the
- // ObjectConverter interface that this function is not
- // guaranteed to not mutate the input. Or maybe set the input
- // object to nil.
- unstructOut.Object = unstructIn.Object
- return nil
-}
-
-func (UnstructuredObjectConverter) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error) {
- if kind := in.GetObjectKind().GroupVersionKind(); !kind.Empty() {
- gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{kind})
- if !ok {
- // TODO: should this be a typed error?
- return nil, fmt.Errorf("%v is unstructured and is not suitable for converting to %q", kind, target)
- }
- in.GetObjectKind().SetGroupVersionKind(gvk)
- }
- return in, nil
-}
-
-func (UnstructuredObjectConverter) ConvertFieldLabel(version, kind, label, value string) (string, string, error) {
- return "", "", errors.New("unstructured cannot convert field labels")
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go
deleted file mode 100644
index 2a1333049..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
-Copyright 2015 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 unstructured
-
-import (
- "bytes"
- "errors"
- "fmt"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/types"
- utilruntime "k8s.io/apimachinery/pkg/util/runtime"
-)
-
-// Unstructured allows objects that do not have Golang structs registered to be manipulated
-// generically. This can be used to deal with the API objects from a plug-in. Unstructured
-// objects still have functioning TypeMeta features-- kind, version, etc.
-//
-// WARNING: This object has accessors for the v1 standard metadata. You *MUST NOT* use this
-// type if you are dealing with objects that are not in the server meta v1 schema.
-//
-// TODO: make the serialization part of this type distinct from the field accessors.
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// +k8s:deepcopy-gen=true
-type Unstructured struct {
- // Object is a JSON compatible map with string, float, int, bool, []interface{}, or
- // map[string]interface{}
- // children.
- Object map[string]interface{}
-}
-
-var _ metav1.Object = &Unstructured{}
-var _ runtime.Unstructured = &Unstructured{}
-
-func (obj *Unstructured) GetObjectKind() schema.ObjectKind { return obj }
-
-func (obj *Unstructured) IsList() bool {
- field, ok := obj.Object["items"]
- if !ok {
- return false
- }
- _, ok = field.([]interface{})
- return ok
-}
-
-func (obj *Unstructured) EachListItem(fn func(runtime.Object) error) error {
- field, ok := obj.Object["items"]
- if !ok {
- return errors.New("content is not a list")
- }
- items, ok := field.([]interface{})
- if !ok {
- return fmt.Errorf("content is not a list: %T", field)
- }
- for _, item := range items {
- child, ok := item.(map[string]interface{})
- if !ok {
- return fmt.Errorf("items member is not an object: %T", child)
- }
- if err := fn(&Unstructured{Object: child}); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (obj *Unstructured) UnstructuredContent() map[string]interface{} {
- if obj.Object == nil {
- obj.Object = make(map[string]interface{})
- }
- return obj.Object
-}
-
-func (obj *Unstructured) SetUnstructuredContent(content map[string]interface{}) {
- obj.Object = content
-}
-
-// MarshalJSON ensures that the unstructured object produces proper
-// JSON when passed to Go's standard JSON library.
-func (u *Unstructured) MarshalJSON() ([]byte, error) {
- var buf bytes.Buffer
- err := UnstructuredJSONScheme.Encode(u, &buf)
- return buf.Bytes(), err
-}
-
-// UnmarshalJSON ensures that the unstructured object properly decodes
-// JSON when passed to Go's standard JSON library.
-func (u *Unstructured) UnmarshalJSON(b []byte) error {
- _, _, err := UnstructuredJSONScheme.Decode(b, nil, u)
- return err
-}
-
-func (in *Unstructured) DeepCopy() *Unstructured {
- if in == nil {
- return nil
- }
- out := new(Unstructured)
- *out = *in
- out.Object = runtime.DeepCopyJSON(in.Object)
- return out
-}
-
-func (u *Unstructured) setNestedField(value interface{}, fields ...string) {
- if u.Object == nil {
- u.Object = make(map[string]interface{})
- }
- SetNestedField(u.Object, value, fields...)
-}
-
-func (u *Unstructured) setNestedSlice(value []string, fields ...string) {
- if u.Object == nil {
- u.Object = make(map[string]interface{})
- }
- SetNestedStringSlice(u.Object, value, fields...)
-}
-
-func (u *Unstructured) setNestedMap(value map[string]string, fields ...string) {
- if u.Object == nil {
- u.Object = make(map[string]interface{})
- }
- SetNestedStringMap(u.Object, value, fields...)
-}
-
-func (u *Unstructured) GetOwnerReferences() []metav1.OwnerReference {
- field, found, err := nestedFieldNoCopy(u.Object, "metadata", "ownerReferences")
- if !found || err != nil {
- return nil
- }
- original, ok := field.([]interface{})
- if !ok {
- return nil
- }
- ret := make([]metav1.OwnerReference, 0, len(original))
- for _, obj := range original {
- o, ok := obj.(map[string]interface{})
- if !ok {
- // expected map[string]interface{}, got something else
- return nil
- }
- ret = append(ret, extractOwnerReference(o))
- }
- return ret
-}
-
-func (u *Unstructured) SetOwnerReferences(references []metav1.OwnerReference) {
- newReferences := make([]interface{}, 0, len(references))
- for _, reference := range references {
- out, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&reference)
- if err != nil {
- utilruntime.HandleError(fmt.Errorf("unable to convert Owner Reference: %v", err))
- continue
- }
- newReferences = append(newReferences, out)
- }
- u.setNestedField(newReferences, "metadata", "ownerReferences")
-}
-
-func (u *Unstructured) GetAPIVersion() string {
- return getNestedString(u.Object, "apiVersion")
-}
-
-func (u *Unstructured) SetAPIVersion(version string) {
- u.setNestedField(version, "apiVersion")
-}
-
-func (u *Unstructured) GetKind() string {
- return getNestedString(u.Object, "kind")
-}
-
-func (u *Unstructured) SetKind(kind string) {
- u.setNestedField(kind, "kind")
-}
-
-func (u *Unstructured) GetNamespace() string {
- return getNestedString(u.Object, "metadata", "namespace")
-}
-
-func (u *Unstructured) SetNamespace(namespace string) {
- u.setNestedField(namespace, "metadata", "namespace")
-}
-
-func (u *Unstructured) GetName() string {
- return getNestedString(u.Object, "metadata", "name")
-}
-
-func (u *Unstructured) SetName(name string) {
- u.setNestedField(name, "metadata", "name")
-}
-
-func (u *Unstructured) GetGenerateName() string {
- return getNestedString(u.Object, "metadata", "generateName")
-}
-
-func (u *Unstructured) SetGenerateName(name string) {
- u.setNestedField(name, "metadata", "generateName")
-}
-
-func (u *Unstructured) GetUID() types.UID {
- return types.UID(getNestedString(u.Object, "metadata", "uid"))
-}
-
-func (u *Unstructured) SetUID(uid types.UID) {
- u.setNestedField(string(uid), "metadata", "uid")
-}
-
-func (u *Unstructured) GetResourceVersion() string {
- return getNestedString(u.Object, "metadata", "resourceVersion")
-}
-
-func (u *Unstructured) SetResourceVersion(version string) {
- u.setNestedField(version, "metadata", "resourceVersion")
-}
-
-func (u *Unstructured) GetGeneration() int64 {
- val, found, err := NestedInt64(u.Object, "metadata", "generation")
- if !found || err != nil {
- return 0
- }
- return val
-}
-
-func (u *Unstructured) SetGeneration(generation int64) {
- u.setNestedField(generation, "metadata", "generation")
-}
-
-func (u *Unstructured) GetSelfLink() string {
- return getNestedString(u.Object, "metadata", "selfLink")
-}
-
-func (u *Unstructured) SetSelfLink(selfLink string) {
- u.setNestedField(selfLink, "metadata", "selfLink")
-}
-
-func (u *Unstructured) GetContinue() string {
- return getNestedString(u.Object, "metadata", "continue")
-}
-
-func (u *Unstructured) SetContinue(c string) {
- u.setNestedField(c, "metadata", "continue")
-}
-
-func (u *Unstructured) GetCreationTimestamp() metav1.Time {
- var timestamp metav1.Time
- timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "creationTimestamp"))
- return timestamp
-}
-
-func (u *Unstructured) SetCreationTimestamp(timestamp metav1.Time) {
- ts, _ := timestamp.MarshalQueryParameter()
- if len(ts) == 0 || timestamp.Time.IsZero() {
- RemoveNestedField(u.Object, "metadata", "creationTimestamp")
- return
- }
- u.setNestedField(ts, "metadata", "creationTimestamp")
-}
-
-func (u *Unstructured) GetDeletionTimestamp() *metav1.Time {
- var timestamp metav1.Time
- timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "deletionTimestamp"))
- if timestamp.IsZero() {
- return nil
- }
- return &timestamp
-}
-
-func (u *Unstructured) SetDeletionTimestamp(timestamp *metav1.Time) {
- if timestamp == nil {
- RemoveNestedField(u.Object, "metadata", "deletionTimestamp")
- return
- }
- ts, _ := timestamp.MarshalQueryParameter()
- u.setNestedField(ts, "metadata", "deletionTimestamp")
-}
-
-func (u *Unstructured) GetDeletionGracePeriodSeconds() *int64 {
- val, found, err := NestedInt64(u.Object, "metadata", "deletionGracePeriodSeconds")
- if !found || err != nil {
- return nil
- }
- return &val
-}
-
-func (u *Unstructured) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) {
- if deletionGracePeriodSeconds == nil {
- RemoveNestedField(u.Object, "metadata", "deletionGracePeriodSeconds")
- return
- }
- u.setNestedField(*deletionGracePeriodSeconds, "metadata", "deletionGracePeriodSeconds")
-}
-
-func (u *Unstructured) GetLabels() map[string]string {
- m, _, _ := NestedStringMap(u.Object, "metadata", "labels")
- return m
-}
-
-func (u *Unstructured) SetLabels(labels map[string]string) {
- u.setNestedMap(labels, "metadata", "labels")
-}
-
-func (u *Unstructured) GetAnnotations() map[string]string {
- m, _, _ := NestedStringMap(u.Object, "metadata", "annotations")
- return m
-}
-
-func (u *Unstructured) SetAnnotations(annotations map[string]string) {
- u.setNestedMap(annotations, "metadata", "annotations")
-}
-
-func (u *Unstructured) SetGroupVersionKind(gvk schema.GroupVersionKind) {
- u.SetAPIVersion(gvk.GroupVersion().String())
- u.SetKind(gvk.Kind)
-}
-
-func (u *Unstructured) GroupVersionKind() schema.GroupVersionKind {
- gv, err := schema.ParseGroupVersion(u.GetAPIVersion())
- if err != nil {
- return schema.GroupVersionKind{}
- }
- gvk := gv.WithKind(u.GetKind())
- return gvk
-}
-
-func (u *Unstructured) GetInitializers() *metav1.Initializers {
- m, found, err := nestedMapNoCopy(u.Object, "metadata", "initializers")
- if !found || err != nil {
- return nil
- }
- out := &metav1.Initializers{}
- if err := runtime.DefaultUnstructuredConverter.FromUnstructured(m, out); err != nil {
- utilruntime.HandleError(fmt.Errorf("unable to retrieve initializers for object: %v", err))
- return nil
- }
- return out
-}
-
-func (u *Unstructured) SetInitializers(initializers *metav1.Initializers) {
- if initializers == nil {
- RemoveNestedField(u.Object, "metadata", "initializers")
- return
- }
- out, err := runtime.DefaultUnstructuredConverter.ToUnstructured(initializers)
- if err != nil {
- utilruntime.HandleError(fmt.Errorf("unable to retrieve initializers for object: %v", err))
- }
- u.setNestedField(out, "metadata", "initializers")
-}
-
-func (u *Unstructured) GetFinalizers() []string {
- val, _, _ := NestedStringSlice(u.Object, "metadata", "finalizers")
- return val
-}
-
-func (u *Unstructured) SetFinalizers(finalizers []string) {
- u.setNestedSlice(finalizers, "metadata", "finalizers")
-}
-
-func (u *Unstructured) GetClusterName() string {
- return getNestedString(u.Object, "metadata", "clusterName")
-}
-
-func (u *Unstructured) SetClusterName(clusterName string) {
- u.setNestedField(clusterName, "metadata", "clusterName")
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go
deleted file mode 100644
index 57d78a09d..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
-Copyright 2015 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 unstructured
-
-import (
- "bytes"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-var _ runtime.Unstructured = &UnstructuredList{}
-var _ metav1.ListInterface = &UnstructuredList{}
-
-// UnstructuredList allows lists that do not have Golang structs
-// registered to be manipulated generically. This can be used to deal
-// with the API lists from a plug-in.
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// +k8s:deepcopy-gen=true
-type UnstructuredList struct {
- Object map[string]interface{}
-
- // Items is a list of unstructured objects.
- Items []Unstructured `json:"items"`
-}
-
-func (u *UnstructuredList) GetObjectKind() schema.ObjectKind { return u }
-
-func (u *UnstructuredList) IsList() bool { return true }
-
-func (u *UnstructuredList) EachListItem(fn func(runtime.Object) error) error {
- for i := range u.Items {
- if err := fn(&u.Items[i]); err != nil {
- return err
- }
- }
- return nil
-}
-
-// UnstructuredContent returns a map contain an overlay of the Items field onto
-// the Object field. Items always overwrites overlay. Changing "items" in the
-// returned object will affect items in the underlying Items field, but changing
-// the "items" slice itself will have no effect.
-// TODO: expose SetUnstructuredContent on runtime.Unstructured that allows
-// items to be changed.
-func (u *UnstructuredList) UnstructuredContent() map[string]interface{} {
- out := u.Object
- if out == nil {
- out = make(map[string]interface{})
- }
- items := make([]interface{}, len(u.Items))
- for i, item := range u.Items {
- items[i] = item.Object
- }
- out["items"] = items
- return out
-}
-
-// SetUnstructuredContent obeys the conventions of List and keeps Items and the items
-// array in sync. If items is not an array of objects in the incoming map, then any
-// mismatched item will be removed.
-func (obj *UnstructuredList) SetUnstructuredContent(content map[string]interface{}) {
- obj.Object = content
- if content == nil {
- obj.Items = nil
- return
- }
- items, ok := obj.Object["items"].([]interface{})
- if !ok || items == nil {
- items = []interface{}{}
- }
- unstructuredItems := make([]Unstructured, 0, len(items))
- newItems := make([]interface{}, 0, len(items))
- for _, item := range items {
- o, ok := item.(map[string]interface{})
- if !ok {
- continue
- }
- unstructuredItems = append(unstructuredItems, Unstructured{Object: o})
- newItems = append(newItems, o)
- }
- obj.Items = unstructuredItems
- obj.Object["items"] = newItems
-}
-
-func (u *UnstructuredList) DeepCopy() *UnstructuredList {
- if u == nil {
- return nil
- }
- out := new(UnstructuredList)
- *out = *u
- out.Object = runtime.DeepCopyJSON(u.Object)
- out.Items = make([]Unstructured, len(u.Items))
- for i := range u.Items {
- u.Items[i].DeepCopyInto(&out.Items[i])
- }
- return out
-}
-
-// MarshalJSON ensures that the unstructured list object produces proper
-// JSON when passed to Go's standard JSON library.
-func (u *UnstructuredList) MarshalJSON() ([]byte, error) {
- var buf bytes.Buffer
- err := UnstructuredJSONScheme.Encode(u, &buf)
- return buf.Bytes(), err
-}
-
-// UnmarshalJSON ensures that the unstructured list object properly
-// decodes JSON when passed to Go's standard JSON library.
-func (u *UnstructuredList) UnmarshalJSON(b []byte) error {
- _, _, err := UnstructuredJSONScheme.Decode(b, nil, u)
- return err
-}
-
-func (u *UnstructuredList) GetAPIVersion() string {
- return getNestedString(u.Object, "apiVersion")
-}
-
-func (u *UnstructuredList) SetAPIVersion(version string) {
- u.setNestedField(version, "apiVersion")
-}
-
-func (u *UnstructuredList) GetKind() string {
- return getNestedString(u.Object, "kind")
-}
-
-func (u *UnstructuredList) SetKind(kind string) {
- u.setNestedField(kind, "kind")
-}
-
-func (u *UnstructuredList) GetResourceVersion() string {
- return getNestedString(u.Object, "metadata", "resourceVersion")
-}
-
-func (u *UnstructuredList) SetResourceVersion(version string) {
- u.setNestedField(version, "metadata", "resourceVersion")
-}
-
-func (u *UnstructuredList) GetSelfLink() string {
- return getNestedString(u.Object, "metadata", "selfLink")
-}
-
-func (u *UnstructuredList) SetSelfLink(selfLink string) {
- u.setNestedField(selfLink, "metadata", "selfLink")
-}
-
-func (u *UnstructuredList) GetContinue() string {
- return getNestedString(u.Object, "metadata", "continue")
-}
-
-func (u *UnstructuredList) SetContinue(c string) {
- u.setNestedField(c, "metadata", "continue")
-}
-
-func (u *UnstructuredList) SetGroupVersionKind(gvk schema.GroupVersionKind) {
- u.SetAPIVersion(gvk.GroupVersion().String())
- u.SetKind(gvk.Kind)
-}
-
-func (u *UnstructuredList) GroupVersionKind() schema.GroupVersionKind {
- gv, err := schema.ParseGroupVersion(u.GetAPIVersion())
- if err != nil {
- return schema.GroupVersionKind{}
- }
- gvk := gv.WithKind(u.GetKind())
- return gvk
-}
-
-func (u *UnstructuredList) setNestedField(value interface{}, fields ...string) {
- if u.Object == nil {
- u.Object = make(map[string]interface{})
- }
- SetNestedField(u.Object, value, fields...)
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go
deleted file mode 100644
index e3bae45ec..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was autogenerated by deepcopy-gen. Do not edit it manually!
-
-package unstructured
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Unstructured) DeepCopyInto(out *Unstructured) {
- clone := in.DeepCopy()
- *out = *clone
- return
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Unstructured) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- } else {
- return nil
- }
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *UnstructuredList) DeepCopyInto(out *UnstructuredList) {
- clone := in.DeepCopy()
- *out = *clone
- return
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *UnstructuredList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- } else {
- return nil
- }
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go
deleted file mode 100644
index 26c5a0cdc..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-Copyright 2015 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 validation
-
-import (
- "fmt"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/validation"
- "k8s.io/apimachinery/pkg/util/validation/field"
-)
-
-func ValidateLabelSelector(ps *metav1.LabelSelector, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- if ps == nil {
- return allErrs
- }
- allErrs = append(allErrs, ValidateLabels(ps.MatchLabels, fldPath.Child("matchLabels"))...)
- for i, expr := range ps.MatchExpressions {
- allErrs = append(allErrs, ValidateLabelSelectorRequirement(expr, fldPath.Child("matchExpressions").Index(i))...)
- }
- return allErrs
-}
-
-func ValidateLabelSelectorRequirement(sr metav1.LabelSelectorRequirement, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- switch sr.Operator {
- case metav1.LabelSelectorOpIn, metav1.LabelSelectorOpNotIn:
- if len(sr.Values) == 0 {
- allErrs = append(allErrs, field.Required(fldPath.Child("values"), "must be specified when `operator` is 'In' or 'NotIn'"))
- }
- case metav1.LabelSelectorOpExists, metav1.LabelSelectorOpDoesNotExist:
- if len(sr.Values) > 0 {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("values"), "may not be specified when `operator` is 'Exists' or 'DoesNotExist'"))
- }
- default:
- allErrs = append(allErrs, field.Invalid(fldPath.Child("operator"), sr.Operator, "not a valid selector operator"))
- }
- allErrs = append(allErrs, ValidateLabelName(sr.Key, fldPath.Child("key"))...)
- return allErrs
-}
-
-// ValidateLabelName validates that the label name is correctly defined.
-func ValidateLabelName(labelName string, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- for _, msg := range validation.IsQualifiedName(labelName) {
- allErrs = append(allErrs, field.Invalid(fldPath, labelName, msg))
- }
- return allErrs
-}
-
-// ValidateLabels validates that a set of labels are correctly defined.
-func ValidateLabels(labels map[string]string, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- for k, v := range labels {
- allErrs = append(allErrs, ValidateLabelName(k, fldPath)...)
- for _, msg := range validation.IsValidLabelValue(v) {
- allErrs = append(allErrs, field.Invalid(fldPath, v, msg))
- }
- }
- return allErrs
-}
-
-func ValidateDeleteOptions(options *metav1.DeleteOptions) field.ErrorList {
- allErrs := field.ErrorList{}
- if options.OrphanDependents != nil && options.PropagationPolicy != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath(""), options, "OrphanDependents and DeletionPropagation cannot be both set"))
- }
- if options.PropagationPolicy != nil &&
- *options.PropagationPolicy != metav1.DeletePropagationForeground &&
- *options.PropagationPolicy != metav1.DeletePropagationBackground &&
- *options.PropagationPolicy != metav1.DeletePropagationOrphan {
- allErrs = append(allErrs, field.Invalid(field.NewPath(""), options, fmt.Sprintf("DeletionPropagation need to be one of %q, %q, %q or nil", metav1.DeletePropagationForeground, metav1.DeletePropagationBackground, metav1.DeletePropagationOrphan)))
- }
- return allErrs
-}
-
-const UninitializedStatusUpdateErrorMsg string = `must not update status when the object is uninitialized`
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/conversion.go
deleted file mode 100644
index f3e5e4c98..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/conversion.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import "k8s.io/apimachinery/pkg/conversion"
-
-// Convert_Slice_string_To_v1beta1_IncludeObjectPolicy allows converting a URL query parameter value
-func Convert_Slice_string_To_v1beta1_IncludeObjectPolicy(input *[]string, out *IncludeObjectPolicy, s conversion.Scope) error {
- if len(*input) > 0 {
- *out = IncludeObjectPolicy((*input)[0])
- }
- return nil
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/deepcopy.go
deleted file mode 100644
index 2dd440bb7..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/deepcopy.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-func (in *TableRow) DeepCopy() *TableRow {
- if in == nil {
- return nil
- }
-
- out := new(TableRow)
-
- if in.Cells != nil {
- out.Cells = make([]interface{}, len(in.Cells))
- for i := range in.Cells {
- out.Cells[i] = deepCopyJSON(in.Cells[i])
- }
- }
-
- if in.Conditions != nil {
- out.Conditions = make([]TableRowCondition, len(in.Conditions))
- for i := range in.Conditions {
- in.Conditions[i].DeepCopyInto(&out.Conditions[i])
- }
- }
-
- in.Object.DeepCopyInto(&out.Object)
- return out
-}
-
-func deepCopyJSON(x interface{}) interface{} {
- switch x := x.(type) {
- case map[string]interface{}:
- clone := make(map[string]interface{}, len(x))
- for k, v := range x {
- clone[k] = deepCopyJSON(v)
- }
- return clone
- case []interface{}:
- clone := make([]interface{}, len(x))
- for i := range x {
- clone[i] = deepCopyJSON(x[i])
- }
- return clone
- default:
- return x
- }
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/doc.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/doc.go
deleted file mode 100644
index dc461cc29..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/doc.go
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:openapi-gen=true
-// +k8s:defaulter-gen=TypeMeta
-
-// +groupName=meta.k8s.io
-package v1beta1
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go
deleted file mode 100644
index dda05bea4..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,633 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto
-
- It has these top-level messages:
- PartialObjectMetadata
- PartialObjectMetadataList
- TableOptions
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
-func (m *PartialObjectMetadata) Reset() { *m = PartialObjectMetadata{} }
-func (*PartialObjectMetadata) ProtoMessage() {}
-func (*PartialObjectMetadata) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} }
-func (*PartialObjectMetadataList) ProtoMessage() {}
-func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{1}
-}
-
-func (m *TableOptions) Reset() { *m = TableOptions{} }
-func (*TableOptions) ProtoMessage() {}
-func (*TableOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func init() {
- proto.RegisterType((*PartialObjectMetadata)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1beta1.PartialObjectMetadata")
- proto.RegisterType((*PartialObjectMetadataList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1beta1.PartialObjectMetadataList")
- proto.RegisterType((*TableOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1beta1.TableOptions")
-}
-func (m *PartialObjectMetadata) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PartialObjectMetadata) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- return i, nil
-}
-
-func (m *PartialObjectMetadataList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PartialObjectMetadataList) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *TableOptions) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *TableOptions) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.IncludeObject)))
- i += copy(dAtA[i:], m.IncludeObject)
- return i, nil
-}
-
-func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *PartialObjectMetadata) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *PartialObjectMetadataList) Size() (n int) {
- var l int
- _ = l
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *TableOptions) Size() (n int) {
- var l int
- _ = l
- l = len(m.IncludeObject)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *PartialObjectMetadata) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PartialObjectMetadata{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *PartialObjectMetadataList) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&PartialObjectMetadataList{`,
- `Items:` + strings.Replace(fmt.Sprintf("%v", this.Items), "PartialObjectMetadata", "PartialObjectMetadata", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *TableOptions) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TableOptions{`,
- `IncludeObject:` + fmt.Sprintf("%v", this.IncludeObject) + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *PartialObjectMetadata) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PartialObjectMetadata: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PartialObjectMetadata: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PartialObjectMetadataList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PartialObjectMetadataList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PartialObjectMetadataList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, &PartialObjectMetadata{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *TableOptions) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: TableOptions: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TableOptions: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field IncludeObject", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.IncludeObject = IncludeObjectPolicy(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
-
-func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto", fileDescriptorGenerated)
-}
-
-var fileDescriptorGenerated = []byte{
- // 391 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbd, 0x6e, 0xd4, 0x40,
- 0x10, 0xc7, 0xbd, 0x42, 0x11, 0x64, 0x43, 0x1a, 0x23, 0xa4, 0x70, 0xc5, 0x3a, 0xba, 0x2a, 0x48,
- 0x64, 0x97, 0x04, 0x84, 0x28, 0x91, 0xbb, 0x48, 0xa0, 0x44, 0x16, 0x15, 0x15, 0x6b, 0x7b, 0xf0,
- 0x2d, 0xb6, 0x77, 0xad, 0xdd, 0x71, 0xa4, 0x6b, 0x10, 0x8f, 0xc0, 0x63, 0x5d, 0x99, 0x32, 0x95,
- 0xc5, 0x99, 0xb7, 0xa0, 0x42, 0xfe, 0x10, 0xf9, 0xb8, 0x3b, 0xe5, 0xba, 0x99, 0xff, 0xe8, 0xf7,
- 0xf3, 0x8c, 0x97, 0x46, 0xf9, 0x7b, 0xc7, 0x95, 0x11, 0x79, 0x1d, 0x83, 0xd5, 0x80, 0xe0, 0xc4,
- 0x25, 0xe8, 0xd4, 0x58, 0x31, 0x0e, 0x64, 0xa5, 0x4a, 0x99, 0xcc, 0x94, 0x06, 0x3b, 0x17, 0x55,
- 0x9e, 0x75, 0x81, 0x13, 0x25, 0xa0, 0x14, 0x97, 0x27, 0x31, 0xa0, 0x3c, 0x11, 0x19, 0x68, 0xb0,
- 0x12, 0x21, 0xe5, 0x95, 0x35, 0x68, 0xfc, 0x97, 0x03, 0xca, 0x6f, 0xa3, 0xbc, 0xca, 0xb3, 0x2e,
- 0x70, 0xbc, 0x43, 0xf9, 0x88, 0x4e, 0x8e, 0x33, 0x85, 0xb3, 0x3a, 0xe6, 0x89, 0x29, 0x45, 0x66,
- 0x32, 0x23, 0x7a, 0x43, 0x5c, 0x7f, 0xeb, 0xbb, 0xbe, 0xe9, 0xab, 0xc1, 0x3c, 0x79, 0xbb, 0xcd,
- 0x52, 0xf7, 0xf7, 0x99, 0x6c, 0x3c, 0xc5, 0xd6, 0x1a, 0x55, 0x09, 0x2b, 0xc0, 0xbb, 0x87, 0x00,
- 0x97, 0xcc, 0xa0, 0x94, 0x2b, 0xdc, 0x9b, 0x4d, 0x5c, 0x8d, 0xaa, 0x10, 0x4a, 0xa3, 0x43, 0x7b,
- 0x1f, 0x9a, 0xce, 0xe9, 0xf3, 0x0b, 0x69, 0x51, 0xc9, 0xe2, 0x3c, 0xfe, 0x0e, 0x09, 0x7e, 0x02,
- 0x94, 0xa9, 0x44, 0xe9, 0x7f, 0xa5, 0x4f, 0xca, 0xb1, 0x3e, 0x20, 0x87, 0xe4, 0x68, 0xef, 0xf4,
- 0x35, 0xdf, 0xe6, 0xcf, 0xf2, 0x1b, 0x4f, 0xe8, 0x2f, 0x9a, 0xc0, 0x6b, 0x9b, 0x80, 0xde, 0x64,
- 0xd1, 0x7f, 0xeb, 0xf4, 0x07, 0x7d, 0xb1, 0xf6, 0xd3, 0x1f, 0x95, 0x43, 0x5f, 0xd2, 0x1d, 0x85,
- 0x50, 0xba, 0x03, 0x72, 0xf8, 0xe8, 0x68, 0xef, 0xf4, 0x03, 0xdf, 0xfa, 0x55, 0xf9, 0x5a, 0x69,
- 0xb8, 0xdb, 0x36, 0xc1, 0xce, 0x59, 0xa7, 0x8c, 0x06, 0xf3, 0x34, 0xa6, 0x4f, 0x3f, 0xcb, 0xb8,
- 0x80, 0xf3, 0x0a, 0x95, 0xd1, 0xce, 0x8f, 0xe8, 0xbe, 0xd2, 0x49, 0x51, 0xa7, 0x30, 0xa0, 0xfd,
- 0xd9, 0xbb, 0xe1, 0xab, 0xf1, 0x88, 0xfd, 0xb3, 0xdb, 0xc3, 0xbf, 0x4d, 0xf0, 0xec, 0x4e, 0x70,
- 0x61, 0x0a, 0x95, 0xcc, 0xa3, 0xbb, 0x8a, 0xf0, 0x78, 0xb1, 0x64, 0xde, 0xd5, 0x92, 0x79, 0xd7,
- 0x4b, 0xe6, 0xfd, 0x6c, 0x19, 0x59, 0xb4, 0x8c, 0x5c, 0xb5, 0x8c, 0x5c, 0xb7, 0x8c, 0xfc, 0x6e,
- 0x19, 0xf9, 0xf5, 0x87, 0x79, 0x5f, 0x1e, 0x8f, 0xab, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x73,
- 0xdf, 0x3a, 0x0c, 0x10, 0x03, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto
deleted file mode 100644
index a9060bf96..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.apimachinery.pkg.apis.meta.v1beta1;
-
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients
-// to get access to a particular ObjectMeta schema without knowing the details of the version.
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-message PartialObjectMetadata {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-}
-
-// PartialObjectMetadataList contains a list of objects containing only their metadata
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-message PartialObjectMetadataList {
- // items contains each of the included items.
- repeated PartialObjectMetadata items = 1;
-}
-
-// TableOptions are used when a Table is requested by the caller.
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-message TableOptions {
- // includeObject decides whether to include each object along with its columnar information.
- // Specifying "None" will return no object, specifying "Object" will return the full object contents, and
- // specifying "Metadata" (the default) will return the object's metadata in the PartialObjectMetadata kind
- // in version v1beta1 of the meta.k8s.io API group.
- optional string includeObject = 1;
-}
-
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go
deleted file mode 100644
index d13254b41..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name for this API.
-const GroupName = "meta.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-// Kind takes an unqualified kind and returns a Group qualified GroupKind
-func Kind(kind string) schema.GroupKind {
- return SchemeGroupVersion.WithKind(kind).GroupKind()
-}
-
-// scheme is the registry for the common types that adhere to the meta v1beta1 API spec.
-var scheme = runtime.NewScheme()
-
-// ParameterCodec knows about query parameters used with the meta v1beta1 API spec.
-var ParameterCodec = runtime.NewParameterCodec(scheme)
-
-func init() {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Table{},
- &TableOptions{},
- &PartialObjectMetadata{},
- &PartialObjectMetadataList{},
- )
-
- if err := scheme.AddConversionFuncs(
- Convert_Slice_string_To_v1beta1_IncludeObjectPolicy,
- ); err != nil {
- panic(err)
- }
-
- // register manually. This usually goes through the SchemeBuilder, which we cannot use here.
- //scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...)
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go
deleted file mode 100644
index 7b7c47d82..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-Copyright 2017 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 v1beta1 is alpha objects from meta that will be introduced.
-package v1beta1
-
-import (
- "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
-)
-
-// TODO: Table does not generate to protobuf because of the interface{} - fix protobuf
-// generation to support a meta type that can accept any valid JSON.
-
-// Table is a tabular representation of a set of API resources. The server transforms the
-// object into a set of preferred columns for quickly reviewing the objects.
-// +protobuf=false
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-type Table struct {
- v1.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
- // +optional
- v1.ListMeta `json:"metadata,omitempty"`
-
- // columnDefinitions describes each column in the returned items array. The number of cells per row
- // will always match the number of column definitions.
- ColumnDefinitions []TableColumnDefinition `json:"columnDefinitions"`
- // rows is the list of items in the table.
- Rows []TableRow `json:"rows"`
-}
-
-// TableColumnDefinition contains information about a column returned in the Table.
-// +protobuf=false
-type TableColumnDefinition struct {
- // name is a human readable name for the column.
- Name string `json:"name"`
- // type is an OpenAPI type definition for this column.
- // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
- Type string `json:"type"`
- // format is an optional OpenAPI type definition for this column. The 'name' format is applied
- // to the primary identifier column to assist in clients identifying column is the resource name.
- // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
- Format string `json:"format"`
- // description is a human readable description of this column.
- Description string `json:"description"`
- // priority is an integer defining the relative importance of this column compared to others. Lower
- // numbers are considered higher priority. Columns that may be omitted in limited space scenarios
- // should be given a higher priority.
- Priority int32 `json:"priority"`
-}
-
-// TableRow is an individual row in a table.
-// +protobuf=false
-type TableRow struct {
- // cells will be as wide as headers and may contain strings, numbers, booleans, simple maps, or lists, or
- // null. See the type field of the column definition for a more detailed description.
- Cells []interface{} `json:"cells"`
- // conditions describe additional status of a row that are relevant for a human user.
- // +optional
- Conditions []TableRowCondition `json:"conditions,omitempty"`
- // This field contains the requested additional information about each object based on the includeObject
- // policy when requesting the Table. If "None", this field is empty, if "Object" this will be the
- // default serialization of the object for the current API version, and if "Metadata" (the default) will
- // contain the object metadata. Check the returned kind and apiVersion of the object before parsing.
- // +optional
- Object runtime.RawExtension `json:"object,omitempty"`
-}
-
-// TableRowCondition allows a row to be marked with additional information.
-// +protobuf=false
-type TableRowCondition struct {
- // Type of row condition.
- Type RowConditionType `json:"type"`
- // Status of the condition, one of True, False, Unknown.
- Status ConditionStatus `json:"status"`
- // (brief) machine readable reason for the condition's last transition.
- // +optional
- Reason string `json:"reason,omitempty"`
- // Human readable message indicating details about last transition.
- // +optional
- Message string `json:"message,omitempty"`
-}
-
-type RowConditionType string
-
-// These are valid conditions of a row. This list is not exhaustive and new conditions may be
-// included by other resources.
-const (
- // RowCompleted means the underlying resource has reached completion and may be given less
- // visual priority than other resources.
- RowCompleted RowConditionType = "Completed"
-)
-
-type ConditionStatus string
-
-// These are valid condition statuses. "ConditionTrue" means a resource is in the condition.
-// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes
-// can't decide if a resource is in the condition or not. In the future, we could add other
-// intermediate conditions, e.g. ConditionDegraded.
-const (
- ConditionTrue ConditionStatus = "True"
- ConditionFalse ConditionStatus = "False"
- ConditionUnknown ConditionStatus = "Unknown"
-)
-
-// IncludeObjectPolicy controls which portion of the object is returned with a Table.
-type IncludeObjectPolicy string
-
-const (
- // IncludeNone returns no object.
- IncludeNone IncludeObjectPolicy = "None"
- // IncludeMetadata serializes the object containing only its metadata field.
- IncludeMetadata IncludeObjectPolicy = "Metadata"
- // IncludeObject contains the full object.
- IncludeObject IncludeObjectPolicy = "Object"
-)
-
-// TableOptions are used when a Table is requested by the caller.
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-type TableOptions struct {
- v1.TypeMeta `json:",inline"`
- // includeObject decides whether to include each object along with its columnar information.
- // Specifying "None" will return no object, specifying "Object" will return the full object contents, and
- // specifying "Metadata" (the default) will return the object's metadata in the PartialObjectMetadata kind
- // in version v1beta1 of the meta.k8s.io API group.
- IncludeObject IncludeObjectPolicy `json:"includeObject,omitempty" protobuf:"bytes,1,opt,name=includeObject,casttype=IncludeObjectPolicy"`
-}
-
-// PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients
-// to get access to a particular ObjectMeta schema without knowing the details of the version.
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-type PartialObjectMetadata struct {
- v1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-}
-
-// PartialObjectMetadataList contains a list of objects containing only their metadata
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-type PartialObjectMetadataList struct {
- v1.TypeMeta `json:",inline"`
-
- // items contains each of the included items.
- Items []*PartialObjectMetadata `json:"items" protobuf:"bytes,1,rep,name=items"`
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 2680fbf7e..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_PartialObjectMetadata = map[string]string{
- "": "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
-}
-
-func (PartialObjectMetadata) SwaggerDoc() map[string]string {
- return map_PartialObjectMetadata
-}
-
-var map_PartialObjectMetadataList = map[string]string{
- "": "PartialObjectMetadataList contains a list of objects containing only their metadata",
- "items": "items contains each of the included items.",
-}
-
-func (PartialObjectMetadataList) SwaggerDoc() map[string]string {
- return map_PartialObjectMetadataList
-}
-
-var map_Table = map[string]string{
- "": "Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.",
- "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
- "columnDefinitions": "columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.",
- "rows": "rows is the list of items in the table.",
-}
-
-func (Table) SwaggerDoc() map[string]string {
- return map_Table
-}
-
-var map_TableColumnDefinition = map[string]string{
- "": "TableColumnDefinition contains information about a column returned in the Table.",
- "name": "name is a human readable name for the column.",
- "type": "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.",
- "format": "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.",
- "description": "description is a human readable description of this column.",
- "priority": "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.",
-}
-
-func (TableColumnDefinition) SwaggerDoc() map[string]string {
- return map_TableColumnDefinition
-}
-
-var map_TableOptions = map[string]string{
- "": "TableOptions are used when a Table is requested by the caller.",
- "includeObject": "includeObject decides whether to include each object along with its columnar information. Specifying \"None\" will return no object, specifying \"Object\" will return the full object contents, and specifying \"Metadata\" (the default) will return the object's metadata in the PartialObjectMetadata kind in version v1beta1 of the meta.k8s.io API group.",
-}
-
-func (TableOptions) SwaggerDoc() map[string]string {
- return map_TableOptions
-}
-
-var map_TableRow = map[string]string{
- "": "TableRow is an individual row in a table.",
- "cells": "cells will be as wide as headers and may contain strings, numbers, booleans, simple maps, or lists, or null. See the type field of the column definition for a more detailed description.",
- "conditions": "conditions describe additional status of a row that are relevant for a human user.",
- "object": "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing.",
-}
-
-func (TableRow) SwaggerDoc() map[string]string {
- return map_TableRow
-}
-
-var map_TableRowCondition = map[string]string{
- "": "TableRowCondition allows a row to be marked with additional information.",
- "type": "Type of row condition.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "reason": "(brief) machine readable reason for the condition's last transition.",
- "message": "Human readable message indicating details about last transition.",
-}
-
-func (TableRowCondition) SwaggerDoc() map[string]string {
- return map_TableRowCondition
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index a1f58daa3..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,194 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was autogenerated by deepcopy-gen. Do not edit it manually!
-
-package v1beta1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PartialObjectMetadata) DeepCopyInto(out *PartialObjectMetadata) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PartialObjectMetadata.
-func (in *PartialObjectMetadata) DeepCopy() *PartialObjectMetadata {
- if in == nil {
- return nil
- }
- out := new(PartialObjectMetadata)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PartialObjectMetadata) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- } else {
- return nil
- }
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PartialObjectMetadataList) DeepCopyInto(out *PartialObjectMetadataList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]*PartialObjectMetadata, len(*in))
- for i := range *in {
- if (*in)[i] == nil {
- (*out)[i] = nil
- } else {
- (*out)[i] = new(PartialObjectMetadata)
- (*in)[i].DeepCopyInto((*out)[i])
- }
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PartialObjectMetadataList.
-func (in *PartialObjectMetadataList) DeepCopy() *PartialObjectMetadataList {
- if in == nil {
- return nil
- }
- out := new(PartialObjectMetadataList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *PartialObjectMetadataList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- } else {
- return nil
- }
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Table) DeepCopyInto(out *Table) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.ColumnDefinitions != nil {
- in, out := &in.ColumnDefinitions, &out.ColumnDefinitions
- *out = make([]TableColumnDefinition, len(*in))
- copy(*out, *in)
- }
- if in.Rows != nil {
- in, out := &in.Rows, &out.Rows
- *out = make([]TableRow, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Table.
-func (in *Table) DeepCopy() *Table {
- if in == nil {
- return nil
- }
- out := new(Table)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Table) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- } else {
- return nil
- }
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TableColumnDefinition) DeepCopyInto(out *TableColumnDefinition) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableColumnDefinition.
-func (in *TableColumnDefinition) DeepCopy() *TableColumnDefinition {
- if in == nil {
- return nil
- }
- out := new(TableColumnDefinition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TableOptions) DeepCopyInto(out *TableOptions) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableOptions.
-func (in *TableOptions) DeepCopy() *TableOptions {
- if in == nil {
- return nil
- }
- out := new(TableOptions)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *TableOptions) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- } else {
- return nil
- }
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TableRow) DeepCopyInto(out *TableRow) {
- clone := in.DeepCopy()
- *out = *clone
- return
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *TableRowCondition) DeepCopyInto(out *TableRowCondition) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableRowCondition.
-func (in *TableRowCondition) DeepCopy() *TableRowCondition {
- if in == nil {
- return nil
- }
- out := new(TableRowCondition)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.defaults.go
deleted file mode 100644
index b61dda74c..000000000
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.defaults.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was autogenerated by defaulter-gen. Do not edit it manually!
-
-package v1beta1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// RegisterDefaults adds defaulters functions to the given scheme.
-// Public to allow building arbitrary schemes.
-// All generated defaulters are covering - they call all nested defaulters.
-func RegisterDefaults(scheme *runtime.Scheme) error {
- return nil
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/cache/cache.go b/vendor/k8s.io/apimachinery/pkg/util/cache/cache.go
deleted file mode 100644
index 9a09fe54d..000000000
--- a/vendor/k8s.io/apimachinery/pkg/util/cache/cache.go
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-Copyright 2014 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 cache
-
-import (
- "sync"
-)
-
-const (
- shardsCount int = 32
-)
-
-type Cache []*cacheShard
-
-func NewCache(maxSize int) Cache {
- if maxSize < shardsCount {
- maxSize = shardsCount
- }
- cache := make(Cache, shardsCount)
- for i := 0; i < shardsCount; i++ {
- cache[i] = &cacheShard{
- items: make(map[uint64]interface{}),
- maxSize: maxSize / shardsCount,
- }
- }
- return cache
-}
-
-func (c Cache) getShard(index uint64) *cacheShard {
- return c[index%uint64(shardsCount)]
-}
-
-// Returns true if object already existed, false otherwise.
-func (c *Cache) Add(index uint64, obj interface{}) bool {
- return c.getShard(index).add(index, obj)
-}
-
-func (c *Cache) Get(index uint64) (obj interface{}, found bool) {
- return c.getShard(index).get(index)
-}
-
-type cacheShard struct {
- items map[uint64]interface{}
- sync.RWMutex
- maxSize int
-}
-
-// Returns true if object already existed, false otherwise.
-func (s *cacheShard) add(index uint64, obj interface{}) bool {
- s.Lock()
- defer s.Unlock()
- _, isOverwrite := s.items[index]
- if !isOverwrite && len(s.items) >= s.maxSize {
- var randomKey uint64
- for randomKey = range s.items {
- break
- }
- delete(s.items, randomKey)
- }
- s.items[index] = obj
- return isOverwrite
-}
-
-func (s *cacheShard) get(index uint64) (obj interface{}, found bool) {
- s.RLock()
- defer s.RUnlock()
- obj, found = s.items[index]
- return
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go b/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go
deleted file mode 100644
index f6b307aa6..000000000
--- a/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
-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 cache
-
-import (
- "sync"
- "time"
-
- "github.com/hashicorp/golang-lru"
-)
-
-// Clock defines an interface for obtaining the current time
-type Clock interface {
- Now() time.Time
-}
-
-// realClock implements the Clock interface by calling time.Now()
-type realClock struct{}
-
-func (realClock) Now() time.Time { return time.Now() }
-
-// LRUExpireCache is a cache that ensures the mostly recently accessed keys are returned with
-// a ttl beyond which keys are forcibly expired.
-type LRUExpireCache struct {
- // clock is used to obtain the current time
- clock Clock
-
- cache *lru.Cache
- lock sync.Mutex
-}
-
-// NewLRUExpireCache creates an expiring cache with the given size
-func NewLRUExpireCache(maxSize int) *LRUExpireCache {
- return NewLRUExpireCacheWithClock(maxSize, realClock{})
-}
-
-// NewLRUExpireCacheWithClock creates an expiring cache with the given size, using the specified clock to obtain the current time.
-func NewLRUExpireCacheWithClock(maxSize int, clock Clock) *LRUExpireCache {
- cache, err := lru.New(maxSize)
- if err != nil {
- // if called with an invalid size
- panic(err)
- }
- return &LRUExpireCache{clock: clock, cache: cache}
-}
-
-type cacheEntry struct {
- value interface{}
- expireTime time.Time
-}
-
-// Add adds the value to the cache at key with the specified maximum duration.
-func (c *LRUExpireCache) Add(key interface{}, value interface{}, ttl time.Duration) {
- c.lock.Lock()
- defer c.lock.Unlock()
- c.cache.Add(key, &cacheEntry{value, c.clock.Now().Add(ttl)})
-}
-
-// Get returns the value at the specified key from the cache if it exists and is not
-// expired, or returns false.
-func (c *LRUExpireCache) Get(key interface{}) (interface{}, bool) {
- c.lock.Lock()
- defer c.lock.Unlock()
- e, ok := c.cache.Get(key)
- if !ok {
- return nil, false
- }
- if c.clock.Now().After(e.(*cacheEntry).expireTime) {
- c.cache.Remove(key)
- return nil, false
- }
- return e.(*cacheEntry).value, true
-}
-
-// Remove removes the specified key from the cache if it exists
-func (c *LRUExpireCache) Remove(key interface{}) {
- c.lock.Lock()
- defer c.lock.Unlock()
- c.cache.Remove(key)
-}
-
-// Keys returns all the keys in the cache, even if they are expired. Subsequent calls to
-// get may return not found. It returns all keys from oldest to newest.
-func (c *LRUExpireCache) Keys() []interface{} {
- c.lock.Lock()
- defer c.lock.Unlock()
- return c.cache.Keys()
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/diff/diff.go b/vendor/k8s.io/apimachinery/pkg/util/diff/diff.go
deleted file mode 100644
index 3d5ec14bf..000000000
--- a/vendor/k8s.io/apimachinery/pkg/util/diff/diff.go
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
-Copyright 2014 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 diff
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "reflect"
- "sort"
- "strings"
- "text/tabwriter"
-
- "github.com/davecgh/go-spew/spew"
-
- "k8s.io/apimachinery/pkg/util/validation/field"
-)
-
-// StringDiff diffs a and b and returns a human readable diff.
-func StringDiff(a, b string) string {
- ba := []byte(a)
- bb := []byte(b)
- out := []byte{}
- i := 0
- for ; i < len(ba) && i < len(bb); i++ {
- if ba[i] != bb[i] {
- break
- }
- out = append(out, ba[i])
- }
- out = append(out, []byte("\n\nA: ")...)
- out = append(out, ba[i:]...)
- out = append(out, []byte("\n\nB: ")...)
- out = append(out, bb[i:]...)
- out = append(out, []byte("\n\n")...)
- return string(out)
-}
-
-// ObjectDiff writes the two objects out as JSON and prints out the identical part of
-// the objects followed by the remaining part of 'a' and finally the remaining part of 'b'.
-// For debugging tests.
-func ObjectDiff(a, b interface{}) string {
- ab, err := json.Marshal(a)
- if err != nil {
- panic(fmt.Sprintf("a: %v", err))
- }
- bb, err := json.Marshal(b)
- if err != nil {
- panic(fmt.Sprintf("b: %v", err))
- }
- return StringDiff(string(ab), string(bb))
-}
-
-// ObjectGoPrintDiff is like ObjectDiff, but uses go-spew to print the objects,
-// which shows absolutely everything by recursing into every single pointer
-// (go's %#v formatters OTOH stop at a certain point). This is needed when you
-// can't figure out why reflect.DeepEqual is returning false and nothing is
-// showing you differences. This will.
-func ObjectGoPrintDiff(a, b interface{}) string {
- s := spew.ConfigState{DisableMethods: true}
- return StringDiff(
- s.Sprintf("%#v", a),
- s.Sprintf("%#v", b),
- )
-}
-
-func ObjectReflectDiff(a, b interface{}) string {
- vA, vB := reflect.ValueOf(a), reflect.ValueOf(b)
- if vA.Type() != vB.Type() {
- return fmt.Sprintf("type A %T and type B %T do not match", a, b)
- }
- diffs := objectReflectDiff(field.NewPath("object"), vA, vB)
- if len(diffs) == 0 {
- return "<no diffs>"
- }
- out := []string{""}
- for _, d := range diffs {
- out = append(out,
- fmt.Sprintf("%s:", d.path),
- limit(fmt.Sprintf(" a: %#v", d.a), 80),
- limit(fmt.Sprintf(" b: %#v", d.b), 80),
- )
- }
- return strings.Join(out, "\n")
-}
-
-func limit(s string, max int) string {
- if len(s) > max {
- return s[:max]
- }
- return s
-}
-
-func public(s string) bool {
- if len(s) == 0 {
- return false
- }
- return s[:1] == strings.ToUpper(s[:1])
-}
-
-type diff struct {
- path *field.Path
- a, b interface{}
-}
-
-type orderedDiffs []diff
-
-func (d orderedDiffs) Len() int { return len(d) }
-func (d orderedDiffs) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
-func (d orderedDiffs) Less(i, j int) bool {
- a, b := d[i].path.String(), d[j].path.String()
- if a < b {
- return true
- }
- return false
-}
-
-func objectReflectDiff(path *field.Path, a, b reflect.Value) []diff {
- switch a.Type().Kind() {
- case reflect.Struct:
- var changes []diff
- for i := 0; i < a.Type().NumField(); i++ {
- if !public(a.Type().Field(i).Name) {
- if reflect.DeepEqual(a.Interface(), b.Interface()) {
- continue
- }
- return []diff{{path: path, a: fmt.Sprintf("%#v", a), b: fmt.Sprintf("%#v", b)}}
- }
- if sub := objectReflectDiff(path.Child(a.Type().Field(i).Name), a.Field(i), b.Field(i)); len(sub) > 0 {
- changes = append(changes, sub...)
- }
- }
- return changes
- case reflect.Ptr, reflect.Interface:
- if a.IsNil() || b.IsNil() {
- switch {
- case a.IsNil() && b.IsNil():
- return nil
- case a.IsNil():
- return []diff{{path: path, a: nil, b: b.Interface()}}
- default:
- return []diff{{path: path, a: a.Interface(), b: nil}}
- }
- }
- return objectReflectDiff(path, a.Elem(), b.Elem())
- case reflect.Chan:
- if !reflect.DeepEqual(a.Interface(), b.Interface()) {
- return []diff{{path: path, a: a.Interface(), b: b.Interface()}}
- }
- return nil
- case reflect.Slice:
- lA, lB := a.Len(), b.Len()
- l := lA
- if lB < lA {
- l = lB
- }
- if lA == lB && lA == 0 {
- if a.IsNil() != b.IsNil() {
- return []diff{{path: path, a: a.Interface(), b: b.Interface()}}
- }
- return nil
- }
- var diffs []diff
- for i := 0; i < l; i++ {
- if !reflect.DeepEqual(a.Index(i), b.Index(i)) {
- diffs = append(diffs, objectReflectDiff(path.Index(i), a.Index(i), b.Index(i))...)
- }
- }
- for i := l; i < lA; i++ {
- diffs = append(diffs, diff{path: path.Index(i), a: a.Index(i), b: nil})
- }
- for i := l; i < lB; i++ {
- diffs = append(diffs, diff{path: path.Index(i), a: nil, b: b.Index(i)})
- }
- return diffs
- case reflect.Map:
- if reflect.DeepEqual(a.Interface(), b.Interface()) {
- return nil
- }
- aKeys := make(map[interface{}]interface{})
- for _, key := range a.MapKeys() {
- aKeys[key.Interface()] = a.MapIndex(key).Interface()
- }
- var missing []diff
- for _, key := range b.MapKeys() {
- if _, ok := aKeys[key.Interface()]; ok {
- delete(aKeys, key.Interface())
- if reflect.DeepEqual(a.MapIndex(key).Interface(), b.MapIndex(key).Interface()) {
- continue
- }
- missing = append(missing, objectReflectDiff(path.Key(fmt.Sprintf("%s", key.Interface())), a.MapIndex(key), b.MapIndex(key))...)
- continue
- }
- missing = append(missing, diff{path: path.Key(fmt.Sprintf("%s", key.Interface())), a: nil, b: b.MapIndex(key).Interface()})
- }
- for key, value := range aKeys {
- missing = append(missing, diff{path: path.Key(fmt.Sprintf("%s", key)), a: value, b: nil})
- }
- if len(missing) == 0 {
- missing = append(missing, diff{path: path, a: a.Interface(), b: b.Interface()})
- }
- sort.Sort(orderedDiffs(missing))
- return missing
- default:
- if reflect.DeepEqual(a.Interface(), b.Interface()) {
- return nil
- }
- if !a.CanInterface() {
- return []diff{{path: path, a: fmt.Sprintf("%#v", a), b: fmt.Sprintf("%#v", b)}}
- }
- return []diff{{path: path, a: a.Interface(), b: b.Interface()}}
- }
-}
-
-// ObjectGoPrintSideBySide prints a and b as textual dumps side by side,
-// enabling easy visual scanning for mismatches.
-func ObjectGoPrintSideBySide(a, b interface{}) string {
- s := spew.ConfigState{
- Indent: " ",
- // Extra deep spew.
- DisableMethods: true,
- }
- sA := s.Sdump(a)
- sB := s.Sdump(b)
-
- linesA := strings.Split(sA, "\n")
- linesB := strings.Split(sB, "\n")
- width := 0
- for _, s := range linesA {
- l := len(s)
- if l > width {
- width = l
- }
- }
- for _, s := range linesB {
- l := len(s)
- if l > width {
- width = l
- }
- }
- buf := &bytes.Buffer{}
- w := tabwriter.NewWriter(buf, width, 0, 1, ' ', 0)
- max := len(linesA)
- if len(linesB) > max {
- max = len(linesB)
- }
- for i := 0; i < max; i++ {
- var a, b string
- if i < len(linesA) {
- a = linesA[i]
- }
- if i < len(linesB) {
- b = linesB[i]
- }
- fmt.Fprintf(w, "%s\t%s\n", a, b)
- }
- w.Flush()
- return buf.String()
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/errors.go b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/errors.go
deleted file mode 100644
index 16501d5af..000000000
--- a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/errors.go
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
-Copyright 2017 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 mergepatch
-
-import (
- "errors"
- "fmt"
- "reflect"
-)
-
-var (
- ErrBadJSONDoc = errors.New("invalid JSON document")
- ErrNoListOfLists = errors.New("lists of lists are not supported")
- ErrBadPatchFormatForPrimitiveList = errors.New("invalid patch format of primitive list")
- ErrBadPatchFormatForRetainKeys = errors.New("invalid patch format of retainKeys")
- ErrBadPatchFormatForSetElementOrderList = errors.New("invalid patch format of setElementOrder list")
- ErrPatchContentNotMatchRetainKeys = errors.New("patch content doesn't match retainKeys list")
- ErrUnsupportedStrategicMergePatchFormat = errors.New("strategic merge patch format is not supported")
-)
-
-func ErrNoMergeKey(m map[string]interface{}, k string) error {
- return fmt.Errorf("map: %v does not contain declared merge key: %s", m, k)
-}
-
-func ErrBadArgType(expected, actual interface{}) error {
- return fmt.Errorf("expected a %s, but received a %s",
- reflect.TypeOf(expected),
- reflect.TypeOf(actual))
-}
-
-func ErrBadArgKind(expected, actual interface{}) error {
- var expectedKindString, actualKindString string
- if expected == nil {
- expectedKindString = "nil"
- } else {
- expectedKindString = reflect.TypeOf(expected).Kind().String()
- }
- if actual == nil {
- actualKindString = "nil"
- } else {
- actualKindString = reflect.TypeOf(actual).Kind().String()
- }
- return fmt.Errorf("expected a %s, but received a %s", expectedKindString, actualKindString)
-}
-
-func ErrBadPatchType(t interface{}, m map[string]interface{}) error {
- return fmt.Errorf("unknown patch type: %s in map: %v", t, m)
-}
-
-// IsPreconditionFailed returns true if the provided error indicates
-// a precondition failed.
-func IsPreconditionFailed(err error) bool {
- _, ok := err.(ErrPreconditionFailed)
- return ok
-}
-
-type ErrPreconditionFailed struct {
- message string
-}
-
-func NewErrPreconditionFailed(target map[string]interface{}) ErrPreconditionFailed {
- s := fmt.Sprintf("precondition failed for: %v", target)
- return ErrPreconditionFailed{s}
-}
-
-func (err ErrPreconditionFailed) Error() string {
- return err.message
-}
-
-type ErrConflict struct {
- message string
-}
-
-func NewErrConflict(patch, current string) ErrConflict {
- s := fmt.Sprintf("patch:\n%s\nconflicts with changes made from original to current:\n%s\n", patch, current)
- return ErrConflict{s}
-}
-
-func (err ErrConflict) Error() string {
- return err.message
-}
-
-// IsConflict returns true if the provided error indicates
-// a conflict between the patch and the current configuration.
-func IsConflict(err error) bool {
- _, ok := err.(ErrConflict)
- return ok
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go
deleted file mode 100644
index 9261290a7..000000000
--- a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-Copyright 2017 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 mergepatch
-
-import (
- "fmt"
- "reflect"
-
- "github.com/davecgh/go-spew/spew"
- "github.com/ghodss/yaml"
-)
-
-// PreconditionFunc asserts that an incompatible change is not present within a patch.
-type PreconditionFunc func(interface{}) bool
-
-// RequireKeyUnchanged returns a precondition function that fails if the provided key
-// is present in the patch (indicating that its value has changed).
-func RequireKeyUnchanged(key string) PreconditionFunc {
- return func(patch interface{}) bool {
- patchMap, ok := patch.(map[string]interface{})
- if !ok {
- return true
- }
-
- // The presence of key means that its value has been changed, so the test fails.
- _, ok = patchMap[key]
- return !ok
- }
-}
-
-// RequireMetadataKeyUnchanged creates a precondition function that fails
-// if the metadata.key is present in the patch (indicating its value
-// has changed).
-func RequireMetadataKeyUnchanged(key string) PreconditionFunc {
- return func(patch interface{}) bool {
- patchMap, ok := patch.(map[string]interface{})
- if !ok {
- return true
- }
- patchMap1, ok := patchMap["metadata"]
- if !ok {
- return true
- }
- patchMap2, ok := patchMap1.(map[string]interface{})
- if !ok {
- return true
- }
- _, ok = patchMap2[key]
- return !ok
- }
-}
-
-func ToYAMLOrError(v interface{}) string {
- y, err := toYAML(v)
- if err != nil {
- return err.Error()
- }
-
- return y
-}
-
-func toYAML(v interface{}) (string, error) {
- y, err := yaml.Marshal(v)
- if err != nil {
- return "", fmt.Errorf("yaml marshal failed:%v\n%v\n", err, spew.Sdump(v))
- }
-
- return string(y), nil
-}
-
-// HasConflicts returns true if the left and right JSON interface objects overlap with
-// different values in any key. All keys are required to be strings. Since patches of the
-// same Type have congruent keys, this is valid for multiple patch types. This method
-// supports JSON merge patch semantics.
-//
-// NOTE: Numbers with different types (e.g. int(0) vs int64(0)) will be detected as conflicts.
-// Make sure the unmarshaling of left and right are consistent (e.g. use the same library).
-func HasConflicts(left, right interface{}) (bool, error) {
- switch typedLeft := left.(type) {
- case map[string]interface{}:
- switch typedRight := right.(type) {
- case map[string]interface{}:
- for key, leftValue := range typedLeft {
- rightValue, ok := typedRight[key]
- if !ok {
- continue
- }
- if conflict, err := HasConflicts(leftValue, rightValue); err != nil || conflict {
- return conflict, err
- }
- }
-
- return false, nil
- default:
- return true, nil
- }
- case []interface{}:
- switch typedRight := right.(type) {
- case []interface{}:
- if len(typedLeft) != len(typedRight) {
- return true, nil
- }
-
- for i := range typedLeft {
- if conflict, err := HasConflicts(typedLeft[i], typedRight[i]); err != nil || conflict {
- return conflict, err
- }
- }
-
- return false, nil
- default:
- return true, nil
- }
- case string, float64, bool, int, int64, nil:
- return !reflect.DeepEqual(left, right), nil
- default:
- return true, fmt.Errorf("unknown type: %v", reflect.TypeOf(left))
- }
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/errors.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/errors.go
deleted file mode 100644
index ab66d0452..000000000
--- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/errors.go
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-Copyright 2017 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 strategicpatch
-
-import (
- "fmt"
-)
-
-type LookupPatchMetaError struct {
- Path string
- Err error
-}
-
-func (e LookupPatchMetaError) Error() string {
- return fmt.Sprintf("LookupPatchMetaError(%s): %v", e.Path, e.Err)
-}
-
-type FieldNotFoundError struct {
- Path string
- Field string
-}
-
-func (e FieldNotFoundError) Error() string {
- return fmt.Sprintf("unable to find api field %q in %s", e.Field, e.Path)
-}
-
-type InvalidTypeError struct {
- Path string
- Expected string
- Actual string
-}
-
-func (e InvalidTypeError) Error() string {
- return fmt.Sprintf("invalid type for %s: got %q, expected %q", e.Path, e.Actual, e.Expected)
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/meta.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/meta.go
deleted file mode 100644
index c31de15e7..000000000
--- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/meta.go
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
-Copyright 2017 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 strategicpatch
-
-import (
- "errors"
- "fmt"
- "reflect"
-
- "k8s.io/apimachinery/pkg/util/mergepatch"
- forkedjson "k8s.io/apimachinery/third_party/forked/golang/json"
- openapi "k8s.io/kube-openapi/pkg/util/proto"
-)
-
-type PatchMeta struct {
- patchStrategies []string
- patchMergeKey string
-}
-
-func (pm PatchMeta) GetPatchStrategies() []string {
- if pm.patchStrategies == nil {
- return []string{}
- }
- return pm.patchStrategies
-}
-
-func (pm PatchMeta) SetPatchStrategies(ps []string) {
- pm.patchStrategies = ps
-}
-
-func (pm PatchMeta) GetPatchMergeKey() string {
- return pm.patchMergeKey
-}
-
-func (pm PatchMeta) SetPatchMergeKey(pmk string) {
- pm.patchMergeKey = pmk
-}
-
-type LookupPatchMeta interface {
- // LookupPatchMetadataForStruct gets subschema and the patch metadata (e.g. patch strategy and merge key) for map.
- LookupPatchMetadataForStruct(key string) (LookupPatchMeta, PatchMeta, error)
- // LookupPatchMetadataForSlice get subschema and the patch metadata for slice.
- LookupPatchMetadataForSlice(key string) (LookupPatchMeta, PatchMeta, error)
- // Get the type name of the field
- Name() string
-}
-
-type PatchMetaFromStruct struct {
- T reflect.Type
-}
-
-func NewPatchMetaFromStruct(dataStruct interface{}) (PatchMetaFromStruct, error) {
- t, err := getTagStructType(dataStruct)
- return PatchMetaFromStruct{T: t}, err
-}
-
-var _ LookupPatchMeta = PatchMetaFromStruct{}
-
-func (s PatchMetaFromStruct) LookupPatchMetadataForStruct(key string) (LookupPatchMeta, PatchMeta, error) {
- fieldType, fieldPatchStrategies, fieldPatchMergeKey, err := forkedjson.LookupPatchMetadataForStruct(s.T, key)
- if err != nil {
- return nil, PatchMeta{}, err
- }
-
- return PatchMetaFromStruct{T: fieldType},
- PatchMeta{
- patchStrategies: fieldPatchStrategies,
- patchMergeKey: fieldPatchMergeKey,
- }, nil
-}
-
-func (s PatchMetaFromStruct) LookupPatchMetadataForSlice(key string) (LookupPatchMeta, PatchMeta, error) {
- subschema, patchMeta, err := s.LookupPatchMetadataForStruct(key)
- if err != nil {
- return nil, PatchMeta{}, err
- }
- elemPatchMetaFromStruct := subschema.(PatchMetaFromStruct)
- t := elemPatchMetaFromStruct.T
-
- var elemType reflect.Type
- switch t.Kind() {
- // If t is an array or a slice, get the element type.
- // If element is still an array or a slice, return an error.
- // Otherwise, return element type.
- case reflect.Array, reflect.Slice:
- elemType = t.Elem()
- if elemType.Kind() == reflect.Array || elemType.Kind() == reflect.Slice {
- return nil, PatchMeta{}, errors.New("unexpected slice of slice")
- }
- // If t is an pointer, get the underlying element.
- // If the underlying element is neither an array nor a slice, the pointer is pointing to a slice,
- // e.g. https://github.com/kubernetes/kubernetes/blob/bc22e206c79282487ea0bf5696d5ccec7e839a76/staging/src/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go#L2782-L2822
- // If the underlying element is either an array or a slice, return its element type.
- case reflect.Ptr:
- t = t.Elem()
- if t.Kind() == reflect.Array || t.Kind() == reflect.Slice {
- t = t.Elem()
- }
- elemType = t
- default:
- return nil, PatchMeta{}, fmt.Errorf("expected slice or array type, but got: %s", s.T.Kind().String())
- }
-
- return PatchMetaFromStruct{T: elemType}, patchMeta, nil
-}
-
-func (s PatchMetaFromStruct) Name() string {
- return s.T.Kind().String()
-}
-
-func getTagStructType(dataStruct interface{}) (reflect.Type, error) {
- if dataStruct == nil {
- return nil, mergepatch.ErrBadArgKind(struct{}{}, nil)
- }
-
- t := reflect.TypeOf(dataStruct)
- // Get the underlying type for pointers
- if t.Kind() == reflect.Ptr {
- t = t.Elem()
- }
-
- if t.Kind() != reflect.Struct {
- return nil, mergepatch.ErrBadArgKind(struct{}{}, dataStruct)
- }
-
- return t, nil
-}
-
-func GetTagStructTypeOrDie(dataStruct interface{}) reflect.Type {
- t, err := getTagStructType(dataStruct)
- if err != nil {
- panic(err)
- }
- return t
-}
-
-type PatchMetaFromOpenAPI struct {
- Schema openapi.Schema
-}
-
-func NewPatchMetaFromOpenAPI(s openapi.Schema) PatchMetaFromOpenAPI {
- return PatchMetaFromOpenAPI{Schema: s}
-}
-
-var _ LookupPatchMeta = PatchMetaFromOpenAPI{}
-
-func (s PatchMetaFromOpenAPI) LookupPatchMetadataForStruct(key string) (LookupPatchMeta, PatchMeta, error) {
- if s.Schema == nil {
- return nil, PatchMeta{}, nil
- }
- kindItem := NewKindItem(key, s.Schema.GetPath())
- s.Schema.Accept(kindItem)
-
- err := kindItem.Error()
- if err != nil {
- return nil, PatchMeta{}, err
- }
- return PatchMetaFromOpenAPI{Schema: kindItem.subschema},
- kindItem.patchmeta, nil
-}
-
-func (s PatchMetaFromOpenAPI) LookupPatchMetadataForSlice(key string) (LookupPatchMeta, PatchMeta, error) {
- if s.Schema == nil {
- return nil, PatchMeta{}, nil
- }
- sliceItem := NewSliceItem(key, s.Schema.GetPath())
- s.Schema.Accept(sliceItem)
-
- err := sliceItem.Error()
- if err != nil {
- return nil, PatchMeta{}, err
- }
- return PatchMetaFromOpenAPI{Schema: sliceItem.subschema},
- sliceItem.patchmeta, nil
-}
-
-func (s PatchMetaFromOpenAPI) Name() string {
- schema := s.Schema
- return schema.GetName()
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
deleted file mode 100644
index 2f6ade2be..000000000
--- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
+++ /dev/null
@@ -1,2151 +0,0 @@
-/*
-Copyright 2014 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 strategicpatch
-
-import (
- "fmt"
- "reflect"
- "sort"
- "strings"
-
- "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
- "k8s.io/apimachinery/pkg/util/json"
- "k8s.io/apimachinery/pkg/util/mergepatch"
-)
-
-// An alternate implementation of JSON Merge Patch
-// (https://tools.ietf.org/html/rfc7386) which supports the ability to annotate
-// certain fields with metadata that indicates whether the elements of JSON
-// lists should be merged or replaced.
-//
-// For more information, see the PATCH section of docs/devel/api-conventions.md.
-//
-// Some of the content of this package was borrowed with minor adaptations from
-// evanphx/json-patch and openshift/origin.
-
-const (
- directiveMarker = "$patch"
- deleteDirective = "delete"
- replaceDirective = "replace"
- mergeDirective = "merge"
-
- retainKeysStrategy = "retainKeys"
-
- deleteFromPrimitiveListDirectivePrefix = "$deleteFromPrimitiveList"
- retainKeysDirective = "$" + retainKeysStrategy
- setElementOrderDirectivePrefix = "$setElementOrder"
-)
-
-// JSONMap is a representations of JSON object encoded as map[string]interface{}
-// where the children can be either map[string]interface{}, []interface{} or
-// primitive type).
-// Operating on JSONMap representation is much faster as it doesn't require any
-// json marshaling and/or unmarshaling operations.
-type JSONMap map[string]interface{}
-
-type DiffOptions struct {
- // SetElementOrder determines whether we generate the $setElementOrder parallel list.
- SetElementOrder bool
- // IgnoreChangesAndAdditions indicates if we keep the changes and additions in the patch.
- IgnoreChangesAndAdditions bool
- // IgnoreDeletions indicates if we keep the deletions in the patch.
- IgnoreDeletions bool
- // We introduce a new value retainKeys for patchStrategy.
- // It indicates that all fields needing to be preserved must be
- // present in the `retainKeys` list.
- // And the fields that are present will be merged with live object.
- // All the missing fields will be cleared when patching.
- BuildRetainKeysDirective bool
-}
-
-type MergeOptions struct {
- // MergeParallelList indicates if we are merging the parallel list.
- // We don't merge parallel list when calling mergeMap() in CreateThreeWayMergePatch()
- // which is called client-side.
- // We merge parallel list iff when calling mergeMap() in StrategicMergeMapPatch()
- // which is called server-side
- MergeParallelList bool
- // IgnoreUnmatchedNulls indicates if we should process the unmatched nulls.
- IgnoreUnmatchedNulls bool
-}
-
-// The following code is adapted from github.com/openshift/origin/pkg/util/jsonmerge.
-// Instead of defining a Delta that holds an original, a patch and a set of preconditions,
-// the reconcile method accepts a set of preconditions as an argument.
-
-// CreateTwoWayMergePatch creates a patch that can be passed to StrategicMergePatch from an original
-// document and a modified document, which are passed to the method as json encoded content. It will
-// return a patch that yields the modified document when applied to the original document, or an error
-// if either of the two documents is invalid.
-func CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}, fns ...mergepatch.PreconditionFunc) ([]byte, error) {
- schema, err := NewPatchMetaFromStruct(dataStruct)
- if err != nil {
- return nil, err
- }
-
- return CreateTwoWayMergePatchUsingLookupPatchMeta(original, modified, schema, fns...)
-}
-
-func CreateTwoWayMergePatchUsingLookupPatchMeta(
- original, modified []byte, schema LookupPatchMeta, fns ...mergepatch.PreconditionFunc) ([]byte, error) {
- originalMap := map[string]interface{}{}
- if len(original) > 0 {
- if err := json.Unmarshal(original, &originalMap); err != nil {
- return nil, mergepatch.ErrBadJSONDoc
- }
- }
-
- modifiedMap := map[string]interface{}{}
- if len(modified) > 0 {
- if err := json.Unmarshal(modified, &modifiedMap); err != nil {
- return nil, mergepatch.ErrBadJSONDoc
- }
- }
-
- patchMap, err := CreateTwoWayMergeMapPatchUsingLookupPatchMeta(originalMap, modifiedMap, schema, fns...)
- if err != nil {
- return nil, err
- }
-
- return json.Marshal(patchMap)
-}
-
-// CreateTwoWayMergeMapPatch creates a patch from an original and modified JSON objects,
-// encoded JSONMap.
-// The serialized version of the map can then be passed to StrategicMergeMapPatch.
-func CreateTwoWayMergeMapPatch(original, modified JSONMap, dataStruct interface{}, fns ...mergepatch.PreconditionFunc) (JSONMap, error) {
- schema, err := NewPatchMetaFromStruct(dataStruct)
- if err != nil {
- return nil, err
- }
-
- return CreateTwoWayMergeMapPatchUsingLookupPatchMeta(original, modified, schema, fns...)
-}
-
-func CreateTwoWayMergeMapPatchUsingLookupPatchMeta(original, modified JSONMap, schema LookupPatchMeta, fns ...mergepatch.PreconditionFunc) (JSONMap, error) {
- diffOptions := DiffOptions{
- SetElementOrder: true,
- }
- patchMap, err := diffMaps(original, modified, schema, diffOptions)
- if err != nil {
- return nil, err
- }
-
- // Apply the preconditions to the patch, and return an error if any of them fail.
- for _, fn := range fns {
- if !fn(patchMap) {
- return nil, mergepatch.NewErrPreconditionFailed(patchMap)
- }
- }
-
- return patchMap, nil
-}
-
-// Returns a (recursive) strategic merge patch that yields modified when applied to original.
-// Including:
-// - Adding fields to the patch present in modified, missing from original
-// - Setting fields to the patch present in modified and original with different values
-// - Delete fields present in original, missing from modified through
-// - IFF map field - set to nil in patch
-// - IFF list of maps && merge strategy - use deleteDirective for the elements
-// - IFF list of primitives && merge strategy - use parallel deletion list
-// - IFF list of maps or primitives with replace strategy (default) - set patch value to the value in modified
-// - Build $retainKeys directive for fields with retainKeys patch strategy
-func diffMaps(original, modified map[string]interface{}, schema LookupPatchMeta, diffOptions DiffOptions) (map[string]interface{}, error) {
- patch := map[string]interface{}{}
-
- // This will be used to build the $retainKeys directive sent in the patch
- retainKeysList := make([]interface{}, 0, len(modified))
-
- // Compare each value in the modified map against the value in the original map
- for key, modifiedValue := range modified {
- // Get the underlying type for pointers
- if diffOptions.BuildRetainKeysDirective && modifiedValue != nil {
- retainKeysList = append(retainKeysList, key)
- }
-
- originalValue, ok := original[key]
- if !ok {
- // Key was added, so add to patch
- if !diffOptions.IgnoreChangesAndAdditions {
- patch[key] = modifiedValue
- }
- continue
- }
-
- // The patch may have a patch directive
- // TODO: figure out if we need this. This shouldn't be needed by apply. When would the original map have patch directives in it?
- foundDirectiveMarker, err := handleDirectiveMarker(key, originalValue, modifiedValue, patch)
- if err != nil {
- return nil, err
- }
- if foundDirectiveMarker {
- continue
- }
-
- if reflect.TypeOf(originalValue) != reflect.TypeOf(modifiedValue) {
- // Types have changed, so add to patch
- if !diffOptions.IgnoreChangesAndAdditions {
- patch[key] = modifiedValue
- }
- continue
- }
-
- // Types are the same, so compare values
- switch originalValueTyped := originalValue.(type) {
- case map[string]interface{}:
- modifiedValueTyped := modifiedValue.(map[string]interface{})
- err = handleMapDiff(key, originalValueTyped, modifiedValueTyped, patch, schema, diffOptions)
- case []interface{}:
- modifiedValueTyped := modifiedValue.([]interface{})
- err = handleSliceDiff(key, originalValueTyped, modifiedValueTyped, patch, schema, diffOptions)
- default:
- replacePatchFieldIfNotEqual(key, originalValue, modifiedValue, patch, diffOptions)
- }
- if err != nil {
- return nil, err
- }
- }
-
- updatePatchIfMissing(original, modified, patch, diffOptions)
- // Insert the retainKeysList iff there are values present in the retainKeysList and
- // either of the following is true:
- // - the patch is not empty
- // - there are additional field in original that need to be cleared
- if len(retainKeysList) > 0 &&
- (len(patch) > 0 || hasAdditionalNewField(original, modified)) {
- patch[retainKeysDirective] = sortScalars(retainKeysList)
- }
- return patch, nil
-}
-
-// handleDirectiveMarker handles how to diff directive marker between 2 objects
-func handleDirectiveMarker(key string, originalValue, modifiedValue interface{}, patch map[string]interface{}) (bool, error) {
- if key == directiveMarker {
- originalString, ok := originalValue.(string)
- if !ok {
- return false, fmt.Errorf("invalid value for special key: %s", directiveMarker)
- }
- modifiedString, ok := modifiedValue.(string)
- if !ok {
- return false, fmt.Errorf("invalid value for special key: %s", directiveMarker)
- }
- if modifiedString != originalString {
- patch[directiveMarker] = modifiedValue
- }
- return true, nil
- }
- return false, nil
-}
-
-// handleMapDiff diff between 2 maps `originalValueTyped` and `modifiedValue`,
-// puts the diff in the `patch` associated with `key`
-// key is the key associated with originalValue and modifiedValue.
-// originalValue, modifiedValue are the old and new value respectively.They are both maps
-// patch is the patch map that contains key and the updated value, and it is the parent of originalValue, modifiedValue
-// diffOptions contains multiple options to control how we do the diff.
-func handleMapDiff(key string, originalValue, modifiedValue, patch map[string]interface{},
- schema LookupPatchMeta, diffOptions DiffOptions) error {
- subschema, patchMeta, err := schema.LookupPatchMetadataForStruct(key)
-
- if err != nil {
- // We couldn't look up metadata for the field
- // If the values are identical, this doesn't matter, no patch is needed
- if reflect.DeepEqual(originalValue, modifiedValue) {
- return nil
- }
- // Otherwise, return the error
- return err
- }
- retainKeys, patchStrategy, err := extractRetainKeysPatchStrategy(patchMeta.GetPatchStrategies())
- if err != nil {
- return err
- }
- diffOptions.BuildRetainKeysDirective = retainKeys
- switch patchStrategy {
- // The patch strategic from metadata tells us to replace the entire object instead of diffing it
- case replaceDirective:
- if !diffOptions.IgnoreChangesAndAdditions {
- patch[key] = modifiedValue
- }
- default:
- patchValue, err := diffMaps(originalValue, modifiedValue, subschema, diffOptions)
- if err != nil {
- return err
- }
- // Maps were not identical, use provided patch value
- if len(patchValue) > 0 {
- patch[key] = patchValue
- }
- }
- return nil
-}
-
-// handleSliceDiff diff between 2 slices `originalValueTyped` and `modifiedValue`,
-// puts the diff in the `patch` associated with `key`
-// key is the key associated with originalValue and modifiedValue.
-// originalValue, modifiedValue are the old and new value respectively.They are both slices
-// patch is the patch map that contains key and the updated value, and it is the parent of originalValue, modifiedValue
-// diffOptions contains multiple options to control how we do the diff.
-func handleSliceDiff(key string, originalValue, modifiedValue []interface{}, patch map[string]interface{},
- schema LookupPatchMeta, diffOptions DiffOptions) error {
- subschema, patchMeta, err := schema.LookupPatchMetadataForSlice(key)
- if err != nil {
- // We couldn't look up metadata for the field
- // If the values are identical, this doesn't matter, no patch is needed
- if reflect.DeepEqual(originalValue, modifiedValue) {
- return nil
- }
- // Otherwise, return the error
- return err
- }
- retainKeys, patchStrategy, err := extractRetainKeysPatchStrategy(patchMeta.GetPatchStrategies())
- if err != nil {
- return err
- }
- switch patchStrategy {
- // Merge the 2 slices using mergePatchKey
- case mergeDirective:
- diffOptions.BuildRetainKeysDirective = retainKeys
- addList, deletionList, setOrderList, err := diffLists(originalValue, modifiedValue, subschema, patchMeta.GetPatchMergeKey(), diffOptions)
- if err != nil {
- return err
- }
- if len(addList) > 0 {
- patch[key] = addList
- }
- // generate a parallel list for deletion
- if len(deletionList) > 0 {
- parallelDeletionListKey := fmt.Sprintf("%s/%s", deleteFromPrimitiveListDirectivePrefix, key)
- patch[parallelDeletionListKey] = deletionList
- }
- if len(setOrderList) > 0 {
- parallelSetOrderListKey := fmt.Sprintf("%s/%s", setElementOrderDirectivePrefix, key)
- patch[parallelSetOrderListKey] = setOrderList
- }
- default:
- replacePatchFieldIfNotEqual(key, originalValue, modifiedValue, patch, diffOptions)
- }
- return nil
-}
-
-// replacePatchFieldIfNotEqual updates the patch if original and modified are not deep equal
-// if diffOptions.IgnoreChangesAndAdditions is false.
-// original is the old value, maybe either the live cluster object or the last applied configuration
-// modified is the new value, is always the users new config
-func replacePatchFieldIfNotEqual(key string, original, modified interface{},
- patch map[string]interface{}, diffOptions DiffOptions) {
- if diffOptions.IgnoreChangesAndAdditions {
- // Ignoring changes - do nothing
- return
- }
- if reflect.DeepEqual(original, modified) {
- // Contents are identical - do nothing
- return
- }
- // Create a patch to replace the old value with the new one
- patch[key] = modified
-}
-
-// updatePatchIfMissing iterates over `original` when ignoreDeletions is false.
-// Clear the field whose key is not present in `modified`.
-// original is the old value, maybe either the live cluster object or the last applied configuration
-// modified is the new value, is always the users new config
-func updatePatchIfMissing(original, modified, patch map[string]interface{}, diffOptions DiffOptions) {
- if diffOptions.IgnoreDeletions {
- // Ignoring deletion - do nothing
- return
- }
- // Add nils for deleted values
- for key := range original {
- if _, found := modified[key]; !found {
- patch[key] = nil
- }
- }
-}
-
-// validateMergeKeyInLists checks if each map in the list has the mentryerge key.
-func validateMergeKeyInLists(mergeKey string, lists ...[]interface{}) error {
- for _, list := range lists {
- for _, item := range list {
- m, ok := item.(map[string]interface{})
- if !ok {
- return mergepatch.ErrBadArgType(m, item)
- }
- if _, ok = m[mergeKey]; !ok {
- return mergepatch.ErrNoMergeKey(m, mergeKey)
- }
- }
- }
- return nil
-}
-
-// normalizeElementOrder sort `patch` list by `patchOrder` and sort `serverOnly` list by `serverOrder`.
-// Then it merges the 2 sorted lists.
-// It guarantee the relative order in the patch list and in the serverOnly list is kept.
-// `patch` is a list of items in the patch, and `serverOnly` is a list of items in the live object.
-// `patchOrder` is the order we want `patch` list to have and
-// `serverOrder` is the order we want `serverOnly` list to have.
-// kind is the kind of each item in the lists `patch` and `serverOnly`.
-func normalizeElementOrder(patch, serverOnly, patchOrder, serverOrder []interface{}, mergeKey string, kind reflect.Kind) ([]interface{}, error) {
- patch, err := normalizeSliceOrder(patch, patchOrder, mergeKey, kind)
- if err != nil {
- return nil, err
- }
- serverOnly, err = normalizeSliceOrder(serverOnly, serverOrder, mergeKey, kind)
- if err != nil {
- return nil, err
- }
- all := mergeSortedSlice(serverOnly, patch, serverOrder, mergeKey, kind)
-
- return all, nil
-}
-
-// mergeSortedSlice merges the 2 sorted lists by serverOrder with best effort.
-// It will insert each item in `left` list to `right` list. In most cases, the 2 lists will be interleaved.
-// The relative order of left and right are guaranteed to be kept.
-// They have higher precedence than the order in the live list.
-// The place for a item in `left` is found by:
-// scan from the place of last insertion in `right` to the end of `right`,
-// the place is before the first item that is greater than the item we want to insert.
-// example usage: using server-only items as left and patch items as right. We insert server-only items
-// to patch list. We use the order of live object as record for comparison.
-func mergeSortedSlice(left, right, serverOrder []interface{}, mergeKey string, kind reflect.Kind) []interface{} {
- // Returns if l is less than r, and if both have been found.
- // If l and r both present and l is in front of r, l is less than r.
- less := func(l, r interface{}) (bool, bool) {
- li := index(serverOrder, l, mergeKey, kind)
- ri := index(serverOrder, r, mergeKey, kind)
- if li >= 0 && ri >= 0 {
- return li < ri, true
- } else {
- return false, false
- }
- }
-
- // left and right should be non-overlapping.
- size := len(left) + len(right)
- i, j := 0, 0
- s := make([]interface{}, size, size)
-
- for k := 0; k < size; k++ {
- if i >= len(left) && j < len(right) {
- // have items left in `right` list
- s[k] = right[j]
- j++
- } else if j >= len(right) && i < len(left) {
- // have items left in `left` list
- s[k] = left[i]
- i++
- } else {
- // compare them if i and j are both in bound
- less, foundBoth := less(left[i], right[j])
- if foundBoth && less {
- s[k] = left[i]
- i++
- } else {
- s[k] = right[j]
- j++
- }
- }
- }
- return s
-}
-
-// index returns the index of the item in the given items, or -1 if it doesn't exist
-// l must NOT be a slice of slices, this should be checked before calling.
-func index(l []interface{}, valToLookUp interface{}, mergeKey string, kind reflect.Kind) int {
- var getValFn func(interface{}) interface{}
- // Get the correct `getValFn` based on item `kind`.
- // It should return the value of merge key for maps and
- // return the item for other kinds.
- switch kind {
- case reflect.Map:
- getValFn = func(item interface{}) interface{} {
- typedItem, ok := item.(map[string]interface{})
- if !ok {
- return nil
- }
- val := typedItem[mergeKey]
- return val
- }
- default:
- getValFn = func(item interface{}) interface{} {
- return item
- }
- }
-
- for i, v := range l {
- if getValFn(valToLookUp) == getValFn(v) {
- return i
- }
- }
- return -1
-}
-
-// extractToDeleteItems takes a list and
-// returns 2 lists: one contains items that should be kept and the other contains items to be deleted.
-func extractToDeleteItems(l []interface{}) ([]interface{}, []interface{}, error) {
- var nonDelete, toDelete []interface{}
- for _, v := range l {
- m, ok := v.(map[string]interface{})
- if !ok {
- return nil, nil, mergepatch.ErrBadArgType(m, v)
- }
-
- directive, foundDirective := m[directiveMarker]
- if foundDirective && directive == deleteDirective {
- toDelete = append(toDelete, v)
- } else {
- nonDelete = append(nonDelete, v)
- }
- }
- return nonDelete, toDelete, nil
-}
-
-// normalizeSliceOrder sort `toSort` list by `order`
-func normalizeSliceOrder(toSort, order []interface{}, mergeKey string, kind reflect.Kind) ([]interface{}, error) {
- var toDelete []interface{}
- if kind == reflect.Map {
- // make sure each item in toSort, order has merge key
- err := validateMergeKeyInLists(mergeKey, toSort, order)
- if err != nil {
- return nil, err
- }
- toSort, toDelete, err = extractToDeleteItems(toSort)
- if err != nil {
- return nil, err
- }
- }
-
- sort.SliceStable(toSort, func(i, j int) bool {
- if ii := index(order, toSort[i], mergeKey, kind); ii >= 0 {
- if ij := index(order, toSort[j], mergeKey, kind); ij >= 0 {
- return ii < ij
- }
- }
- return true
- })
- toSort = append(toSort, toDelete...)
- return toSort, nil
-}
-
-// Returns a (recursive) strategic merge patch, a parallel deletion list if necessary and
-// another list to set the order of the list
-// Only list of primitives with merge strategy will generate a parallel deletion list.
-// These two lists should yield modified when applied to original, for lists with merge semantics.
-func diffLists(original, modified []interface{}, schema LookupPatchMeta, mergeKey string, diffOptions DiffOptions) ([]interface{}, []interface{}, []interface{}, error) {
- if len(original) == 0 {
- // Both slices are empty - do nothing
- if len(modified) == 0 || diffOptions.IgnoreChangesAndAdditions {
- return nil, nil, nil, nil
- }
-
- // Old slice was empty - add all elements from the new slice
- return modified, nil, nil, nil
- }
-
- elementType, err := sliceElementType(original, modified)
- if err != nil {
- return nil, nil, nil, err
- }
-
- var patchList, deleteList, setOrderList []interface{}
- kind := elementType.Kind()
- switch kind {
- case reflect.Map:
- patchList, deleteList, err = diffListsOfMaps(original, modified, schema, mergeKey, diffOptions)
- if err != nil {
- return nil, nil, nil, err
- }
- patchList, err = normalizeSliceOrder(patchList, modified, mergeKey, kind)
- if err != nil {
- return nil, nil, nil, err
- }
- orderSame, err := isOrderSame(original, modified, mergeKey)
- if err != nil {
- return nil, nil, nil, err
- }
- // append the deletions to the end of the patch list.
- patchList = append(patchList, deleteList...)
- deleteList = nil
- // generate the setElementOrder list when there are content changes or order changes
- if diffOptions.SetElementOrder &&
- ((!diffOptions.IgnoreChangesAndAdditions && (len(patchList) > 0 || !orderSame)) ||
- (!diffOptions.IgnoreDeletions && len(patchList) > 0)) {
- // Generate a list of maps that each item contains only the merge key.
- setOrderList = make([]interface{}, len(modified))
- for i, v := range modified {
- typedV := v.(map[string]interface{})
- setOrderList[i] = map[string]interface{}{
- mergeKey: typedV[mergeKey],
- }
- }
- }
- case reflect.Slice:
- // Lists of Lists are not permitted by the api
- return nil, nil, nil, mergepatch.ErrNoListOfLists
- default:
- patchList, deleteList, err = diffListsOfScalars(original, modified, diffOptions)
- if err != nil {
- return nil, nil, nil, err
- }
- patchList, err = normalizeSliceOrder(patchList, modified, mergeKey, kind)
- // generate the setElementOrder list when there are content changes or order changes
- if diffOptions.SetElementOrder && ((!diffOptions.IgnoreDeletions && len(deleteList) > 0) ||
- (!diffOptions.IgnoreChangesAndAdditions && !reflect.DeepEqual(original, modified))) {
- setOrderList = modified
- }
- }
- return patchList, deleteList, setOrderList, err
-}
-
-// isOrderSame checks if the order in a list has changed
-func isOrderSame(original, modified []interface{}, mergeKey string) (bool, error) {
- if len(original) != len(modified) {
- return false, nil
- }
- for i, modifiedItem := range modified {
- equal, err := mergeKeyValueEqual(original[i], modifiedItem, mergeKey)
- if err != nil || !equal {
- return equal, err
- }
- }
- return true, nil
-}
-
-// diffListsOfScalars returns 2 lists, the first one is addList and the second one is deletionList.
-// Argument diffOptions.IgnoreChangesAndAdditions controls if calculate addList. true means not calculate.
-// Argument diffOptions.IgnoreDeletions controls if calculate deletionList. true means not calculate.
-// original may be changed, but modified is guaranteed to not be changed
-func diffListsOfScalars(original, modified []interface{}, diffOptions DiffOptions) ([]interface{}, []interface{}, error) {
- modifiedCopy := make([]interface{}, len(modified))
- copy(modifiedCopy, modified)
- // Sort the scalars for easier calculating the diff
- originalScalars := sortScalars(original)
- modifiedScalars := sortScalars(modifiedCopy)
-
- originalIndex, modifiedIndex := 0, 0
- addList := []interface{}{}
- deletionList := []interface{}{}
-
- for {
- originalInBounds := originalIndex < len(originalScalars)
- modifiedInBounds := modifiedIndex < len(modifiedScalars)
- if !originalInBounds && !modifiedInBounds {
- break
- }
- // we need to compare the string representation of the scalar,
- // because the scalar is an interface which doesn't support either < or >
- // And that's how func sortScalars compare scalars.
- var originalString, modifiedString string
- var originalValue, modifiedValue interface{}
- if originalInBounds {
- originalValue = originalScalars[originalIndex]
- originalString = fmt.Sprintf("%v", originalValue)
- }
- if modifiedInBounds {
- modifiedValue = modifiedScalars[modifiedIndex]
- modifiedString = fmt.Sprintf("%v", modifiedValue)
- }
-
- originalV, modifiedV := compareListValuesAtIndex(originalInBounds, modifiedInBounds, originalString, modifiedString)
- switch {
- case originalV == nil && modifiedV == nil:
- originalIndex++
- modifiedIndex++
- case originalV != nil && modifiedV == nil:
- if !diffOptions.IgnoreDeletions {
- deletionList = append(deletionList, originalValue)
- }
- originalIndex++
- case originalV == nil && modifiedV != nil:
- if !diffOptions.IgnoreChangesAndAdditions {
- addList = append(addList, modifiedValue)
- }
- modifiedIndex++
- default:
- return nil, nil, fmt.Errorf("Unexpected returned value from compareListValuesAtIndex: %v and %v", originalV, modifiedV)
- }
- }
-
- return addList, deduplicateScalars(deletionList), nil
-}
-
-// If first return value is non-nil, list1 contains an element not present in list2
-// If second return value is non-nil, list2 contains an element not present in list1
-func compareListValuesAtIndex(list1Inbounds, list2Inbounds bool, list1Value, list2Value string) (interface{}, interface{}) {
- bothInBounds := list1Inbounds && list2Inbounds
- switch {
- // scalars are identical
- case bothInBounds && list1Value == list2Value:
- return nil, nil
- // only list2 is in bound
- case !list1Inbounds:
- fallthrough
- // list2 has additional scalar
- case bothInBounds && list1Value > list2Value:
- return nil, list2Value
- // only original is in bound
- case !list2Inbounds:
- fallthrough
- // original has additional scalar
- case bothInBounds && list1Value < list2Value:
- return list1Value, nil
- default:
- return nil, nil
- }
-}
-
-// diffListsOfMaps takes a pair of lists and
-// returns a (recursive) strategic merge patch list contains additions and changes and
-// a deletion list contains deletions
-func diffListsOfMaps(original, modified []interface{}, schema LookupPatchMeta, mergeKey string, diffOptions DiffOptions) ([]interface{}, []interface{}, error) {
- patch := make([]interface{}, 0, len(modified))
- deletionList := make([]interface{}, 0, len(original))
-
- originalSorted, err := sortMergeListsByNameArray(original, schema, mergeKey, false)
- if err != nil {
- return nil, nil, err
- }
- modifiedSorted, err := sortMergeListsByNameArray(modified, schema, mergeKey, false)
- if err != nil {
- return nil, nil, err
- }
-
- originalIndex, modifiedIndex := 0, 0
- for {
- originalInBounds := originalIndex < len(originalSorted)
- modifiedInBounds := modifiedIndex < len(modifiedSorted)
- bothInBounds := originalInBounds && modifiedInBounds
- if !originalInBounds && !modifiedInBounds {
- break
- }
-
- var originalElementMergeKeyValueString, modifiedElementMergeKeyValueString string
- var originalElementMergeKeyValue, modifiedElementMergeKeyValue interface{}
- var originalElement, modifiedElement map[string]interface{}
- if originalInBounds {
- originalElement, originalElementMergeKeyValue, err = getMapAndMergeKeyValueByIndex(originalIndex, mergeKey, originalSorted)
- if err != nil {
- return nil, nil, err
- }
- originalElementMergeKeyValueString = fmt.Sprintf("%v", originalElementMergeKeyValue)
- }
- if modifiedInBounds {
- modifiedElement, modifiedElementMergeKeyValue, err = getMapAndMergeKeyValueByIndex(modifiedIndex, mergeKey, modifiedSorted)
- if err != nil {
- return nil, nil, err
- }
- modifiedElementMergeKeyValueString = fmt.Sprintf("%v", modifiedElementMergeKeyValue)
- }
-
- switch {
- case bothInBounds && ItemMatchesOriginalAndModifiedSlice(originalElementMergeKeyValueString, modifiedElementMergeKeyValueString):
- // Merge key values are equal, so recurse
- patchValue, err := diffMaps(originalElement, modifiedElement, schema, diffOptions)
- if err != nil {
- return nil, nil, err
- }
- if len(patchValue) > 0 {
- patchValue[mergeKey] = modifiedElementMergeKeyValue
- patch = append(patch, patchValue)
- }
- originalIndex++
- modifiedIndex++
- // only modified is in bound
- case !originalInBounds:
- fallthrough
- // modified has additional map
- case bothInBounds && ItemAddedToModifiedSlice(originalElementMergeKeyValueString, modifiedElementMergeKeyValueString):
- if !diffOptions.IgnoreChangesAndAdditions {
- patch = append(patch, modifiedElement)
- }
- modifiedIndex++
- // only original is in bound
- case !modifiedInBounds:
- fallthrough
- // original has additional map
- case bothInBounds && ItemRemovedFromModifiedSlice(originalElementMergeKeyValueString, modifiedElementMergeKeyValueString):
- if !diffOptions.IgnoreDeletions {
- // Item was deleted, so add delete directive
- deletionList = append(deletionList, CreateDeleteDirective(mergeKey, originalElementMergeKeyValue))
- }
- originalIndex++
- }
- }
-
- return patch, deletionList, nil
-}
-
-// getMapAndMergeKeyValueByIndex return a map in the list and its merge key value given the index of the map.
-func getMapAndMergeKeyValueByIndex(index int, mergeKey string, listOfMaps []interface{}) (map[string]interface{}, interface{}, error) {
- m, ok := listOfMaps[index].(map[string]interface{})
- if !ok {
- return nil, nil, mergepatch.ErrBadArgType(m, listOfMaps[index])
- }
-
- val, ok := m[mergeKey]
- if !ok {
- return nil, nil, mergepatch.ErrNoMergeKey(m, mergeKey)
- }
- return m, val, nil
-}
-
-// StrategicMergePatch applies a strategic merge patch. The patch and the original document
-// must be json encoded content. A patch can be created from an original and a modified document
-// by calling CreateStrategicMergePatch.
-func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte, error) {
- schema, err := NewPatchMetaFromStruct(dataStruct)
- if err != nil {
- return nil, err
- }
-
- return StrategicMergePatchUsingLookupPatchMeta(original, patch, schema)
-}
-
-func StrategicMergePatchUsingLookupPatchMeta(original, patch []byte, schema LookupPatchMeta) ([]byte, error) {
- originalMap, err := handleUnmarshal(original)
- if err != nil {
- return nil, err
- }
- patchMap, err := handleUnmarshal(patch)
- if err != nil {
- return nil, err
- }
-
- result, err := StrategicMergeMapPatchUsingLookupPatchMeta(originalMap, patchMap, schema)
- if err != nil {
- return nil, err
- }
-
- return json.Marshal(result)
-}
-
-func handleUnmarshal(j []byte) (map[string]interface{}, error) {
- if j == nil {
- j = []byte("{}")
- }
-
- m := map[string]interface{}{}
- err := json.Unmarshal(j, &m)
- if err != nil {
- return nil, mergepatch.ErrBadJSONDoc
- }
- return m, nil
-}
-
-// StrategicMergeMapPatch applies a strategic merge patch. The original and patch documents
-// must be JSONMap. A patch can be created from an original and modified document by
-// calling CreateTwoWayMergeMapPatch.
-// Warning: the original and patch JSONMap objects are mutated by this function and should not be reused.
-func StrategicMergeMapPatch(original, patch JSONMap, dataStruct interface{}) (JSONMap, error) {
- schema, err := NewPatchMetaFromStruct(dataStruct)
- if err != nil {
- return nil, err
- }
-
- // We need the go struct tags `patchMergeKey` and `patchStrategy` for fields that support a strategic merge patch.
- // For native resources, we can easily figure out these tags since we know the fields.
-
- // Because custom resources are decoded as Unstructured and because we're missing the metadata about how to handle
- // each field in a strategic merge patch, we can't find the go struct tags. Hence, we can't easily do a strategic merge
- // for custom resources. So we should fail fast and return an error.
- if _, ok := dataStruct.(*unstructured.Unstructured); ok {
- return nil, mergepatch.ErrUnsupportedStrategicMergePatchFormat
- }
-
- return StrategicMergeMapPatchUsingLookupPatchMeta(original, patch, schema)
-}
-
-func StrategicMergeMapPatchUsingLookupPatchMeta(original, patch JSONMap, schema LookupPatchMeta) (JSONMap, error) {
- mergeOptions := MergeOptions{
- MergeParallelList: true,
- IgnoreUnmatchedNulls: true,
- }
- return mergeMap(original, patch, schema, mergeOptions)
-}
-
-// handleDirectiveInMergeMap handles the patch directive when merging 2 maps.
-func handleDirectiveInMergeMap(directive interface{}, patch map[string]interface{}) (map[string]interface{}, error) {
- if directive == replaceDirective {
- // If the patch contains "$patch: replace", don't merge it, just use the
- // patch directly. Later on, we can add a single level replace that only
- // affects the map that the $patch is in.
- delete(patch, directiveMarker)
- return patch, nil
- }
-
- if directive == deleteDirective {
- // If the patch contains "$patch: delete", don't merge it, just return
- // an empty map.
- return map[string]interface{}{}, nil
- }
-
- return nil, mergepatch.ErrBadPatchType(directive, patch)
-}
-
-func containsDirectiveMarker(item interface{}) bool {
- m, ok := item.(map[string]interface{})
- if ok {
- if _, foundDirectiveMarker := m[directiveMarker]; foundDirectiveMarker {
- return true
- }
- }
- return false
-}
-
-func mergeKeyValueEqual(left, right interface{}, mergeKey string) (bool, error) {
- if len(mergeKey) == 0 {
- return left == right, nil
- }
- typedLeft, ok := left.(map[string]interface{})
- if !ok {
- return false, mergepatch.ErrBadArgType(typedLeft, left)
- }
- typedRight, ok := right.(map[string]interface{})
- if !ok {
- return false, mergepatch.ErrBadArgType(typedRight, right)
- }
- mergeKeyLeft, ok := typedLeft[mergeKey]
- if !ok {
- return false, mergepatch.ErrNoMergeKey(typedLeft, mergeKey)
- }
- mergeKeyRight, ok := typedRight[mergeKey]
- if !ok {
- return false, mergepatch.ErrNoMergeKey(typedRight, mergeKey)
- }
- return mergeKeyLeft == mergeKeyRight, nil
-}
-
-// extractKey trims the prefix and return the original key
-func extractKey(s, prefix string) (string, error) {
- substrings := strings.SplitN(s, "/", 2)
- if len(substrings) <= 1 || substrings[0] != prefix {
- switch prefix {
- case deleteFromPrimitiveListDirectivePrefix:
- return "", mergepatch.ErrBadPatchFormatForPrimitiveList
- case setElementOrderDirectivePrefix:
- return "", mergepatch.ErrBadPatchFormatForSetElementOrderList
- default:
- return "", fmt.Errorf("fail to find unknown prefix %q in %s\n", prefix, s)
- }
- }
- return substrings[1], nil
-}
-
-// validatePatchUsingSetOrderList verifies:
-// the relative order of any two items in the setOrderList list matches that in the patch list.
-// the items in the patch list must be a subset or the same as the $setElementOrder list (deletions are ignored).
-func validatePatchWithSetOrderList(patchList, setOrderList interface{}, mergeKey string) error {
- typedSetOrderList, ok := setOrderList.([]interface{})
- if !ok {
- return mergepatch.ErrBadPatchFormatForSetElementOrderList
- }
- typedPatchList, ok := patchList.([]interface{})
- if !ok {
- return mergepatch.ErrBadPatchFormatForSetElementOrderList
- }
- if len(typedSetOrderList) == 0 || len(typedPatchList) == 0 {
- return nil
- }
-
- var nonDeleteList, toDeleteList []interface{}
- var err error
- if len(mergeKey) > 0 {
- nonDeleteList, toDeleteList, err = extractToDeleteItems(typedPatchList)
- if err != nil {
- return err
- }
- } else {
- nonDeleteList = typedPatchList
- }
-
- patchIndex, setOrderIndex := 0, 0
- for patchIndex < len(nonDeleteList) && setOrderIndex < len(typedSetOrderList) {
- if containsDirectiveMarker(nonDeleteList[patchIndex]) {
- patchIndex++
- continue
- }
- mergeKeyEqual, err := mergeKeyValueEqual(nonDeleteList[patchIndex], typedSetOrderList[setOrderIndex], mergeKey)
- if err != nil {
- return err
- }
- if mergeKeyEqual {
- patchIndex++
- }
- setOrderIndex++
- }
- // If patchIndex is inbound but setOrderIndex if out of bound mean there are items mismatching between the patch list and setElementOrder list.
- // the second check is is a sanity check, and should always be true if the first is true.
- if patchIndex < len(nonDeleteList) && setOrderIndex >= len(typedSetOrderList) {
- return fmt.Errorf("The order in patch list:\n%v\n doesn't match %s list:\n%v\n", typedPatchList, setElementOrderDirectivePrefix, setOrderList)
- }
- typedPatchList = append(nonDeleteList, toDeleteList...)
- return nil
-}
-
-// preprocessDeletionListForMerging preprocesses the deletion list.
-// it returns shouldContinue, isDeletionList, noPrefixKey
-func preprocessDeletionListForMerging(key string, original map[string]interface{},
- patchVal interface{}, mergeDeletionList bool) (bool, bool, string, error) {
- // If found a parallel list for deletion and we are going to merge the list,
- // overwrite the key to the original key and set flag isDeleteList
- foundParallelListPrefix := strings.HasPrefix(key, deleteFromPrimitiveListDirectivePrefix)
- if foundParallelListPrefix {
- if !mergeDeletionList {
- original[key] = patchVal
- return true, false, "", nil
- }
- originalKey, err := extractKey(key, deleteFromPrimitiveListDirectivePrefix)
- return false, true, originalKey, err
- }
- return false, false, "", nil
-}
-
-// applyRetainKeysDirective looks for a retainKeys directive and applies to original
-// - if no directive exists do nothing
-// - if directive is found, clear keys in original missing from the directive list
-// - validate that all keys present in the patch are present in the retainKeys directive
-// note: original may be another patch request, e.g. applying the add+modified patch to the deletions patch. In this case it may have directives
-func applyRetainKeysDirective(original, patch map[string]interface{}, options MergeOptions) error {
- retainKeysInPatch, foundInPatch := patch[retainKeysDirective]
- if !foundInPatch {
- return nil
- }
- // cleanup the directive
- delete(patch, retainKeysDirective)
-
- if !options.MergeParallelList {
- // If original is actually a patch, make sure the retainKeys directives are the same in both patches if present in both.
- // If not present in the original patch, copy from the modified patch.
- retainKeysInOriginal, foundInOriginal := original[retainKeysDirective]
- if foundInOriginal {
- if !reflect.DeepEqual(retainKeysInOriginal, retainKeysInPatch) {
- // This error actually should never happen.
- return fmt.Errorf("%v and %v are not deep equal: this may happen when calculating the 3-way diff patch", retainKeysInOriginal, retainKeysInPatch)
- }
- } else {
- original[retainKeysDirective] = retainKeysInPatch
- }
- return nil
- }
-
- retainKeysList, ok := retainKeysInPatch.([]interface{})
- if !ok {
- return mergepatch.ErrBadPatchFormatForRetainKeys
- }
-
- // validate patch to make sure all fields in the patch are present in the retainKeysList.
- // The map is used only as a set, the value is never referenced
- m := map[interface{}]struct{}{}
- for _, v := range retainKeysList {
- m[v] = struct{}{}
- }
- for k, v := range patch {
- if v == nil || strings.HasPrefix(k, deleteFromPrimitiveListDirectivePrefix) ||
- strings.HasPrefix(k, setElementOrderDirectivePrefix) {
- continue
- }
- // If there is an item present in the patch but not in the retainKeys list,
- // the patch is invalid.
- if _, found := m[k]; !found {
- return mergepatch.ErrBadPatchFormatForRetainKeys
- }
- }
-
- // clear not present fields
- for k := range original {
- if _, found := m[k]; !found {
- delete(original, k)
- }
- }
- return nil
-}
-
-// mergePatchIntoOriginal processes $setElementOrder list.
-// When not merging the directive, it will make sure $setElementOrder list exist only in original.
-// When merging the directive, it will try to find the $setElementOrder list and
-// its corresponding patch list, validate it and merge it.
-// Then, sort them by the relative order in setElementOrder, patch list and live list.
-// The precedence is $setElementOrder > order in patch list > order in live list.
-// This function will delete the item after merging it to prevent process it again in the future.
-// Ref: https://git.k8s.io/community/contributors/design-proposals/cli/preserve-order-in-strategic-merge-patch.md
-func mergePatchIntoOriginal(original, patch map[string]interface{}, schema LookupPatchMeta, mergeOptions MergeOptions) error {
- for key, patchV := range patch {
- // Do nothing if there is no ordering directive
- if !strings.HasPrefix(key, setElementOrderDirectivePrefix) {
- continue
- }
-
- setElementOrderInPatch := patchV
- // Copies directive from the second patch (`patch`) to the first patch (`original`)
- // and checks they are equal and delete the directive in the second patch
- if !mergeOptions.MergeParallelList {
- setElementOrderListInOriginal, ok := original[key]
- if ok {
- // check if the setElementOrder list in original and the one in patch matches
- if !reflect.DeepEqual(setElementOrderListInOriginal, setElementOrderInPatch) {
- return mergepatch.ErrBadPatchFormatForSetElementOrderList
- }
- } else {
- // move the setElementOrder list from patch to original
- original[key] = setElementOrderInPatch
- }
- }
- delete(patch, key)
-
- var (
- ok bool
- originalFieldValue, patchFieldValue, merged []interface{}
- patchStrategy string
- patchMeta PatchMeta
- subschema LookupPatchMeta
- )
- typedSetElementOrderList, ok := setElementOrderInPatch.([]interface{})
- if !ok {
- return mergepatch.ErrBadArgType(typedSetElementOrderList, setElementOrderInPatch)
- }
- // Trim the setElementOrderDirectivePrefix to get the key of the list field in original.
- originalKey, err := extractKey(key, setElementOrderDirectivePrefix)
- if err != nil {
- return err
- }
- // try to find the list with `originalKey` in `original` and `modified` and merge them.
- originalList, foundOriginal := original[originalKey]
- patchList, foundPatch := patch[originalKey]
- if foundOriginal {
- originalFieldValue, ok = originalList.([]interface{})
- if !ok {
- return mergepatch.ErrBadArgType(originalFieldValue, originalList)
- }
- }
- if foundPatch {
- patchFieldValue, ok = patchList.([]interface{})
- if !ok {
- return mergepatch.ErrBadArgType(patchFieldValue, patchList)
- }
- }
- subschema, patchMeta, err = schema.LookupPatchMetadataForSlice(originalKey)
- if err != nil {
- return err
- }
- _, patchStrategy, err = extractRetainKeysPatchStrategy(patchMeta.GetPatchStrategies())
- if err != nil {
- return err
- }
- // Check for consistency between the element order list and the field it applies to
- err = validatePatchWithSetOrderList(patchFieldValue, typedSetElementOrderList, patchMeta.GetPatchMergeKey())
- if err != nil {
- return err
- }
-
- switch {
- case foundOriginal && !foundPatch:
- // no change to list contents
- merged = originalFieldValue
- case !foundOriginal && foundPatch:
- // list was added
- merged = patchFieldValue
- case foundOriginal && foundPatch:
- merged, err = mergeSliceHandler(originalList, patchList, subschema,
- patchStrategy, patchMeta.GetPatchMergeKey(), false, mergeOptions)
- if err != nil {
- return err
- }
- case !foundOriginal && !foundPatch:
- continue
- }
-
- // Split all items into patch items and server-only items and then enforce the order.
- var patchItems, serverOnlyItems []interface{}
- if len(patchMeta.GetPatchMergeKey()) == 0 {
- // Primitives doesn't need merge key to do partitioning.
- patchItems, serverOnlyItems = partitionPrimitivesByPresentInList(merged, typedSetElementOrderList)
-
- } else {
- // Maps need merge key to do partitioning.
- patchItems, serverOnlyItems, err = partitionMapsByPresentInList(merged, typedSetElementOrderList, patchMeta.GetPatchMergeKey())
- if err != nil {
- return err
- }
- }
-
- elementType, err := sliceElementType(originalFieldValue, patchFieldValue)
- if err != nil {
- return err
- }
- kind := elementType.Kind()
- // normalize merged list
- // typedSetElementOrderList contains all the relative order in typedPatchList,
- // so don't need to use typedPatchList
- both, err := normalizeElementOrder(patchItems, serverOnlyItems, typedSetElementOrderList, originalFieldValue, patchMeta.GetPatchMergeKey(), kind)
- if err != nil {
- return err
- }
- original[originalKey] = both
- // delete patch list from patch to prevent process again in the future
- delete(patch, originalKey)
- }
- return nil
-}
-
-// partitionPrimitivesByPresentInList partitions elements into 2 slices, the first containing items present in partitionBy, the other not.
-func partitionPrimitivesByPresentInList(original, partitionBy []interface{}) ([]interface{}, []interface{}) {
- patch := make([]interface{}, 0, len(original))
- serverOnly := make([]interface{}, 0, len(original))
- inPatch := map[interface{}]bool{}
- for _, v := range partitionBy {
- inPatch[v] = true
- }
- for _, v := range original {
- if !inPatch[v] {
- serverOnly = append(serverOnly, v)
- } else {
- patch = append(patch, v)
- }
- }
- return patch, serverOnly
-}
-
-// partitionMapsByPresentInList partitions elements into 2 slices, the first containing items present in partitionBy, the other not.
-func partitionMapsByPresentInList(original, partitionBy []interface{}, mergeKey string) ([]interface{}, []interface{}, error) {
- patch := make([]interface{}, 0, len(original))
- serverOnly := make([]interface{}, 0, len(original))
- for _, v := range original {
- typedV, ok := v.(map[string]interface{})
- if !ok {
- return nil, nil, mergepatch.ErrBadArgType(typedV, v)
- }
- mergeKeyValue, foundMergeKey := typedV[mergeKey]
- if !foundMergeKey {
- return nil, nil, mergepatch.ErrNoMergeKey(typedV, mergeKey)
- }
- _, _, found, err := findMapInSliceBasedOnKeyValue(partitionBy, mergeKey, mergeKeyValue)
- if err != nil {
- return nil, nil, err
- }
- if !found {
- serverOnly = append(serverOnly, v)
- } else {
- patch = append(patch, v)
- }
- }
- return patch, serverOnly, nil
-}
-
-// Merge fields from a patch map into the original map. Note: This may modify
-// both the original map and the patch because getting a deep copy of a map in
-// golang is highly non-trivial.
-// flag mergeOptions.MergeParallelList controls if using the parallel list to delete or keeping the list.
-// If patch contains any null field (e.g. field_1: null) that is not
-// present in original, then to propagate it to the end result use
-// mergeOptions.IgnoreUnmatchedNulls == false.
-func mergeMap(original, patch map[string]interface{}, schema LookupPatchMeta, mergeOptions MergeOptions) (map[string]interface{}, error) {
- if v, ok := patch[directiveMarker]; ok {
- return handleDirectiveInMergeMap(v, patch)
- }
-
- // nil is an accepted value for original to simplify logic in other places.
- // If original is nil, replace it with an empty map and then apply the patch.
- if original == nil {
- original = map[string]interface{}{}
- }
-
- err := applyRetainKeysDirective(original, patch, mergeOptions)
- if err != nil {
- return nil, err
- }
-
- // Process $setElementOrder list and other lists sharing the same key.
- // When not merging the directive, it will make sure $setElementOrder list exist only in original.
- // When merging the directive, it will process $setElementOrder and its patch list together.
- // This function will delete the merged elements from patch so they will not be reprocessed
- err = mergePatchIntoOriginal(original, patch, schema, mergeOptions)
- if err != nil {
- return nil, err
- }
-
- // Start merging the patch into the original.
- for k, patchV := range patch {
- skipProcessing, isDeleteList, noPrefixKey, err := preprocessDeletionListForMerging(k, original, patchV, mergeOptions.MergeParallelList)
- if err != nil {
- return nil, err
- }
- if skipProcessing {
- continue
- }
- if len(noPrefixKey) > 0 {
- k = noPrefixKey
- }
-
- // If the value of this key is null, delete the key if it exists in the
- // original. Otherwise, check if we want to preserve it or skip it.
- // Preserving the null value is useful when we want to send an explicit
- // delete to the API server.
- if patchV == nil {
- if _, ok := original[k]; ok {
- delete(original, k)
- }
- if mergeOptions.IgnoreUnmatchedNulls {
- continue
- }
- }
-
- _, ok := original[k]
- if !ok {
- // If it's not in the original document, just take the patch value.
- original[k] = patchV
- continue
- }
-
- originalType := reflect.TypeOf(original[k])
- patchType := reflect.TypeOf(patchV)
- if originalType != patchType {
- original[k] = patchV
- continue
- }
- // If they're both maps or lists, recurse into the value.
- switch originalType.Kind() {
- case reflect.Map:
- subschema, patchMeta, err2 := schema.LookupPatchMetadataForStruct(k)
- if err2 != nil {
- return nil, err2
- }
- _, patchStrategy, err2 := extractRetainKeysPatchStrategy(patchMeta.GetPatchStrategies())
- if err2 != nil {
- return nil, err2
- }
- original[k], err = mergeMapHandler(original[k], patchV, subschema, patchStrategy, mergeOptions)
- case reflect.Slice:
- subschema, patchMeta, err2 := schema.LookupPatchMetadataForSlice(k)
- if err2 != nil {
- return nil, err2
- }
- _, patchStrategy, err2 := extractRetainKeysPatchStrategy(patchMeta.GetPatchStrategies())
- if err2 != nil {
- return nil, err2
- }
- original[k], err = mergeSliceHandler(original[k], patchV, subschema, patchStrategy, patchMeta.GetPatchMergeKey(), isDeleteList, mergeOptions)
- default:
- original[k] = patchV
- }
- if err != nil {
- return nil, err
- }
- }
- return original, nil
-}
-
-// mergeMapHandler handles how to merge `patchV` whose key is `key` with `original` respecting
-// fieldPatchStrategy and mergeOptions.
-func mergeMapHandler(original, patch interface{}, schema LookupPatchMeta,
- fieldPatchStrategy string, mergeOptions MergeOptions) (map[string]interface{}, error) {
- typedOriginal, typedPatch, err := mapTypeAssertion(original, patch)
- if err != nil {
- return nil, err
- }
-
- if fieldPatchStrategy != replaceDirective {
- return mergeMap(typedOriginal, typedPatch, schema, mergeOptions)
- } else {
- return typedPatch, nil
- }
-}
-
-// mergeSliceHandler handles how to merge `patchV` whose key is `key` with `original` respecting
-// fieldPatchStrategy, fieldPatchMergeKey, isDeleteList and mergeOptions.
-func mergeSliceHandler(original, patch interface{}, schema LookupPatchMeta,
- fieldPatchStrategy, fieldPatchMergeKey string, isDeleteList bool, mergeOptions MergeOptions) ([]interface{}, error) {
- typedOriginal, typedPatch, err := sliceTypeAssertion(original, patch)
- if err != nil {
- return nil, err
- }
-
- if fieldPatchStrategy == mergeDirective {
- return mergeSlice(typedOriginal, typedPatch, schema, fieldPatchMergeKey, mergeOptions, isDeleteList)
- } else {
- return typedPatch, nil
- }
-}
-
-// Merge two slices together. Note: This may modify both the original slice and
-// the patch because getting a deep copy of a slice in golang is highly
-// non-trivial.
-func mergeSlice(original, patch []interface{}, schema LookupPatchMeta, mergeKey string, mergeOptions MergeOptions, isDeleteList bool) ([]interface{}, error) {
- if len(original) == 0 && len(patch) == 0 {
- return original, nil
- }
-
- // All the values must be of the same type, but not a list.
- t, err := sliceElementType(original, patch)
- if err != nil {
- return nil, err
- }
-
- var merged []interface{}
- kind := t.Kind()
- // If the elements are not maps, merge the slices of scalars.
- if kind != reflect.Map {
- if mergeOptions.MergeParallelList && isDeleteList {
- return deleteFromSlice(original, patch), nil
- }
- // Maybe in the future add a "concat" mode that doesn't
- // deduplicate.
- both := append(original, patch...)
- merged = deduplicateScalars(both)
-
- } else {
- if mergeKey == "" {
- return nil, fmt.Errorf("cannot merge lists without merge key for %s", schema.Name())
- }
-
- original, patch, err = mergeSliceWithSpecialElements(original, patch, mergeKey)
- if err != nil {
- return nil, err
- }
-
- merged, err = mergeSliceWithoutSpecialElements(original, patch, mergeKey, schema, mergeOptions)
- if err != nil {
- return nil, err
- }
- }
-
- // enforce the order
- var patchItems, serverOnlyItems []interface{}
- if len(mergeKey) == 0 {
- patchItems, serverOnlyItems = partitionPrimitivesByPresentInList(merged, patch)
- } else {
- patchItems, serverOnlyItems, err = partitionMapsByPresentInList(merged, patch, mergeKey)
- if err != nil {
- return nil, err
- }
- }
- return normalizeElementOrder(patchItems, serverOnlyItems, patch, original, mergeKey, kind)
-}
-
-// mergeSliceWithSpecialElements handles special elements with directiveMarker
-// before merging the slices. It returns a updated `original` and a patch without special elements.
-// original and patch must be slices of maps, they should be checked before calling this function.
-func mergeSliceWithSpecialElements(original, patch []interface{}, mergeKey string) ([]interface{}, []interface{}, error) {
- patchWithoutSpecialElements := []interface{}{}
- replace := false
- for _, v := range patch {
- typedV := v.(map[string]interface{})
- patchType, ok := typedV[directiveMarker]
- if !ok {
- patchWithoutSpecialElements = append(patchWithoutSpecialElements, v)
- } else {
- switch patchType {
- case deleteDirective:
- mergeValue, ok := typedV[mergeKey]
- if ok {
- var err error
- original, err = deleteMatchingEntries(original, mergeKey, mergeValue)
- if err != nil {
- return nil, nil, err
- }
- } else {
- return nil, nil, mergepatch.ErrNoMergeKey(typedV, mergeKey)
- }
- case replaceDirective:
- replace = true
- // Continue iterating through the array to prune any other $patch elements.
- case mergeDirective:
- return nil, nil, fmt.Errorf("merging lists cannot yet be specified in the patch")
- default:
- return nil, nil, mergepatch.ErrBadPatchType(patchType, typedV)
- }
- }
- }
- if replace {
- return patchWithoutSpecialElements, nil, nil
- }
- return original, patchWithoutSpecialElements, nil
-}
-
-// delete all matching entries (based on merge key) from a merging list
-func deleteMatchingEntries(original []interface{}, mergeKey string, mergeValue interface{}) ([]interface{}, error) {
- for {
- _, originalKey, found, err := findMapInSliceBasedOnKeyValue(original, mergeKey, mergeValue)
- if err != nil {
- return nil, err
- }
-
- if !found {
- break
- }
- // Delete the element at originalKey.
- original = append(original[:originalKey], original[originalKey+1:]...)
- }
- return original, nil
-}
-
-// mergeSliceWithoutSpecialElements merges slices with non-special elements.
-// original and patch must be slices of maps, they should be checked before calling this function.
-func mergeSliceWithoutSpecialElements(original, patch []interface{}, mergeKey string, schema LookupPatchMeta, mergeOptions MergeOptions) ([]interface{}, error) {
- for _, v := range patch {
- typedV := v.(map[string]interface{})
- mergeValue, ok := typedV[mergeKey]
- if !ok {
- return nil, mergepatch.ErrNoMergeKey(typedV, mergeKey)
- }
-
- // If we find a value with this merge key value in original, merge the
- // maps. Otherwise append onto original.
- originalMap, originalKey, found, err := findMapInSliceBasedOnKeyValue(original, mergeKey, mergeValue)
- if err != nil {
- return nil, err
- }
-
- if found {
- var mergedMaps interface{}
- var err error
- // Merge into original.
- mergedMaps, err = mergeMap(originalMap, typedV, schema, mergeOptions)
- if err != nil {
- return nil, err
- }
-
- original[originalKey] = mergedMaps
- } else {
- original = append(original, v)
- }
- }
- return original, nil
-}
-
-// deleteFromSlice uses the parallel list to delete the items in a list of scalars
-func deleteFromSlice(current, toDelete []interface{}) []interface{} {
- toDeleteMap := map[interface{}]interface{}{}
- processed := make([]interface{}, 0, len(current))
- for _, v := range toDelete {
- toDeleteMap[v] = true
- }
- for _, v := range current {
- if _, found := toDeleteMap[v]; !found {
- processed = append(processed, v)
- }
- }
- return processed
-}
-
-// This method no longer panics if any element of the slice is not a map.
-func findMapInSliceBasedOnKeyValue(m []interface{}, key string, value interface{}) (map[string]interface{}, int, bool, error) {
- for k, v := range m {
- typedV, ok := v.(map[string]interface{})
- if !ok {
- return nil, 0, false, fmt.Errorf("value for key %v is not a map", k)
- }
-
- valueToMatch, ok := typedV[key]
- if ok && valueToMatch == value {
- return typedV, k, true, nil
- }
- }
-
- return nil, 0, false, nil
-}
-
-// This function takes a JSON map and sorts all the lists that should be merged
-// by key. This is needed by tests because in JSON, list order is significant,
-// but in Strategic Merge Patch, merge lists do not have significant order.
-// Sorting the lists allows for order-insensitive comparison of patched maps.
-func sortMergeListsByName(mapJSON []byte, schema LookupPatchMeta) ([]byte, error) {
- var m map[string]interface{}
- err := json.Unmarshal(mapJSON, &m)
- if err != nil {
- return nil, mergepatch.ErrBadJSONDoc
- }
-
- newM, err := sortMergeListsByNameMap(m, schema)
- if err != nil {
- return nil, err
- }
-
- return json.Marshal(newM)
-}
-
-// Function sortMergeListsByNameMap recursively sorts the merge lists by its mergeKey in a map.
-func sortMergeListsByNameMap(s map[string]interface{}, schema LookupPatchMeta) (map[string]interface{}, error) {
- newS := map[string]interface{}{}
- for k, v := range s {
- if k == retainKeysDirective {
- typedV, ok := v.([]interface{})
- if !ok {
- return nil, mergepatch.ErrBadPatchFormatForRetainKeys
- }
- v = sortScalars(typedV)
- } else if strings.HasPrefix(k, deleteFromPrimitiveListDirectivePrefix) {
- typedV, ok := v.([]interface{})
- if !ok {
- return nil, mergepatch.ErrBadPatchFormatForPrimitiveList
- }
- v = sortScalars(typedV)
- } else if strings.HasPrefix(k, setElementOrderDirectivePrefix) {
- _, ok := v.([]interface{})
- if !ok {
- return nil, mergepatch.ErrBadPatchFormatForSetElementOrderList
- }
- } else if k != directiveMarker {
- // recurse for map and slice.
- switch typedV := v.(type) {
- case map[string]interface{}:
- subschema, _, err := schema.LookupPatchMetadataForStruct(k)
- if err != nil {
- return nil, err
- }
- v, err = sortMergeListsByNameMap(typedV, subschema)
- if err != nil {
- return nil, err
- }
- case []interface{}:
- subschema, patchMeta, err := schema.LookupPatchMetadataForSlice(k)
- if err != nil {
- return nil, err
- }
- _, patchStrategy, err := extractRetainKeysPatchStrategy(patchMeta.GetPatchStrategies())
- if err != nil {
- return nil, err
- }
- if patchStrategy == mergeDirective {
- var err error
- v, err = sortMergeListsByNameArray(typedV, subschema, patchMeta.GetPatchMergeKey(), true)
- if err != nil {
- return nil, err
- }
- }
- }
- }
-
- newS[k] = v
- }
-
- return newS, nil
-}
-
-// Function sortMergeListsByNameMap recursively sorts the merge lists by its mergeKey in an array.
-func sortMergeListsByNameArray(s []interface{}, schema LookupPatchMeta, mergeKey string, recurse bool) ([]interface{}, error) {
- if len(s) == 0 {
- return s, nil
- }
-
- // We don't support lists of lists yet.
- t, err := sliceElementType(s)
- if err != nil {
- return nil, err
- }
-
- // If the elements are not maps...
- if t.Kind() != reflect.Map {
- // Sort the elements, because they may have been merged out of order.
- return deduplicateAndSortScalars(s), nil
- }
-
- // Elements are maps - if one of the keys of the map is a map or a
- // list, we may need to recurse into it.
- newS := []interface{}{}
- for _, elem := range s {
- if recurse {
- typedElem := elem.(map[string]interface{})
- newElem, err := sortMergeListsByNameMap(typedElem, schema)
- if err != nil {
- return nil, err
- }
-
- newS = append(newS, newElem)
- } else {
- newS = append(newS, elem)
- }
- }
-
- // Sort the maps.
- newS = sortMapsBasedOnField(newS, mergeKey)
- return newS, nil
-}
-
-func sortMapsBasedOnField(m []interface{}, fieldName string) []interface{} {
- mapM := mapSliceFromSlice(m)
- ss := SortableSliceOfMaps{mapM, fieldName}
- sort.Sort(ss)
- newS := sliceFromMapSlice(ss.s)
- return newS
-}
-
-func mapSliceFromSlice(m []interface{}) []map[string]interface{} {
- newM := []map[string]interface{}{}
- for _, v := range m {
- vt := v.(map[string]interface{})
- newM = append(newM, vt)
- }
-
- return newM
-}
-
-func sliceFromMapSlice(s []map[string]interface{}) []interface{} {
- newS := []interface{}{}
- for _, v := range s {
- newS = append(newS, v)
- }
-
- return newS
-}
-
-type SortableSliceOfMaps struct {
- s []map[string]interface{}
- k string // key to sort on
-}
-
-func (ss SortableSliceOfMaps) Len() int {
- return len(ss.s)
-}
-
-func (ss SortableSliceOfMaps) Less(i, j int) bool {
- iStr := fmt.Sprintf("%v", ss.s[i][ss.k])
- jStr := fmt.Sprintf("%v", ss.s[j][ss.k])
- return sort.StringsAreSorted([]string{iStr, jStr})
-}
-
-func (ss SortableSliceOfMaps) Swap(i, j int) {
- tmp := ss.s[i]
- ss.s[i] = ss.s[j]
- ss.s[j] = tmp
-}
-
-func deduplicateAndSortScalars(s []interface{}) []interface{} {
- s = deduplicateScalars(s)
- return sortScalars(s)
-}
-
-func sortScalars(s []interface{}) []interface{} {
- ss := SortableSliceOfScalars{s}
- sort.Sort(ss)
- return ss.s
-}
-
-func deduplicateScalars(s []interface{}) []interface{} {
- // Clever algorithm to deduplicate.
- length := len(s) - 1
- for i := 0; i < length; i++ {
- for j := i + 1; j <= length; j++ {
- if s[i] == s[j] {
- s[j] = s[length]
- s = s[0:length]
- length--
- j--
- }
- }
- }
-
- return s
-}
-
-type SortableSliceOfScalars struct {
- s []interface{}
-}
-
-func (ss SortableSliceOfScalars) Len() int {
- return len(ss.s)
-}
-
-func (ss SortableSliceOfScalars) Less(i, j int) bool {
- iStr := fmt.Sprintf("%v", ss.s[i])
- jStr := fmt.Sprintf("%v", ss.s[j])
- return sort.StringsAreSorted([]string{iStr, jStr})
-}
-
-func (ss SortableSliceOfScalars) Swap(i, j int) {
- tmp := ss.s[i]
- ss.s[i] = ss.s[j]
- ss.s[j] = tmp
-}
-
-// Returns the type of the elements of N slice(s). If the type is different,
-// another slice or undefined, returns an error.
-func sliceElementType(slices ...[]interface{}) (reflect.Type, error) {
- var prevType reflect.Type
- for _, s := range slices {
- // Go through elements of all given slices and make sure they are all the same type.
- for _, v := range s {
- currentType := reflect.TypeOf(v)
- if prevType == nil {
- prevType = currentType
- // We don't support lists of lists yet.
- if prevType.Kind() == reflect.Slice {
- return nil, mergepatch.ErrNoListOfLists
- }
- } else {
- if prevType != currentType {
- return nil, fmt.Errorf("list element types are not identical: %v", fmt.Sprint(slices))
- }
- prevType = currentType
- }
- }
- }
-
- if prevType == nil {
- return nil, fmt.Errorf("no elements in any of the given slices")
- }
-
- return prevType, nil
-}
-
-// MergingMapsHaveConflicts returns true if the left and right JSON interface
-// objects overlap with different values in any key. All keys are required to be
-// strings. Since patches of the same Type have congruent keys, this is valid
-// for multiple patch types. This method supports strategic merge patch semantics.
-func MergingMapsHaveConflicts(left, right map[string]interface{}, schema LookupPatchMeta) (bool, error) {
- return mergingMapFieldsHaveConflicts(left, right, schema, "", "")
-}
-
-func mergingMapFieldsHaveConflicts(
- left, right interface{},
- schema LookupPatchMeta,
- fieldPatchStrategy, fieldPatchMergeKey string,
-) (bool, error) {
- switch leftType := left.(type) {
- case map[string]interface{}:
- rightType, ok := right.(map[string]interface{})
- if !ok {
- return true, nil
- }
- leftMarker, okLeft := leftType[directiveMarker]
- rightMarker, okRight := rightType[directiveMarker]
- // if one or the other has a directive marker,
- // then we need to consider that before looking at the individual keys,
- // since a directive operates on the whole map.
- if okLeft || okRight {
- // if one has a directive marker and the other doesn't,
- // then we have a conflict, since one is deleting or replacing the whole map,
- // and the other is doing things to individual keys.
- if okLeft != okRight {
- return true, nil
- }
- // if they both have markers, but they are not the same directive,
- // then we have a conflict because they're doing different things to the map.
- if leftMarker != rightMarker {
- return true, nil
- }
- }
- if fieldPatchStrategy == replaceDirective {
- return false, nil
- }
- // Check the individual keys.
- return mapsHaveConflicts(leftType, rightType, schema)
-
- case []interface{}:
- rightType, ok := right.([]interface{})
- if !ok {
- return true, nil
- }
- return slicesHaveConflicts(leftType, rightType, schema, fieldPatchStrategy, fieldPatchMergeKey)
- case string, float64, bool, int, int64, nil:
- return !reflect.DeepEqual(left, right), nil
- default:
- return true, fmt.Errorf("unknown type: %v", reflect.TypeOf(left))
- }
-}
-
-func mapsHaveConflicts(typedLeft, typedRight map[string]interface{}, schema LookupPatchMeta) (bool, error) {
- for key, leftValue := range typedLeft {
- if key != directiveMarker && key != retainKeysDirective {
- if rightValue, ok := typedRight[key]; ok {
- var subschema LookupPatchMeta
- var patchMeta PatchMeta
- var patchStrategy string
- var err error
- switch leftValue.(type) {
- case []interface{}:
- subschema, patchMeta, err = schema.LookupPatchMetadataForSlice(key)
- if err != nil {
- return true, err
- }
- _, patchStrategy, err = extractRetainKeysPatchStrategy(patchMeta.patchStrategies)
- if err != nil {
- return true, err
- }
- case map[string]interface{}:
- subschema, patchMeta, err = schema.LookupPatchMetadataForStruct(key)
- if err != nil {
- return true, err
- }
- _, patchStrategy, err = extractRetainKeysPatchStrategy(patchMeta.patchStrategies)
- if err != nil {
- return true, err
- }
- }
-
- if hasConflicts, err := mergingMapFieldsHaveConflicts(leftValue, rightValue,
- subschema, patchStrategy, patchMeta.GetPatchMergeKey()); hasConflicts {
- return true, err
- }
- }
- }
- }
-
- return false, nil
-}
-
-func slicesHaveConflicts(
- typedLeft, typedRight []interface{},
- schema LookupPatchMeta,
- fieldPatchStrategy, fieldPatchMergeKey string,
-) (bool, error) {
- elementType, err := sliceElementType(typedLeft, typedRight)
- if err != nil {
- return true, err
- }
-
- if fieldPatchStrategy == mergeDirective {
- // Merging lists of scalars have no conflicts by definition
- // So we only need to check further if the elements are maps
- if elementType.Kind() != reflect.Map {
- return false, nil
- }
-
- // Build a map for each slice and then compare the two maps
- leftMap, err := sliceOfMapsToMapOfMaps(typedLeft, fieldPatchMergeKey)
- if err != nil {
- return true, err
- }
-
- rightMap, err := sliceOfMapsToMapOfMaps(typedRight, fieldPatchMergeKey)
- if err != nil {
- return true, err
- }
-
- return mapsOfMapsHaveConflicts(leftMap, rightMap, schema)
- }
-
- // Either we don't have type information, or these are non-merging lists
- if len(typedLeft) != len(typedRight) {
- return true, nil
- }
-
- // Sort scalar slices to prevent ordering issues
- // We have no way to sort non-merging lists of maps
- if elementType.Kind() != reflect.Map {
- typedLeft = deduplicateAndSortScalars(typedLeft)
- typedRight = deduplicateAndSortScalars(typedRight)
- }
-
- // Compare the slices element by element in order
- // This test will fail if the slices are not sorted
- for i := range typedLeft {
- if hasConflicts, err := mergingMapFieldsHaveConflicts(typedLeft[i], typedRight[i], schema, "", ""); hasConflicts {
- return true, err
- }
- }
-
- return false, nil
-}
-
-func sliceOfMapsToMapOfMaps(slice []interface{}, mergeKey string) (map[string]interface{}, error) {
- result := make(map[string]interface{}, len(slice))
- for _, value := range slice {
- typedValue, ok := value.(map[string]interface{})
- if !ok {
- return nil, fmt.Errorf("invalid element type in merging list:%v", slice)
- }
-
- mergeValue, ok := typedValue[mergeKey]
- if !ok {
- return nil, fmt.Errorf("cannot find merge key `%s` in merging list element:%v", mergeKey, typedValue)
- }
-
- result[fmt.Sprintf("%s", mergeValue)] = typedValue
- }
-
- return result, nil
-}
-
-func mapsOfMapsHaveConflicts(typedLeft, typedRight map[string]interface{}, schema LookupPatchMeta) (bool, error) {
- for key, leftValue := range typedLeft {
- if rightValue, ok := typedRight[key]; ok {
- if hasConflicts, err := mergingMapFieldsHaveConflicts(leftValue, rightValue, schema, "", ""); hasConflicts {
- return true, err
- }
- }
- }
-
- return false, nil
-}
-
-// CreateThreeWayMergePatch reconciles a modified configuration with an original configuration,
-// while preserving any changes or deletions made to the original configuration in the interim,
-// and not overridden by the current configuration. All three documents must be passed to the
-// method as json encoded content. It will return a strategic merge patch, or an error if any
-// of the documents is invalid, or if there are any preconditions that fail against the modified
-// configuration, or, if overwrite is false and there are conflicts between the modified and current
-// configurations. Conflicts are defined as keys changed differently from original to modified
-// than from original to current. In other words, a conflict occurs if modified changes any key
-// in a way that is different from how it is changed in current (e.g., deleting it, changing its
-// value). We also propagate values fields that do not exist in original but are explicitly
-// defined in modified.
-func CreateThreeWayMergePatch(original, modified, current []byte, schema LookupPatchMeta, overwrite bool, fns ...mergepatch.PreconditionFunc) ([]byte, error) {
- originalMap := map[string]interface{}{}
- if len(original) > 0 {
- if err := json.Unmarshal(original, &originalMap); err != nil {
- return nil, mergepatch.ErrBadJSONDoc
- }
- }
-
- modifiedMap := map[string]interface{}{}
- if len(modified) > 0 {
- if err := json.Unmarshal(modified, &modifiedMap); err != nil {
- return nil, mergepatch.ErrBadJSONDoc
- }
- }
-
- currentMap := map[string]interface{}{}
- if len(current) > 0 {
- if err := json.Unmarshal(current, &currentMap); err != nil {
- return nil, mergepatch.ErrBadJSONDoc
- }
- }
-
- // The patch is the difference from current to modified without deletions, plus deletions
- // from original to modified. To find it, we compute deletions, which are the deletions from
- // original to modified, and delta, which is the difference from current to modified without
- // deletions, and then apply delta to deletions as a patch, which should be strictly additive.
- deltaMapDiffOptions := DiffOptions{
- IgnoreDeletions: true,
- SetElementOrder: true,
- }
- deltaMap, err := diffMaps(currentMap, modifiedMap, schema, deltaMapDiffOptions)
- if err != nil {
- return nil, err
- }
- deletionsMapDiffOptions := DiffOptions{
- SetElementOrder: true,
- IgnoreChangesAndAdditions: true,
- }
- deletionsMap, err := diffMaps(originalMap, modifiedMap, schema, deletionsMapDiffOptions)
- if err != nil {
- return nil, err
- }
-
- mergeOptions := MergeOptions{}
- patchMap, err := mergeMap(deletionsMap, deltaMap, schema, mergeOptions)
- if err != nil {
- return nil, err
- }
-
- // Apply the preconditions to the patch, and return an error if any of them fail.
- for _, fn := range fns {
- if !fn(patchMap) {
- return nil, mergepatch.NewErrPreconditionFailed(patchMap)
- }
- }
-
- // If overwrite is false, and the patch contains any keys that were changed differently,
- // then return a conflict error.
- if !overwrite {
- changeMapDiffOptions := DiffOptions{}
- changedMap, err := diffMaps(originalMap, currentMap, schema, changeMapDiffOptions)
- if err != nil {
- return nil, err
- }
-
- hasConflicts, err := MergingMapsHaveConflicts(patchMap, changedMap, schema)
- if err != nil {
- return nil, err
- }
-
- if hasConflicts {
- return nil, mergepatch.NewErrConflict(mergepatch.ToYAMLOrError(patchMap), mergepatch.ToYAMLOrError(changedMap))
- }
- }
-
- return json.Marshal(patchMap)
-}
-
-func ItemAddedToModifiedSlice(original, modified string) bool { return original > modified }
-
-func ItemRemovedFromModifiedSlice(original, modified string) bool { return original < modified }
-
-func ItemMatchesOriginalAndModifiedSlice(original, modified string) bool { return original == modified }
-
-func CreateDeleteDirective(mergeKey string, mergeKeyValue interface{}) map[string]interface{} {
- return map[string]interface{}{mergeKey: mergeKeyValue, directiveMarker: deleteDirective}
-}
-
-func mapTypeAssertion(original, patch interface{}) (map[string]interface{}, map[string]interface{}, error) {
- typedOriginal, ok := original.(map[string]interface{})
- if !ok {
- return nil, nil, mergepatch.ErrBadArgType(typedOriginal, original)
- }
- typedPatch, ok := patch.(map[string]interface{})
- if !ok {
- return nil, nil, mergepatch.ErrBadArgType(typedPatch, patch)
- }
- return typedOriginal, typedPatch, nil
-}
-
-func sliceTypeAssertion(original, patch interface{}) ([]interface{}, []interface{}, error) {
- typedOriginal, ok := original.([]interface{})
- if !ok {
- return nil, nil, mergepatch.ErrBadArgType(typedOriginal, original)
- }
- typedPatch, ok := patch.([]interface{})
- if !ok {
- return nil, nil, mergepatch.ErrBadArgType(typedPatch, patch)
- }
- return typedOriginal, typedPatch, nil
-}
-
-// extractRetainKeysPatchStrategy process patch strategy, which is a string may contains multiple
-// patch strategies separated by ",". It returns a boolean var indicating if it has
-// retainKeys strategies and a string for the other strategy.
-func extractRetainKeysPatchStrategy(strategies []string) (bool, string, error) {
- switch len(strategies) {
- case 0:
- return false, "", nil
- case 1:
- singleStrategy := strategies[0]
- switch singleStrategy {
- case retainKeysStrategy:
- return true, "", nil
- default:
- return false, singleStrategy, nil
- }
- case 2:
- switch {
- case strategies[0] == retainKeysStrategy:
- return true, strategies[1], nil
- case strategies[1] == retainKeysStrategy:
- return true, strategies[0], nil
- default:
- return false, "", fmt.Errorf("unexpected patch strategy: %v", strategies)
- }
- default:
- return false, "", fmt.Errorf("unexpected patch strategy: %v", strategies)
- }
-}
-
-// hasAdditionalNewField returns if original map has additional key with non-nil value than modified.
-func hasAdditionalNewField(original, modified map[string]interface{}) bool {
- for k, v := range original {
- if v == nil {
- continue
- }
- if _, found := modified[k]; !found {
- return true
- }
- }
- return false
-}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/types.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/types.go
deleted file mode 100644
index f84d65aac..000000000
--- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/types.go
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-Copyright 2017 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 strategicpatch
-
-import (
- "errors"
- "strings"
-
- "k8s.io/apimachinery/pkg/util/mergepatch"
- openapi "k8s.io/kube-openapi/pkg/util/proto"
-)
-
-const (
- patchStrategyOpenapiextensionKey = "x-kubernetes-patch-strategy"
- patchMergeKeyOpenapiextensionKey = "x-kubernetes-patch-merge-key"
-)
-
-type LookupPatchItem interface {
- openapi.SchemaVisitor
-
- Error() error
- Path() *openapi.Path
-}
-
-type kindItem struct {
- key string
- path *openapi.Path
- err error
- patchmeta PatchMeta
- subschema openapi.Schema
- hasVisitKind bool
-}
-
-func NewKindItem(key string, path *openapi.Path) *kindItem {
- return &kindItem{
- key: key,
- path: path,
- }
-}
-
-var _ LookupPatchItem = &kindItem{}
-
-func (item *kindItem) Error() error {
- return item.err
-}
-
-func (item *kindItem) Path() *openapi.Path {
- return item.path
-}
-
-func (item *kindItem) VisitPrimitive(schema *openapi.Primitive) {
- item.err = errors.New("expected kind, but got primitive")
-}
-
-func (item *kindItem) VisitArray(schema *openapi.Array) {
- item.err = errors.New("expected kind, but got slice")
-}
-
-func (item *kindItem) VisitMap(schema *openapi.Map) {
- item.err = errors.New("expected kind, but got map")
-}
-
-func (item *kindItem) VisitReference(schema openapi.Reference) {
- if !item.hasVisitKind {
- schema.SubSchema().Accept(item)
- }
-}
-
-func (item *kindItem) VisitKind(schema *openapi.Kind) {
- subschema, ok := schema.Fields[item.key]
- if !ok {
- item.err = FieldNotFoundError{Path: schema.GetPath().String(), Field: item.key}
- return
- }
-
- mergeKey, patchStrategies, err := parsePatchMetadata(subschema.GetExtensions())
- if err != nil {
- item.err = err
- return
- }
- item.patchmeta = PatchMeta{
- patchStrategies: patchStrategies,
- patchMergeKey: mergeKey,
- }
- item.subschema = subschema
-}
-
-type sliceItem struct {
- key string
- path *openapi.Path
- err error
- patchmeta PatchMeta
- subschema openapi.Schema
- hasVisitKind bool
-}
-
-func NewSliceItem(key string, path *openapi.Path) *sliceItem {
- return &sliceItem{
- key: key,
- path: path,
- }
-}
-
-var _ LookupPatchItem = &sliceItem{}
-
-func (item *sliceItem) Error() error {
- return item.err
-}
-
-func (item *sliceItem) Path() *openapi.Path {
- return item.path
-}
-
-func (item *sliceItem) VisitPrimitive(schema *openapi.Primitive) {
- item.err = errors.New("expected slice, but got primitive")
-}
-
-func (item *sliceItem) VisitArray(schema *openapi.Array) {
- if !item.hasVisitKind {
- item.err = errors.New("expected visit kind first, then visit array")
- }
- subschema := schema.SubType
- item.subschema = subschema
-}
-
-func (item *sliceItem) VisitMap(schema *openapi.Map) {
- item.err = errors.New("expected slice, but got map")
-}
-
-func (item *sliceItem) VisitReference(schema openapi.Reference) {
- if !item.hasVisitKind {
- schema.SubSchema().Accept(item)
- } else {
- item.subschema = schema.SubSchema()
- }
-}
-
-func (item *sliceItem) VisitKind(schema *openapi.Kind) {
- subschema, ok := schema.Fields[item.key]
- if !ok {
- item.err = FieldNotFoundError{Path: schema.GetPath().String(), Field: item.key}
- return
- }
-
- mergeKey, patchStrategies, err := parsePatchMetadata(subschema.GetExtensions())
- if err != nil {
- item.err = err
- return
- }
- item.patchmeta = PatchMeta{
- patchStrategies: patchStrategies,
- patchMergeKey: mergeKey,
- }
- item.hasVisitKind = true
- subschema.Accept(item)
-}
-
-func parsePatchMetadata(extensions map[string]interface{}) (string, []string, error) {
- ps, foundPS := extensions[patchStrategyOpenapiextensionKey]
- var patchStrategies []string
- var mergeKey, patchStrategy string
- var ok bool
- if foundPS {
- patchStrategy, ok = ps.(string)
- if ok {
- patchStrategies = strings.Split(patchStrategy, ",")
- } else {
- return "", nil, mergepatch.ErrBadArgType(patchStrategy, ps)
- }
- }
- mk, foundMK := extensions[patchMergeKeyOpenapiextensionKey]
- if foundMK {
- mergeKey, ok = mk.(string)
- if !ok {
- return "", nil, mergepatch.ErrBadArgType(mergeKey, mk)
- }
- }
- return mergeKey, patchStrategies, nil
-}
diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go
deleted file mode 100644
index 8205a4dd1..000000000
--- a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go
+++ /dev/null
@@ -1,513 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package json is forked from the Go standard library to enable us to find the
-// field of a struct that a given JSON key maps to.
-package json
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "sort"
- "strings"
- "sync"
- "unicode"
- "unicode/utf8"
-)
-
-const (
- patchStrategyTagKey = "patchStrategy"
- patchMergeKeyTagKey = "patchMergeKey"
-)
-
-// Finds the patchStrategy and patchMergeKey struct tag fields on a given
-// struct field given the struct type and the JSON name of the field.
-// It returns field type, a slice of patch strategies, merge key and error.
-// TODO: fix the returned errors to be introspectable.
-func LookupPatchMetadataForStruct(t reflect.Type, jsonField string) (
- elemType reflect.Type, patchStrategies []string, patchMergeKey string, e error) {
- if t.Kind() == reflect.Ptr {
- t = t.Elem()
- }
-
- if t.Kind() != reflect.Struct {
- e = fmt.Errorf("merging an object in json but data type is not struct, instead is: %s",
- t.Kind().String())
- return
- }
- jf := []byte(jsonField)
- // Find the field that the JSON library would use.
- var f *field
- fields := cachedTypeFields(t)
- for i := range fields {
- ff := &fields[i]
- if bytes.Equal(ff.nameBytes, jf) {
- f = ff
- break
- }
- // Do case-insensitive comparison.
- if f == nil && ff.equalFold(ff.nameBytes, jf) {
- f = ff
- }
- }
- if f != nil {
- // Find the reflect.Value of the most preferential struct field.
- tjf := t.Field(f.index[0])
- // we must navigate down all the anonymously included structs in the chain
- for i := 1; i < len(f.index); i++ {
- tjf = tjf.Type.Field(f.index[i])
- }
- patchStrategy := tjf.Tag.Get(patchStrategyTagKey)
- patchMergeKey = tjf.Tag.Get(patchMergeKeyTagKey)
- patchStrategies = strings.Split(patchStrategy, ",")
- elemType = tjf.Type
- return
- }
- e = fmt.Errorf("unable to find api field in struct %s for the json field %q", t.Name(), jsonField)
- return
-}
-
-// A field represents a single field found in a struct.
-type field struct {
- name string
- nameBytes []byte // []byte(name)
- equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent
-
- tag bool
- // index is the sequence of indexes from the containing type fields to this field.
- // it is a slice because anonymous structs will need multiple navigation steps to correctly
- // resolve the proper fields
- index []int
- typ reflect.Type
- omitEmpty bool
- quoted bool
-}
-
-func (f field) String() string {
- return fmt.Sprintf("{name: %s, type: %v, tag: %v, index: %v, omitEmpty: %v, quoted: %v}", f.name, f.typ, f.tag, f.index, f.omitEmpty, f.quoted)
-}
-
-func fillField(f field) field {
- f.nameBytes = []byte(f.name)
- f.equalFold = foldFunc(f.nameBytes)
- return f
-}
-
-// byName sorts field by name, breaking ties with depth,
-// then breaking ties with "name came from json tag", then
-// breaking ties with index sequence.
-type byName []field
-
-func (x byName) Len() int { return len(x) }
-
-func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byName) Less(i, j int) bool {
- if x[i].name != x[j].name {
- return x[i].name < x[j].name
- }
- if len(x[i].index) != len(x[j].index) {
- return len(x[i].index) < len(x[j].index)
- }
- if x[i].tag != x[j].tag {
- return x[i].tag
- }
- return byIndex(x).Less(i, j)
-}
-
-// byIndex sorts field by index sequence.
-type byIndex []field
-
-func (x byIndex) Len() int { return len(x) }
-
-func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byIndex) Less(i, j int) bool {
- for k, xik := range x[i].index {
- if k >= len(x[j].index) {
- return false
- }
- if xik != x[j].index[k] {
- return xik < x[j].index[k]
- }
- }
- return len(x[i].index) < len(x[j].index)
-}
-
-// typeFields returns a list of fields that JSON should recognize for the given type.
-// The algorithm is breadth-first search over the set of structs to include - the top struct
-// and then any reachable anonymous structs.
-func typeFields(t reflect.Type) []field {
- // Anonymous fields to explore at the current level and the next.
- current := []field{}
- next := []field{{typ: t}}
-
- // Count of queued names for current level and the next.
- count := map[reflect.Type]int{}
- nextCount := map[reflect.Type]int{}
-
- // Types already visited at an earlier level.
- visited := map[reflect.Type]bool{}
-
- // Fields found.
- var fields []field
-
- for len(next) > 0 {
- current, next = next, current[:0]
- count, nextCount = nextCount, map[reflect.Type]int{}
-
- for _, f := range current {
- if visited[f.typ] {
- continue
- }
- visited[f.typ] = true
-
- // Scan f.typ for fields to include.
- for i := 0; i < f.typ.NumField(); i++ {
- sf := f.typ.Field(i)
- if sf.PkgPath != "" { // unexported
- continue
- }
- tag := sf.Tag.Get("json")
- if tag == "-" {
- continue
- }
- name, opts := parseTag(tag)
- if !isValidTag(name) {
- name = ""
- }
- index := make([]int, len(f.index)+1)
- copy(index, f.index)
- index[len(f.index)] = i
-
- ft := sf.Type
- if ft.Name() == "" && ft.Kind() == reflect.Ptr {
- // Follow pointer.
- ft = ft.Elem()
- }
-
- // Record found field and index sequence.
- if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
- tagged := name != ""
- if name == "" {
- name = sf.Name
- }
- fields = append(fields, fillField(field{
- name: name,
- tag: tagged,
- index: index,
- typ: ft,
- omitEmpty: opts.Contains("omitempty"),
- quoted: opts.Contains("string"),
- }))
- if count[f.typ] > 1 {
- // If there were multiple instances, add a second,
- // so that the annihilation code will see a duplicate.
- // It only cares about the distinction between 1 or 2,
- // so don't bother generating any more copies.
- fields = append(fields, fields[len(fields)-1])
- }
- continue
- }
-
- // Record new anonymous struct to explore in next round.
- nextCount[ft]++
- if nextCount[ft] == 1 {
- next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft}))
- }
- }
- }
- }
-
- sort.Sort(byName(fields))
-
- // Delete all fields that are hidden by the Go rules for embedded fields,
- // except that fields with JSON tags are promoted.
-
- // The fields are sorted in primary order of name, secondary order
- // of field index length. Loop over names; for each name, delete
- // hidden fields by choosing the one dominant field that survives.
- out := fields[:0]
- for advance, i := 0, 0; i < len(fields); i += advance {
- // One iteration per name.
- // Find the sequence of fields with the name of this first field.
- fi := fields[i]
- name := fi.name
- for advance = 1; i+advance < len(fields); advance++ {
- fj := fields[i+advance]
- if fj.name != name {
- break
- }
- }
- if advance == 1 { // Only one field with this name
- out = append(out, fi)
- continue
- }
- dominant, ok := dominantField(fields[i : i+advance])
- if ok {
- out = append(out, dominant)
- }
- }
-
- fields = out
- sort.Sort(byIndex(fields))
-
- return fields
-}
-
-// dominantField looks through the fields, all of which are known to
-// have the same name, to find the single field that dominates the
-// others using Go's embedding rules, modified by the presence of
-// JSON tags. If there are multiple top-level fields, the boolean
-// will be false: This condition is an error in Go and we skip all
-// the fields.
-func dominantField(fields []field) (field, bool) {
- // The fields are sorted in increasing index-length order. The winner
- // must therefore be one with the shortest index length. Drop all
- // longer entries, which is easy: just truncate the slice.
- length := len(fields[0].index)
- tagged := -1 // Index of first tagged field.
- for i, f := range fields {
- if len(f.index) > length {
- fields = fields[:i]
- break
- }
- if f.tag {
- if tagged >= 0 {
- // Multiple tagged fields at the same level: conflict.
- // Return no field.
- return field{}, false
- }
- tagged = i
- }
- }
- if tagged >= 0 {
- return fields[tagged], true
- }
- // All remaining fields have the same length. If there's more than one,
- // we have a conflict (two fields named "X" at the same level) and we
- // return no field.
- if len(fields) > 1 {
- return field{}, false
- }
- return fields[0], true
-}
-
-var fieldCache struct {
- sync.RWMutex
- m map[reflect.Type][]field
-}
-
-// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.
-func cachedTypeFields(t reflect.Type) []field {
- fieldCache.RLock()
- f := fieldCache.m[t]
- fieldCache.RUnlock()
- if f != nil {
- return f
- }
-
- // Compute fields without lock.
- // Might duplicate effort but won't hold other computations back.
- f = typeFields(t)
- if f == nil {
- f = []field{}
- }
-
- fieldCache.Lock()
- if fieldCache.m == nil {
- fieldCache.m = map[reflect.Type][]field{}
- }
- fieldCache.m[t] = f
- fieldCache.Unlock()
- return f
-}
-
-func isValidTag(s string) bool {
- if s == "" {
- return false
- }
- for _, c := range s {
- switch {
- case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c):
- // Backslash and quote chars are reserved, but
- // otherwise any punctuation chars are allowed
- // in a tag name.
- default:
- if !unicode.IsLetter(c) && !unicode.IsDigit(c) {
- return false
- }
- }
- }
- return true
-}
-
-const (
- caseMask = ^byte(0x20) // Mask to ignore case in ASCII.
- kelvin = '\u212a'
- smallLongEss = '\u017f'
-)
-
-// foldFunc returns one of four different case folding equivalence
-// functions, from most general (and slow) to fastest:
-//
-// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8
-// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S')
-// 3) asciiEqualFold, no special, but includes non-letters (including _)
-// 4) simpleLetterEqualFold, no specials, no non-letters.
-//
-// The letters S and K are special because they map to 3 runes, not just 2:
-// * S maps to s and to U+017F 'ſ' Latin small letter long s
-// * k maps to K and to U+212A 'K' Kelvin sign
-// See http://play.golang.org/p/tTxjOc0OGo
-//
-// The returned function is specialized for matching against s and
-// should only be given s. It's not curried for performance reasons.
-func foldFunc(s []byte) func(s, t []byte) bool {
- nonLetter := false
- special := false // special letter
- for _, b := range s {
- if b >= utf8.RuneSelf {
- return bytes.EqualFold
- }
- upper := b & caseMask
- if upper < 'A' || upper > 'Z' {
- nonLetter = true
- } else if upper == 'K' || upper == 'S' {
- // See above for why these letters are special.
- special = true
- }
- }
- if special {
- return equalFoldRight
- }
- if nonLetter {
- return asciiEqualFold
- }
- return simpleLetterEqualFold
-}
-
-// equalFoldRight is a specialization of bytes.EqualFold when s is
-// known to be all ASCII (including punctuation), but contains an 's',
-// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t.
-// See comments on foldFunc.
-func equalFoldRight(s, t []byte) bool {
- for _, sb := range s {
- if len(t) == 0 {
- return false
- }
- tb := t[0]
- if tb < utf8.RuneSelf {
- if sb != tb {
- sbUpper := sb & caseMask
- if 'A' <= sbUpper && sbUpper <= 'Z' {
- if sbUpper != tb&caseMask {
- return false
- }
- } else {
- return false
- }
- }
- t = t[1:]
- continue
- }
- // sb is ASCII and t is not. t must be either kelvin
- // sign or long s; sb must be s, S, k, or K.
- tr, size := utf8.DecodeRune(t)
- switch sb {
- case 's', 'S':
- if tr != smallLongEss {
- return false
- }
- case 'k', 'K':
- if tr != kelvin {
- return false
- }
- default:
- return false
- }
- t = t[size:]
-
- }
- if len(t) > 0 {
- return false
- }
- return true
-}
-
-// asciiEqualFold is a specialization of bytes.EqualFold for use when
-// s is all ASCII (but may contain non-letters) and contains no
-// special-folding letters.
-// See comments on foldFunc.
-func asciiEqualFold(s, t []byte) bool {
- if len(s) != len(t) {
- return false
- }
- for i, sb := range s {
- tb := t[i]
- if sb == tb {
- continue
- }
- if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') {
- if sb&caseMask != tb&caseMask {
- return false
- }
- } else {
- return false
- }
- }
- return true
-}
-
-// simpleLetterEqualFold is a specialization of bytes.EqualFold for
-// use when s is all ASCII letters (no underscores, etc) and also
-// doesn't contain 'k', 'K', 's', or 'S'.
-// See comments on foldFunc.
-func simpleLetterEqualFold(s, t []byte) bool {
- if len(s) != len(t) {
- return false
- }
- for i, b := range s {
- if b&caseMask != t[i]&caseMask {
- return false
- }
- }
- return true
-}
-
-// tagOptions is the string following a comma in a struct field's "json"
-// tag, or the empty string. It does not include the leading comma.
-type tagOptions string
-
-// parseTag splits a struct field's json tag into its name and
-// comma-separated options.
-func parseTag(tag string) (string, tagOptions) {
- if idx := strings.Index(tag, ","); idx != -1 {
- return tag[:idx], tagOptions(tag[idx+1:])
- }
- return tag, tagOptions("")
-}
-
-// Contains reports whether a comma-separated list of options
-// contains a particular substr flag. substr must be surrounded by a
-// string boundary or commas.
-func (o tagOptions) Contains(optionName string) bool {
- if len(o) == 0 {
- return false
- }
- s := string(o)
- for s != "" {
- var next string
- i := strings.Index(s, ",")
- if i >= 0 {
- s, next = s[:i], s[i+1:]
- }
- if s == optionName {
- return true
- }
- s = next
- }
- return false
-}
diff --git a/vendor/k8s.io/apiserver/LICENSE b/vendor/k8s.io/apiserver/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/vendor/k8s.io/apiserver/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/vendor/k8s.io/apiserver/README.md b/vendor/k8s.io/apiserver/README.md
deleted file mode 100644
index 130ba87de..000000000
--- a/vendor/k8s.io/apiserver/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# apiserver
-
-Generic library for building a Kubernetes aggregated API server.
-
-
-## Purpose
-
-This library contains code to create Kubernetes aggregation server complete with delegated authentication and authorization,
-`kubectl` compatible discovery information, optional admission chain, and versioned types. It's first consumers are
-`k8s.io/kubernetes`, `k8s.io/kube-aggregator`, and `github.com/kubernetes-incubator/service-catalog`.
-
-
-## Compatibility
-
-There are *NO compatibility guarantees* for this repository, yet. It is in direct support of Kubernetes, so branches
-will track Kubernetes and be compatible with that repo. As we more cleanly separate the layers, we will review the
-compatibility guarantee. We have a goal to make this easier to use in 2017.
-
-
-## Where does it come from?
-
-`apiserver` is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver.
-Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here.
-
-
-## Things you should *NOT* do
-
- 1. Directly modify any files under `pkg` in this repo. Those are driven from `k8s.io/kubernetes/staging/src/k8s.io/apiserver`.
- 2. Expect compatibility. This repo is changing quickly in direct support of
- Kubernetes and the API isn't yet stable enough for API guarantees.
diff --git a/vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go b/vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go
deleted file mode 100644
index fd3d0383e..000000000
--- a/vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-Copyright 2014 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 authenticator
-
-import (
- "net/http"
-
- "k8s.io/apiserver/pkg/authentication/user"
-)
-
-// Token checks a string value against a backing authentication store and returns
-// information about the current user and true if successful, false if not successful,
-// or an error if the token could not be checked.
-type Token interface {
- AuthenticateToken(token string) (user.Info, bool, error)
-}
-
-// Request attempts to extract authentication information from a request and returns
-// information about the current user and true if successful, false if not successful,
-// or an error if the request could not be checked.
-type Request interface {
- AuthenticateRequest(req *http.Request) (user.Info, bool, error)
-}
-
-// Password checks a username and password against a backing authentication store and
-// returns information about the user and true if successful, false if not successful,
-// or an error if the username and password could not be checked
-type Password interface {
- AuthenticatePassword(user, password string) (user.Info, bool, error)
-}
-
-// TokenFunc is a function that implements the Token interface.
-type TokenFunc func(token string) (user.Info, bool, error)
-
-// AuthenticateToken implements authenticator.Token.
-func (f TokenFunc) AuthenticateToken(token string) (user.Info, bool, error) {
- return f(token)
-}
-
-// RequestFunc is a function that implements the Request interface.
-type RequestFunc func(req *http.Request) (user.Info, bool, error)
-
-// AuthenticateRequest implements authenticator.Request.
-func (f RequestFunc) AuthenticateRequest(req *http.Request) (user.Info, bool, error) {
- return f(req)
-}
-
-// PasswordFunc is a function that implements the Password interface.
-type PasswordFunc func(user, password string) (user.Info, bool, error)
-
-// AuthenticatePassword implements authenticator.Password.
-func (f PasswordFunc) AuthenticatePassword(user, password string) (user.Info, bool, error) {
- return f(user, password)
-}
diff --git a/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go b/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go
deleted file mode 100644
index 1b7bbc139..000000000
--- a/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-Copyright 2014 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 serviceaccount
-
-import (
- "fmt"
- "strings"
-
- apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation"
-)
-
-const (
- ServiceAccountUsernamePrefix = "system:serviceaccount:"
- ServiceAccountUsernameSeparator = ":"
- ServiceAccountGroupPrefix = "system:serviceaccounts:"
- AllServiceAccountsGroup = "system:serviceaccounts"
-)
-
-// MakeUsername generates a username from the given namespace and ServiceAccount name.
-// The resulting username can be passed to SplitUsername to extract the original namespace and ServiceAccount name.
-func MakeUsername(namespace, name string) string {
- return ServiceAccountUsernamePrefix + namespace + ServiceAccountUsernameSeparator + name
-}
-
-var invalidUsernameErr = fmt.Errorf("Username must be in the form %s", MakeUsername("namespace", "name"))
-
-// SplitUsername returns the namespace and ServiceAccount name embedded in the given username,
-// or an error if the username is not a valid name produced by MakeUsername
-func SplitUsername(username string) (string, string, error) {
- if !strings.HasPrefix(username, ServiceAccountUsernamePrefix) {
- return "", "", invalidUsernameErr
- }
- trimmed := strings.TrimPrefix(username, ServiceAccountUsernamePrefix)
- parts := strings.Split(trimmed, ServiceAccountUsernameSeparator)
- if len(parts) != 2 {
- return "", "", invalidUsernameErr
- }
- namespace, name := parts[0], parts[1]
- if len(apimachineryvalidation.ValidateNamespaceName(namespace, false)) != 0 {
- return "", "", invalidUsernameErr
- }
- if len(apimachineryvalidation.ValidateServiceAccountName(name, false)) != 0 {
- return "", "", invalidUsernameErr
- }
- return namespace, name, nil
-}
-
-// MakeGroupNames generates service account group names for the given namespace
-func MakeGroupNames(namespace string) []string {
- return []string{
- AllServiceAccountsGroup,
- MakeNamespaceGroupName(namespace),
- }
-}
-
-// MakeNamespaceGroupName returns the name of the group all service accounts in the namespace are included in
-func MakeNamespaceGroupName(namespace string) string {
- return ServiceAccountGroupPrefix + namespace
-}
diff --git a/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go b/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go
deleted file mode 100644
index 570c51ae9..000000000
--- a/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2014 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 user contains utilities for dealing with simple user exchange in the auth
-// packages. The user.Info interface defines an interface for exchanging that info.
-package user
diff --git a/vendor/k8s.io/apiserver/pkg/authentication/user/user.go b/vendor/k8s.io/apiserver/pkg/authentication/user/user.go
deleted file mode 100644
index f02dc39ec..000000000
--- a/vendor/k8s.io/apiserver/pkg/authentication/user/user.go
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-Copyright 2014 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 user
-
-// Info describes a user that has been authenticated to the system.
-type Info interface {
- // GetName returns the name that uniquely identifies this user among all
- // other active users.
- GetName() string
- // GetUID returns a unique value for a particular user that will change
- // if the user is removed from the system and another user is added with
- // the same name.
- GetUID() string
- // GetGroups returns the names of the groups the user is a member of
- GetGroups() []string
-
- // GetExtra can contain any additional information that the authenticator
- // thought was interesting. One example would be scopes on a token.
- // Keys in this map should be namespaced to the authenticator or
- // authenticator/authorizer pair making use of them.
- // For instance: "example.org/foo" instead of "foo"
- // This is a map[string][]string because it needs to be serializeable into
- // a SubjectAccessReviewSpec.authorization.k8s.io for proper authorization
- // delegation flows
- // In order to faithfully round-trip through an impersonation flow, these keys
- // MUST be lowercase.
- GetExtra() map[string][]string
-}
-
-// DefaultInfo provides a simple user information exchange object
-// for components that implement the UserInfo interface.
-type DefaultInfo struct {
- Name string
- UID string
- Groups []string
- Extra map[string][]string
-}
-
-func (i *DefaultInfo) GetName() string {
- return i.Name
-}
-
-func (i *DefaultInfo) GetUID() string {
- return i.UID
-}
-
-func (i *DefaultInfo) GetGroups() []string {
- return i.Groups
-}
-
-func (i *DefaultInfo) GetExtra() map[string][]string {
- return i.Extra
-}
-
-// well-known user and group names
-const (
- SystemPrivilegedGroup = "system:masters"
- NodesGroup = "system:nodes"
- AllUnauthenticated = "system:unauthenticated"
- AllAuthenticated = "system:authenticated"
-
- Anonymous = "system:anonymous"
- APIServerUser = "system:apiserver"
-
- // core kubernetes process identities
- KubeProxy = "system:kube-proxy"
- KubeControllerManager = "system:kube-controller-manager"
- KubeScheduler = "system:kube-scheduler"
-)
diff --git a/vendor/k8s.io/apiserver/pkg/features/kube_features.go b/vendor/k8s.io/apiserver/pkg/features/kube_features.go
deleted file mode 100644
index 57bab8b00..000000000
--- a/vendor/k8s.io/apiserver/pkg/features/kube_features.go
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-Copyright 2017 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 features
-
-import (
- utilfeature "k8s.io/apiserver/pkg/util/feature"
-)
-
-const (
- // Every feature gate should add method here following this template:
- //
- // // owner: @username
- // // alpha: v1.4
- // MyFeature() bool
-
- // owner: @tallclair
- // alpha: v1.5
- //
- // StreamingProxyRedirects controls whether the apiserver should intercept (and follow)
- // redirects from the backend (Kubelet) for streaming requests (exec/attach/port-forward).
- StreamingProxyRedirects utilfeature.Feature = "StreamingProxyRedirects"
-
- // owner: @tallclair
- // alpha: v1.7
- // beta: v1.8
- //
- // AdvancedAuditing enables a much more general API auditing pipeline, which includes support for
- // pluggable output backends and an audit policy specifying how different requests should be
- // audited.
- AdvancedAuditing utilfeature.Feature = "AdvancedAuditing"
-
- // owner: @ilackams
- // alpha: v1.7
- //
- // Enables compression of REST responses (GET and LIST only)
- APIResponseCompression utilfeature.Feature = "APIResponseCompression"
-
- // owner: @smarterclayton
- // alpha: v1.7
- //
- // Allow asynchronous coordination of object creation.
- // Auto-enabled by the Initializers admission plugin.
- Initializers utilfeature.Feature = "Initializers"
-
- // owner: @smarterclayton
- // alpha: v1.8
- // beta: v1.9
- //
- // Allow API clients to retrieve resource lists in chunks rather than
- // all at once.
- APIListChunking utilfeature.Feature = "APIListChunking"
-)
-
-func init() {
- utilfeature.DefaultFeatureGate.Add(defaultKubernetesFeatureGates)
-}
-
-// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
-// To add a new feature, define a key for it above and add it here. The features will be
-// available throughout Kubernetes binaries.
-var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureSpec{
- StreamingProxyRedirects: {Default: true, PreRelease: utilfeature.Beta},
- AdvancedAuditing: {Default: true, PreRelease: utilfeature.Beta},
- APIResponseCompression: {Default: false, PreRelease: utilfeature.Alpha},
- Initializers: {Default: false, PreRelease: utilfeature.Alpha},
- APIListChunking: {Default: true, PreRelease: utilfeature.Beta},
-}
diff --git a/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate.go b/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate.go
deleted file mode 100644
index 306877124..000000000
--- a/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate.go
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
-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 feature
-
-import (
- "fmt"
- "sort"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
-
- "github.com/golang/glog"
- "github.com/spf13/pflag"
-)
-
-type Feature string
-
-const (
- flagName = "feature-gates"
-
- // allAlphaGate is a global toggle for alpha features. Per-feature key
- // values override the default set by allAlphaGate. Examples:
- // AllAlpha=false,NewFeature=true will result in newFeature=true
- // AllAlpha=true,NewFeature=false will result in newFeature=false
- allAlphaGate Feature = "AllAlpha"
-)
-
-var (
- // The generic features.
- defaultFeatures = map[Feature]FeatureSpec{
- allAlphaGate: {Default: false, PreRelease: Alpha},
- }
-
- // Special handling for a few gates.
- specialFeatures = map[Feature]func(known map[Feature]FeatureSpec, enabled map[Feature]bool, val bool){
- allAlphaGate: setUnsetAlphaGates,
- }
-
- // DefaultFeatureGate is a shared global FeatureGate.
- DefaultFeatureGate FeatureGate = NewFeatureGate()
-)
-
-type FeatureSpec struct {
- Default bool
- PreRelease prerelease
-}
-
-type prerelease string
-
-const (
- // Values for PreRelease.
- Alpha = prerelease("ALPHA")
- Beta = prerelease("BETA")
- GA = prerelease("")
-
- // Deprecated
- Deprecated = prerelease("DEPRECATED")
-)
-
-// FeatureGate parses and stores flag gates for known features from
-// a string like feature1=true,feature2=false,...
-type FeatureGate interface {
- // AddFlag adds a flag for setting global feature gates to the specified FlagSet.
- AddFlag(fs *pflag.FlagSet)
- // Set parses and stores flag gates for known features
- // from a string like feature1=true,feature2=false,...
- Set(value string) error
- // SetFromMap stores flag gates for known features from a map[string]bool or returns an error
- SetFromMap(m map[string]bool) error
- // Enabled returns true if the key is enabled.
- Enabled(key Feature) bool
- // Add adds features to the featureGate.
- Add(features map[Feature]FeatureSpec) error
- // KnownFeatures returns a slice of strings describing the FeatureGate's known features.
- KnownFeatures() []string
-}
-
-// featureGate implements FeatureGate as well as pflag.Value for flag parsing.
-type featureGate struct {
- special map[Feature]func(map[Feature]FeatureSpec, map[Feature]bool, bool)
-
- // lock guards writes to known, enabled, and reads/writes of closed
- lock sync.Mutex
- // known holds a map[Feature]FeatureSpec
- known *atomic.Value
- // enabled holds a map[Feature]bool
- enabled *atomic.Value
- // closed is set to true when AddFlag is called, and prevents subsequent calls to Add
- closed bool
-}
-
-func setUnsetAlphaGates(known map[Feature]FeatureSpec, enabled map[Feature]bool, val bool) {
- for k, v := range known {
- if v.PreRelease == Alpha {
- if _, found := enabled[k]; !found {
- enabled[k] = val
- }
- }
- }
-}
-
-// Set, String, and Type implement pflag.Value
-var _ pflag.Value = &featureGate{}
-
-func NewFeatureGate() *featureGate {
- known := map[Feature]FeatureSpec{}
- for k, v := range defaultFeatures {
- known[k] = v
- }
-
- knownValue := &atomic.Value{}
- knownValue.Store(known)
-
- enabled := map[Feature]bool{}
- enabledValue := &atomic.Value{}
- enabledValue.Store(enabled)
-
- f := &featureGate{
- known: knownValue,
- special: specialFeatures,
- enabled: enabledValue,
- }
- return f
-}
-
-// Set parses a string of the form "key1=value1,key2=value2,..." into a
-// map[string]bool of known keys or returns an error.
-func (f *featureGate) Set(value string) error {
- f.lock.Lock()
- defer f.lock.Unlock()
-
- // Copy existing state
- known := map[Feature]FeatureSpec{}
- for k, v := range f.known.Load().(map[Feature]FeatureSpec) {
- known[k] = v
- }
- enabled := map[Feature]bool{}
- for k, v := range f.enabled.Load().(map[Feature]bool) {
- enabled[k] = v
- }
-
- for _, s := range strings.Split(value, ",") {
- if len(s) == 0 {
- continue
- }
- arr := strings.SplitN(s, "=", 2)
- k := Feature(strings.TrimSpace(arr[0]))
- featureSpec, ok := known[k]
- if !ok {
- return fmt.Errorf("unrecognized key: %s", k)
- }
- if len(arr) != 2 {
- return fmt.Errorf("missing bool value for %s", k)
- }
- v := strings.TrimSpace(arr[1])
- boolValue, err := strconv.ParseBool(v)
- if err != nil {
- return fmt.Errorf("invalid value of %s: %s, err: %v", k, v, err)
- }
- enabled[k] = boolValue
- if boolValue && featureSpec.PreRelease == Deprecated {
- glog.Warningf("enabling deprecated feature gate %s", k)
- }
-
- // Handle "special" features like "all alpha gates"
- if fn, found := f.special[k]; found {
- fn(known, enabled, boolValue)
- }
- }
-
- // Persist changes
- f.known.Store(known)
- f.enabled.Store(enabled)
-
- glog.Infof("feature gates: %v", enabled)
- return nil
-}
-
-// SetFromMap stores flag gates for known features from a map[string]bool or returns an error
-func (f *featureGate) SetFromMap(m map[string]bool) error {
- f.lock.Lock()
- defer f.lock.Unlock()
-
- // Copy existing state
- known := map[Feature]FeatureSpec{}
- for k, v := range f.known.Load().(map[Feature]FeatureSpec) {
- known[k] = v
- }
- enabled := map[Feature]bool{}
- for k, v := range f.enabled.Load().(map[Feature]bool) {
- enabled[k] = v
- }
-
- for k, v := range m {
- k := Feature(k)
- _, ok := known[k]
- if !ok {
- return fmt.Errorf("unrecognized key: %s", k)
- }
- enabled[k] = v
- // Handle "special" features like "all alpha gates"
- if fn, found := f.special[k]; found {
- fn(known, enabled, v)
- }
- }
-
- // Persist changes
- f.known.Store(known)
- f.enabled.Store(enabled)
-
- glog.Infof("feature gates: %v", f.enabled)
- return nil
-}
-
-// String returns a string containing all enabled feature gates, formatted as "key1=value1,key2=value2,...".
-func (f *featureGate) String() string {
- pairs := []string{}
- for k, v := range f.enabled.Load().(map[Feature]bool) {
- pairs = append(pairs, fmt.Sprintf("%s=%t", k, v))
- }
- sort.Strings(pairs)
- return strings.Join(pairs, ",")
-}
-
-func (f *featureGate) Type() string {
- return "mapStringBool"
-}
-
-// Add adds features to the featureGate.
-func (f *featureGate) Add(features map[Feature]FeatureSpec) error {
- f.lock.Lock()
- defer f.lock.Unlock()
-
- if f.closed {
- return fmt.Errorf("cannot add a feature gate after adding it to the flag set")
- }
-
- // Copy existing state
- known := map[Feature]FeatureSpec{}
- for k, v := range f.known.Load().(map[Feature]FeatureSpec) {
- known[k] = v
- }
-
- for name, spec := range features {
- if existingSpec, found := known[name]; found {
- if existingSpec == spec {
- continue
- }
- return fmt.Errorf("feature gate %q with different spec already exists: %v", name, existingSpec)
- }
-
- known[name] = spec
- }
-
- // Persist updated state
- f.known.Store(known)
-
- return nil
-}
-
-// Enabled returns true if the key is enabled.
-func (f *featureGate) Enabled(key Feature) bool {
- if v, ok := f.enabled.Load().(map[Feature]bool)[key]; ok {
- return v
- }
- return f.known.Load().(map[Feature]FeatureSpec)[key].Default
-}
-
-// AddFlag adds a flag for setting global feature gates to the specified FlagSet.
-func (f *featureGate) AddFlag(fs *pflag.FlagSet) {
- f.lock.Lock()
- f.closed = true
- f.lock.Unlock()
-
- known := f.KnownFeatures()
- fs.Var(f, flagName, ""+
- "A set of key=value pairs that describe feature gates for alpha/experimental features. "+
- "Options are:\n"+strings.Join(known, "\n"))
-}
-
-// KnownFeatures returns a slice of strings describing the FeatureGate's known features.
-func (f *featureGate) KnownFeatures() []string {
- var known []string
- for k, v := range f.known.Load().(map[Feature]FeatureSpec) {
- pre := ""
- if v.PreRelease != GA {
- pre = fmt.Sprintf("%s - ", v.PreRelease)
- }
- known = append(known, fmt.Sprintf("%s=true|false (%sdefault=%t)", k, pre, v.Default))
- }
- sort.Strings(known)
- return known
-}
diff --git a/vendor/k8s.io/client-go/discovery/discovery_client.go b/vendor/k8s.io/client-go/discovery/discovery_client.go
deleted file mode 100644
index 24c11f33b..000000000
--- a/vendor/k8s.io/client-go/discovery/discovery_client.go
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
-Copyright 2015 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 discovery
-
-import (
- "encoding/json"
- "fmt"
- "net/url"
- "sort"
- "strings"
-
- "github.com/golang/protobuf/proto"
- "github.com/googleapis/gnostic/OpenAPIv2"
-
- "k8s.io/apimachinery/pkg/api/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/apimachinery/pkg/version"
- "k8s.io/client-go/kubernetes/scheme"
- restclient "k8s.io/client-go/rest"
-)
-
-// defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources).
-const defaultRetries = 2
-
-// DiscoveryInterface holds the methods that discover server-supported API groups,
-// versions and resources.
-type DiscoveryInterface interface {
- RESTClient() restclient.Interface
- ServerGroupsInterface
- ServerResourcesInterface
- ServerVersionInterface
- OpenAPISchemaInterface
-}
-
-// CachedDiscoveryInterface is a DiscoveryInterface with cache invalidation and freshness.
-type CachedDiscoveryInterface interface {
- DiscoveryInterface
- // Fresh is supposed to tell the caller whether or not to retry if the cache
- // fails to find something (false = retry, true = no need to retry).
- //
- // TODO: this needs to be revisited, this interface can't be locked properly
- // and doesn't make a lot of sense.
- Fresh() bool
- // Invalidate enforces that no cached data is used in the future that is older than the current time.
- Invalidate()
-}
-
-// ServerGroupsInterface has methods for obtaining supported groups on the API server
-type ServerGroupsInterface interface {
- // ServerGroups returns the supported groups, with information like supported versions and the
- // preferred version.
- ServerGroups() (*metav1.APIGroupList, error)
-}
-
-// ServerResourcesInterface has methods for obtaining supported resources on the API server
-type ServerResourcesInterface interface {
- // ServerResourcesForGroupVersion returns the supported resources for a group and version.
- ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
- // ServerResources returns the supported resources for all groups and versions.
- ServerResources() ([]*metav1.APIResourceList, error)
- // ServerPreferredResources returns the supported resources with the version preferred by the
- // server.
- ServerPreferredResources() ([]*metav1.APIResourceList, error)
- // ServerPreferredNamespacedResources returns the supported namespaced resources with the
- // version preferred by the server.
- ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error)
-}
-
-// ServerVersionInterface has a method for retrieving the server's version.
-type ServerVersionInterface interface {
- // ServerVersion retrieves and parses the server's version (git version).
- ServerVersion() (*version.Info, error)
-}
-
-// OpenAPISchemaInterface has a method to retrieve the open API schema.
-type OpenAPISchemaInterface interface {
- // OpenAPISchema retrieves and parses the swagger API schema the server supports.
- OpenAPISchema() (*openapi_v2.Document, error)
-}
-
-// DiscoveryClient implements the functions that discover server-supported API groups,
-// versions and resources.
-type DiscoveryClient struct {
- restClient restclient.Interface
-
- LegacyPrefix string
-}
-
-// Convert metav1.APIVersions to metav1.APIGroup. APIVersions is used by legacy v1, so
-// group would be "".
-func apiVersionsToAPIGroup(apiVersions *metav1.APIVersions) (apiGroup metav1.APIGroup) {
- groupVersions := []metav1.GroupVersionForDiscovery{}
- for _, version := range apiVersions.Versions {
- groupVersion := metav1.GroupVersionForDiscovery{
- GroupVersion: version,
- Version: version,
- }
- groupVersions = append(groupVersions, groupVersion)
- }
- apiGroup.Versions = groupVersions
- // There should be only one groupVersion returned at /api
- apiGroup.PreferredVersion = groupVersions[0]
- return
-}
-
-// ServerGroups returns the supported groups, with information like supported versions and the
-// preferred version.
-func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err error) {
- // Get the groupVersions exposed at /api
- v := &metav1.APIVersions{}
- err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do().Into(v)
- apiGroup := metav1.APIGroup{}
- if err == nil && len(v.Versions) != 0 {
- apiGroup = apiVersionsToAPIGroup(v)
- }
- if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) {
- return nil, err
- }
-
- // Get the groupVersions exposed at /apis
- apiGroupList = &metav1.APIGroupList{}
- err = d.restClient.Get().AbsPath("/apis").Do().Into(apiGroupList)
- if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) {
- return nil, err
- }
- // to be compatible with a v1.0 server, if it's a 403 or 404, ignore and return whatever we got from /api
- if err != nil && (errors.IsNotFound(err) || errors.IsForbidden(err)) {
- apiGroupList = &metav1.APIGroupList{}
- }
-
- // prepend the group retrieved from /api to the list if not empty
- if len(v.Versions) != 0 {
- apiGroupList.Groups = append([]metav1.APIGroup{apiGroup}, apiGroupList.Groups...)
- }
- return apiGroupList, nil
-}
-
-// ServerResourcesForGroupVersion returns the supported resources for a group and version.
-func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (resources *metav1.APIResourceList, err error) {
- url := url.URL{}
- if len(groupVersion) == 0 {
- return nil, fmt.Errorf("groupVersion shouldn't be empty")
- }
- if len(d.LegacyPrefix) > 0 && groupVersion == "v1" {
- url.Path = d.LegacyPrefix + "/" + groupVersion
- } else {
- url.Path = "/apis/" + groupVersion
- }
- resources = &metav1.APIResourceList{
- GroupVersion: groupVersion,
- }
- err = d.restClient.Get().AbsPath(url.String()).Do().Into(resources)
- if err != nil {
- // ignore 403 or 404 error to be compatible with an v1.0 server.
- if groupVersion == "v1" && (errors.IsNotFound(err) || errors.IsForbidden(err)) {
- return resources, nil
- }
- return nil, err
- }
- return resources, nil
-}
-
-// serverResources returns the supported resources for all groups and versions.
-func (d *DiscoveryClient) serverResources() ([]*metav1.APIResourceList, error) {
- apiGroups, err := d.ServerGroups()
- if err != nil {
- return nil, err
- }
-
- result := []*metav1.APIResourceList{}
- failedGroups := make(map[schema.GroupVersion]error)
-
- for _, apiGroup := range apiGroups.Groups {
- for _, version := range apiGroup.Versions {
- gv := schema.GroupVersion{Group: apiGroup.Name, Version: version.Version}
- resources, err := d.ServerResourcesForGroupVersion(version.GroupVersion)
- if err != nil {
- // TODO: maybe restrict this to NotFound errors
- failedGroups[gv] = err
- continue
- }
-
- result = append(result, resources)
- }
- }
-
- if len(failedGroups) == 0 {
- return result, nil
- }
-
- return result, &ErrGroupDiscoveryFailed{Groups: failedGroups}
-}
-
-// ServerResources returns the supported resources for all groups and versions.
-func (d *DiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) {
- return withRetries(defaultRetries, d.serverResources)
-}
-
-// ErrGroupDiscoveryFailed is returned if one or more API groups fail to load.
-type ErrGroupDiscoveryFailed struct {
- // Groups is a list of the groups that failed to load and the error cause
- Groups map[schema.GroupVersion]error
-}
-
-// Error implements the error interface
-func (e *ErrGroupDiscoveryFailed) Error() string {
- var groups []string
- for k, v := range e.Groups {
- groups = append(groups, fmt.Sprintf("%s: %v", k, v))
- }
- sort.Strings(groups)
- return fmt.Sprintf("unable to retrieve the complete list of server APIs: %s", strings.Join(groups, ", "))
-}
-
-// IsGroupDiscoveryFailedError returns true if the provided error indicates the server was unable to discover
-// a complete list of APIs for the client to use.
-func IsGroupDiscoveryFailedError(err error) bool {
- _, ok := err.(*ErrGroupDiscoveryFailed)
- return err != nil && ok
-}
-
-// serverPreferredResources returns the supported resources with the version preferred by the server.
-func (d *DiscoveryClient) serverPreferredResources() ([]*metav1.APIResourceList, error) {
- serverGroupList, err := d.ServerGroups()
- if err != nil {
- return nil, err
- }
-
- result := []*metav1.APIResourceList{}
- failedGroups := make(map[schema.GroupVersion]error)
-
- grVersions := map[schema.GroupResource]string{} // selected version of a GroupResource
- grApiResources := map[schema.GroupResource]*metav1.APIResource{} // selected APIResource for a GroupResource
- gvApiResourceLists := map[schema.GroupVersion]*metav1.APIResourceList{} // blueprint for a APIResourceList for later grouping
-
- for _, apiGroup := range serverGroupList.Groups {
- for _, version := range apiGroup.Versions {
- groupVersion := schema.GroupVersion{Group: apiGroup.Name, Version: version.Version}
- apiResourceList, err := d.ServerResourcesForGroupVersion(version.GroupVersion)
- if err != nil {
- // TODO: maybe restrict this to NotFound errors
- failedGroups[groupVersion] = err
- continue
- }
-
- // create empty list which is filled later in another loop
- emptyApiResourceList := metav1.APIResourceList{
- GroupVersion: version.GroupVersion,
- }
- gvApiResourceLists[groupVersion] = &emptyApiResourceList
- result = append(result, &emptyApiResourceList)
-
- for i := range apiResourceList.APIResources {
- apiResource := &apiResourceList.APIResources[i]
- if strings.Contains(apiResource.Name, "/") {
- continue
- }
- gv := schema.GroupResource{Group: apiGroup.Name, Resource: apiResource.Name}
- if _, ok := grApiResources[gv]; ok && version.Version != apiGroup.PreferredVersion.Version {
- // only override with preferred version
- continue
- }
- grVersions[gv] = version.Version
- grApiResources[gv] = apiResource
- }
- }
- }
-
- // group selected APIResources according to GroupVersion into APIResourceLists
- for groupResource, apiResource := range grApiResources {
- version := grVersions[groupResource]
- groupVersion := schema.GroupVersion{Group: groupResource.Group, Version: version}
- apiResourceList := gvApiResourceLists[groupVersion]
- apiResourceList.APIResources = append(apiResourceList.APIResources, *apiResource)
- }
-
- if len(failedGroups) == 0 {
- return result, nil
- }
-
- return result, &ErrGroupDiscoveryFailed{Groups: failedGroups}
-}
-
-// ServerPreferredResources returns the supported resources with the version preferred by the
-// server.
-func (d *DiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) {
- return withRetries(defaultRetries, d.serverPreferredResources)
-}
-
-// ServerPreferredNamespacedResources returns the supported namespaced resources with the
-// version preferred by the server.
-func (d *DiscoveryClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) {
- all, err := d.ServerPreferredResources()
- return FilteredBy(ResourcePredicateFunc(func(groupVersion string, r *metav1.APIResource) bool {
- return r.Namespaced
- }), all), err
-}
-
-// ServerVersion retrieves and parses the server's version (git version).
-func (d *DiscoveryClient) ServerVersion() (*version.Info, error) {
- body, err := d.restClient.Get().AbsPath("/version").Do().Raw()
- if err != nil {
- return nil, err
- }
- var info version.Info
- err = json.Unmarshal(body, &info)
- if err != nil {
- return nil, fmt.Errorf("got '%s': %v", string(body), err)
- }
- return &info, nil
-}
-
-// OpenAPISchema fetches the open api schema using a rest client and parses the proto.
-func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) {
- data, err := d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do().Raw()
- if err != nil {
- return nil, err
- }
- document := &openapi_v2.Document{}
- err = proto.Unmarshal(data, document)
- if err != nil {
- return nil, err
- }
- return document, nil
-}
-
-// withRetries retries the given recovery function in case the groups supported by the server change after ServerGroup() returns.
-func withRetries(maxRetries int, f func() ([]*metav1.APIResourceList, error)) ([]*metav1.APIResourceList, error) {
- var result []*metav1.APIResourceList
- var err error
- for i := 0; i < maxRetries; i++ {
- result, err = f()
- if err == nil {
- return result, nil
- }
- if _, ok := err.(*ErrGroupDiscoveryFailed); !ok {
- return nil, err
- }
- }
- return result, err
-}
-
-func setDiscoveryDefaults(config *restclient.Config) error {
- config.APIPath = ""
- config.GroupVersion = nil
- codec := runtime.NoopEncoder{Decoder: scheme.Codecs.UniversalDecoder()}
- config.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec})
- if len(config.UserAgent) == 0 {
- config.UserAgent = restclient.DefaultKubernetesUserAgent()
- }
- return nil
-}
-
-// NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. This client
-// can be used to discover supported resources in the API server.
-func NewDiscoveryClientForConfig(c *restclient.Config) (*DiscoveryClient, error) {
- config := *c
- if err := setDiscoveryDefaults(&config); err != nil {
- return nil, err
- }
- client, err := restclient.UnversionedRESTClientFor(&config)
- return &DiscoveryClient{restClient: client, LegacyPrefix: "/api"}, err
-}
-
-// NewDiscoveryClientForConfigOrDie creates a new DiscoveryClient for the given config. If
-// there is an error, it panics.
-func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient {
- client, err := NewDiscoveryClientForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-
-}
-
-// NewDiscoveryClient returns a new DiscoveryClient for the given RESTClient.
-func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient {
- return &DiscoveryClient{restClient: c, LegacyPrefix: "/api"}
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *DiscoveryClient) RESTClient() restclient.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/discovery/helper.go b/vendor/k8s.io/client-go/discovery/helper.go
deleted file mode 100644
index 353d34b3c..000000000
--- a/vendor/k8s.io/client-go/discovery/helper.go
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-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 discovery
-
-import (
- "fmt"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/util/sets"
- apimachineryversion "k8s.io/apimachinery/pkg/version"
-)
-
-// MatchesServerVersion queries the server to compares the build version
-// (git hash) of the client with the server's build version. It returns an error
-// if it failed to contact the server or if the versions are not an exact match.
-func MatchesServerVersion(clientVersion apimachineryversion.Info, client DiscoveryInterface) error {
- sVer, err := client.ServerVersion()
- if err != nil {
- return fmt.Errorf("couldn't read version from server: %v\n", err)
- }
- // GitVersion includes GitCommit and GitTreeState, but best to be safe?
- if clientVersion.GitVersion != sVer.GitVersion || clientVersion.GitCommit != sVer.GitCommit || clientVersion.GitTreeState != sVer.GitTreeState {
- return fmt.Errorf("server version (%#v) differs from client version (%#v)!\n", sVer, clientVersion)
- }
-
- return nil
-}
-
-// ServerSupportsVersion returns an error if the server doesn't have the required version
-func ServerSupportsVersion(client DiscoveryInterface, requiredGV schema.GroupVersion) error {
- groups, err := client.ServerGroups()
- if err != nil {
- // This is almost always a connection error, and higher level code should treat this as a generic error,
- // not a negotiation specific error.
- return err
- }
- versions := metav1.ExtractGroupVersions(groups)
- serverVersions := sets.String{}
- for _, v := range versions {
- serverVersions.Insert(v)
- }
-
- if serverVersions.Has(requiredGV.String()) {
- return nil
- }
-
- // If the server supports no versions, then we should pretend it has the version because of old servers.
- // This can happen because discovery fails due to 403 Forbidden errors
- if len(serverVersions) == 0 {
- return nil
- }
-
- return fmt.Errorf("server does not support API version %q", requiredGV)
-}
-
-// GroupVersionResources converts APIResourceLists to the GroupVersionResources.
-func GroupVersionResources(rls []*metav1.APIResourceList) (map[schema.GroupVersionResource]struct{}, error) {
- gvrs := map[schema.GroupVersionResource]struct{}{}
- for _, rl := range rls {
- gv, err := schema.ParseGroupVersion(rl.GroupVersion)
- if err != nil {
- return nil, err
- }
- for i := range rl.APIResources {
- gvrs[schema.GroupVersionResource{Group: gv.Group, Version: gv.Version, Resource: rl.APIResources[i].Name}] = struct{}{}
- }
- }
- return gvrs, nil
-}
-
-// FilteredBy filters by the given predicate. Empty APIResourceLists are dropped.
-func FilteredBy(pred ResourcePredicate, rls []*metav1.APIResourceList) []*metav1.APIResourceList {
- result := []*metav1.APIResourceList{}
- for _, rl := range rls {
- filtered := *rl
- filtered.APIResources = nil
- for i := range rl.APIResources {
- if pred.Match(rl.GroupVersion, &rl.APIResources[i]) {
- filtered.APIResources = append(filtered.APIResources, rl.APIResources[i])
- }
- }
- if filtered.APIResources != nil {
- result = append(result, &filtered)
- }
- }
- return result
-}
-
-type ResourcePredicate interface {
- Match(groupVersion string, r *metav1.APIResource) bool
-}
-
-type ResourcePredicateFunc func(groupVersion string, r *metav1.APIResource) bool
-
-func (fn ResourcePredicateFunc) Match(groupVersion string, r *metav1.APIResource) bool {
- return fn(groupVersion, r)
-}
-
-// SupportsAllVerbs is a predicate matching a resource iff all given verbs are supported.
-type SupportsAllVerbs struct {
- Verbs []string
-}
-
-func (p SupportsAllVerbs) Match(groupVersion string, r *metav1.APIResource) bool {
- return sets.NewString([]string(r.Verbs)...).HasAll(p.Verbs...)
-}
diff --git a/vendor/k8s.io/client-go/discovery/restmapper.go b/vendor/k8s.io/client-go/discovery/restmapper.go
deleted file mode 100644
index 6d1de8c1b..000000000
--- a/vendor/k8s.io/client-go/discovery/restmapper.go
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
-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 discovery
-
-import (
- "fmt"
- "sync"
-
- "k8s.io/apimachinery/pkg/api/meta"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime/schema"
-
- "github.com/golang/glog"
-)
-
-// APIGroupResources is an API group with a mapping of versions to
-// resources.
-type APIGroupResources struct {
- Group metav1.APIGroup
- // A mapping of version string to a slice of APIResources for
- // that version.
- VersionedResources map[string][]metav1.APIResource
-}
-
-// NewRESTMapper returns a PriorityRESTMapper based on the discovered
-// groups and resources passed in.
-func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.VersionInterfacesFunc) meta.RESTMapper {
- unionMapper := meta.MultiRESTMapper{}
-
- var groupPriority []string
- // /v1 is special. It should always come first
- resourcePriority := []schema.GroupVersionResource{{Group: "", Version: "v1", Resource: meta.AnyResource}}
- kindPriority := []schema.GroupVersionKind{{Group: "", Version: "v1", Kind: meta.AnyKind}}
-
- for _, group := range groupResources {
- groupPriority = append(groupPriority, group.Group.Name)
-
- // Make sure the preferred version comes first
- if len(group.Group.PreferredVersion.Version) != 0 {
- preferred := group.Group.PreferredVersion.Version
- if _, ok := group.VersionedResources[preferred]; ok {
- resourcePriority = append(resourcePriority, schema.GroupVersionResource{
- Group: group.Group.Name,
- Version: group.Group.PreferredVersion.Version,
- Resource: meta.AnyResource,
- })
-
- kindPriority = append(kindPriority, schema.GroupVersionKind{
- Group: group.Group.Name,
- Version: group.Group.PreferredVersion.Version,
- Kind: meta.AnyKind,
- })
- }
- }
-
- for _, discoveryVersion := range group.Group.Versions {
- resources, ok := group.VersionedResources[discoveryVersion.Version]
- if !ok {
- continue
- }
-
- // Add non-preferred versions after the preferred version, in case there are resources that only exist in those versions
- if discoveryVersion.Version != group.Group.PreferredVersion.Version {
- resourcePriority = append(resourcePriority, schema.GroupVersionResource{
- Group: group.Group.Name,
- Version: discoveryVersion.Version,
- Resource: meta.AnyResource,
- })
-
- kindPriority = append(kindPriority, schema.GroupVersionKind{
- Group: group.Group.Name,
- Version: discoveryVersion.Version,
- Kind: meta.AnyKind,
- })
- }
-
- gv := schema.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version}
- versionMapper := meta.NewDefaultRESTMapper([]schema.GroupVersion{gv}, versionInterfaces)
-
- for _, resource := range resources {
- scope := meta.RESTScopeNamespace
- if !resource.Namespaced {
- scope = meta.RESTScopeRoot
- }
-
- // this is for legacy resources and servers which don't list singular forms. For those we must still guess.
- if len(resource.SingularName) == 0 {
- versionMapper.Add(gv.WithKind(resource.Kind), scope)
- // TODO this is producing unsafe guesses that don't actually work, but it matches previous behavior
- versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope)
- continue
- }
-
- plural := gv.WithResource(resource.Name)
- singular := gv.WithResource(resource.SingularName)
- versionMapper.AddSpecific(gv.WithKind(resource.Kind), plural, singular, scope)
- // TODO this is producing unsafe guesses that don't actually work, but it matches previous behavior
- versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope)
- }
- // TODO why is this type not in discovery (at least for "v1")
- versionMapper.Add(gv.WithKind("List"), meta.RESTScopeRoot)
- unionMapper = append(unionMapper, versionMapper)
- }
- }
-
- for _, group := range groupPriority {
- resourcePriority = append(resourcePriority, schema.GroupVersionResource{
- Group: group,
- Version: meta.AnyVersion,
- Resource: meta.AnyResource,
- })
- kindPriority = append(kindPriority, schema.GroupVersionKind{
- Group: group,
- Version: meta.AnyVersion,
- Kind: meta.AnyKind,
- })
- }
-
- return meta.PriorityRESTMapper{
- Delegate: unionMapper,
- ResourcePriority: resourcePriority,
- KindPriority: kindPriority,
- }
-}
-
-// GetAPIGroupResources uses the provided discovery client to gather
-// discovery information and populate a slice of APIGroupResources.
-func GetAPIGroupResources(cl DiscoveryInterface) ([]*APIGroupResources, error) {
- apiGroups, err := cl.ServerGroups()
- if err != nil {
- return nil, err
- }
- var result []*APIGroupResources
- for _, group := range apiGroups.Groups {
- groupResources := &APIGroupResources{
- Group: group,
- VersionedResources: make(map[string][]metav1.APIResource),
- }
- for _, version := range group.Versions {
- resources, err := cl.ServerResourcesForGroupVersion(version.GroupVersion)
- if err != nil {
- // continue as best we can
- // TODO track the errors and update callers to handle partial errors.
- continue
- }
- groupResources.VersionedResources[version.Version] = resources.APIResources
- }
- result = append(result, groupResources)
- }
- return result, nil
-}
-
-// DeferredDiscoveryRESTMapper is a RESTMapper that will defer
-// initialization of the RESTMapper until the first mapping is
-// requested.
-type DeferredDiscoveryRESTMapper struct {
- initMu sync.Mutex
- delegate meta.RESTMapper
- cl CachedDiscoveryInterface
- versionInterface meta.VersionInterfacesFunc
-}
-
-// NewDeferredDiscoveryRESTMapper returns a
-// DeferredDiscoveryRESTMapper that will lazily query the provided
-// client for discovery information to do REST mappings.
-func NewDeferredDiscoveryRESTMapper(cl CachedDiscoveryInterface, versionInterface meta.VersionInterfacesFunc) *DeferredDiscoveryRESTMapper {
- return &DeferredDiscoveryRESTMapper{
- cl: cl,
- versionInterface: versionInterface,
- }
-}
-
-func (d *DeferredDiscoveryRESTMapper) getDelegate() (meta.RESTMapper, error) {
- d.initMu.Lock()
- defer d.initMu.Unlock()
-
- if d.delegate != nil {
- return d.delegate, nil
- }
-
- groupResources, err := GetAPIGroupResources(d.cl)
- if err != nil {
- return nil, err
- }
-
- d.delegate = NewRESTMapper(groupResources, d.versionInterface)
- return d.delegate, err
-}
-
-// Reset resets the internally cached Discovery information and will
-// cause the next mapping request to re-discover.
-func (d *DeferredDiscoveryRESTMapper) Reset() {
- glog.V(5).Info("Invalidating discovery information")
-
- d.initMu.Lock()
- defer d.initMu.Unlock()
-
- d.cl.Invalidate()
- d.delegate = nil
-}
-
-// KindFor takes a partial resource and returns back the single match.
-// It returns an error if there are multiple matches.
-func (d *DeferredDiscoveryRESTMapper) KindFor(resource schema.GroupVersionResource) (gvk schema.GroupVersionKind, err error) {
- del, err := d.getDelegate()
- if err != nil {
- return schema.GroupVersionKind{}, err
- }
- gvk, err = del.KindFor(resource)
- if err != nil && !d.cl.Fresh() {
- d.Reset()
- gvk, err = d.KindFor(resource)
- }
- return
-}
-
-// KindsFor takes a partial resource and returns back the list of
-// potential kinds in priority order.
-func (d *DeferredDiscoveryRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvks []schema.GroupVersionKind, err error) {
- del, err := d.getDelegate()
- if err != nil {
- return nil, err
- }
- gvks, err = del.KindsFor(resource)
- if len(gvks) == 0 && !d.cl.Fresh() {
- d.Reset()
- gvks, err = d.KindsFor(resource)
- }
- return
-}
-
-// ResourceFor takes a partial resource and returns back the single
-// match. It returns an error if there are multiple matches.
-func (d *DeferredDiscoveryRESTMapper) ResourceFor(input schema.GroupVersionResource) (gvr schema.GroupVersionResource, err error) {
- del, err := d.getDelegate()
- if err != nil {
- return schema.GroupVersionResource{}, err
- }
- gvr, err = del.ResourceFor(input)
- if err != nil && !d.cl.Fresh() {
- d.Reset()
- gvr, err = d.ResourceFor(input)
- }
- return
-}
-
-// ResourcesFor takes a partial resource and returns back the list of
-// potential resource in priority order.
-func (d *DeferredDiscoveryRESTMapper) ResourcesFor(input schema.GroupVersionResource) (gvrs []schema.GroupVersionResource, err error) {
- del, err := d.getDelegate()
- if err != nil {
- return nil, err
- }
- gvrs, err = del.ResourcesFor(input)
- if len(gvrs) == 0 && !d.cl.Fresh() {
- d.Reset()
- gvrs, err = d.ResourcesFor(input)
- }
- return
-}
-
-// RESTMapping identifies a preferred resource mapping for the
-// provided group kind.
-func (d *DeferredDiscoveryRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (m *meta.RESTMapping, err error) {
- del, err := d.getDelegate()
- if err != nil {
- return nil, err
- }
- m, err = del.RESTMapping(gk, versions...)
- if err != nil && !d.cl.Fresh() {
- d.Reset()
- m, err = d.RESTMapping(gk, versions...)
- }
- return
-}
-
-// RESTMappings returns the RESTMappings for the provided group kind
-// in a rough internal preferred order. If no kind is found, it will
-// return a NoResourceMatchError.
-func (d *DeferredDiscoveryRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) (ms []*meta.RESTMapping, err error) {
- del, err := d.getDelegate()
- if err != nil {
- return nil, err
- }
- ms, err = del.RESTMappings(gk, versions...)
- if len(ms) == 0 && !d.cl.Fresh() {
- d.Reset()
- ms, err = d.RESTMappings(gk, versions...)
- }
- return
-}
-
-// ResourceSingularizer converts a resource name from plural to
-// singular (e.g., from pods to pod).
-func (d *DeferredDiscoveryRESTMapper) ResourceSingularizer(resource string) (singular string, err error) {
- del, err := d.getDelegate()
- if err != nil {
- return resource, err
- }
- singular, err = del.ResourceSingularizer(resource)
- if err != nil && !d.cl.Fresh() {
- d.Reset()
- singular, err = d.ResourceSingularizer(resource)
- }
- return
-}
-
-func (d *DeferredDiscoveryRESTMapper) String() string {
- del, err := d.getDelegate()
- if err != nil {
- return fmt.Sprintf("DeferredDiscoveryRESTMapper{%v}", err)
- }
- return fmt.Sprintf("DeferredDiscoveryRESTMapper{\n\t%v\n}", del)
-}
-
-// Make sure it satisfies the interface
-var _ meta.RESTMapper = &DeferredDiscoveryRESTMapper{}
diff --git a/vendor/k8s.io/client-go/discovery/unstructured.go b/vendor/k8s.io/client-go/discovery/unstructured.go
deleted file mode 100644
index fa7f2ec06..000000000
--- a/vendor/k8s.io/client-go/discovery/unstructured.go
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-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 discovery
-
-import (
- "reflect"
-
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// UnstructuredObjectTyper provides a runtime.ObjectTyper implementation for
-// runtime.Unstructured object based on discovery information.
-type UnstructuredObjectTyper struct {
- registered map[schema.GroupVersionKind]bool
- typers []runtime.ObjectTyper
-}
-
-// NewUnstructuredObjectTyper returns a runtime.ObjectTyper for
-// unstructured objects based on discovery information. It accepts a list of fallback typers
-// for handling objects that are not runtime.Unstructured. It does not delegate the Recognizes
-// check, only ObjectKinds.
-func NewUnstructuredObjectTyper(groupResources []*APIGroupResources, typers ...runtime.ObjectTyper) *UnstructuredObjectTyper {
- dot := &UnstructuredObjectTyper{
- registered: make(map[schema.GroupVersionKind]bool),
- typers: typers,
- }
- for _, group := range groupResources {
- for _, discoveryVersion := range group.Group.Versions {
- resources, ok := group.VersionedResources[discoveryVersion.Version]
- if !ok {
- continue
- }
-
- gv := schema.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version}
- for _, resource := range resources {
- dot.registered[gv.WithKind(resource.Kind)] = true
- }
- }
- }
- return dot
-}
-
-// ObjectKinds returns a slice of one element with the group,version,kind of the
-// provided object, or an error if the object is not runtime.Unstructured or
-// has no group,version,kind information. unversionedType will always be false
-// because runtime.Unstructured object should always have group,version,kind
-// information set.
-func (d *UnstructuredObjectTyper) ObjectKinds(obj runtime.Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error) {
- if _, ok := obj.(runtime.Unstructured); ok {
- gvk := obj.GetObjectKind().GroupVersionKind()
- if len(gvk.Kind) == 0 {
- return nil, false, runtime.NewMissingKindErr("object has no kind field ")
- }
- if len(gvk.Version) == 0 {
- return nil, false, runtime.NewMissingVersionErr("object has no apiVersion field")
- }
- return []schema.GroupVersionKind{gvk}, false, nil
- }
- var lastErr error
- for _, typer := range d.typers {
- gvks, unversioned, err := typer.ObjectKinds(obj)
- if err != nil {
- lastErr = err
- continue
- }
- return gvks, unversioned, nil
- }
- if lastErr == nil {
- lastErr = runtime.NewNotRegisteredErrForType(reflect.TypeOf(obj))
- }
- return nil, false, lastErr
-}
-
-// Recognizes returns true if the provided group,version,kind was in the
-// discovery information.
-func (d *UnstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool {
- return d.registered[gvk]
-}
-
-var _ runtime.ObjectTyper = &UnstructuredObjectTyper{}
diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/interface.go b/vendor/k8s.io/client-go/informers/admissionregistration/interface.go
deleted file mode 100644
index 2f6d69538..000000000
--- a/vendor/k8s.io/client-go/informers/admissionregistration/interface.go
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package admissionregistration
-
-import (
- v1alpha1 "k8s.io/client-go/informers/admissionregistration/v1alpha1"
- v1beta1 "k8s.io/client-go/informers/admissionregistration/v1beta1"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1alpha1 provides access to shared informers for resources in V1alpha1.
- V1alpha1() v1alpha1.Interface
- // V1beta1 provides access to shared informers for resources in V1beta1.
- V1beta1() v1beta1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1alpha1 returns a new v1alpha1.Interface.
-func (g *group) V1alpha1() v1alpha1.Interface {
- return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
-}
-
-// V1beta1 returns a new v1beta1.Interface.
-func (g *group) V1beta1() v1beta1.Interface {
- return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go
deleted file mode 100644
index 96b410d76..000000000
--- a/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- time "time"
-
- admissionregistration_v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// InitializerConfigurationInformer provides access to a shared informer and lister for
-// InitializerConfigurations.
-type InitializerConfigurationInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1alpha1.InitializerConfigurationLister
-}
-
-type initializerConfigurationInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewInitializerConfigurationInformer constructs a new informer for InitializerConfiguration type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewInitializerConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredInitializerConfigurationInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredInitializerConfigurationInformer constructs a new informer for InitializerConfiguration type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredInitializerConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AdmissionregistrationV1alpha1().InitializerConfigurations().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AdmissionregistrationV1alpha1().InitializerConfigurations().Watch(options)
- },
- },
- &admissionregistration_v1alpha1.InitializerConfiguration{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *initializerConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredInitializerConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *initializerConfigurationInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&admissionregistration_v1alpha1.InitializerConfiguration{}, f.defaultInformer)
-}
-
-func (f *initializerConfigurationInformer) Lister() v1alpha1.InitializerConfigurationLister {
- return v1alpha1.NewInitializerConfigurationLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go
deleted file mode 100644
index d932ff5e1..000000000
--- a/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // InitializerConfigurations returns a InitializerConfigurationInformer.
- InitializerConfigurations() InitializerConfigurationInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// InitializerConfigurations returns a InitializerConfigurationInformer.
-func (v *version) InitializerConfigurations() InitializerConfigurationInformer {
- return &initializerConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/interface.go
deleted file mode 100644
index 3b4f3b992..000000000
--- a/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/interface.go
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer.
- MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer
- // ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer.
- ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer.
-func (v *version) MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer {
- return &mutatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer.
-func (v *version) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer {
- return &validatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go
deleted file mode 100644
index d22e03759..000000000
--- a/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// MutatingWebhookConfigurationInformer provides access to a shared informer and lister for
-// MutatingWebhookConfigurations.
-type MutatingWebhookConfigurationInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.MutatingWebhookConfigurationLister
-}
-
-type mutatingWebhookConfigurationInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(options)
- },
- },
- &admissionregistration_v1beta1.MutatingWebhookConfiguration{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *mutatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *mutatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&admissionregistration_v1beta1.MutatingWebhookConfiguration{}, f.defaultInformer)
-}
-
-func (f *mutatingWebhookConfigurationInformer) Lister() v1beta1.MutatingWebhookConfigurationLister {
- return v1beta1.NewMutatingWebhookConfigurationLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go
deleted file mode 100644
index 0520d74c3..000000000
--- a/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ValidatingWebhookConfigurationInformer provides access to a shared informer and lister for
-// ValidatingWebhookConfigurations.
-type ValidatingWebhookConfigurationInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.ValidatingWebhookConfigurationLister
-}
-
-type validatingWebhookConfigurationInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(options)
- },
- },
- &admissionregistration_v1beta1.ValidatingWebhookConfiguration{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *validatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *validatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&admissionregistration_v1beta1.ValidatingWebhookConfiguration{}, f.defaultInformer)
-}
-
-func (f *validatingWebhookConfigurationInformer) Lister() v1beta1.ValidatingWebhookConfigurationLister {
- return v1beta1.NewValidatingWebhookConfigurationLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/interface.go b/vendor/k8s.io/client-go/informers/apps/interface.go
deleted file mode 100644
index cd9541928..000000000
--- a/vendor/k8s.io/client-go/informers/apps/interface.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package apps
-
-import (
- v1 "k8s.io/client-go/informers/apps/v1"
- v1beta1 "k8s.io/client-go/informers/apps/v1beta1"
- v1beta2 "k8s.io/client-go/informers/apps/v1beta2"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1 provides access to shared informers for resources in V1.
- V1() v1.Interface
- // V1beta1 provides access to shared informers for resources in V1beta1.
- V1beta1() v1beta1.Interface
- // V1beta2 provides access to shared informers for resources in V1beta2.
- V1beta2() v1beta2.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1 returns a new v1.Interface.
-func (g *group) V1() v1.Interface {
- return v1.New(g.factory, g.namespace, g.tweakListOptions)
-}
-
-// V1beta1 returns a new v1beta1.Interface.
-func (g *group) V1beta1() v1beta1.Interface {
- return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
-}
-
-// V1beta2 returns a new v1beta2.Interface.
-func (g *group) V1beta2() v1beta2.Interface {
- return v1beta2.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1/controllerrevision.go b/vendor/k8s.io/client-go/informers/apps/v1/controllerrevision.go
deleted file mode 100644
index 234aa90e1..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1/controllerrevision.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- apps_v1 "k8s.io/api/apps/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/apps/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ControllerRevisionInformer provides access to a shared informer and lister for
-// ControllerRevisions.
-type ControllerRevisionInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.ControllerRevisionLister
-}
-
-type controllerRevisionInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewControllerRevisionInformer constructs a new informer for ControllerRevision type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredControllerRevisionInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredControllerRevisionInformer constructs a new informer for ControllerRevision type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1().ControllerRevisions(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1().ControllerRevisions(namespace).Watch(options)
- },
- },
- &apps_v1.ControllerRevision{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *controllerRevisionInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredControllerRevisionInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *controllerRevisionInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1.ControllerRevision{}, f.defaultInformer)
-}
-
-func (f *controllerRevisionInformer) Lister() v1.ControllerRevisionLister {
- return v1.NewControllerRevisionLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1/daemonset.go b/vendor/k8s.io/client-go/informers/apps/v1/daemonset.go
deleted file mode 100644
index 066b44a30..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1/daemonset.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- apps_v1 "k8s.io/api/apps/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/apps/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// DaemonSetInformer provides access to a shared informer and lister for
-// DaemonSets.
-type DaemonSetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.DaemonSetLister
-}
-
-type daemonSetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewDaemonSetInformer constructs a new informer for DaemonSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredDaemonSetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredDaemonSetInformer constructs a new informer for DaemonSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1().DaemonSets(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1().DaemonSets(namespace).Watch(options)
- },
- },
- &apps_v1.DaemonSet{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *daemonSetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredDaemonSetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *daemonSetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1.DaemonSet{}, f.defaultInformer)
-}
-
-func (f *daemonSetInformer) Lister() v1.DaemonSetLister {
- return v1.NewDaemonSetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1/deployment.go b/vendor/k8s.io/client-go/informers/apps/v1/deployment.go
deleted file mode 100644
index 209cbf402..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1/deployment.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- apps_v1 "k8s.io/api/apps/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/apps/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// DeploymentInformer provides access to a shared informer and lister for
-// Deployments.
-type DeploymentInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.DeploymentLister
-}
-
-type deploymentInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewDeploymentInformer constructs a new informer for Deployment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredDeploymentInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredDeploymentInformer constructs a new informer for Deployment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1().Deployments(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1().Deployments(namespace).Watch(options)
- },
- },
- &apps_v1.Deployment{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *deploymentInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredDeploymentInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *deploymentInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1.Deployment{}, f.defaultInformer)
-}
-
-func (f *deploymentInformer) Lister() v1.DeploymentLister {
- return v1.NewDeploymentLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1/interface.go b/vendor/k8s.io/client-go/informers/apps/v1/interface.go
deleted file mode 100644
index 8af8a25db..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1/interface.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // ControllerRevisions returns a ControllerRevisionInformer.
- ControllerRevisions() ControllerRevisionInformer
- // DaemonSets returns a DaemonSetInformer.
- DaemonSets() DaemonSetInformer
- // Deployments returns a DeploymentInformer.
- Deployments() DeploymentInformer
- // ReplicaSets returns a ReplicaSetInformer.
- ReplicaSets() ReplicaSetInformer
- // StatefulSets returns a StatefulSetInformer.
- StatefulSets() StatefulSetInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// ControllerRevisions returns a ControllerRevisionInformer.
-func (v *version) ControllerRevisions() ControllerRevisionInformer {
- return &controllerRevisionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// DaemonSets returns a DaemonSetInformer.
-func (v *version) DaemonSets() DaemonSetInformer {
- return &daemonSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Deployments returns a DeploymentInformer.
-func (v *version) Deployments() DeploymentInformer {
- return &deploymentInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// ReplicaSets returns a ReplicaSetInformer.
-func (v *version) ReplicaSets() ReplicaSetInformer {
- return &replicaSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// StatefulSets returns a StatefulSetInformer.
-func (v *version) StatefulSets() StatefulSetInformer {
- return &statefulSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1/replicaset.go b/vendor/k8s.io/client-go/informers/apps/v1/replicaset.go
deleted file mode 100644
index c7c9d8940..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1/replicaset.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- apps_v1 "k8s.io/api/apps/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/apps/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ReplicaSetInformer provides access to a shared informer and lister for
-// ReplicaSets.
-type ReplicaSetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.ReplicaSetLister
-}
-
-type replicaSetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewReplicaSetInformer constructs a new informer for ReplicaSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewReplicaSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredReplicaSetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredReplicaSetInformer constructs a new informer for ReplicaSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1().ReplicaSets(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1().ReplicaSets(namespace).Watch(options)
- },
- },
- &apps_v1.ReplicaSet{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *replicaSetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredReplicaSetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *replicaSetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1.ReplicaSet{}, f.defaultInformer)
-}
-
-func (f *replicaSetInformer) Lister() v1.ReplicaSetLister {
- return v1.NewReplicaSetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1/statefulset.go b/vendor/k8s.io/client-go/informers/apps/v1/statefulset.go
deleted file mode 100644
index f421da82b..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1/statefulset.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- apps_v1 "k8s.io/api/apps/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/apps/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// StatefulSetInformer provides access to a shared informer and lister for
-// StatefulSets.
-type StatefulSetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.StatefulSetLister
-}
-
-type statefulSetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewStatefulSetInformer constructs a new informer for StatefulSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredStatefulSetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredStatefulSetInformer constructs a new informer for StatefulSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1().StatefulSets(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1().StatefulSets(namespace).Watch(options)
- },
- },
- &apps_v1.StatefulSet{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *statefulSetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredStatefulSetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *statefulSetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1.StatefulSet{}, f.defaultInformer)
-}
-
-func (f *statefulSetInformer) Lister() v1.StatefulSetLister {
- return v1.NewStatefulSetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go b/vendor/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go
deleted file mode 100644
index 04ef7201f..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- apps_v1beta1 "k8s.io/api/apps/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ControllerRevisionInformer provides access to a shared informer and lister for
-// ControllerRevisions.
-type ControllerRevisionInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.ControllerRevisionLister
-}
-
-type controllerRevisionInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewControllerRevisionInformer constructs a new informer for ControllerRevision type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredControllerRevisionInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredControllerRevisionInformer constructs a new informer for ControllerRevision type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta1().ControllerRevisions(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta1().ControllerRevisions(namespace).Watch(options)
- },
- },
- &apps_v1beta1.ControllerRevision{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *controllerRevisionInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredControllerRevisionInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *controllerRevisionInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1beta1.ControllerRevision{}, f.defaultInformer)
-}
-
-func (f *controllerRevisionInformer) Lister() v1beta1.ControllerRevisionLister {
- return v1beta1.NewControllerRevisionLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta1/deployment.go b/vendor/k8s.io/client-go/informers/apps/v1beta1/deployment.go
deleted file mode 100644
index b5735542e..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1beta1/deployment.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- apps_v1beta1 "k8s.io/api/apps/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// DeploymentInformer provides access to a shared informer and lister for
-// Deployments.
-type DeploymentInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.DeploymentLister
-}
-
-type deploymentInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewDeploymentInformer constructs a new informer for Deployment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredDeploymentInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredDeploymentInformer constructs a new informer for Deployment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta1().Deployments(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta1().Deployments(namespace).Watch(options)
- },
- },
- &apps_v1beta1.Deployment{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *deploymentInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredDeploymentInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *deploymentInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1beta1.Deployment{}, f.defaultInformer)
-}
-
-func (f *deploymentInformer) Lister() v1beta1.DeploymentLister {
- return v1beta1.NewDeploymentLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/apps/v1beta1/interface.go
deleted file mode 100644
index b6bc41024..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1beta1/interface.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // ControllerRevisions returns a ControllerRevisionInformer.
- ControllerRevisions() ControllerRevisionInformer
- // Deployments returns a DeploymentInformer.
- Deployments() DeploymentInformer
- // StatefulSets returns a StatefulSetInformer.
- StatefulSets() StatefulSetInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// ControllerRevisions returns a ControllerRevisionInformer.
-func (v *version) ControllerRevisions() ControllerRevisionInformer {
- return &controllerRevisionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Deployments returns a DeploymentInformer.
-func (v *version) Deployments() DeploymentInformer {
- return &deploymentInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// StatefulSets returns a StatefulSetInformer.
-func (v *version) StatefulSets() StatefulSetInformer {
- return &statefulSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta1/statefulset.go b/vendor/k8s.io/client-go/informers/apps/v1beta1/statefulset.go
deleted file mode 100644
index f19ddc8ac..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1beta1/statefulset.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- apps_v1beta1 "k8s.io/api/apps/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// StatefulSetInformer provides access to a shared informer and lister for
-// StatefulSets.
-type StatefulSetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.StatefulSetLister
-}
-
-type statefulSetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewStatefulSetInformer constructs a new informer for StatefulSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredStatefulSetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredStatefulSetInformer constructs a new informer for StatefulSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta1().StatefulSets(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta1().StatefulSets(namespace).Watch(options)
- },
- },
- &apps_v1beta1.StatefulSet{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *statefulSetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredStatefulSetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *statefulSetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1beta1.StatefulSet{}, f.defaultInformer)
-}
-
-func (f *statefulSetInformer) Lister() v1beta1.StatefulSetLister {
- return v1beta1.NewStatefulSetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go
deleted file mode 100644
index 15b70e4e4..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta2
-
-import (
- time "time"
-
- apps_v1beta2 "k8s.io/api/apps/v1beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ControllerRevisionInformer provides access to a shared informer and lister for
-// ControllerRevisions.
-type ControllerRevisionInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta2.ControllerRevisionLister
-}
-
-type controllerRevisionInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewControllerRevisionInformer constructs a new informer for ControllerRevision type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredControllerRevisionInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredControllerRevisionInformer constructs a new informer for ControllerRevision type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta2().ControllerRevisions(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta2().ControllerRevisions(namespace).Watch(options)
- },
- },
- &apps_v1beta2.ControllerRevision{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *controllerRevisionInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredControllerRevisionInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *controllerRevisionInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1beta2.ControllerRevision{}, f.defaultInformer)
-}
-
-func (f *controllerRevisionInformer) Lister() v1beta2.ControllerRevisionLister {
- return v1beta2.NewControllerRevisionLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/daemonset.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/daemonset.go
deleted file mode 100644
index 8b9d1584f..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1beta2/daemonset.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta2
-
-import (
- time "time"
-
- apps_v1beta2 "k8s.io/api/apps/v1beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// DaemonSetInformer provides access to a shared informer and lister for
-// DaemonSets.
-type DaemonSetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta2.DaemonSetLister
-}
-
-type daemonSetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewDaemonSetInformer constructs a new informer for DaemonSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredDaemonSetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredDaemonSetInformer constructs a new informer for DaemonSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta2().DaemonSets(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta2().DaemonSets(namespace).Watch(options)
- },
- },
- &apps_v1beta2.DaemonSet{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *daemonSetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredDaemonSetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *daemonSetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1beta2.DaemonSet{}, f.defaultInformer)
-}
-
-func (f *daemonSetInformer) Lister() v1beta2.DaemonSetLister {
- return v1beta2.NewDaemonSetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/deployment.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/deployment.go
deleted file mode 100644
index 3f0688c48..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1beta2/deployment.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta2
-
-import (
- time "time"
-
- apps_v1beta2 "k8s.io/api/apps/v1beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// DeploymentInformer provides access to a shared informer and lister for
-// Deployments.
-type DeploymentInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta2.DeploymentLister
-}
-
-type deploymentInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewDeploymentInformer constructs a new informer for Deployment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredDeploymentInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredDeploymentInformer constructs a new informer for Deployment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta2().Deployments(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta2().Deployments(namespace).Watch(options)
- },
- },
- &apps_v1beta2.Deployment{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *deploymentInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredDeploymentInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *deploymentInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1beta2.Deployment{}, f.defaultInformer)
-}
-
-func (f *deploymentInformer) Lister() v1beta2.DeploymentLister {
- return v1beta2.NewDeploymentLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/interface.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/interface.go
deleted file mode 100644
index 88c3b05bd..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1beta2/interface.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta2
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // ControllerRevisions returns a ControllerRevisionInformer.
- ControllerRevisions() ControllerRevisionInformer
- // DaemonSets returns a DaemonSetInformer.
- DaemonSets() DaemonSetInformer
- // Deployments returns a DeploymentInformer.
- Deployments() DeploymentInformer
- // ReplicaSets returns a ReplicaSetInformer.
- ReplicaSets() ReplicaSetInformer
- // StatefulSets returns a StatefulSetInformer.
- StatefulSets() StatefulSetInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// ControllerRevisions returns a ControllerRevisionInformer.
-func (v *version) ControllerRevisions() ControllerRevisionInformer {
- return &controllerRevisionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// DaemonSets returns a DaemonSetInformer.
-func (v *version) DaemonSets() DaemonSetInformer {
- return &daemonSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Deployments returns a DeploymentInformer.
-func (v *version) Deployments() DeploymentInformer {
- return &deploymentInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// ReplicaSets returns a ReplicaSetInformer.
-func (v *version) ReplicaSets() ReplicaSetInformer {
- return &replicaSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// StatefulSets returns a StatefulSetInformer.
-func (v *version) StatefulSets() StatefulSetInformer {
- return &statefulSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/replicaset.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/replicaset.go
deleted file mode 100644
index 5a82ecdb0..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1beta2/replicaset.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta2
-
-import (
- time "time"
-
- apps_v1beta2 "k8s.io/api/apps/v1beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ReplicaSetInformer provides access to a shared informer and lister for
-// ReplicaSets.
-type ReplicaSetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta2.ReplicaSetLister
-}
-
-type replicaSetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewReplicaSetInformer constructs a new informer for ReplicaSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewReplicaSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredReplicaSetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredReplicaSetInformer constructs a new informer for ReplicaSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta2().ReplicaSets(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta2().ReplicaSets(namespace).Watch(options)
- },
- },
- &apps_v1beta2.ReplicaSet{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *replicaSetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredReplicaSetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *replicaSetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1beta2.ReplicaSet{}, f.defaultInformer)
-}
-
-func (f *replicaSetInformer) Lister() v1beta2.ReplicaSetLister {
- return v1beta2.NewReplicaSetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/statefulset.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/statefulset.go
deleted file mode 100644
index 7cc1dd5bf..000000000
--- a/vendor/k8s.io/client-go/informers/apps/v1beta2/statefulset.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta2
-
-import (
- time "time"
-
- apps_v1beta2 "k8s.io/api/apps/v1beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// StatefulSetInformer provides access to a shared informer and lister for
-// StatefulSets.
-type StatefulSetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta2.StatefulSetLister
-}
-
-type statefulSetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewStatefulSetInformer constructs a new informer for StatefulSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredStatefulSetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredStatefulSetInformer constructs a new informer for StatefulSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta2().StatefulSets(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AppsV1beta2().StatefulSets(namespace).Watch(options)
- },
- },
- &apps_v1beta2.StatefulSet{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *statefulSetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredStatefulSetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *statefulSetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&apps_v1beta2.StatefulSet{}, f.defaultInformer)
-}
-
-func (f *statefulSetInformer) Lister() v1beta2.StatefulSetLister {
- return v1beta2.NewStatefulSetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/autoscaling/interface.go b/vendor/k8s.io/client-go/informers/autoscaling/interface.go
deleted file mode 100644
index 8d9caaf22..000000000
--- a/vendor/k8s.io/client-go/informers/autoscaling/interface.go
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package autoscaling
-
-import (
- v1 "k8s.io/client-go/informers/autoscaling/v1"
- v2beta1 "k8s.io/client-go/informers/autoscaling/v2beta1"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1 provides access to shared informers for resources in V1.
- V1() v1.Interface
- // V2beta1 provides access to shared informers for resources in V2beta1.
- V2beta1() v2beta1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1 returns a new v1.Interface.
-func (g *group) V1() v1.Interface {
- return v1.New(g.factory, g.namespace, g.tweakListOptions)
-}
-
-// V2beta1 returns a new v2beta1.Interface.
-func (g *group) V2beta1() v2beta1.Interface {
- return v2beta1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go
deleted file mode 100644
index 9d0a429e3..000000000
--- a/vendor/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- autoscaling_v1 "k8s.io/api/autoscaling/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/autoscaling/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for
-// HorizontalPodAutoscalers.
-type HorizontalPodAutoscalerInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.HorizontalPodAutoscalerLister
-}
-
-type horizontalPodAutoscalerInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewHorizontalPodAutoscalerInformer constructs a new informer for HorizontalPodAutoscaler type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredHorizontalPodAutoscalerInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredHorizontalPodAutoscalerInformer constructs a new informer for HorizontalPodAutoscaler type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).Watch(options)
- },
- },
- &autoscaling_v1.HorizontalPodAutoscaler{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *horizontalPodAutoscalerInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredHorizontalPodAutoscalerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&autoscaling_v1.HorizontalPodAutoscaler{}, f.defaultInformer)
-}
-
-func (f *horizontalPodAutoscalerInformer) Lister() v1.HorizontalPodAutoscalerLister {
- return v1.NewHorizontalPodAutoscalerLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/autoscaling/v1/interface.go b/vendor/k8s.io/client-go/informers/autoscaling/v1/interface.go
deleted file mode 100644
index e927a8ce3..000000000
--- a/vendor/k8s.io/client-go/informers/autoscaling/v1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
- HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
-func (v *version) HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer {
- return &horizontalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go
deleted file mode 100644
index 98bfbde62..000000000
--- a/vendor/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v2beta1
-
-import (
- time "time"
-
- autoscaling_v2beta1 "k8s.io/api/autoscaling/v2beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v2beta1 "k8s.io/client-go/listers/autoscaling/v2beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for
-// HorizontalPodAutoscalers.
-type HorizontalPodAutoscalerInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v2beta1.HorizontalPodAutoscalerLister
-}
-
-type horizontalPodAutoscalerInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewHorizontalPodAutoscalerInformer constructs a new informer for HorizontalPodAutoscaler type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredHorizontalPodAutoscalerInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredHorizontalPodAutoscalerInformer constructs a new informer for HorizontalPodAutoscaler type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).Watch(options)
- },
- },
- &autoscaling_v2beta1.HorizontalPodAutoscaler{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *horizontalPodAutoscalerInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredHorizontalPodAutoscalerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&autoscaling_v2beta1.HorizontalPodAutoscaler{}, f.defaultInformer)
-}
-
-func (f *horizontalPodAutoscalerInformer) Lister() v2beta1.HorizontalPodAutoscalerLister {
- return v2beta1.NewHorizontalPodAutoscalerLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/autoscaling/v2beta1/interface.go b/vendor/k8s.io/client-go/informers/autoscaling/v2beta1/interface.go
deleted file mode 100644
index ab7b04f74..000000000
--- a/vendor/k8s.io/client-go/informers/autoscaling/v2beta1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v2beta1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
- HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
-func (v *version) HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer {
- return &horizontalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/batch/interface.go b/vendor/k8s.io/client-go/informers/batch/interface.go
deleted file mode 100644
index c06b0b19e..000000000
--- a/vendor/k8s.io/client-go/informers/batch/interface.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package batch
-
-import (
- v1 "k8s.io/client-go/informers/batch/v1"
- v1beta1 "k8s.io/client-go/informers/batch/v1beta1"
- v2alpha1 "k8s.io/client-go/informers/batch/v2alpha1"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1 provides access to shared informers for resources in V1.
- V1() v1.Interface
- // V1beta1 provides access to shared informers for resources in V1beta1.
- V1beta1() v1beta1.Interface
- // V2alpha1 provides access to shared informers for resources in V2alpha1.
- V2alpha1() v2alpha1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1 returns a new v1.Interface.
-func (g *group) V1() v1.Interface {
- return v1.New(g.factory, g.namespace, g.tweakListOptions)
-}
-
-// V1beta1 returns a new v1beta1.Interface.
-func (g *group) V1beta1() v1beta1.Interface {
- return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
-}
-
-// V2alpha1 returns a new v2alpha1.Interface.
-func (g *group) V2alpha1() v2alpha1.Interface {
- return v2alpha1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/batch/v1/interface.go b/vendor/k8s.io/client-go/informers/batch/v1/interface.go
deleted file mode 100644
index 60464d461..000000000
--- a/vendor/k8s.io/client-go/informers/batch/v1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // Jobs returns a JobInformer.
- Jobs() JobInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// Jobs returns a JobInformer.
-func (v *version) Jobs() JobInformer {
- return &jobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/batch/v1/job.go b/vendor/k8s.io/client-go/informers/batch/v1/job.go
deleted file mode 100644
index ad3b2c6b7..000000000
--- a/vendor/k8s.io/client-go/informers/batch/v1/job.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- batch_v1 "k8s.io/api/batch/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/batch/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// JobInformer provides access to a shared informer and lister for
-// Jobs.
-type JobInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.JobLister
-}
-
-type jobInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewJobInformer constructs a new informer for Job type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewJobInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredJobInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredJobInformer constructs a new informer for Job type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredJobInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.BatchV1().Jobs(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.BatchV1().Jobs(namespace).Watch(options)
- },
- },
- &batch_v1.Job{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *jobInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *jobInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&batch_v1.Job{}, f.defaultInformer)
-}
-
-func (f *jobInformer) Lister() v1.JobLister {
- return v1.NewJobLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/batch/v1beta1/cronjob.go b/vendor/k8s.io/client-go/informers/batch/v1beta1/cronjob.go
deleted file mode 100644
index 933930fd9..000000000
--- a/vendor/k8s.io/client-go/informers/batch/v1beta1/cronjob.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- batch_v1beta1 "k8s.io/api/batch/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/batch/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// CronJobInformer provides access to a shared informer and lister for
-// CronJobs.
-type CronJobInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.CronJobLister
-}
-
-type cronJobInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewCronJobInformer constructs a new informer for CronJob type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewCronJobInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredCronJobInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredCronJobInformer constructs a new informer for CronJob type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredCronJobInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.BatchV1beta1().CronJobs(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.BatchV1beta1().CronJobs(namespace).Watch(options)
- },
- },
- &batch_v1beta1.CronJob{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *cronJobInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredCronJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *cronJobInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&batch_v1beta1.CronJob{}, f.defaultInformer)
-}
-
-func (f *cronJobInformer) Lister() v1beta1.CronJobLister {
- return v1beta1.NewCronJobLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/batch/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/batch/v1beta1/interface.go
deleted file mode 100644
index 785a62f7b..000000000
--- a/vendor/k8s.io/client-go/informers/batch/v1beta1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // CronJobs returns a CronJobInformer.
- CronJobs() CronJobInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// CronJobs returns a CronJobInformer.
-func (v *version) CronJobs() CronJobInformer {
- return &cronJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go b/vendor/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go
deleted file mode 100644
index 94e47e180..000000000
--- a/vendor/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v2alpha1
-
-import (
- time "time"
-
- batch_v2alpha1 "k8s.io/api/batch/v2alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v2alpha1 "k8s.io/client-go/listers/batch/v2alpha1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// CronJobInformer provides access to a shared informer and lister for
-// CronJobs.
-type CronJobInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v2alpha1.CronJobLister
-}
-
-type cronJobInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewCronJobInformer constructs a new informer for CronJob type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewCronJobInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredCronJobInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredCronJobInformer constructs a new informer for CronJob type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredCronJobInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.BatchV2alpha1().CronJobs(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.BatchV2alpha1().CronJobs(namespace).Watch(options)
- },
- },
- &batch_v2alpha1.CronJob{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *cronJobInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredCronJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *cronJobInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&batch_v2alpha1.CronJob{}, f.defaultInformer)
-}
-
-func (f *cronJobInformer) Lister() v2alpha1.CronJobLister {
- return v2alpha1.NewCronJobLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/batch/v2alpha1/interface.go b/vendor/k8s.io/client-go/informers/batch/v2alpha1/interface.go
deleted file mode 100644
index 2bc64945f..000000000
--- a/vendor/k8s.io/client-go/informers/batch/v2alpha1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v2alpha1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // CronJobs returns a CronJobInformer.
- CronJobs() CronJobInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// CronJobs returns a CronJobInformer.
-func (v *version) CronJobs() CronJobInformer {
- return &cronJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/certificates/interface.go b/vendor/k8s.io/client-go/informers/certificates/interface.go
deleted file mode 100644
index d99ff192d..000000000
--- a/vendor/k8s.io/client-go/informers/certificates/interface.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package certificates
-
-import (
- v1beta1 "k8s.io/client-go/informers/certificates/v1beta1"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1beta1 provides access to shared informers for resources in V1beta1.
- V1beta1() v1beta1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1beta1 returns a new v1beta1.Interface.
-func (g *group) V1beta1() v1beta1.Interface {
- return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go b/vendor/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go
deleted file mode 100644
index 3fd95ed83..000000000
--- a/vendor/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- certificates_v1beta1 "k8s.io/api/certificates/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/certificates/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// CertificateSigningRequestInformer provides access to a shared informer and lister for
-// CertificateSigningRequests.
-type CertificateSigningRequestInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.CertificateSigningRequestLister
-}
-
-type certificateSigningRequestInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewCertificateSigningRequestInformer constructs a new informer for CertificateSigningRequest type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewCertificateSigningRequestInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredCertificateSigningRequestInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredCertificateSigningRequestInformer constructs a new informer for CertificateSigningRequest type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredCertificateSigningRequestInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CertificatesV1beta1().CertificateSigningRequests().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CertificatesV1beta1().CertificateSigningRequests().Watch(options)
- },
- },
- &certificates_v1beta1.CertificateSigningRequest{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *certificateSigningRequestInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredCertificateSigningRequestInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *certificateSigningRequestInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&certificates_v1beta1.CertificateSigningRequest{}, f.defaultInformer)
-}
-
-func (f *certificateSigningRequestInformer) Lister() v1beta1.CertificateSigningRequestLister {
- return v1beta1.NewCertificateSigningRequestLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/certificates/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/certificates/v1beta1/interface.go
deleted file mode 100644
index 4b8d9b1c7..000000000
--- a/vendor/k8s.io/client-go/informers/certificates/v1beta1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // CertificateSigningRequests returns a CertificateSigningRequestInformer.
- CertificateSigningRequests() CertificateSigningRequestInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// CertificateSigningRequests returns a CertificateSigningRequestInformer.
-func (v *version) CertificateSigningRequests() CertificateSigningRequestInformer {
- return &certificateSigningRequestInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/core/interface.go b/vendor/k8s.io/client-go/informers/core/interface.go
deleted file mode 100644
index 82b4917e8..000000000
--- a/vendor/k8s.io/client-go/informers/core/interface.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package core
-
-import (
- v1 "k8s.io/client-go/informers/core/v1"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1 provides access to shared informers for resources in V1.
- V1() v1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1 returns a new v1.Interface.
-func (g *group) V1() v1.Interface {
- return v1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/componentstatus.go b/vendor/k8s.io/client-go/informers/core/v1/componentstatus.go
deleted file mode 100644
index 5c1b4b172..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/componentstatus.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ComponentStatusInformer provides access to a shared informer and lister for
-// ComponentStatuses.
-type ComponentStatusInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.ComponentStatusLister
-}
-
-type componentStatusInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewComponentStatusInformer constructs a new informer for ComponentStatus type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewComponentStatusInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredComponentStatusInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredComponentStatusInformer constructs a new informer for ComponentStatus type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredComponentStatusInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().ComponentStatuses().List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().ComponentStatuses().Watch(options)
- },
- },
- &core_v1.ComponentStatus{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *componentStatusInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredComponentStatusInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *componentStatusInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.ComponentStatus{}, f.defaultInformer)
-}
-
-func (f *componentStatusInformer) Lister() v1.ComponentStatusLister {
- return v1.NewComponentStatusLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/configmap.go b/vendor/k8s.io/client-go/informers/core/v1/configmap.go
deleted file mode 100644
index db58f2ab3..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/configmap.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ConfigMapInformer provides access to a shared informer and lister for
-// ConfigMaps.
-type ConfigMapInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.ConfigMapLister
-}
-
-type configMapInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewConfigMapInformer constructs a new informer for ConfigMap type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewConfigMapInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredConfigMapInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredConfigMapInformer constructs a new informer for ConfigMap type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredConfigMapInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().ConfigMaps(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().ConfigMaps(namespace).Watch(options)
- },
- },
- &core_v1.ConfigMap{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *configMapInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredConfigMapInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *configMapInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.ConfigMap{}, f.defaultInformer)
-}
-
-func (f *configMapInformer) Lister() v1.ConfigMapLister {
- return v1.NewConfigMapLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/endpoints.go b/vendor/k8s.io/client-go/informers/core/v1/endpoints.go
deleted file mode 100644
index a184e5586..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/endpoints.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// EndpointsInformer provides access to a shared informer and lister for
-// Endpoints.
-type EndpointsInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.EndpointsLister
-}
-
-type endpointsInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewEndpointsInformer constructs a new informer for Endpoints type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewEndpointsInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredEndpointsInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredEndpointsInformer constructs a new informer for Endpoints type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredEndpointsInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Endpoints(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Endpoints(namespace).Watch(options)
- },
- },
- &core_v1.Endpoints{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *endpointsInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredEndpointsInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *endpointsInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.Endpoints{}, f.defaultInformer)
-}
-
-func (f *endpointsInformer) Lister() v1.EndpointsLister {
- return v1.NewEndpointsLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/event.go b/vendor/k8s.io/client-go/informers/core/v1/event.go
deleted file mode 100644
index 02712adc5..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/event.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// EventInformer provides access to a shared informer and lister for
-// Events.
-type EventInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.EventLister
-}
-
-type eventInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewEventInformer constructs a new informer for Event type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredEventInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredEventInformer constructs a new informer for Event type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Events(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Events(namespace).Watch(options)
- },
- },
- &core_v1.Event{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *eventInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredEventInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *eventInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.Event{}, f.defaultInformer)
-}
-
-func (f *eventInformer) Lister() v1.EventLister {
- return v1.NewEventLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/interface.go b/vendor/k8s.io/client-go/informers/core/v1/interface.go
deleted file mode 100644
index 0b460d6b5..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/interface.go
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // ComponentStatuses returns a ComponentStatusInformer.
- ComponentStatuses() ComponentStatusInformer
- // ConfigMaps returns a ConfigMapInformer.
- ConfigMaps() ConfigMapInformer
- // Endpoints returns a EndpointsInformer.
- Endpoints() EndpointsInformer
- // Events returns a EventInformer.
- Events() EventInformer
- // LimitRanges returns a LimitRangeInformer.
- LimitRanges() LimitRangeInformer
- // Namespaces returns a NamespaceInformer.
- Namespaces() NamespaceInformer
- // Nodes returns a NodeInformer.
- Nodes() NodeInformer
- // PersistentVolumes returns a PersistentVolumeInformer.
- PersistentVolumes() PersistentVolumeInformer
- // PersistentVolumeClaims returns a PersistentVolumeClaimInformer.
- PersistentVolumeClaims() PersistentVolumeClaimInformer
- // Pods returns a PodInformer.
- Pods() PodInformer
- // PodTemplates returns a PodTemplateInformer.
- PodTemplates() PodTemplateInformer
- // ReplicationControllers returns a ReplicationControllerInformer.
- ReplicationControllers() ReplicationControllerInformer
- // ResourceQuotas returns a ResourceQuotaInformer.
- ResourceQuotas() ResourceQuotaInformer
- // Secrets returns a SecretInformer.
- Secrets() SecretInformer
- // Services returns a ServiceInformer.
- Services() ServiceInformer
- // ServiceAccounts returns a ServiceAccountInformer.
- ServiceAccounts() ServiceAccountInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// ComponentStatuses returns a ComponentStatusInformer.
-func (v *version) ComponentStatuses() ComponentStatusInformer {
- return &componentStatusInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// ConfigMaps returns a ConfigMapInformer.
-func (v *version) ConfigMaps() ConfigMapInformer {
- return &configMapInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Endpoints returns a EndpointsInformer.
-func (v *version) Endpoints() EndpointsInformer {
- return &endpointsInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Events returns a EventInformer.
-func (v *version) Events() EventInformer {
- return &eventInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// LimitRanges returns a LimitRangeInformer.
-func (v *version) LimitRanges() LimitRangeInformer {
- return &limitRangeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Namespaces returns a NamespaceInformer.
-func (v *version) Namespaces() NamespaceInformer {
- return &namespaceInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// Nodes returns a NodeInformer.
-func (v *version) Nodes() NodeInformer {
- return &nodeInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// PersistentVolumes returns a PersistentVolumeInformer.
-func (v *version) PersistentVolumes() PersistentVolumeInformer {
- return &persistentVolumeInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// PersistentVolumeClaims returns a PersistentVolumeClaimInformer.
-func (v *version) PersistentVolumeClaims() PersistentVolumeClaimInformer {
- return &persistentVolumeClaimInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Pods returns a PodInformer.
-func (v *version) Pods() PodInformer {
- return &podInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// PodTemplates returns a PodTemplateInformer.
-func (v *version) PodTemplates() PodTemplateInformer {
- return &podTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// ReplicationControllers returns a ReplicationControllerInformer.
-func (v *version) ReplicationControllers() ReplicationControllerInformer {
- return &replicationControllerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// ResourceQuotas returns a ResourceQuotaInformer.
-func (v *version) ResourceQuotas() ResourceQuotaInformer {
- return &resourceQuotaInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Secrets returns a SecretInformer.
-func (v *version) Secrets() SecretInformer {
- return &secretInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Services returns a ServiceInformer.
-func (v *version) Services() ServiceInformer {
- return &serviceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// ServiceAccounts returns a ServiceAccountInformer.
-func (v *version) ServiceAccounts() ServiceAccountInformer {
- return &serviceAccountInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/limitrange.go b/vendor/k8s.io/client-go/informers/core/v1/limitrange.go
deleted file mode 100644
index 82b21ba1b..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/limitrange.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// LimitRangeInformer provides access to a shared informer and lister for
-// LimitRanges.
-type LimitRangeInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.LimitRangeLister
-}
-
-type limitRangeInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewLimitRangeInformer constructs a new informer for LimitRange type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewLimitRangeInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredLimitRangeInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredLimitRangeInformer constructs a new informer for LimitRange type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredLimitRangeInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().LimitRanges(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().LimitRanges(namespace).Watch(options)
- },
- },
- &core_v1.LimitRange{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *limitRangeInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredLimitRangeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *limitRangeInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.LimitRange{}, f.defaultInformer)
-}
-
-func (f *limitRangeInformer) Lister() v1.LimitRangeLister {
- return v1.NewLimitRangeLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/namespace.go b/vendor/k8s.io/client-go/informers/core/v1/namespace.go
deleted file mode 100644
index ea36024bc..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/namespace.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// NamespaceInformer provides access to a shared informer and lister for
-// Namespaces.
-type NamespaceInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.NamespaceLister
-}
-
-type namespaceInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewNamespaceInformer constructs a new informer for Namespace type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewNamespaceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredNamespaceInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredNamespaceInformer constructs a new informer for Namespace type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredNamespaceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Namespaces().List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Namespaces().Watch(options)
- },
- },
- &core_v1.Namespace{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *namespaceInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredNamespaceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *namespaceInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.Namespace{}, f.defaultInformer)
-}
-
-func (f *namespaceInformer) Lister() v1.NamespaceLister {
- return v1.NewNamespaceLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/node.go b/vendor/k8s.io/client-go/informers/core/v1/node.go
deleted file mode 100644
index 66ae4548a..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/node.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// NodeInformer provides access to a shared informer and lister for
-// Nodes.
-type NodeInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.NodeLister
-}
-
-type nodeInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewNodeInformer constructs a new informer for Node type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewNodeInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredNodeInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredNodeInformer constructs a new informer for Node type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredNodeInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Nodes().List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Nodes().Watch(options)
- },
- },
- &core_v1.Node{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *nodeInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredNodeInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *nodeInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.Node{}, f.defaultInformer)
-}
-
-func (f *nodeInformer) Lister() v1.NodeLister {
- return v1.NewNodeLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go
deleted file mode 100644
index df8a09d39..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// PersistentVolumeInformer provides access to a shared informer and lister for
-// PersistentVolumes.
-type PersistentVolumeInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.PersistentVolumeLister
-}
-
-type persistentVolumeInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewPersistentVolumeInformer constructs a new informer for PersistentVolume type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewPersistentVolumeInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredPersistentVolumeInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredPersistentVolumeInformer constructs a new informer for PersistentVolume type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredPersistentVolumeInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().PersistentVolumes().List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().PersistentVolumes().Watch(options)
- },
- },
- &core_v1.PersistentVolume{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *persistentVolumeInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredPersistentVolumeInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *persistentVolumeInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.PersistentVolume{}, f.defaultInformer)
-}
-
-func (f *persistentVolumeInformer) Lister() v1.PersistentVolumeLister {
- return v1.NewPersistentVolumeLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go
deleted file mode 100644
index 2fbef8a6d..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// PersistentVolumeClaimInformer provides access to a shared informer and lister for
-// PersistentVolumeClaims.
-type PersistentVolumeClaimInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.PersistentVolumeClaimLister
-}
-
-type persistentVolumeClaimInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewPersistentVolumeClaimInformer constructs a new informer for PersistentVolumeClaim type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewPersistentVolumeClaimInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredPersistentVolumeClaimInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredPersistentVolumeClaimInformer constructs a new informer for PersistentVolumeClaim type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredPersistentVolumeClaimInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().PersistentVolumeClaims(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().PersistentVolumeClaims(namespace).Watch(options)
- },
- },
- &core_v1.PersistentVolumeClaim{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *persistentVolumeClaimInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredPersistentVolumeClaimInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *persistentVolumeClaimInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.PersistentVolumeClaim{}, f.defaultInformer)
-}
-
-func (f *persistentVolumeClaimInformer) Lister() v1.PersistentVolumeClaimLister {
- return v1.NewPersistentVolumeClaimLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/pod.go b/vendor/k8s.io/client-go/informers/core/v1/pod.go
deleted file mode 100644
index b70999bb7..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/pod.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// PodInformer provides access to a shared informer and lister for
-// Pods.
-type PodInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.PodLister
-}
-
-type podInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewPodInformer constructs a new informer for Pod type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewPodInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredPodInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredPodInformer constructs a new informer for Pod type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredPodInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Pods(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Pods(namespace).Watch(options)
- },
- },
- &core_v1.Pod{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *podInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredPodInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *podInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.Pod{}, f.defaultInformer)
-}
-
-func (f *podInformer) Lister() v1.PodLister {
- return v1.NewPodLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/podtemplate.go b/vendor/k8s.io/client-go/informers/core/v1/podtemplate.go
deleted file mode 100644
index 4e2fde734..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/podtemplate.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// PodTemplateInformer provides access to a shared informer and lister for
-// PodTemplates.
-type PodTemplateInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.PodTemplateLister
-}
-
-type podTemplateInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewPodTemplateInformer constructs a new informer for PodTemplate type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewPodTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredPodTemplateInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredPodTemplateInformer constructs a new informer for PodTemplate type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredPodTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().PodTemplates(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().PodTemplates(namespace).Watch(options)
- },
- },
- &core_v1.PodTemplate{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *podTemplateInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredPodTemplateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *podTemplateInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.PodTemplate{}, f.defaultInformer)
-}
-
-func (f *podTemplateInformer) Lister() v1.PodTemplateLister {
- return v1.NewPodTemplateLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go
deleted file mode 100644
index 9c0bac1c7..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ReplicationControllerInformer provides access to a shared informer and lister for
-// ReplicationControllers.
-type ReplicationControllerInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.ReplicationControllerLister
-}
-
-type replicationControllerInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewReplicationControllerInformer constructs a new informer for ReplicationController type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewReplicationControllerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredReplicationControllerInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredReplicationControllerInformer constructs a new informer for ReplicationController type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredReplicationControllerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().ReplicationControllers(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().ReplicationControllers(namespace).Watch(options)
- },
- },
- &core_v1.ReplicationController{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *replicationControllerInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredReplicationControllerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *replicationControllerInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.ReplicationController{}, f.defaultInformer)
-}
-
-func (f *replicationControllerInformer) Lister() v1.ReplicationControllerLister {
- return v1.NewReplicationControllerLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/resourcequota.go b/vendor/k8s.io/client-go/informers/core/v1/resourcequota.go
deleted file mode 100644
index c1f593c2f..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/resourcequota.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ResourceQuotaInformer provides access to a shared informer and lister for
-// ResourceQuotas.
-type ResourceQuotaInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.ResourceQuotaLister
-}
-
-type resourceQuotaInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewResourceQuotaInformer constructs a new informer for ResourceQuota type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewResourceQuotaInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredResourceQuotaInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredResourceQuotaInformer constructs a new informer for ResourceQuota type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredResourceQuotaInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().ResourceQuotas(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().ResourceQuotas(namespace).Watch(options)
- },
- },
- &core_v1.ResourceQuota{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *resourceQuotaInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredResourceQuotaInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *resourceQuotaInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.ResourceQuota{}, f.defaultInformer)
-}
-
-func (f *resourceQuotaInformer) Lister() v1.ResourceQuotaLister {
- return v1.NewResourceQuotaLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/secret.go b/vendor/k8s.io/client-go/informers/core/v1/secret.go
deleted file mode 100644
index c45f1c738..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/secret.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// SecretInformer provides access to a shared informer and lister for
-// Secrets.
-type SecretInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.SecretLister
-}
-
-type secretInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewSecretInformer constructs a new informer for Secret type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewSecretInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredSecretInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredSecretInformer constructs a new informer for Secret type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredSecretInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Secrets(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Secrets(namespace).Watch(options)
- },
- },
- &core_v1.Secret{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *secretInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredSecretInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *secretInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.Secret{}, f.defaultInformer)
-}
-
-func (f *secretInformer) Lister() v1.SecretLister {
- return v1.NewSecretLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/service.go b/vendor/k8s.io/client-go/informers/core/v1/service.go
deleted file mode 100644
index f4cd7091f..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/service.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ServiceInformer provides access to a shared informer and lister for
-// Services.
-type ServiceInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.ServiceLister
-}
-
-type serviceInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewServiceInformer constructs a new informer for Service type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewServiceInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredServiceInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredServiceInformer constructs a new informer for Service type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredServiceInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Services(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().Services(namespace).Watch(options)
- },
- },
- &core_v1.Service{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *serviceInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredServiceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *serviceInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.Service{}, f.defaultInformer)
-}
-
-func (f *serviceInformer) Lister() v1.ServiceLister {
- return v1.NewServiceLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go
deleted file mode 100644
index 997292625..000000000
--- a/vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- core_v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/core/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ServiceAccountInformer provides access to a shared informer and lister for
-// ServiceAccounts.
-type ServiceAccountInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.ServiceAccountLister
-}
-
-type serviceAccountInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewServiceAccountInformer constructs a new informer for ServiceAccount type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewServiceAccountInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredServiceAccountInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredServiceAccountInformer constructs a new informer for ServiceAccount type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredServiceAccountInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().ServiceAccounts(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.CoreV1().ServiceAccounts(namespace).Watch(options)
- },
- },
- &core_v1.ServiceAccount{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *serviceAccountInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredServiceAccountInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *serviceAccountInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&core_v1.ServiceAccount{}, f.defaultInformer)
-}
-
-func (f *serviceAccountInformer) Lister() v1.ServiceAccountLister {
- return v1.NewServiceAccountLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/events/interface.go b/vendor/k8s.io/client-go/informers/events/interface.go
deleted file mode 100644
index cfb8d375f..000000000
--- a/vendor/k8s.io/client-go/informers/events/interface.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package events
-
-import (
- v1beta1 "k8s.io/client-go/informers/events/v1beta1"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1beta1 provides access to shared informers for resources in V1beta1.
- V1beta1() v1beta1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1beta1 returns a new v1beta1.Interface.
-func (g *group) V1beta1() v1beta1.Interface {
- return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/events/v1beta1/event.go b/vendor/k8s.io/client-go/informers/events/v1beta1/event.go
deleted file mode 100644
index 223e0e3dd..000000000
--- a/vendor/k8s.io/client-go/informers/events/v1beta1/event.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- events_v1beta1 "k8s.io/api/events/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/events/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// EventInformer provides access to a shared informer and lister for
-// Events.
-type EventInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.EventLister
-}
-
-type eventInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewEventInformer constructs a new informer for Event type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredEventInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredEventInformer constructs a new informer for Event type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.EventsV1beta1().Events(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.EventsV1beta1().Events(namespace).Watch(options)
- },
- },
- &events_v1beta1.Event{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *eventInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredEventInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *eventInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&events_v1beta1.Event{}, f.defaultInformer)
-}
-
-func (f *eventInformer) Lister() v1beta1.EventLister {
- return v1beta1.NewEventLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/events/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/events/v1beta1/interface.go
deleted file mode 100644
index 8138b0a0b..000000000
--- a/vendor/k8s.io/client-go/informers/events/v1beta1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // Events returns a EventInformer.
- Events() EventInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// Events returns a EventInformer.
-func (v *version) Events() EventInformer {
- return &eventInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/extensions/interface.go b/vendor/k8s.io/client-go/informers/extensions/interface.go
deleted file mode 100644
index 3a5d8a52e..000000000
--- a/vendor/k8s.io/client-go/informers/extensions/interface.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package extensions
-
-import (
- v1beta1 "k8s.io/client-go/informers/extensions/v1beta1"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1beta1 provides access to shared informers for resources in V1beta1.
- V1beta1() v1beta1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1beta1 returns a new v1beta1.Interface.
-func (g *group) V1beta1() v1beta1.Interface {
- return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go
deleted file mode 100644
index 4017b8d3e..000000000
--- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// DaemonSetInformer provides access to a shared informer and lister for
-// DaemonSets.
-type DaemonSetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.DaemonSetLister
-}
-
-type daemonSetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewDaemonSetInformer constructs a new informer for DaemonSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredDaemonSetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredDaemonSetInformer constructs a new informer for DaemonSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.ExtensionsV1beta1().DaemonSets(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.ExtensionsV1beta1().DaemonSets(namespace).Watch(options)
- },
- },
- &extensions_v1beta1.DaemonSet{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *daemonSetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredDaemonSetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *daemonSetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&extensions_v1beta1.DaemonSet{}, f.defaultInformer)
-}
-
-func (f *daemonSetInformer) Lister() v1beta1.DaemonSetLister {
- return v1beta1.NewDaemonSetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go
deleted file mode 100644
index 01794d7c7..000000000
--- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// DeploymentInformer provides access to a shared informer and lister for
-// Deployments.
-type DeploymentInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.DeploymentLister
-}
-
-type deploymentInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewDeploymentInformer constructs a new informer for Deployment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredDeploymentInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredDeploymentInformer constructs a new informer for Deployment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.ExtensionsV1beta1().Deployments(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.ExtensionsV1beta1().Deployments(namespace).Watch(options)
- },
- },
- &extensions_v1beta1.Deployment{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *deploymentInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredDeploymentInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *deploymentInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&extensions_v1beta1.Deployment{}, f.defaultInformer)
-}
-
-func (f *deploymentInformer) Lister() v1beta1.DeploymentLister {
- return v1beta1.NewDeploymentLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go
deleted file mode 100644
index d5c9f1671..000000000
--- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// IngressInformer provides access to a shared informer and lister for
-// Ingresses.
-type IngressInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.IngressLister
-}
-
-type ingressInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewIngressInformer constructs a new informer for Ingress type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewIngressInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredIngressInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredIngressInformer constructs a new informer for Ingress type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredIngressInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.ExtensionsV1beta1().Ingresses(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.ExtensionsV1beta1().Ingresses(namespace).Watch(options)
- },
- },
- &extensions_v1beta1.Ingress{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *ingressInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredIngressInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *ingressInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&extensions_v1beta1.Ingress{}, f.defaultInformer)
-}
-
-func (f *ingressInformer) Lister() v1beta1.IngressLister {
- return v1beta1.NewIngressLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/interface.go
deleted file mode 100644
index a3af9309f..000000000
--- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/interface.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // DaemonSets returns a DaemonSetInformer.
- DaemonSets() DaemonSetInformer
- // Deployments returns a DeploymentInformer.
- Deployments() DeploymentInformer
- // Ingresses returns a IngressInformer.
- Ingresses() IngressInformer
- // PodSecurityPolicies returns a PodSecurityPolicyInformer.
- PodSecurityPolicies() PodSecurityPolicyInformer
- // ReplicaSets returns a ReplicaSetInformer.
- ReplicaSets() ReplicaSetInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// DaemonSets returns a DaemonSetInformer.
-func (v *version) DaemonSets() DaemonSetInformer {
- return &daemonSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Deployments returns a DeploymentInformer.
-func (v *version) Deployments() DeploymentInformer {
- return &deploymentInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// Ingresses returns a IngressInformer.
-func (v *version) Ingresses() IngressInformer {
- return &ingressInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// PodSecurityPolicies returns a PodSecurityPolicyInformer.
-func (v *version) PodSecurityPolicies() PodSecurityPolicyInformer {
- return &podSecurityPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// ReplicaSets returns a ReplicaSetInformer.
-func (v *version) ReplicaSets() ReplicaSetInformer {
- return &replicaSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go
deleted file mode 100644
index 7cf8d5bbf..000000000
--- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// PodSecurityPolicyInformer provides access to a shared informer and lister for
-// PodSecurityPolicies.
-type PodSecurityPolicyInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.PodSecurityPolicyLister
-}
-
-type podSecurityPolicyInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredPodSecurityPolicyInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.ExtensionsV1beta1().PodSecurityPolicies().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(options)
- },
- },
- &extensions_v1beta1.PodSecurityPolicy{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *podSecurityPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredPodSecurityPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *podSecurityPolicyInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&extensions_v1beta1.PodSecurityPolicy{}, f.defaultInformer)
-}
-
-func (f *podSecurityPolicyInformer) Lister() v1beta1.PodSecurityPolicyLister {
- return v1beta1.NewPodSecurityPolicyLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go
deleted file mode 100644
index b826a99c3..000000000
--- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ReplicaSetInformer provides access to a shared informer and lister for
-// ReplicaSets.
-type ReplicaSetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.ReplicaSetLister
-}
-
-type replicaSetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewReplicaSetInformer constructs a new informer for ReplicaSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewReplicaSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredReplicaSetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredReplicaSetInformer constructs a new informer for ReplicaSet type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.ExtensionsV1beta1().ReplicaSets(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.ExtensionsV1beta1().ReplicaSets(namespace).Watch(options)
- },
- },
- &extensions_v1beta1.ReplicaSet{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *replicaSetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredReplicaSetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *replicaSetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&extensions_v1beta1.ReplicaSet{}, f.defaultInformer)
-}
-
-func (f *replicaSetInformer) Lister() v1beta1.ReplicaSetLister {
- return v1beta1.NewReplicaSetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/factory.go b/vendor/k8s.io/client-go/informers/factory.go
deleted file mode 100644
index 4a9296d07..000000000
--- a/vendor/k8s.io/client-go/informers/factory.go
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package informers
-
-import (
- reflect "reflect"
- sync "sync"
- time "time"
-
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- schema "k8s.io/apimachinery/pkg/runtime/schema"
- admissionregistration "k8s.io/client-go/informers/admissionregistration"
- apps "k8s.io/client-go/informers/apps"
- autoscaling "k8s.io/client-go/informers/autoscaling"
- batch "k8s.io/client-go/informers/batch"
- certificates "k8s.io/client-go/informers/certificates"
- core "k8s.io/client-go/informers/core"
- events "k8s.io/client-go/informers/events"
- extensions "k8s.io/client-go/informers/extensions"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- networking "k8s.io/client-go/informers/networking"
- policy "k8s.io/client-go/informers/policy"
- rbac "k8s.io/client-go/informers/rbac"
- scheduling "k8s.io/client-go/informers/scheduling"
- settings "k8s.io/client-go/informers/settings"
- storage "k8s.io/client-go/informers/storage"
- kubernetes "k8s.io/client-go/kubernetes"
- cache "k8s.io/client-go/tools/cache"
-)
-
-type sharedInformerFactory struct {
- client kubernetes.Interface
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- lock sync.Mutex
- defaultResync time.Duration
-
- informers map[reflect.Type]cache.SharedIndexInformer
- // startedInformers is used for tracking which informers have been started.
- // This allows Start() to be called multiple times safely.
- startedInformers map[reflect.Type]bool
-}
-
-// NewSharedInformerFactory constructs a new instance of sharedInformerFactory
-func NewSharedInformerFactory(client kubernetes.Interface, defaultResync time.Duration) SharedInformerFactory {
- return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil)
-}
-
-// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory.
-// Listers obtained via this SharedInformerFactory will be subject to the same filters
-// as specified here.
-func NewFilteredSharedInformerFactory(client kubernetes.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory {
- return &sharedInformerFactory{
- client: client,
- namespace: namespace,
- tweakListOptions: tweakListOptions,
- defaultResync: defaultResync,
- informers: make(map[reflect.Type]cache.SharedIndexInformer),
- startedInformers: make(map[reflect.Type]bool),
- }
-}
-
-// Start initializes all requested informers.
-func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) {
- f.lock.Lock()
- defer f.lock.Unlock()
-
- for informerType, informer := range f.informers {
- if !f.startedInformers[informerType] {
- go informer.Run(stopCh)
- f.startedInformers[informerType] = true
- }
- }
-}
-
-// WaitForCacheSync waits for all started informers' cache were synced.
-func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool {
- informers := func() map[reflect.Type]cache.SharedIndexInformer {
- f.lock.Lock()
- defer f.lock.Unlock()
-
- informers := map[reflect.Type]cache.SharedIndexInformer{}
- for informerType, informer := range f.informers {
- if f.startedInformers[informerType] {
- informers[informerType] = informer
- }
- }
- return informers
- }()
-
- res := map[reflect.Type]bool{}
- for informType, informer := range informers {
- res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced)
- }
- return res
-}
-
-// InternalInformerFor returns the SharedIndexInformer for obj using an internal
-// client.
-func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
- f.lock.Lock()
- defer f.lock.Unlock()
-
- informerType := reflect.TypeOf(obj)
- informer, exists := f.informers[informerType]
- if exists {
- return informer
- }
- informer = newFunc(f.client, f.defaultResync)
- f.informers[informerType] = informer
-
- return informer
-}
-
-// SharedInformerFactory provides shared informers for resources in all known
-// API group versions.
-type SharedInformerFactory interface {
- internalinterfaces.SharedInformerFactory
- ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
- WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
-
- Admissionregistration() admissionregistration.Interface
- Apps() apps.Interface
- Autoscaling() autoscaling.Interface
- Batch() batch.Interface
- Certificates() certificates.Interface
- Core() core.Interface
- Events() events.Interface
- Extensions() extensions.Interface
- Networking() networking.Interface
- Policy() policy.Interface
- Rbac() rbac.Interface
- Scheduling() scheduling.Interface
- Settings() settings.Interface
- Storage() storage.Interface
-}
-
-func (f *sharedInformerFactory) Admissionregistration() admissionregistration.Interface {
- return admissionregistration.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Apps() apps.Interface {
- return apps.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Autoscaling() autoscaling.Interface {
- return autoscaling.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Batch() batch.Interface {
- return batch.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Certificates() certificates.Interface {
- return certificates.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Core() core.Interface {
- return core.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Events() events.Interface {
- return events.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Extensions() extensions.Interface {
- return extensions.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Networking() networking.Interface {
- return networking.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Policy() policy.Interface {
- return policy.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Rbac() rbac.Interface {
- return rbac.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Scheduling() scheduling.Interface {
- return scheduling.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Settings() settings.Interface {
- return settings.New(f, f.namespace, f.tweakListOptions)
-}
-
-func (f *sharedInformerFactory) Storage() storage.Interface {
- return storage.New(f, f.namespace, f.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/generic.go b/vendor/k8s.io/client-go/informers/generic.go
deleted file mode 100644
index c19f137cf..000000000
--- a/vendor/k8s.io/client-go/informers/generic.go
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package informers
-
-import (
- "fmt"
-
- v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
- v1beta1 "k8s.io/api/admissionregistration/v1beta1"
- v1 "k8s.io/api/apps/v1"
- apps_v1beta1 "k8s.io/api/apps/v1beta1"
- v1beta2 "k8s.io/api/apps/v1beta2"
- autoscaling_v1 "k8s.io/api/autoscaling/v1"
- v2beta1 "k8s.io/api/autoscaling/v2beta1"
- batch_v1 "k8s.io/api/batch/v1"
- batch_v1beta1 "k8s.io/api/batch/v1beta1"
- v2alpha1 "k8s.io/api/batch/v2alpha1"
- certificates_v1beta1 "k8s.io/api/certificates/v1beta1"
- core_v1 "k8s.io/api/core/v1"
- events_v1beta1 "k8s.io/api/events/v1beta1"
- extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
- networking_v1 "k8s.io/api/networking/v1"
- policy_v1beta1 "k8s.io/api/policy/v1beta1"
- rbac_v1 "k8s.io/api/rbac/v1"
- rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
- rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
- scheduling_v1alpha1 "k8s.io/api/scheduling/v1alpha1"
- settings_v1alpha1 "k8s.io/api/settings/v1alpha1"
- storage_v1 "k8s.io/api/storage/v1"
- storage_v1alpha1 "k8s.io/api/storage/v1alpha1"
- storage_v1beta1 "k8s.io/api/storage/v1beta1"
- schema "k8s.io/apimachinery/pkg/runtime/schema"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// GenericInformer is type of SharedIndexInformer which will locate and delegate to other
-// sharedInformers based on type
-type GenericInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() cache.GenericLister
-}
-
-type genericInformer struct {
- informer cache.SharedIndexInformer
- resource schema.GroupResource
-}
-
-// Informer returns the SharedIndexInformer.
-func (f *genericInformer) Informer() cache.SharedIndexInformer {
- return f.informer
-}
-
-// Lister returns the GenericLister.
-func (f *genericInformer) Lister() cache.GenericLister {
- return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource)
-}
-
-// ForResource gives generic access to a shared informer of the matching type
-// TODO extend this to unknown resources with a client pool
-func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
- switch resource {
- // Group=admissionregistration.k8s.io, Version=v1alpha1
- case v1alpha1.SchemeGroupVersion.WithResource("initializerconfigurations"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().InitializerConfigurations().Informer()}, nil
-
- // Group=admissionregistration.k8s.io, Version=v1beta1
- case v1beta1.SchemeGroupVersion.WithResource("mutatingwebhookconfigurations"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1beta1().MutatingWebhookConfigurations().Informer()}, nil
- case v1beta1.SchemeGroupVersion.WithResource("validatingwebhookconfigurations"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1beta1().ValidatingWebhookConfigurations().Informer()}, nil
-
- // Group=apps, Version=v1
- case v1.SchemeGroupVersion.WithResource("controllerrevisions"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1().ControllerRevisions().Informer()}, nil
- case v1.SchemeGroupVersion.WithResource("daemonsets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1().DaemonSets().Informer()}, nil
- case v1.SchemeGroupVersion.WithResource("deployments"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1().Deployments().Informer()}, nil
- case v1.SchemeGroupVersion.WithResource("replicasets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1().ReplicaSets().Informer()}, nil
- case v1.SchemeGroupVersion.WithResource("statefulsets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1().StatefulSets().Informer()}, nil
-
- // Group=apps, Version=v1beta1
- case apps_v1beta1.SchemeGroupVersion.WithResource("controllerrevisions"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().ControllerRevisions().Informer()}, nil
- case apps_v1beta1.SchemeGroupVersion.WithResource("deployments"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().Deployments().Informer()}, nil
- case apps_v1beta1.SchemeGroupVersion.WithResource("statefulsets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().StatefulSets().Informer()}, nil
-
- // Group=apps, Version=v1beta2
- case v1beta2.SchemeGroupVersion.WithResource("controllerrevisions"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().ControllerRevisions().Informer()}, nil
- case v1beta2.SchemeGroupVersion.WithResource("daemonsets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().DaemonSets().Informer()}, nil
- case v1beta2.SchemeGroupVersion.WithResource("deployments"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().Deployments().Informer()}, nil
- case v1beta2.SchemeGroupVersion.WithResource("replicasets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().ReplicaSets().Informer()}, nil
- case v1beta2.SchemeGroupVersion.WithResource("statefulsets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().StatefulSets().Informer()}, nil
-
- // Group=autoscaling, Version=v1
- case autoscaling_v1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1().HorizontalPodAutoscalers().Informer()}, nil
-
- // Group=autoscaling, Version=v2beta1
- case v2beta1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta1().HorizontalPodAutoscalers().Informer()}, nil
-
- // Group=batch, Version=v1
- case batch_v1.SchemeGroupVersion.WithResource("jobs"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1().Jobs().Informer()}, nil
-
- // Group=batch, Version=v1beta1
- case batch_v1beta1.SchemeGroupVersion.WithResource("cronjobs"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1beta1().CronJobs().Informer()}, nil
-
- // Group=batch, Version=v2alpha1
- case v2alpha1.SchemeGroupVersion.WithResource("cronjobs"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil
-
- // Group=certificates.k8s.io, Version=v1beta1
- case certificates_v1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().CertificateSigningRequests().Informer()}, nil
-
- // Group=core, Version=v1
- case core_v1.SchemeGroupVersion.WithResource("componentstatuses"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ComponentStatuses().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("configmaps"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ConfigMaps().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("endpoints"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Endpoints().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("events"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Events().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("limitranges"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().LimitRanges().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("namespaces"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Namespaces().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("nodes"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Nodes().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("persistentvolumes"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PersistentVolumes().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("persistentvolumeclaims"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PersistentVolumeClaims().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("pods"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Pods().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("podtemplates"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PodTemplates().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("replicationcontrollers"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ReplicationControllers().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("resourcequotas"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ResourceQuotas().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("secrets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Secrets().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("services"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Services().Informer()}, nil
- case core_v1.SchemeGroupVersion.WithResource("serviceaccounts"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ServiceAccounts().Informer()}, nil
-
- // Group=events.k8s.io, Version=v1beta1
- case events_v1beta1.SchemeGroupVersion.WithResource("events"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Events().V1beta1().Events().Informer()}, nil
-
- // Group=extensions, Version=v1beta1
- case extensions_v1beta1.SchemeGroupVersion.WithResource("daemonsets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().DaemonSets().Informer()}, nil
- case extensions_v1beta1.SchemeGroupVersion.WithResource("deployments"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Deployments().Informer()}, nil
- case extensions_v1beta1.SchemeGroupVersion.WithResource("ingresses"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Ingresses().Informer()}, nil
- case extensions_v1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().PodSecurityPolicies().Informer()}, nil
- case extensions_v1beta1.SchemeGroupVersion.WithResource("replicasets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil
-
- // Group=networking.k8s.io, Version=v1
- case networking_v1.SchemeGroupVersion.WithResource("networkpolicies"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().NetworkPolicies().Informer()}, nil
-
- // Group=policy, Version=v1beta1
- case policy_v1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodDisruptionBudgets().Informer()}, nil
-
- // Group=rbac.authorization.k8s.io, Version=v1
- case rbac_v1.SchemeGroupVersion.WithResource("clusterroles"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1().ClusterRoles().Informer()}, nil
- case rbac_v1.SchemeGroupVersion.WithResource("clusterrolebindings"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1().ClusterRoleBindings().Informer()}, nil
- case rbac_v1.SchemeGroupVersion.WithResource("roles"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1().Roles().Informer()}, nil
- case rbac_v1.SchemeGroupVersion.WithResource("rolebindings"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1().RoleBindings().Informer()}, nil
-
- // Group=rbac.authorization.k8s.io, Version=v1alpha1
- case rbac_v1alpha1.SchemeGroupVersion.WithResource("clusterroles"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().ClusterRoles().Informer()}, nil
- case rbac_v1alpha1.SchemeGroupVersion.WithResource("clusterrolebindings"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().ClusterRoleBindings().Informer()}, nil
- case rbac_v1alpha1.SchemeGroupVersion.WithResource("roles"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().Roles().Informer()}, nil
- case rbac_v1alpha1.SchemeGroupVersion.WithResource("rolebindings"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().RoleBindings().Informer()}, nil
-
- // Group=rbac.authorization.k8s.io, Version=v1beta1
- case rbac_v1beta1.SchemeGroupVersion.WithResource("clusterroles"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().ClusterRoles().Informer()}, nil
- case rbac_v1beta1.SchemeGroupVersion.WithResource("clusterrolebindings"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().ClusterRoleBindings().Informer()}, nil
- case rbac_v1beta1.SchemeGroupVersion.WithResource("roles"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().Roles().Informer()}, nil
- case rbac_v1beta1.SchemeGroupVersion.WithResource("rolebindings"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
-
- // Group=scheduling.k8s.io, Version=v1alpha1
- case scheduling_v1alpha1.SchemeGroupVersion.WithResource("priorityclasses"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1alpha1().PriorityClasses().Informer()}, nil
-
- // Group=settings.k8s.io, Version=v1alpha1
- case settings_v1alpha1.SchemeGroupVersion.WithResource("podpresets"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Settings().V1alpha1().PodPresets().Informer()}, nil
-
- // Group=storage.k8s.io, Version=v1
- case storage_v1.SchemeGroupVersion.WithResource("storageclasses"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().StorageClasses().Informer()}, nil
-
- // Group=storage.k8s.io, Version=v1alpha1
- case storage_v1alpha1.SchemeGroupVersion.WithResource("volumeattachments"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().VolumeAttachments().Informer()}, nil
-
- // Group=storage.k8s.io, Version=v1beta1
- case storage_v1beta1.SchemeGroupVersion.WithResource("storageclasses"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil
- case storage_v1beta1.SchemeGroupVersion.WithResource("volumeattachments"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().VolumeAttachments().Informer()}, nil
-
- }
-
- return nil, fmt.Errorf("no informer found for %v", resource)
-}
diff --git a/vendor/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go b/vendor/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go
deleted file mode 100644
index ce6e89944..000000000
--- a/vendor/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package internalinterfaces
-
-import (
- time "time"
-
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- kubernetes "k8s.io/client-go/kubernetes"
- cache "k8s.io/client-go/tools/cache"
-)
-
-type NewInformerFunc func(kubernetes.Interface, time.Duration) cache.SharedIndexInformer
-
-// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
-type SharedInformerFactory interface {
- Start(stopCh <-chan struct{})
- InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
-}
-
-type TweakListOptionsFunc func(*v1.ListOptions)
diff --git a/vendor/k8s.io/client-go/informers/networking/interface.go b/vendor/k8s.io/client-go/informers/networking/interface.go
deleted file mode 100644
index bd0b3aaa7..000000000
--- a/vendor/k8s.io/client-go/informers/networking/interface.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package networking
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- v1 "k8s.io/client-go/informers/networking/v1"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1 provides access to shared informers for resources in V1.
- V1() v1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1 returns a new v1.Interface.
-func (g *group) V1() v1.Interface {
- return v1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/networking/v1/interface.go b/vendor/k8s.io/client-go/informers/networking/v1/interface.go
deleted file mode 100644
index aa75a918c..000000000
--- a/vendor/k8s.io/client-go/informers/networking/v1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // NetworkPolicies returns a NetworkPolicyInformer.
- NetworkPolicies() NetworkPolicyInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// NetworkPolicies returns a NetworkPolicyInformer.
-func (v *version) NetworkPolicies() NetworkPolicyInformer {
- return &networkPolicyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/networking/v1/networkpolicy.go b/vendor/k8s.io/client-go/informers/networking/v1/networkpolicy.go
deleted file mode 100644
index 7d091cbb9..000000000
--- a/vendor/k8s.io/client-go/informers/networking/v1/networkpolicy.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- networking_v1 "k8s.io/api/networking/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/networking/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// NetworkPolicyInformer provides access to a shared informer and lister for
-// NetworkPolicies.
-type NetworkPolicyInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.NetworkPolicyLister
-}
-
-type networkPolicyInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewNetworkPolicyInformer constructs a new informer for NetworkPolicy type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewNetworkPolicyInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredNetworkPolicyInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredNetworkPolicyInformer constructs a new informer for NetworkPolicy type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredNetworkPolicyInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.NetworkingV1().NetworkPolicies(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.NetworkingV1().NetworkPolicies(namespace).Watch(options)
- },
- },
- &networking_v1.NetworkPolicy{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *networkPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredNetworkPolicyInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *networkPolicyInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&networking_v1.NetworkPolicy{}, f.defaultInformer)
-}
-
-func (f *networkPolicyInformer) Lister() v1.NetworkPolicyLister {
- return v1.NewNetworkPolicyLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/policy/interface.go b/vendor/k8s.io/client-go/informers/policy/interface.go
deleted file mode 100644
index 5908e63c5..000000000
--- a/vendor/k8s.io/client-go/informers/policy/interface.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package policy
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- v1beta1 "k8s.io/client-go/informers/policy/v1beta1"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1beta1 provides access to shared informers for resources in V1beta1.
- V1beta1() v1beta1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1beta1 returns a new v1beta1.Interface.
-func (g *group) V1beta1() v1beta1.Interface {
- return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/policy/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/policy/v1beta1/interface.go
deleted file mode 100644
index e59a4aa9c..000000000
--- a/vendor/k8s.io/client-go/informers/policy/v1beta1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // PodDisruptionBudgets returns a PodDisruptionBudgetInformer.
- PodDisruptionBudgets() PodDisruptionBudgetInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// PodDisruptionBudgets returns a PodDisruptionBudgetInformer.
-func (v *version) PodDisruptionBudgets() PodDisruptionBudgetInformer {
- return &podDisruptionBudgetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go
deleted file mode 100644
index aefdc7681..000000000
--- a/vendor/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- policy_v1beta1 "k8s.io/api/policy/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/policy/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// PodDisruptionBudgetInformer provides access to a shared informer and lister for
-// PodDisruptionBudgets.
-type PodDisruptionBudgetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.PodDisruptionBudgetLister
-}
-
-type podDisruptionBudgetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewPodDisruptionBudgetInformer constructs a new informer for PodDisruptionBudget type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewPodDisruptionBudgetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredPodDisruptionBudgetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredPodDisruptionBudgetInformer constructs a new informer for PodDisruptionBudget type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredPodDisruptionBudgetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.PolicyV1beta1().PodDisruptionBudgets(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.PolicyV1beta1().PodDisruptionBudgets(namespace).Watch(options)
- },
- },
- &policy_v1beta1.PodDisruptionBudget{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *podDisruptionBudgetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredPodDisruptionBudgetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *podDisruptionBudgetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&policy_v1beta1.PodDisruptionBudget{}, f.defaultInformer)
-}
-
-func (f *podDisruptionBudgetInformer) Lister() v1beta1.PodDisruptionBudgetLister {
- return v1beta1.NewPodDisruptionBudgetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/interface.go b/vendor/k8s.io/client-go/informers/rbac/interface.go
deleted file mode 100644
index edf21fa6a..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/interface.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package rbac
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- v1 "k8s.io/client-go/informers/rbac/v1"
- v1alpha1 "k8s.io/client-go/informers/rbac/v1alpha1"
- v1beta1 "k8s.io/client-go/informers/rbac/v1beta1"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1 provides access to shared informers for resources in V1.
- V1() v1.Interface
- // V1alpha1 provides access to shared informers for resources in V1alpha1.
- V1alpha1() v1alpha1.Interface
- // V1beta1 provides access to shared informers for resources in V1beta1.
- V1beta1() v1beta1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1 returns a new v1.Interface.
-func (g *group) V1() v1.Interface {
- return v1.New(g.factory, g.namespace, g.tweakListOptions)
-}
-
-// V1alpha1 returns a new v1alpha1.Interface.
-func (g *group) V1alpha1() v1alpha1.Interface {
- return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
-}
-
-// V1beta1 returns a new v1beta1.Interface.
-func (g *group) V1beta1() v1beta1.Interface {
- return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1/clusterrole.go b/vendor/k8s.io/client-go/informers/rbac/v1/clusterrole.go
deleted file mode 100644
index 0f83c32ce..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1/clusterrole.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- rbac_v1 "k8s.io/api/rbac/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/rbac/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleInformer provides access to a shared informer and lister for
-// ClusterRoles.
-type ClusterRoleInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.ClusterRoleLister
-}
-
-type clusterRoleInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewClusterRoleInformer constructs a new informer for ClusterRole type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredClusterRoleInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredClusterRoleInformer constructs a new informer for ClusterRole type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1().ClusterRoles().List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1().ClusterRoles().Watch(options)
- },
- },
- &rbac_v1.ClusterRole{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *clusterRoleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredClusterRoleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1.ClusterRole{}, f.defaultInformer)
-}
-
-func (f *clusterRoleInformer) Lister() v1.ClusterRoleLister {
- return v1.NewClusterRoleLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go
deleted file mode 100644
index f4bbe9898..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- rbac_v1 "k8s.io/api/rbac/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/rbac/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleBindingInformer provides access to a shared informer and lister for
-// ClusterRoleBindings.
-type ClusterRoleBindingInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.ClusterRoleBindingLister
-}
-
-type clusterRoleBindingInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewClusterRoleBindingInformer constructs a new informer for ClusterRoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredClusterRoleBindingInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredClusterRoleBindingInformer constructs a new informer for ClusterRoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1().ClusterRoleBindings().List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1().ClusterRoleBindings().Watch(options)
- },
- },
- &rbac_v1.ClusterRoleBinding{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *clusterRoleBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredClusterRoleBindingInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1.ClusterRoleBinding{}, f.defaultInformer)
-}
-
-func (f *clusterRoleBindingInformer) Lister() v1.ClusterRoleBindingLister {
- return v1.NewClusterRoleBindingLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1/interface.go b/vendor/k8s.io/client-go/informers/rbac/v1/interface.go
deleted file mode 100644
index 969dd563c..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1/interface.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // ClusterRoles returns a ClusterRoleInformer.
- ClusterRoles() ClusterRoleInformer
- // ClusterRoleBindings returns a ClusterRoleBindingInformer.
- ClusterRoleBindings() ClusterRoleBindingInformer
- // Roles returns a RoleInformer.
- Roles() RoleInformer
- // RoleBindings returns a RoleBindingInformer.
- RoleBindings() RoleBindingInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// ClusterRoles returns a ClusterRoleInformer.
-func (v *version) ClusterRoles() ClusterRoleInformer {
- return &clusterRoleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// ClusterRoleBindings returns a ClusterRoleBindingInformer.
-func (v *version) ClusterRoleBindings() ClusterRoleBindingInformer {
- return &clusterRoleBindingInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// Roles returns a RoleInformer.
-func (v *version) Roles() RoleInformer {
- return &roleInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// RoleBindings returns a RoleBindingInformer.
-func (v *version) RoleBindings() RoleBindingInformer {
- return &roleBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1/role.go b/vendor/k8s.io/client-go/informers/rbac/v1/role.go
deleted file mode 100644
index 3b50e1821..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1/role.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- rbac_v1 "k8s.io/api/rbac/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/rbac/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// RoleInformer provides access to a shared informer and lister for
-// Roles.
-type RoleInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.RoleLister
-}
-
-type roleInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewRoleInformer constructs a new informer for Role type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewRoleInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredRoleInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredRoleInformer constructs a new informer for Role type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1().Roles(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1().Roles(namespace).Watch(options)
- },
- },
- &rbac_v1.Role{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *roleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredRoleInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *roleInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1.Role{}, f.defaultInformer)
-}
-
-func (f *roleInformer) Lister() v1.RoleLister {
- return v1.NewRoleLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1/rolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1/rolebinding.go
deleted file mode 100644
index 32af822f6..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1/rolebinding.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- rbac_v1 "k8s.io/api/rbac/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/rbac/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// RoleBindingInformer provides access to a shared informer and lister for
-// RoleBindings.
-type RoleBindingInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.RoleBindingLister
-}
-
-type roleBindingInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewRoleBindingInformer constructs a new informer for RoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewRoleBindingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredRoleBindingInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredRoleBindingInformer constructs a new informer for RoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1().RoleBindings(namespace).List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1().RoleBindings(namespace).Watch(options)
- },
- },
- &rbac_v1.RoleBinding{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *roleBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredRoleBindingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *roleBindingInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1.RoleBinding{}, f.defaultInformer)
-}
-
-func (f *roleBindingInformer) Lister() v1.RoleBindingLister {
- return v1.NewRoleBindingLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go
deleted file mode 100644
index b64bc8d43..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- time "time"
-
- rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleInformer provides access to a shared informer and lister for
-// ClusterRoles.
-type ClusterRoleInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1alpha1.ClusterRoleLister
-}
-
-type clusterRoleInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewClusterRoleInformer constructs a new informer for ClusterRole type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredClusterRoleInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredClusterRoleInformer constructs a new informer for ClusterRole type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1alpha1().ClusterRoles().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1alpha1().ClusterRoles().Watch(options)
- },
- },
- &rbac_v1alpha1.ClusterRole{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *clusterRoleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredClusterRoleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1alpha1.ClusterRole{}, f.defaultInformer)
-}
-
-func (f *clusterRoleInformer) Lister() v1alpha1.ClusterRoleLister {
- return v1alpha1.NewClusterRoleLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go
deleted file mode 100644
index ad8fe6007..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- time "time"
-
- rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleBindingInformer provides access to a shared informer and lister for
-// ClusterRoleBindings.
-type ClusterRoleBindingInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1alpha1.ClusterRoleBindingLister
-}
-
-type clusterRoleBindingInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewClusterRoleBindingInformer constructs a new informer for ClusterRoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredClusterRoleBindingInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredClusterRoleBindingInformer constructs a new informer for ClusterRoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1alpha1().ClusterRoleBindings().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1alpha1().ClusterRoleBindings().Watch(options)
- },
- },
- &rbac_v1alpha1.ClusterRoleBinding{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *clusterRoleBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredClusterRoleBindingInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1alpha1.ClusterRoleBinding{}, f.defaultInformer)
-}
-
-func (f *clusterRoleBindingInformer) Lister() v1alpha1.ClusterRoleBindingLister {
- return v1alpha1.NewClusterRoleBindingLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/interface.go b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/interface.go
deleted file mode 100644
index 2f4945f9a..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/interface.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // ClusterRoles returns a ClusterRoleInformer.
- ClusterRoles() ClusterRoleInformer
- // ClusterRoleBindings returns a ClusterRoleBindingInformer.
- ClusterRoleBindings() ClusterRoleBindingInformer
- // Roles returns a RoleInformer.
- Roles() RoleInformer
- // RoleBindings returns a RoleBindingInformer.
- RoleBindings() RoleBindingInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// ClusterRoles returns a ClusterRoleInformer.
-func (v *version) ClusterRoles() ClusterRoleInformer {
- return &clusterRoleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// ClusterRoleBindings returns a ClusterRoleBindingInformer.
-func (v *version) ClusterRoleBindings() ClusterRoleBindingInformer {
- return &clusterRoleBindingInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// Roles returns a RoleInformer.
-func (v *version) Roles() RoleInformer {
- return &roleInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// RoleBindings returns a RoleBindingInformer.
-func (v *version) RoleBindings() RoleBindingInformer {
- return &roleBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/role.go b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/role.go
deleted file mode 100644
index 56f19a03d..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/role.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- time "time"
-
- rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// RoleInformer provides access to a shared informer and lister for
-// Roles.
-type RoleInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1alpha1.RoleLister
-}
-
-type roleInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewRoleInformer constructs a new informer for Role type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewRoleInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredRoleInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredRoleInformer constructs a new informer for Role type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1alpha1().Roles(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1alpha1().Roles(namespace).Watch(options)
- },
- },
- &rbac_v1alpha1.Role{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *roleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredRoleInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *roleInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1alpha1.Role{}, f.defaultInformer)
-}
-
-func (f *roleInformer) Lister() v1alpha1.RoleLister {
- return v1alpha1.NewRoleLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go
deleted file mode 100644
index 22318e982..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- time "time"
-
- rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// RoleBindingInformer provides access to a shared informer and lister for
-// RoleBindings.
-type RoleBindingInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1alpha1.RoleBindingLister
-}
-
-type roleBindingInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewRoleBindingInformer constructs a new informer for RoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewRoleBindingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredRoleBindingInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredRoleBindingInformer constructs a new informer for RoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1alpha1().RoleBindings(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1alpha1().RoleBindings(namespace).Watch(options)
- },
- },
- &rbac_v1alpha1.RoleBinding{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *roleBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredRoleBindingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *roleBindingInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1alpha1.RoleBinding{}, f.defaultInformer)
-}
-
-func (f *roleBindingInformer) Lister() v1alpha1.RoleBindingLister {
- return v1alpha1.NewRoleBindingLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go
deleted file mode 100644
index 21fb3b6d9..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleInformer provides access to a shared informer and lister for
-// ClusterRoles.
-type ClusterRoleInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.ClusterRoleLister
-}
-
-type clusterRoleInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewClusterRoleInformer constructs a new informer for ClusterRole type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredClusterRoleInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredClusterRoleInformer constructs a new informer for ClusterRole type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1beta1().ClusterRoles().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1beta1().ClusterRoles().Watch(options)
- },
- },
- &rbac_v1beta1.ClusterRole{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *clusterRoleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredClusterRoleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1beta1.ClusterRole{}, f.defaultInformer)
-}
-
-func (f *clusterRoleInformer) Lister() v1beta1.ClusterRoleLister {
- return v1beta1.NewClusterRoleLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go
deleted file mode 100644
index 3c78ac34c..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleBindingInformer provides access to a shared informer and lister for
-// ClusterRoleBindings.
-type ClusterRoleBindingInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.ClusterRoleBindingLister
-}
-
-type clusterRoleBindingInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewClusterRoleBindingInformer constructs a new informer for ClusterRoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredClusterRoleBindingInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredClusterRoleBindingInformer constructs a new informer for ClusterRoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1beta1().ClusterRoleBindings().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1beta1().ClusterRoleBindings().Watch(options)
- },
- },
- &rbac_v1beta1.ClusterRoleBinding{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *clusterRoleBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredClusterRoleBindingInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1beta1.ClusterRoleBinding{}, f.defaultInformer)
-}
-
-func (f *clusterRoleBindingInformer) Lister() v1beta1.ClusterRoleBindingLister {
- return v1beta1.NewClusterRoleBindingLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/rbac/v1beta1/interface.go
deleted file mode 100644
index 92e440ba0..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1beta1/interface.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // ClusterRoles returns a ClusterRoleInformer.
- ClusterRoles() ClusterRoleInformer
- // ClusterRoleBindings returns a ClusterRoleBindingInformer.
- ClusterRoleBindings() ClusterRoleBindingInformer
- // Roles returns a RoleInformer.
- Roles() RoleInformer
- // RoleBindings returns a RoleBindingInformer.
- RoleBindings() RoleBindingInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// ClusterRoles returns a ClusterRoleInformer.
-func (v *version) ClusterRoles() ClusterRoleInformer {
- return &clusterRoleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// ClusterRoleBindings returns a ClusterRoleBindingInformer.
-func (v *version) ClusterRoleBindings() ClusterRoleBindingInformer {
- return &clusterRoleBindingInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// Roles returns a RoleInformer.
-func (v *version) Roles() RoleInformer {
- return &roleInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
-
-// RoleBindings returns a RoleBindingInformer.
-func (v *version) RoleBindings() RoleBindingInformer {
- return &roleBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1beta1/role.go b/vendor/k8s.io/client-go/informers/rbac/v1beta1/role.go
deleted file mode 100644
index 3bd67d84b..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1beta1/role.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// RoleInformer provides access to a shared informer and lister for
-// Roles.
-type RoleInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.RoleLister
-}
-
-type roleInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewRoleInformer constructs a new informer for Role type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewRoleInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredRoleInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredRoleInformer constructs a new informer for Role type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1beta1().Roles(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1beta1().Roles(namespace).Watch(options)
- },
- },
- &rbac_v1beta1.Role{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *roleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredRoleInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *roleInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1beta1.Role{}, f.defaultInformer)
-}
-
-func (f *roleInformer) Lister() v1beta1.RoleLister {
- return v1beta1.NewRoleLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go
deleted file mode 100644
index 5180c1cff..000000000
--- a/vendor/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// RoleBindingInformer provides access to a shared informer and lister for
-// RoleBindings.
-type RoleBindingInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.RoleBindingLister
-}
-
-type roleBindingInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewRoleBindingInformer constructs a new informer for RoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewRoleBindingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredRoleBindingInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredRoleBindingInformer constructs a new informer for RoleBinding type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1beta1().RoleBindings(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.RbacV1beta1().RoleBindings(namespace).Watch(options)
- },
- },
- &rbac_v1beta1.RoleBinding{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *roleBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredRoleBindingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *roleBindingInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&rbac_v1beta1.RoleBinding{}, f.defaultInformer)
-}
-
-func (f *roleBindingInformer) Lister() v1beta1.RoleBindingLister {
- return v1beta1.NewRoleBindingLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/scheduling/interface.go b/vendor/k8s.io/client-go/informers/scheduling/interface.go
deleted file mode 100644
index 1ea9a2e71..000000000
--- a/vendor/k8s.io/client-go/informers/scheduling/interface.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package scheduling
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- v1alpha1 "k8s.io/client-go/informers/scheduling/v1alpha1"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1alpha1 provides access to shared informers for resources in V1alpha1.
- V1alpha1() v1alpha1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1alpha1 returns a new v1alpha1.Interface.
-func (g *group) V1alpha1() v1alpha1.Interface {
- return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/scheduling/v1alpha1/interface.go b/vendor/k8s.io/client-go/informers/scheduling/v1alpha1/interface.go
deleted file mode 100644
index dabe3fb63..000000000
--- a/vendor/k8s.io/client-go/informers/scheduling/v1alpha1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // PriorityClasses returns a PriorityClassInformer.
- PriorityClasses() PriorityClassInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// PriorityClasses returns a PriorityClassInformer.
-func (v *version) PriorityClasses() PriorityClassInformer {
- return &priorityClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go b/vendor/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go
deleted file mode 100644
index 0aeee10a3..000000000
--- a/vendor/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- time "time"
-
- scheduling_v1alpha1 "k8s.io/api/scheduling/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1alpha1 "k8s.io/client-go/listers/scheduling/v1alpha1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// PriorityClassInformer provides access to a shared informer and lister for
-// PriorityClasses.
-type PriorityClassInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1alpha1.PriorityClassLister
-}
-
-type priorityClassInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewPriorityClassInformer constructs a new informer for PriorityClass type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewPriorityClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredPriorityClassInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredPriorityClassInformer constructs a new informer for PriorityClass type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredPriorityClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.SchedulingV1alpha1().PriorityClasses().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.SchedulingV1alpha1().PriorityClasses().Watch(options)
- },
- },
- &scheduling_v1alpha1.PriorityClass{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *priorityClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredPriorityClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *priorityClassInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&scheduling_v1alpha1.PriorityClass{}, f.defaultInformer)
-}
-
-func (f *priorityClassInformer) Lister() v1alpha1.PriorityClassLister {
- return v1alpha1.NewPriorityClassLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/settings/interface.go b/vendor/k8s.io/client-go/informers/settings/interface.go
deleted file mode 100644
index 205dbbf4d..000000000
--- a/vendor/k8s.io/client-go/informers/settings/interface.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package settings
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- v1alpha1 "k8s.io/client-go/informers/settings/v1alpha1"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1alpha1 provides access to shared informers for resources in V1alpha1.
- V1alpha1() v1alpha1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1alpha1 returns a new v1alpha1.Interface.
-func (g *group) V1alpha1() v1alpha1.Interface {
- return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/settings/v1alpha1/interface.go b/vendor/k8s.io/client-go/informers/settings/v1alpha1/interface.go
deleted file mode 100644
index 5714bf06c..000000000
--- a/vendor/k8s.io/client-go/informers/settings/v1alpha1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // PodPresets returns a PodPresetInformer.
- PodPresets() PodPresetInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// PodPresets returns a PodPresetInformer.
-func (v *version) PodPresets() PodPresetInformer {
- return &podPresetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go b/vendor/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go
deleted file mode 100644
index 7e8140585..000000000
--- a/vendor/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- time "time"
-
- settings_v1alpha1 "k8s.io/api/settings/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1alpha1 "k8s.io/client-go/listers/settings/v1alpha1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// PodPresetInformer provides access to a shared informer and lister for
-// PodPresets.
-type PodPresetInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1alpha1.PodPresetLister
-}
-
-type podPresetInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewPodPresetInformer constructs a new informer for PodPreset type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewPodPresetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredPodPresetInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredPodPresetInformer constructs a new informer for PodPreset type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredPodPresetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.SettingsV1alpha1().PodPresets(namespace).List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.SettingsV1alpha1().PodPresets(namespace).Watch(options)
- },
- },
- &settings_v1alpha1.PodPreset{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *podPresetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredPodPresetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *podPresetInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&settings_v1alpha1.PodPreset{}, f.defaultInformer)
-}
-
-func (f *podPresetInformer) Lister() v1alpha1.PodPresetLister {
- return v1alpha1.NewPodPresetLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/storage/interface.go b/vendor/k8s.io/client-go/informers/storage/interface.go
deleted file mode 100644
index bf95b0b92..000000000
--- a/vendor/k8s.io/client-go/informers/storage/interface.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package storage
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- v1 "k8s.io/client-go/informers/storage/v1"
- v1alpha1 "k8s.io/client-go/informers/storage/v1alpha1"
- v1beta1 "k8s.io/client-go/informers/storage/v1beta1"
-)
-
-// Interface provides access to each of this group's versions.
-type Interface interface {
- // V1 provides access to shared informers for resources in V1.
- V1() v1.Interface
- // V1alpha1 provides access to shared informers for resources in V1alpha1.
- V1alpha1() v1alpha1.Interface
- // V1beta1 provides access to shared informers for resources in V1beta1.
- V1beta1() v1beta1.Interface
-}
-
-type group struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// V1 returns a new v1.Interface.
-func (g *group) V1() v1.Interface {
- return v1.New(g.factory, g.namespace, g.tweakListOptions)
-}
-
-// V1alpha1 returns a new v1alpha1.Interface.
-func (g *group) V1alpha1() v1alpha1.Interface {
- return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
-}
-
-// V1beta1 returns a new v1beta1.Interface.
-func (g *group) V1beta1() v1beta1.Interface {
- return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git a/vendor/k8s.io/client-go/informers/storage/v1/interface.go b/vendor/k8s.io/client-go/informers/storage/v1/interface.go
deleted file mode 100644
index ea84ebabf..000000000
--- a/vendor/k8s.io/client-go/informers/storage/v1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // StorageClasses returns a StorageClassInformer.
- StorageClasses() StorageClassInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// StorageClasses returns a StorageClassInformer.
-func (v *version) StorageClasses() StorageClassInformer {
- return &storageClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/storage/v1/storageclass.go b/vendor/k8s.io/client-go/informers/storage/v1/storageclass.go
deleted file mode 100644
index f356b5902..000000000
--- a/vendor/k8s.io/client-go/informers/storage/v1/storageclass.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1
-
-import (
- time "time"
-
- storage_v1 "k8s.io/api/storage/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1 "k8s.io/client-go/listers/storage/v1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// StorageClassInformer provides access to a shared informer and lister for
-// StorageClasses.
-type StorageClassInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1.StorageClassLister
-}
-
-type storageClassInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewStorageClassInformer constructs a new informer for StorageClass type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredStorageClassInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredStorageClassInformer constructs a new informer for StorageClass type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.StorageV1().StorageClasses().List(options)
- },
- WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.StorageV1().StorageClasses().Watch(options)
- },
- },
- &storage_v1.StorageClass{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *storageClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredStorageClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *storageClassInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&storage_v1.StorageClass{}, f.defaultInformer)
-}
-
-func (f *storageClassInformer) Lister() v1.StorageClassLister {
- return v1.NewStorageClassLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/storage/v1alpha1/interface.go b/vendor/k8s.io/client-go/informers/storage/v1alpha1/interface.go
deleted file mode 100644
index 86d49a952..000000000
--- a/vendor/k8s.io/client-go/informers/storage/v1alpha1/interface.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // VolumeAttachments returns a VolumeAttachmentInformer.
- VolumeAttachments() VolumeAttachmentInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// VolumeAttachments returns a VolumeAttachmentInformer.
-func (v *version) VolumeAttachments() VolumeAttachmentInformer {
- return &volumeAttachmentInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go b/vendor/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go
deleted file mode 100644
index 6b5eeb3c5..000000000
--- a/vendor/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1alpha1
-
-import (
- time "time"
-
- storage_v1alpha1 "k8s.io/api/storage/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1alpha1 "k8s.io/client-go/listers/storage/v1alpha1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// VolumeAttachmentInformer provides access to a shared informer and lister for
-// VolumeAttachments.
-type VolumeAttachmentInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1alpha1.VolumeAttachmentLister
-}
-
-type volumeAttachmentInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewVolumeAttachmentInformer constructs a new informer for VolumeAttachment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewVolumeAttachmentInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredVolumeAttachmentInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredVolumeAttachmentInformer constructs a new informer for VolumeAttachment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.StorageV1alpha1().VolumeAttachments().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.StorageV1alpha1().VolumeAttachments().Watch(options)
- },
- },
- &storage_v1alpha1.VolumeAttachment{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *volumeAttachmentInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredVolumeAttachmentInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *volumeAttachmentInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&storage_v1alpha1.VolumeAttachment{}, f.defaultInformer)
-}
-
-func (f *volumeAttachmentInformer) Lister() v1alpha1.VolumeAttachmentLister {
- return v1alpha1.NewVolumeAttachmentLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/storage/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/storage/v1beta1/interface.go
deleted file mode 100644
index eb8c0c830..000000000
--- a/vendor/k8s.io/client-go/informers/storage/v1beta1/interface.go
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // StorageClasses returns a StorageClassInformer.
- StorageClasses() StorageClassInformer
- // VolumeAttachments returns a VolumeAttachmentInformer.
- VolumeAttachments() VolumeAttachmentInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
-}
-
-// StorageClasses returns a StorageClassInformer.
-func (v *version) StorageClasses() StorageClassInformer {
- return &storageClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
-
-// VolumeAttachments returns a VolumeAttachmentInformer.
-func (v *version) VolumeAttachments() VolumeAttachmentInformer {
- return &volumeAttachmentInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
-}
diff --git a/vendor/k8s.io/client-go/informers/storage/v1beta1/storageclass.go b/vendor/k8s.io/client-go/informers/storage/v1beta1/storageclass.go
deleted file mode 100644
index af6641afb..000000000
--- a/vendor/k8s.io/client-go/informers/storage/v1beta1/storageclass.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- storage_v1beta1 "k8s.io/api/storage/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/storage/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// StorageClassInformer provides access to a shared informer and lister for
-// StorageClasses.
-type StorageClassInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.StorageClassLister
-}
-
-type storageClassInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewStorageClassInformer constructs a new informer for StorageClass type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredStorageClassInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredStorageClassInformer constructs a new informer for StorageClass type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.StorageV1beta1().StorageClasses().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.StorageV1beta1().StorageClasses().Watch(options)
- },
- },
- &storage_v1beta1.StorageClass{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *storageClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredStorageClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *storageClassInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&storage_v1beta1.StorageClass{}, f.defaultInformer)
-}
-
-func (f *storageClassInformer) Lister() v1beta1.StorageClassLister {
- return v1beta1.NewStorageClassLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go b/vendor/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go
deleted file mode 100644
index 22b896823..000000000
--- a/vendor/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by informer-gen
-
-package v1beta1
-
-import (
- time "time"
-
- storage_v1beta1 "k8s.io/api/storage/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
- kubernetes "k8s.io/client-go/kubernetes"
- v1beta1 "k8s.io/client-go/listers/storage/v1beta1"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// VolumeAttachmentInformer provides access to a shared informer and lister for
-// VolumeAttachments.
-type VolumeAttachmentInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v1beta1.VolumeAttachmentLister
-}
-
-type volumeAttachmentInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// NewVolumeAttachmentInformer constructs a new informer for VolumeAttachment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewVolumeAttachmentInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredVolumeAttachmentInformer(client, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredVolumeAttachmentInformer constructs a new informer for VolumeAttachment type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.StorageV1beta1().VolumeAttachments().List(options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.StorageV1beta1().VolumeAttachments().Watch(options)
- },
- },
- &storage_v1beta1.VolumeAttachment{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *volumeAttachmentInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredVolumeAttachmentInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *volumeAttachmentInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&storage_v1beta1.VolumeAttachment{}, f.defaultInformer)
-}
-
-func (f *volumeAttachmentInformer) Lister() v1beta1.VolumeAttachmentLister {
- return v1beta1.NewVolumeAttachmentLister(f.Informer().GetIndexer())
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/clientset.go b/vendor/k8s.io/client-go/kubernetes/clientset.go
deleted file mode 100644
index b68855909..000000000
--- a/vendor/k8s.io/client-go/kubernetes/clientset.go
+++ /dev/null
@@ -1,596 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package kubernetes
-
-import (
- glog "github.com/golang/glog"
- discovery "k8s.io/client-go/discovery"
- admissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1"
- admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1"
- appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1"
- appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
- appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2"
- authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1"
- authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
- authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1"
- authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
- autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
- autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1"
- batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
- batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
- batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
- certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
- corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
- eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
- extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
- networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
- policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
- rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1"
- rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
- rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
- schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
- settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
- storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1"
- storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1"
- storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
- rest "k8s.io/client-go/rest"
- flowcontrol "k8s.io/client-go/util/flowcontrol"
-)
-
-type Interface interface {
- Discovery() discovery.DiscoveryInterface
- AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface
- AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface
- // Deprecated: please explicitly pick a version if possible.
- Admissionregistration() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface
- AppsV1beta1() appsv1beta1.AppsV1beta1Interface
- AppsV1beta2() appsv1beta2.AppsV1beta2Interface
- AppsV1() appsv1.AppsV1Interface
- // Deprecated: please explicitly pick a version if possible.
- Apps() appsv1.AppsV1Interface
- AuthenticationV1() authenticationv1.AuthenticationV1Interface
- // Deprecated: please explicitly pick a version if possible.
- Authentication() authenticationv1.AuthenticationV1Interface
- AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface
- AuthorizationV1() authorizationv1.AuthorizationV1Interface
- // Deprecated: please explicitly pick a version if possible.
- Authorization() authorizationv1.AuthorizationV1Interface
- AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface
- AutoscalingV1() autoscalingv1.AutoscalingV1Interface
- // Deprecated: please explicitly pick a version if possible.
- Autoscaling() autoscalingv1.AutoscalingV1Interface
- AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface
- BatchV1() batchv1.BatchV1Interface
- // Deprecated: please explicitly pick a version if possible.
- Batch() batchv1.BatchV1Interface
- BatchV1beta1() batchv1beta1.BatchV1beta1Interface
- BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface
- CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
- // Deprecated: please explicitly pick a version if possible.
- Certificates() certificatesv1beta1.CertificatesV1beta1Interface
- CoreV1() corev1.CoreV1Interface
- // Deprecated: please explicitly pick a version if possible.
- Core() corev1.CoreV1Interface
- EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
- // Deprecated: please explicitly pick a version if possible.
- Events() eventsv1beta1.EventsV1beta1Interface
- ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
- // Deprecated: please explicitly pick a version if possible.
- Extensions() extensionsv1beta1.ExtensionsV1beta1Interface
- NetworkingV1() networkingv1.NetworkingV1Interface
- // Deprecated: please explicitly pick a version if possible.
- Networking() networkingv1.NetworkingV1Interface
- PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface
- // Deprecated: please explicitly pick a version if possible.
- Policy() policyv1beta1.PolicyV1beta1Interface
- RbacV1() rbacv1.RbacV1Interface
- // Deprecated: please explicitly pick a version if possible.
- Rbac() rbacv1.RbacV1Interface
- RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
- RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
- SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface
- // Deprecated: please explicitly pick a version if possible.
- Scheduling() schedulingv1alpha1.SchedulingV1alpha1Interface
- SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface
- // Deprecated: please explicitly pick a version if possible.
- Settings() settingsv1alpha1.SettingsV1alpha1Interface
- StorageV1beta1() storagev1beta1.StorageV1beta1Interface
- StorageV1() storagev1.StorageV1Interface
- // Deprecated: please explicitly pick a version if possible.
- Storage() storagev1.StorageV1Interface
- StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface
-}
-
-// Clientset contains the clients for groups. Each group has exactly one
-// version included in a Clientset.
-type Clientset struct {
- *discovery.DiscoveryClient
- admissionregistrationV1alpha1 *admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Client
- admissionregistrationV1beta1 *admissionregistrationv1beta1.AdmissionregistrationV1beta1Client
- appsV1beta1 *appsv1beta1.AppsV1beta1Client
- appsV1beta2 *appsv1beta2.AppsV1beta2Client
- appsV1 *appsv1.AppsV1Client
- authenticationV1 *authenticationv1.AuthenticationV1Client
- authenticationV1beta1 *authenticationv1beta1.AuthenticationV1beta1Client
- authorizationV1 *authorizationv1.AuthorizationV1Client
- authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client
- autoscalingV1 *autoscalingv1.AutoscalingV1Client
- autoscalingV2beta1 *autoscalingv2beta1.AutoscalingV2beta1Client
- batchV1 *batchv1.BatchV1Client
- batchV1beta1 *batchv1beta1.BatchV1beta1Client
- batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client
- certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client
- coreV1 *corev1.CoreV1Client
- eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
- extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
- networkingV1 *networkingv1.NetworkingV1Client
- policyV1beta1 *policyv1beta1.PolicyV1beta1Client
- rbacV1 *rbacv1.RbacV1Client
- rbacV1beta1 *rbacv1beta1.RbacV1beta1Client
- rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client
- schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client
- settingsV1alpha1 *settingsv1alpha1.SettingsV1alpha1Client
- storageV1beta1 *storagev1beta1.StorageV1beta1Client
- storageV1 *storagev1.StorageV1Client
- storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client
-}
-
-// AdmissionregistrationV1alpha1 retrieves the AdmissionregistrationV1alpha1Client
-func (c *Clientset) AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface {
- return c.admissionregistrationV1alpha1
-}
-
-// AdmissionregistrationV1beta1 retrieves the AdmissionregistrationV1beta1Client
-func (c *Clientset) AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface {
- return c.admissionregistrationV1beta1
-}
-
-// Deprecated: Admissionregistration retrieves the default version of AdmissionregistrationClient.
-// Please explicitly pick a version.
-func (c *Clientset) Admissionregistration() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface {
- return c.admissionregistrationV1beta1
-}
-
-// AppsV1beta1 retrieves the AppsV1beta1Client
-func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface {
- return c.appsV1beta1
-}
-
-// AppsV1beta2 retrieves the AppsV1beta2Client
-func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface {
- return c.appsV1beta2
-}
-
-// AppsV1 retrieves the AppsV1Client
-func (c *Clientset) AppsV1() appsv1.AppsV1Interface {
- return c.appsV1
-}
-
-// Deprecated: Apps retrieves the default version of AppsClient.
-// Please explicitly pick a version.
-func (c *Clientset) Apps() appsv1.AppsV1Interface {
- return c.appsV1
-}
-
-// AuthenticationV1 retrieves the AuthenticationV1Client
-func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface {
- return c.authenticationV1
-}
-
-// Deprecated: Authentication retrieves the default version of AuthenticationClient.
-// Please explicitly pick a version.
-func (c *Clientset) Authentication() authenticationv1.AuthenticationV1Interface {
- return c.authenticationV1
-}
-
-// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
-func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface {
- return c.authenticationV1beta1
-}
-
-// AuthorizationV1 retrieves the AuthorizationV1Client
-func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface {
- return c.authorizationV1
-}
-
-// Deprecated: Authorization retrieves the default version of AuthorizationClient.
-// Please explicitly pick a version.
-func (c *Clientset) Authorization() authorizationv1.AuthorizationV1Interface {
- return c.authorizationV1
-}
-
-// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
-func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface {
- return c.authorizationV1beta1
-}
-
-// AutoscalingV1 retrieves the AutoscalingV1Client
-func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface {
- return c.autoscalingV1
-}
-
-// Deprecated: Autoscaling retrieves the default version of AutoscalingClient.
-// Please explicitly pick a version.
-func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface {
- return c.autoscalingV1
-}
-
-// AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client
-func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface {
- return c.autoscalingV2beta1
-}
-
-// BatchV1 retrieves the BatchV1Client
-func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
- return c.batchV1
-}
-
-// Deprecated: Batch retrieves the default version of BatchClient.
-// Please explicitly pick a version.
-func (c *Clientset) Batch() batchv1.BatchV1Interface {
- return c.batchV1
-}
-
-// BatchV1beta1 retrieves the BatchV1beta1Client
-func (c *Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface {
- return c.batchV1beta1
-}
-
-// BatchV2alpha1 retrieves the BatchV2alpha1Client
-func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
- return c.batchV2alpha1
-}
-
-// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
-func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface {
- return c.certificatesV1beta1
-}
-
-// Deprecated: Certificates retrieves the default version of CertificatesClient.
-// Please explicitly pick a version.
-func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interface {
- return c.certificatesV1beta1
-}
-
-// CoreV1 retrieves the CoreV1Client
-func (c *Clientset) CoreV1() corev1.CoreV1Interface {
- return c.coreV1
-}
-
-// Deprecated: Core retrieves the default version of CoreClient.
-// Please explicitly pick a version.
-func (c *Clientset) Core() corev1.CoreV1Interface {
- return c.coreV1
-}
-
-// EventsV1beta1 retrieves the EventsV1beta1Client
-func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
- return c.eventsV1beta1
-}
-
-// Deprecated: Events retrieves the default version of EventsClient.
-// Please explicitly pick a version.
-func (c *Clientset) Events() eventsv1beta1.EventsV1beta1Interface {
- return c.eventsV1beta1
-}
-
-// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
-func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
- return c.extensionsV1beta1
-}
-
-// Deprecated: Extensions retrieves the default version of ExtensionsClient.
-// Please explicitly pick a version.
-func (c *Clientset) Extensions() extensionsv1beta1.ExtensionsV1beta1Interface {
- return c.extensionsV1beta1
-}
-
-// NetworkingV1 retrieves the NetworkingV1Client
-func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface {
- return c.networkingV1
-}
-
-// Deprecated: Networking retrieves the default version of NetworkingClient.
-// Please explicitly pick a version.
-func (c *Clientset) Networking() networkingv1.NetworkingV1Interface {
- return c.networkingV1
-}
-
-// PolicyV1beta1 retrieves the PolicyV1beta1Client
-func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface {
- return c.policyV1beta1
-}
-
-// Deprecated: Policy retrieves the default version of PolicyClient.
-// Please explicitly pick a version.
-func (c *Clientset) Policy() policyv1beta1.PolicyV1beta1Interface {
- return c.policyV1beta1
-}
-
-// RbacV1 retrieves the RbacV1Client
-func (c *Clientset) RbacV1() rbacv1.RbacV1Interface {
- return c.rbacV1
-}
-
-// Deprecated: Rbac retrieves the default version of RbacClient.
-// Please explicitly pick a version.
-func (c *Clientset) Rbac() rbacv1.RbacV1Interface {
- return c.rbacV1
-}
-
-// RbacV1beta1 retrieves the RbacV1beta1Client
-func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface {
- return c.rbacV1beta1
-}
-
-// RbacV1alpha1 retrieves the RbacV1alpha1Client
-func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
- return c.rbacV1alpha1
-}
-
-// SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client
-func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface {
- return c.schedulingV1alpha1
-}
-
-// Deprecated: Scheduling retrieves the default version of SchedulingClient.
-// Please explicitly pick a version.
-func (c *Clientset) Scheduling() schedulingv1alpha1.SchedulingV1alpha1Interface {
- return c.schedulingV1alpha1
-}
-
-// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
-func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
- return c.settingsV1alpha1
-}
-
-// Deprecated: Settings retrieves the default version of SettingsClient.
-// Please explicitly pick a version.
-func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
- return c.settingsV1alpha1
-}
-
-// StorageV1beta1 retrieves the StorageV1beta1Client
-func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
- return c.storageV1beta1
-}
-
-// StorageV1 retrieves the StorageV1Client
-func (c *Clientset) StorageV1() storagev1.StorageV1Interface {
- return c.storageV1
-}
-
-// Deprecated: Storage retrieves the default version of StorageClient.
-// Please explicitly pick a version.
-func (c *Clientset) Storage() storagev1.StorageV1Interface {
- return c.storageV1
-}
-
-// StorageV1alpha1 retrieves the StorageV1alpha1Client
-func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface {
- return c.storageV1alpha1
-}
-
-// Discovery retrieves the DiscoveryClient
-func (c *Clientset) Discovery() discovery.DiscoveryInterface {
- if c == nil {
- return nil
- }
- return c.DiscoveryClient
-}
-
-// NewForConfig creates a new Clientset for the given config.
-func NewForConfig(c *rest.Config) (*Clientset, error) {
- configShallowCopy := *c
- if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
- configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
- }
- var cs Clientset
- var err error
- cs.admissionregistrationV1alpha1, err = admissionregistrationv1alpha1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.admissionregistrationV1beta1, err = admissionregistrationv1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.appsV1beta1, err = appsv1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.appsV1beta2, err = appsv1beta2.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.appsV1, err = appsv1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.authenticationV1, err = authenticationv1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.authenticationV1beta1, err = authenticationv1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.authorizationV1, err = authorizationv1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.authorizationV1beta1, err = authorizationv1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.autoscalingV1, err = autoscalingv1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.autoscalingV2beta1, err = autoscalingv2beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.batchV1, err = batchv1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.batchV1beta1, err = batchv1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.batchV2alpha1, err = batchv2alpha1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.certificatesV1beta1, err = certificatesv1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.coreV1, err = corev1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.eventsV1beta1, err = eventsv1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.extensionsV1beta1, err = extensionsv1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.networkingV1, err = networkingv1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.policyV1beta1, err = policyv1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.rbacV1, err = rbacv1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.rbacV1beta1, err = rbacv1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.rbacV1alpha1, err = rbacv1alpha1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.schedulingV1alpha1, err = schedulingv1alpha1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.settingsV1alpha1, err = settingsv1alpha1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.storageV1beta1, err = storagev1beta1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.storageV1, err = storagev1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
- cs.storageV1alpha1, err = storagev1alpha1.NewForConfig(&configShallowCopy)
- if err != nil {
- return nil, err
- }
-
- cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
- if err != nil {
- glog.Errorf("failed to create the DiscoveryClient: %v", err)
- return nil, err
- }
- return &cs, nil
-}
-
-// NewForConfigOrDie creates a new Clientset for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *Clientset {
- var cs Clientset
- cs.admissionregistrationV1alpha1 = admissionregistrationv1alpha1.NewForConfigOrDie(c)
- cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.NewForConfigOrDie(c)
- cs.appsV1beta1 = appsv1beta1.NewForConfigOrDie(c)
- cs.appsV1beta2 = appsv1beta2.NewForConfigOrDie(c)
- cs.appsV1 = appsv1.NewForConfigOrDie(c)
- cs.authenticationV1 = authenticationv1.NewForConfigOrDie(c)
- cs.authenticationV1beta1 = authenticationv1beta1.NewForConfigOrDie(c)
- cs.authorizationV1 = authorizationv1.NewForConfigOrDie(c)
- cs.authorizationV1beta1 = authorizationv1beta1.NewForConfigOrDie(c)
- cs.autoscalingV1 = autoscalingv1.NewForConfigOrDie(c)
- cs.autoscalingV2beta1 = autoscalingv2beta1.NewForConfigOrDie(c)
- cs.batchV1 = batchv1.NewForConfigOrDie(c)
- cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c)
- cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c)
- cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c)
- cs.coreV1 = corev1.NewForConfigOrDie(c)
- cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c)
- cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c)
- cs.networkingV1 = networkingv1.NewForConfigOrDie(c)
- cs.policyV1beta1 = policyv1beta1.NewForConfigOrDie(c)
- cs.rbacV1 = rbacv1.NewForConfigOrDie(c)
- cs.rbacV1beta1 = rbacv1beta1.NewForConfigOrDie(c)
- cs.rbacV1alpha1 = rbacv1alpha1.NewForConfigOrDie(c)
- cs.schedulingV1alpha1 = schedulingv1alpha1.NewForConfigOrDie(c)
- cs.settingsV1alpha1 = settingsv1alpha1.NewForConfigOrDie(c)
- cs.storageV1beta1 = storagev1beta1.NewForConfigOrDie(c)
- cs.storageV1 = storagev1.NewForConfigOrDie(c)
- cs.storageV1alpha1 = storagev1alpha1.NewForConfigOrDie(c)
-
- cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
- return &cs
-}
-
-// New creates a new Clientset for the given RESTClient.
-func New(c rest.Interface) *Clientset {
- var cs Clientset
- cs.admissionregistrationV1alpha1 = admissionregistrationv1alpha1.New(c)
- cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.New(c)
- cs.appsV1beta1 = appsv1beta1.New(c)
- cs.appsV1beta2 = appsv1beta2.New(c)
- cs.appsV1 = appsv1.New(c)
- cs.authenticationV1 = authenticationv1.New(c)
- cs.authenticationV1beta1 = authenticationv1beta1.New(c)
- cs.authorizationV1 = authorizationv1.New(c)
- cs.authorizationV1beta1 = authorizationv1beta1.New(c)
- cs.autoscalingV1 = autoscalingv1.New(c)
- cs.autoscalingV2beta1 = autoscalingv2beta1.New(c)
- cs.batchV1 = batchv1.New(c)
- cs.batchV1beta1 = batchv1beta1.New(c)
- cs.batchV2alpha1 = batchv2alpha1.New(c)
- cs.certificatesV1beta1 = certificatesv1beta1.New(c)
- cs.coreV1 = corev1.New(c)
- cs.eventsV1beta1 = eventsv1beta1.New(c)
- cs.extensionsV1beta1 = extensionsv1beta1.New(c)
- cs.networkingV1 = networkingv1.New(c)
- cs.policyV1beta1 = policyv1beta1.New(c)
- cs.rbacV1 = rbacv1.New(c)
- cs.rbacV1beta1 = rbacv1beta1.New(c)
- cs.rbacV1alpha1 = rbacv1alpha1.New(c)
- cs.schedulingV1alpha1 = schedulingv1alpha1.New(c)
- cs.settingsV1alpha1 = settingsv1alpha1.New(c)
- cs.storageV1beta1 = storagev1beta1.New(c)
- cs.storageV1 = storagev1.New(c)
- cs.storageV1alpha1 = storagev1alpha1.New(c)
-
- cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
- return &cs
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/doc.go b/vendor/k8s.io/client-go/kubernetes/doc.go
deleted file mode 100644
index 2c07131b1..000000000
--- a/vendor/k8s.io/client-go/kubernetes/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated clientset.
-package kubernetes
diff --git a/vendor/k8s.io/client-go/kubernetes/import.go b/vendor/k8s.io/client-go/kubernetes/import.go
deleted file mode 100644
index c4f9a91bc..000000000
--- a/vendor/k8s.io/client-go/kubernetes/import.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2017 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 exists to enforce this clientset's vanity import path.
-
-package kubernetes // import "k8s.io/client-go/kubernetes"
diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/doc.go b/vendor/k8s.io/client-go/kubernetes/scheme/doc.go
deleted file mode 100644
index 3d3ab5f4e..000000000
--- a/vendor/k8s.io/client-go/kubernetes/scheme/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package contains the scheme of the automatically generated clientset.
-package scheme
diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/register.go b/vendor/k8s.io/client-go/kubernetes/scheme/register.go
deleted file mode 100644
index fc6ff62a6..000000000
--- a/vendor/k8s.io/client-go/kubernetes/scheme/register.go
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package scheme
-
-import (
- admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
- admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
- appsv1 "k8s.io/api/apps/v1"
- appsv1beta1 "k8s.io/api/apps/v1beta1"
- appsv1beta2 "k8s.io/api/apps/v1beta2"
- authenticationv1 "k8s.io/api/authentication/v1"
- authenticationv1beta1 "k8s.io/api/authentication/v1beta1"
- authorizationv1 "k8s.io/api/authorization/v1"
- authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
- autoscalingv1 "k8s.io/api/autoscaling/v1"
- autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
- batchv1 "k8s.io/api/batch/v1"
- batchv1beta1 "k8s.io/api/batch/v1beta1"
- batchv2alpha1 "k8s.io/api/batch/v2alpha1"
- certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
- corev1 "k8s.io/api/core/v1"
- eventsv1beta1 "k8s.io/api/events/v1beta1"
- extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
- networkingv1 "k8s.io/api/networking/v1"
- policyv1beta1 "k8s.io/api/policy/v1beta1"
- rbacv1 "k8s.io/api/rbac/v1"
- rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
- rbacv1beta1 "k8s.io/api/rbac/v1beta1"
- schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
- settingsv1alpha1 "k8s.io/api/settings/v1alpha1"
- storagev1 "k8s.io/api/storage/v1"
- storagev1alpha1 "k8s.io/api/storage/v1alpha1"
- storagev1beta1 "k8s.io/api/storage/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- schema "k8s.io/apimachinery/pkg/runtime/schema"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
-)
-
-var Scheme = runtime.NewScheme()
-var Codecs = serializer.NewCodecFactory(Scheme)
-var ParameterCodec = runtime.NewParameterCodec(Scheme)
-
-func init() {
- v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
- AddToScheme(Scheme)
-}
-
-// AddToScheme adds all types of this clientset into the given scheme. This allows composition
-// of clientsets, like in:
-//
-// import (
-// "k8s.io/client-go/kubernetes"
-// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
-// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
-// )
-//
-// kclientset, _ := kubernetes.NewForConfig(c)
-// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
-//
-// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
-// correctly.
-func AddToScheme(scheme *runtime.Scheme) {
- admissionregistrationv1alpha1.AddToScheme(scheme)
- admissionregistrationv1beta1.AddToScheme(scheme)
- appsv1beta1.AddToScheme(scheme)
- appsv1beta2.AddToScheme(scheme)
- appsv1.AddToScheme(scheme)
- authenticationv1.AddToScheme(scheme)
- authenticationv1beta1.AddToScheme(scheme)
- authorizationv1.AddToScheme(scheme)
- authorizationv1beta1.AddToScheme(scheme)
- autoscalingv1.AddToScheme(scheme)
- autoscalingv2beta1.AddToScheme(scheme)
- batchv1.AddToScheme(scheme)
- batchv1beta1.AddToScheme(scheme)
- batchv2alpha1.AddToScheme(scheme)
- certificatesv1beta1.AddToScheme(scheme)
- corev1.AddToScheme(scheme)
- eventsv1beta1.AddToScheme(scheme)
- extensionsv1beta1.AddToScheme(scheme)
- networkingv1.AddToScheme(scheme)
- policyv1beta1.AddToScheme(scheme)
- rbacv1.AddToScheme(scheme)
- rbacv1beta1.AddToScheme(scheme)
- rbacv1alpha1.AddToScheme(scheme)
- schedulingv1alpha1.AddToScheme(scheme)
- settingsv1alpha1.AddToScheme(scheme)
- storagev1beta1.AddToScheme(scheme)
- storagev1.AddToScheme(scheme)
- storagev1alpha1.AddToScheme(scheme)
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go
deleted file mode 100644
index e6f1a81e2..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AdmissionregistrationV1alpha1Interface interface {
- RESTClient() rest.Interface
- InitializerConfigurationsGetter
-}
-
-// AdmissionregistrationV1alpha1Client is used to interact with features provided by the admissionregistration.k8s.io group.
-type AdmissionregistrationV1alpha1Client struct {
- restClient rest.Interface
-}
-
-func (c *AdmissionregistrationV1alpha1Client) InitializerConfigurations() InitializerConfigurationInterface {
- return newInitializerConfigurations(c)
-}
-
-// NewForConfig creates a new AdmissionregistrationV1alpha1Client for the given config.
-func NewForConfig(c *rest.Config) (*AdmissionregistrationV1alpha1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AdmissionregistrationV1alpha1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AdmissionregistrationV1alpha1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AdmissionregistrationV1alpha1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AdmissionregistrationV1alpha1Client for the given RESTClient.
-func New(c rest.Interface) *AdmissionregistrationV1alpha1Client {
- return &AdmissionregistrationV1alpha1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1alpha1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AdmissionregistrationV1alpha1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go
deleted file mode 100644
index 08a9c7ceb..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go
deleted file mode 100644
index bfd47e53c..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-type InitializerConfigurationExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go
deleted file mode 100644
index 11cc502f2..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// InitializerConfigurationsGetter has a method to return a InitializerConfigurationInterface.
-// A group's client should implement this interface.
-type InitializerConfigurationsGetter interface {
- InitializerConfigurations() InitializerConfigurationInterface
-}
-
-// InitializerConfigurationInterface has methods to work with InitializerConfiguration resources.
-type InitializerConfigurationInterface interface {
- Create(*v1alpha1.InitializerConfiguration) (*v1alpha1.InitializerConfiguration, error)
- Update(*v1alpha1.InitializerConfiguration) (*v1alpha1.InitializerConfiguration, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.InitializerConfiguration, error)
- List(opts v1.ListOptions) (*v1alpha1.InitializerConfigurationList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InitializerConfiguration, err error)
- InitializerConfigurationExpansion
-}
-
-// initializerConfigurations implements InitializerConfigurationInterface
-type initializerConfigurations struct {
- client rest.Interface
-}
-
-// newInitializerConfigurations returns a InitializerConfigurations
-func newInitializerConfigurations(c *AdmissionregistrationV1alpha1Client) *initializerConfigurations {
- return &initializerConfigurations{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the initializerConfiguration, and returns the corresponding initializerConfiguration object, and an error if there is any.
-func (c *initializerConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.InitializerConfiguration, err error) {
- result = &v1alpha1.InitializerConfiguration{}
- err = c.client.Get().
- Resource("initializerconfigurations").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of InitializerConfigurations that match those selectors.
-func (c *initializerConfigurations) List(opts v1.ListOptions) (result *v1alpha1.InitializerConfigurationList, err error) {
- result = &v1alpha1.InitializerConfigurationList{}
- err = c.client.Get().
- Resource("initializerconfigurations").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested initializerConfigurations.
-func (c *initializerConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("initializerconfigurations").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a initializerConfiguration and creates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any.
-func (c *initializerConfigurations) Create(initializerConfiguration *v1alpha1.InitializerConfiguration) (result *v1alpha1.InitializerConfiguration, err error) {
- result = &v1alpha1.InitializerConfiguration{}
- err = c.client.Post().
- Resource("initializerconfigurations").
- Body(initializerConfiguration).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a initializerConfiguration and updates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any.
-func (c *initializerConfigurations) Update(initializerConfiguration *v1alpha1.InitializerConfiguration) (result *v1alpha1.InitializerConfiguration, err error) {
- result = &v1alpha1.InitializerConfiguration{}
- err = c.client.Put().
- Resource("initializerconfigurations").
- Name(initializerConfiguration.Name).
- Body(initializerConfiguration).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the initializerConfiguration and deletes it. Returns an error if one occurs.
-func (c *initializerConfigurations) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("initializerconfigurations").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *initializerConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("initializerconfigurations").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched initializerConfiguration.
-func (c *initializerConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InitializerConfiguration, err error) {
- result = &v1alpha1.InitializerConfiguration{}
- err = c.client.Patch(pt).
- Resource("initializerconfigurations").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go
deleted file mode 100644
index 63e84abc5..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/admissionregistration/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AdmissionregistrationV1beta1Interface interface {
- RESTClient() rest.Interface
- MutatingWebhookConfigurationsGetter
- ValidatingWebhookConfigurationsGetter
-}
-
-// AdmissionregistrationV1beta1Client is used to interact with features provided by the admissionregistration.k8s.io group.
-type AdmissionregistrationV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *AdmissionregistrationV1beta1Client) MutatingWebhookConfigurations() MutatingWebhookConfigurationInterface {
- return newMutatingWebhookConfigurations(c)
-}
-
-func (c *AdmissionregistrationV1beta1Client) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface {
- return newValidatingWebhookConfigurations(c)
-}
-
-// NewForConfig creates a new AdmissionregistrationV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*AdmissionregistrationV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AdmissionregistrationV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AdmissionregistrationV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AdmissionregistrationV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AdmissionregistrationV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *AdmissionregistrationV1beta1Client {
- return &AdmissionregistrationV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AdmissionregistrationV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go
deleted file mode 100644
index a7780738b..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-type MutatingWebhookConfigurationExpansion interface{}
-
-type ValidatingWebhookConfigurationExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go
deleted file mode 100644
index f6afa0339..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/admissionregistration/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// MutatingWebhookConfigurationsGetter has a method to return a MutatingWebhookConfigurationInterface.
-// A group's client should implement this interface.
-type MutatingWebhookConfigurationsGetter interface {
- MutatingWebhookConfigurations() MutatingWebhookConfigurationInterface
-}
-
-// MutatingWebhookConfigurationInterface has methods to work with MutatingWebhookConfiguration resources.
-type MutatingWebhookConfigurationInterface interface {
- Create(*v1beta1.MutatingWebhookConfiguration) (*v1beta1.MutatingWebhookConfiguration, error)
- Update(*v1beta1.MutatingWebhookConfiguration) (*v1beta1.MutatingWebhookConfiguration, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error)
- List(opts v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error)
- MutatingWebhookConfigurationExpansion
-}
-
-// mutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface
-type mutatingWebhookConfigurations struct {
- client rest.Interface
-}
-
-// newMutatingWebhookConfigurations returns a MutatingWebhookConfigurations
-func newMutatingWebhookConfigurations(c *AdmissionregistrationV1beta1Client) *mutatingWebhookConfigurations {
- return &mutatingWebhookConfigurations{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
-func (c *mutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) {
- result = &v1beta1.MutatingWebhookConfiguration{}
- err = c.client.Get().
- Resource("mutatingwebhookconfigurations").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
-func (c *mutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
- result = &v1beta1.MutatingWebhookConfigurationList{}
- err = c.client.Get().
- Resource("mutatingwebhookconfigurations").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations.
-func (c *mutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("mutatingwebhookconfigurations").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
-func (c *mutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
- result = &v1beta1.MutatingWebhookConfiguration{}
- err = c.client.Post().
- Resource("mutatingwebhookconfigurations").
- Body(mutatingWebhookConfiguration).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
-func (c *mutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
- result = &v1beta1.MutatingWebhookConfiguration{}
- err = c.client.Put().
- Resource("mutatingwebhookconfigurations").
- Name(mutatingWebhookConfiguration.Name).
- Body(mutatingWebhookConfiguration).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
-func (c *mutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("mutatingwebhookconfigurations").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *mutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("mutatingwebhookconfigurations").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched mutatingWebhookConfiguration.
-func (c *mutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) {
- result = &v1beta1.MutatingWebhookConfiguration{}
- err = c.client.Patch(pt).
- Resource("mutatingwebhookconfigurations").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go
deleted file mode 100644
index 860ee16b5..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/admissionregistration/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ValidatingWebhookConfigurationsGetter has a method to return a ValidatingWebhookConfigurationInterface.
-// A group's client should implement this interface.
-type ValidatingWebhookConfigurationsGetter interface {
- ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface
-}
-
-// ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources.
-type ValidatingWebhookConfigurationInterface interface {
- Create(*v1beta1.ValidatingWebhookConfiguration) (*v1beta1.ValidatingWebhookConfiguration, error)
- Update(*v1beta1.ValidatingWebhookConfiguration) (*v1beta1.ValidatingWebhookConfiguration, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error)
- List(opts v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error)
- ValidatingWebhookConfigurationExpansion
-}
-
-// validatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface
-type validatingWebhookConfigurations struct {
- client rest.Interface
-}
-
-// newValidatingWebhookConfigurations returns a ValidatingWebhookConfigurations
-func newValidatingWebhookConfigurations(c *AdmissionregistrationV1beta1Client) *validatingWebhookConfigurations {
- return &validatingWebhookConfigurations{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any.
-func (c *validatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
- result = &v1beta1.ValidatingWebhookConfiguration{}
- err = c.client.Get().
- Resource("validatingwebhookconfigurations").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
-func (c *validatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) {
- result = &v1beta1.ValidatingWebhookConfigurationList{}
- err = c.client.Get().
- Resource("validatingwebhookconfigurations").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations.
-func (c *validatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("validatingwebhookconfigurations").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
-func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
- result = &v1beta1.ValidatingWebhookConfiguration{}
- err = c.client.Post().
- Resource("validatingwebhookconfigurations").
- Body(validatingWebhookConfiguration).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
-func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
- result = &v1beta1.ValidatingWebhookConfiguration{}
- err = c.client.Put().
- Resource("validatingwebhookconfigurations").
- Name(validatingWebhookConfiguration.Name).
- Body(validatingWebhookConfiguration).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
-func (c *validatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("validatingwebhookconfigurations").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *validatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("validatingwebhookconfigurations").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched validatingWebhookConfiguration.
-func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
- result = &v1beta1.ValidatingWebhookConfiguration{}
- err = c.client.Patch(pt).
- Resource("validatingwebhookconfigurations").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go
deleted file mode 100644
index 0c81c1d96..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AppsV1Interface interface {
- RESTClient() rest.Interface
- ControllerRevisionsGetter
- DaemonSetsGetter
- DeploymentsGetter
- ReplicaSetsGetter
- StatefulSetsGetter
-}
-
-// AppsV1Client is used to interact with features provided by the apps group.
-type AppsV1Client struct {
- restClient rest.Interface
-}
-
-func (c *AppsV1Client) ControllerRevisions(namespace string) ControllerRevisionInterface {
- return newControllerRevisions(c, namespace)
-}
-
-func (c *AppsV1Client) DaemonSets(namespace string) DaemonSetInterface {
- return newDaemonSets(c, namespace)
-}
-
-func (c *AppsV1Client) Deployments(namespace string) DeploymentInterface {
- return newDeployments(c, namespace)
-}
-
-func (c *AppsV1Client) ReplicaSets(namespace string) ReplicaSetInterface {
- return newReplicaSets(c, namespace)
-}
-
-func (c *AppsV1Client) StatefulSets(namespace string) StatefulSetInterface {
- return newStatefulSets(c, namespace)
-}
-
-// NewForConfig creates a new AppsV1Client for the given config.
-func NewForConfig(c *rest.Config) (*AppsV1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AppsV1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AppsV1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AppsV1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AppsV1Client for the given RESTClient.
-func New(c rest.Interface) *AppsV1Client {
- return &AppsV1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AppsV1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go
deleted file mode 100644
index 5f2d90b63..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ControllerRevisionsGetter has a method to return a ControllerRevisionInterface.
-// A group's client should implement this interface.
-type ControllerRevisionsGetter interface {
- ControllerRevisions(namespace string) ControllerRevisionInterface
-}
-
-// ControllerRevisionInterface has methods to work with ControllerRevision resources.
-type ControllerRevisionInterface interface {
- Create(*v1.ControllerRevision) (*v1.ControllerRevision, error)
- Update(*v1.ControllerRevision) (*v1.ControllerRevision, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.ControllerRevision, error)
- List(opts meta_v1.ListOptions) (*v1.ControllerRevisionList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error)
- ControllerRevisionExpansion
-}
-
-// controllerRevisions implements ControllerRevisionInterface
-type controllerRevisions struct {
- client rest.Interface
- ns string
-}
-
-// newControllerRevisions returns a ControllerRevisions
-func newControllerRevisions(c *AppsV1Client, namespace string) *controllerRevisions {
- return &controllerRevisions{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
-func (c *controllerRevisions) Get(name string, options meta_v1.GetOptions) (result *v1.ControllerRevision, err error) {
- result = &v1.ControllerRevision{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
-func (c *controllerRevisions) List(opts meta_v1.ListOptions) (result *v1.ControllerRevisionList, err error) {
- result = &v1.ControllerRevisionList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("controllerrevisions").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested controllerRevisions.
-func (c *controllerRevisions) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("controllerrevisions").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
-func (c *controllerRevisions) Create(controllerRevision *v1.ControllerRevision) (result *v1.ControllerRevision, err error) {
- result = &v1.ControllerRevision{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Body(controllerRevision).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
-func (c *controllerRevisions) Update(controllerRevision *v1.ControllerRevision) (result *v1.ControllerRevision, err error) {
- result = &v1.ControllerRevision{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Name(controllerRevision.Name).
- Body(controllerRevision).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
-func (c *controllerRevisions) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *controllerRevisions) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("controllerrevisions").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched controllerRevision.
-func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error) {
- result = &v1.ControllerRevision{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("controllerrevisions").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go
deleted file mode 100644
index f9577d787..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// DaemonSetsGetter has a method to return a DaemonSetInterface.
-// A group's client should implement this interface.
-type DaemonSetsGetter interface {
- DaemonSets(namespace string) DaemonSetInterface
-}
-
-// DaemonSetInterface has methods to work with DaemonSet resources.
-type DaemonSetInterface interface {
- Create(*v1.DaemonSet) (*v1.DaemonSet, error)
- Update(*v1.DaemonSet) (*v1.DaemonSet, error)
- UpdateStatus(*v1.DaemonSet) (*v1.DaemonSet, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.DaemonSet, error)
- List(opts meta_v1.ListOptions) (*v1.DaemonSetList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error)
- DaemonSetExpansion
-}
-
-// daemonSets implements DaemonSetInterface
-type daemonSets struct {
- client rest.Interface
- ns string
-}
-
-// newDaemonSets returns a DaemonSets
-func newDaemonSets(c *AppsV1Client, namespace string) *daemonSets {
- return &daemonSets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
-func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1.DaemonSet, err error) {
- result = &v1.DaemonSet{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
-func (c *daemonSets) List(opts meta_v1.ListOptions) (result *v1.DaemonSetList, err error) {
- result = &v1.DaemonSetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("daemonsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested daemonSets.
-func (c *daemonSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("daemonsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.
-func (c *daemonSets) Create(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) {
- result = &v1.DaemonSet{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("daemonsets").
- Body(daemonSet).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
-func (c *daemonSets) Update(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) {
- result = &v1.DaemonSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(daemonSet.Name).
- Body(daemonSet).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *daemonSets) UpdateStatus(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) {
- result = &v1.DaemonSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(daemonSet.Name).
- SubResource("status").
- Body(daemonSet).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
-func (c *daemonSets) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *daemonSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("daemonsets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched daemonSet.
-func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error) {
- result = &v1.DaemonSet{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("daemonsets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go
deleted file mode 100644
index af837714d..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// DeploymentsGetter has a method to return a DeploymentInterface.
-// A group's client should implement this interface.
-type DeploymentsGetter interface {
- Deployments(namespace string) DeploymentInterface
-}
-
-// DeploymentInterface has methods to work with Deployment resources.
-type DeploymentInterface interface {
- Create(*v1.Deployment) (*v1.Deployment, error)
- Update(*v1.Deployment) (*v1.Deployment, error)
- UpdateStatus(*v1.Deployment) (*v1.Deployment, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.Deployment, error)
- List(opts meta_v1.ListOptions) (*v1.DeploymentList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error)
- DeploymentExpansion
-}
-
-// deployments implements DeploymentInterface
-type deployments struct {
- client rest.Interface
- ns string
-}
-
-// newDeployments returns a Deployments
-func newDeployments(c *AppsV1Client, namespace string) *deployments {
- return &deployments{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
-func (c *deployments) Get(name string, options meta_v1.GetOptions) (result *v1.Deployment, err error) {
- result = &v1.Deployment{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Deployments that match those selectors.
-func (c *deployments) List(opts meta_v1.ListOptions) (result *v1.DeploymentList, err error) {
- result = &v1.DeploymentList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested deployments.
-func (c *deployments) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
-func (c *deployments) Create(deployment *v1.Deployment) (result *v1.Deployment, err error) {
- result = &v1.Deployment{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("deployments").
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
-func (c *deployments) Update(deployment *v1.Deployment) (result *v1.Deployment, err error) {
- result = &v1.Deployment{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("deployments").
- Name(deployment.Name).
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *deployments) UpdateStatus(deployment *v1.Deployment) (result *v1.Deployment, err error) {
- result = &v1.Deployment{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("deployments").
- Name(deployment.Name).
- SubResource("status").
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
-func (c *deployments) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("deployments").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *deployments) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched deployment.
-func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error) {
- result = &v1.Deployment{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("deployments").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/doc.go
deleted file mode 100644
index 95b44dfa8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/generated_expansion.go
deleted file mode 100644
index 6d07e293d..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/generated_expansion.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-type ControllerRevisionExpansion interface{}
-
-type DaemonSetExpansion interface{}
-
-type DeploymentExpansion interface{}
-
-type ReplicaSetExpansion interface{}
-
-type StatefulSetExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go
deleted file mode 100644
index bf5330f06..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
-// A group's client should implement this interface.
-type ReplicaSetsGetter interface {
- ReplicaSets(namespace string) ReplicaSetInterface
-}
-
-// ReplicaSetInterface has methods to work with ReplicaSet resources.
-type ReplicaSetInterface interface {
- Create(*v1.ReplicaSet) (*v1.ReplicaSet, error)
- Update(*v1.ReplicaSet) (*v1.ReplicaSet, error)
- UpdateStatus(*v1.ReplicaSet) (*v1.ReplicaSet, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.ReplicaSet, error)
- List(opts meta_v1.ListOptions) (*v1.ReplicaSetList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error)
- ReplicaSetExpansion
-}
-
-// replicaSets implements ReplicaSetInterface
-type replicaSets struct {
- client rest.Interface
- ns string
-}
-
-// newReplicaSets returns a ReplicaSets
-func newReplicaSets(c *AppsV1Client, namespace string) *replicaSets {
- return &replicaSets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
-func (c *replicaSets) Get(name string, options meta_v1.GetOptions) (result *v1.ReplicaSet, err error) {
- result = &v1.ReplicaSet{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("replicasets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
-func (c *replicaSets) List(opts meta_v1.ListOptions) (result *v1.ReplicaSetList, err error) {
- result = &v1.ReplicaSetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("replicasets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested replicaSets.
-func (c *replicaSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("replicasets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any.
-func (c *replicaSets) Create(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) {
- result = &v1.ReplicaSet{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("replicasets").
- Body(replicaSet).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
-func (c *replicaSets) Update(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) {
- result = &v1.ReplicaSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("replicasets").
- Name(replicaSet.Name).
- Body(replicaSet).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *replicaSets) UpdateStatus(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) {
- result = &v1.ReplicaSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("replicasets").
- Name(replicaSet.Name).
- SubResource("status").
- Body(replicaSet).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
-func (c *replicaSets) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("replicasets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *replicaSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("replicasets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched replicaSet.
-func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error) {
- result = &v1.ReplicaSet{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("replicasets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go
deleted file mode 100644
index 05496f311..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// StatefulSetsGetter has a method to return a StatefulSetInterface.
-// A group's client should implement this interface.
-type StatefulSetsGetter interface {
- StatefulSets(namespace string) StatefulSetInterface
-}
-
-// StatefulSetInterface has methods to work with StatefulSet resources.
-type StatefulSetInterface interface {
- Create(*v1.StatefulSet) (*v1.StatefulSet, error)
- Update(*v1.StatefulSet) (*v1.StatefulSet, error)
- UpdateStatus(*v1.StatefulSet) (*v1.StatefulSet, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.StatefulSet, error)
- List(opts meta_v1.ListOptions) (*v1.StatefulSetList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error)
- StatefulSetExpansion
-}
-
-// statefulSets implements StatefulSetInterface
-type statefulSets struct {
- client rest.Interface
- ns string
-}
-
-// newStatefulSets returns a StatefulSets
-func newStatefulSets(c *AppsV1Client, namespace string) *statefulSets {
- return &statefulSets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
-func (c *statefulSets) Get(name string, options meta_v1.GetOptions) (result *v1.StatefulSet, err error) {
- result = &v1.StatefulSet{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
-func (c *statefulSets) List(opts meta_v1.ListOptions) (result *v1.StatefulSetList, err error) {
- result = &v1.StatefulSetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("statefulsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested statefulSets.
-func (c *statefulSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("statefulsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
-func (c *statefulSets) Create(statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) {
- result = &v1.StatefulSet{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("statefulsets").
- Body(statefulSet).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
-func (c *statefulSets) Update(statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) {
- result = &v1.StatefulSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(statefulSet.Name).
- Body(statefulSet).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *statefulSets) UpdateStatus(statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) {
- result = &v1.StatefulSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(statefulSet.Name).
- SubResource("status").
- Body(statefulSet).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
-func (c *statefulSets) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *statefulSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("statefulsets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched statefulSet.
-func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error) {
- result = &v1.StatefulSet{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("statefulsets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go
deleted file mode 100644
index eaf6c8b45..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/apps/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AppsV1beta1Interface interface {
- RESTClient() rest.Interface
- ControllerRevisionsGetter
- DeploymentsGetter
- ScalesGetter
- StatefulSetsGetter
-}
-
-// AppsV1beta1Client is used to interact with features provided by the apps group.
-type AppsV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *AppsV1beta1Client) ControllerRevisions(namespace string) ControllerRevisionInterface {
- return newControllerRevisions(c, namespace)
-}
-
-func (c *AppsV1beta1Client) Deployments(namespace string) DeploymentInterface {
- return newDeployments(c, namespace)
-}
-
-func (c *AppsV1beta1Client) Scales(namespace string) ScaleInterface {
- return newScales(c, namespace)
-}
-
-func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface {
- return newStatefulSets(c, namespace)
-}
-
-// NewForConfig creates a new AppsV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*AppsV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AppsV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AppsV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AppsV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AppsV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *AppsV1beta1Client {
- return &AppsV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AppsV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go
deleted file mode 100644
index 86cab3bb3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/apps/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ControllerRevisionsGetter has a method to return a ControllerRevisionInterface.
-// A group's client should implement this interface.
-type ControllerRevisionsGetter interface {
- ControllerRevisions(namespace string) ControllerRevisionInterface
-}
-
-// ControllerRevisionInterface has methods to work with ControllerRevision resources.
-type ControllerRevisionInterface interface {
- Create(*v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error)
- Update(*v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.ControllerRevision, error)
- List(opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error)
- ControllerRevisionExpansion
-}
-
-// controllerRevisions implements ControllerRevisionInterface
-type controllerRevisions struct {
- client rest.Interface
- ns string
-}
-
-// newControllerRevisions returns a ControllerRevisions
-func newControllerRevisions(c *AppsV1beta1Client, namespace string) *controllerRevisions {
- return &controllerRevisions{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
-func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) {
- result = &v1beta1.ControllerRevision{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
-func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
- result = &v1beta1.ControllerRevisionList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("controllerrevisions").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested controllerRevisions.
-func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("controllerrevisions").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
-func (c *controllerRevisions) Create(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
- result = &v1beta1.ControllerRevision{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Body(controllerRevision).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
-func (c *controllerRevisions) Update(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
- result = &v1beta1.ControllerRevision{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Name(controllerRevision.Name).
- Body(controllerRevision).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
-func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("controllerrevisions").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched controllerRevision.
-func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) {
- result = &v1beta1.ControllerRevision{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("controllerrevisions").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go
deleted file mode 100644
index 1827d92db..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/apps/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// DeploymentsGetter has a method to return a DeploymentInterface.
-// A group's client should implement this interface.
-type DeploymentsGetter interface {
- Deployments(namespace string) DeploymentInterface
-}
-
-// DeploymentInterface has methods to work with Deployment resources.
-type DeploymentInterface interface {
- Create(*v1beta1.Deployment) (*v1beta1.Deployment, error)
- Update(*v1beta1.Deployment) (*v1beta1.Deployment, error)
- UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error)
- List(opts v1.ListOptions) (*v1beta1.DeploymentList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
- DeploymentExpansion
-}
-
-// deployments implements DeploymentInterface
-type deployments struct {
- client rest.Interface
- ns string
-}
-
-// newDeployments returns a Deployments
-func newDeployments(c *AppsV1beta1Client, namespace string) *deployments {
- return &deployments{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
-func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
- result = &v1beta1.Deployment{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Deployments that match those selectors.
-func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
- result = &v1beta1.DeploymentList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested deployments.
-func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
-func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
- result = &v1beta1.Deployment{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("deployments").
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
-func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
- result = &v1beta1.Deployment{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("deployments").
- Name(deployment.Name).
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
- result = &v1beta1.Deployment{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("deployments").
- Name(deployment.Name).
- SubResource("status").
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
-func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("deployments").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched deployment.
-func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
- result = &v1beta1.Deployment{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("deployments").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go
deleted file mode 100644
index 44edefdcd..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-type ControllerRevisionExpansion interface{}
-
-type DeploymentExpansion interface{}
-
-type ScaleExpansion interface{}
-
-type StatefulSetExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go
deleted file mode 100644
index d67f31431..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// ScalesGetter has a method to return a ScaleInterface.
-// A group's client should implement this interface.
-type ScalesGetter interface {
- Scales(namespace string) ScaleInterface
-}
-
-// ScaleInterface has methods to work with Scale resources.
-type ScaleInterface interface {
- ScaleExpansion
-}
-
-// scales implements ScaleInterface
-type scales struct {
- client rest.Interface
- ns string
-}
-
-// newScales returns a Scales
-func newScales(c *AppsV1beta1Client, namespace string) *scales {
- return &scales{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go
deleted file mode 100644
index cf96d006c..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/apps/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// StatefulSetsGetter has a method to return a StatefulSetInterface.
-// A group's client should implement this interface.
-type StatefulSetsGetter interface {
- StatefulSets(namespace string) StatefulSetInterface
-}
-
-// StatefulSetInterface has methods to work with StatefulSet resources.
-type StatefulSetInterface interface {
- Create(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
- Update(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
- UpdateStatus(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.StatefulSet, error)
- List(opts v1.ListOptions) (*v1beta1.StatefulSetList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error)
- StatefulSetExpansion
-}
-
-// statefulSets implements StatefulSetInterface
-type statefulSets struct {
- client rest.Interface
- ns string
-}
-
-// newStatefulSets returns a StatefulSets
-func newStatefulSets(c *AppsV1beta1Client, namespace string) *statefulSets {
- return &statefulSets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
-func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
- result = &v1beta1.StatefulSet{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
-func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
- result = &v1beta1.StatefulSetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("statefulsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested statefulSets.
-func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("statefulsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
-func (c *statefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
- result = &v1beta1.StatefulSet{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("statefulsets").
- Body(statefulSet).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
-func (c *statefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
- result = &v1beta1.StatefulSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(statefulSet.Name).
- Body(statefulSet).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *statefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
- result = &v1beta1.StatefulSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(statefulSet.Name).
- SubResource("status").
- Body(statefulSet).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
-func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("statefulsets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched statefulSet.
-func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
- result = &v1beta1.StatefulSet{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("statefulsets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go
deleted file mode 100644
index cb44f155f..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AppsV1beta2Interface interface {
- RESTClient() rest.Interface
- ControllerRevisionsGetter
- DaemonSetsGetter
- DeploymentsGetter
- ReplicaSetsGetter
- ScalesGetter
- StatefulSetsGetter
-}
-
-// AppsV1beta2Client is used to interact with features provided by the apps group.
-type AppsV1beta2Client struct {
- restClient rest.Interface
-}
-
-func (c *AppsV1beta2Client) ControllerRevisions(namespace string) ControllerRevisionInterface {
- return newControllerRevisions(c, namespace)
-}
-
-func (c *AppsV1beta2Client) DaemonSets(namespace string) DaemonSetInterface {
- return newDaemonSets(c, namespace)
-}
-
-func (c *AppsV1beta2Client) Deployments(namespace string) DeploymentInterface {
- return newDeployments(c, namespace)
-}
-
-func (c *AppsV1beta2Client) ReplicaSets(namespace string) ReplicaSetInterface {
- return newReplicaSets(c, namespace)
-}
-
-func (c *AppsV1beta2Client) Scales(namespace string) ScaleInterface {
- return newScales(c, namespace)
-}
-
-func (c *AppsV1beta2Client) StatefulSets(namespace string) StatefulSetInterface {
- return newStatefulSets(c, namespace)
-}
-
-// NewForConfig creates a new AppsV1beta2Client for the given config.
-func NewForConfig(c *rest.Config) (*AppsV1beta2Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AppsV1beta2Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AppsV1beta2Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AppsV1beta2Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AppsV1beta2Client for the given RESTClient.
-func New(c rest.Interface) *AppsV1beta2Client {
- return &AppsV1beta2Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta2.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AppsV1beta2Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go
deleted file mode 100644
index 9fe5d129a..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ControllerRevisionsGetter has a method to return a ControllerRevisionInterface.
-// A group's client should implement this interface.
-type ControllerRevisionsGetter interface {
- ControllerRevisions(namespace string) ControllerRevisionInterface
-}
-
-// ControllerRevisionInterface has methods to work with ControllerRevision resources.
-type ControllerRevisionInterface interface {
- Create(*v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error)
- Update(*v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta2.ControllerRevision, error)
- List(opts v1.ListOptions) (*v1beta2.ControllerRevisionList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error)
- ControllerRevisionExpansion
-}
-
-// controllerRevisions implements ControllerRevisionInterface
-type controllerRevisions struct {
- client rest.Interface
- ns string
-}
-
-// newControllerRevisions returns a ControllerRevisions
-func newControllerRevisions(c *AppsV1beta2Client, namespace string) *controllerRevisions {
- return &controllerRevisions{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
-func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) {
- result = &v1beta2.ControllerRevision{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
-func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
- result = &v1beta2.ControllerRevisionList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("controllerrevisions").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested controllerRevisions.
-func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("controllerrevisions").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
-func (c *controllerRevisions) Create(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
- result = &v1beta2.ControllerRevision{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Body(controllerRevision).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
-func (c *controllerRevisions) Update(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
- result = &v1beta2.ControllerRevision{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Name(controllerRevision.Name).
- Body(controllerRevision).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
-func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("controllerrevisions").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("controllerrevisions").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched controllerRevision.
-func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) {
- result = &v1beta2.ControllerRevision{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("controllerrevisions").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go
deleted file mode 100644
index e062d392f..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// DaemonSetsGetter has a method to return a DaemonSetInterface.
-// A group's client should implement this interface.
-type DaemonSetsGetter interface {
- DaemonSets(namespace string) DaemonSetInterface
-}
-
-// DaemonSetInterface has methods to work with DaemonSet resources.
-type DaemonSetInterface interface {
- Create(*v1beta2.DaemonSet) (*v1beta2.DaemonSet, error)
- Update(*v1beta2.DaemonSet) (*v1beta2.DaemonSet, error)
- UpdateStatus(*v1beta2.DaemonSet) (*v1beta2.DaemonSet, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta2.DaemonSet, error)
- List(opts v1.ListOptions) (*v1beta2.DaemonSetList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error)
- DaemonSetExpansion
-}
-
-// daemonSets implements DaemonSetInterface
-type daemonSets struct {
- client rest.Interface
- ns string
-}
-
-// newDaemonSets returns a DaemonSets
-func newDaemonSets(c *AppsV1beta2Client, namespace string) *daemonSets {
- return &daemonSets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
-func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) {
- result = &v1beta2.DaemonSet{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
-func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) {
- result = &v1beta2.DaemonSetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("daemonsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested daemonSets.
-func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("daemonsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.
-func (c *daemonSets) Create(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
- result = &v1beta2.DaemonSet{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("daemonsets").
- Body(daemonSet).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
-func (c *daemonSets) Update(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
- result = &v1beta2.DaemonSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(daemonSet.Name).
- Body(daemonSet).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *daemonSets) UpdateStatus(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
- result = &v1beta2.DaemonSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(daemonSet.Name).
- SubResource("status").
- Body(daemonSet).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
-func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("daemonsets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched daemonSet.
-func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) {
- result = &v1beta2.DaemonSet{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("daemonsets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go
deleted file mode 100644
index 0e292ca17..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// DeploymentsGetter has a method to return a DeploymentInterface.
-// A group's client should implement this interface.
-type DeploymentsGetter interface {
- Deployments(namespace string) DeploymentInterface
-}
-
-// DeploymentInterface has methods to work with Deployment resources.
-type DeploymentInterface interface {
- Create(*v1beta2.Deployment) (*v1beta2.Deployment, error)
- Update(*v1beta2.Deployment) (*v1beta2.Deployment, error)
- UpdateStatus(*v1beta2.Deployment) (*v1beta2.Deployment, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta2.Deployment, error)
- List(opts v1.ListOptions) (*v1beta2.DeploymentList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error)
- DeploymentExpansion
-}
-
-// deployments implements DeploymentInterface
-type deployments struct {
- client rest.Interface
- ns string
-}
-
-// newDeployments returns a Deployments
-func newDeployments(c *AppsV1beta2Client, namespace string) *deployments {
- return &deployments{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
-func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) {
- result = &v1beta2.Deployment{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Deployments that match those selectors.
-func (c *deployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) {
- result = &v1beta2.DeploymentList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested deployments.
-func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
-func (c *deployments) Create(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
- result = &v1beta2.Deployment{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("deployments").
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
-func (c *deployments) Update(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
- result = &v1beta2.Deployment{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("deployments").
- Name(deployment.Name).
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *deployments) UpdateStatus(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
- result = &v1beta2.Deployment{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("deployments").
- Name(deployment.Name).
- SubResource("status").
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
-func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("deployments").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched deployment.
-func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) {
- result = &v1beta2.Deployment{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("deployments").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/doc.go
deleted file mode 100644
index 8d6189201..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta2
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/generated_expansion.go
deleted file mode 100644
index 98356ca71..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/generated_expansion.go
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-type ControllerRevisionExpansion interface{}
-
-type DaemonSetExpansion interface{}
-
-type DeploymentExpansion interface{}
-
-type ReplicaSetExpansion interface{}
-
-type ScaleExpansion interface{}
-
-type StatefulSetExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go
deleted file mode 100644
index e0cd3a286..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
-// A group's client should implement this interface.
-type ReplicaSetsGetter interface {
- ReplicaSets(namespace string) ReplicaSetInterface
-}
-
-// ReplicaSetInterface has methods to work with ReplicaSet resources.
-type ReplicaSetInterface interface {
- Create(*v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error)
- Update(*v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error)
- UpdateStatus(*v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta2.ReplicaSet, error)
- List(opts v1.ListOptions) (*v1beta2.ReplicaSetList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error)
- ReplicaSetExpansion
-}
-
-// replicaSets implements ReplicaSetInterface
-type replicaSets struct {
- client rest.Interface
- ns string
-}
-
-// newReplicaSets returns a ReplicaSets
-func newReplicaSets(c *AppsV1beta2Client, namespace string) *replicaSets {
- return &replicaSets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
-func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) {
- result = &v1beta2.ReplicaSet{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("replicasets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
-func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) {
- result = &v1beta2.ReplicaSetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("replicasets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested replicaSets.
-func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("replicasets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any.
-func (c *replicaSets) Create(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
- result = &v1beta2.ReplicaSet{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("replicasets").
- Body(replicaSet).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
-func (c *replicaSets) Update(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
- result = &v1beta2.ReplicaSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("replicasets").
- Name(replicaSet.Name).
- Body(replicaSet).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *replicaSets) UpdateStatus(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
- result = &v1beta2.ReplicaSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("replicasets").
- Name(replicaSet.Name).
- SubResource("status").
- Body(replicaSet).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
-func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("replicasets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("replicasets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched replicaSet.
-func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) {
- result = &v1beta2.ReplicaSet{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("replicasets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/scale.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/scale.go
deleted file mode 100644
index 0295d4144..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/scale.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// ScalesGetter has a method to return a ScaleInterface.
-// A group's client should implement this interface.
-type ScalesGetter interface {
- Scales(namespace string) ScaleInterface
-}
-
-// ScaleInterface has methods to work with Scale resources.
-type ScaleInterface interface {
- ScaleExpansion
-}
-
-// scales implements ScaleInterface
-type scales struct {
- client rest.Interface
- ns string
-}
-
-// newScales returns a Scales
-func newScales(c *AppsV1beta2Client, namespace string) *scales {
- return &scales{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go
deleted file mode 100644
index 8bac75600..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// StatefulSetsGetter has a method to return a StatefulSetInterface.
-// A group's client should implement this interface.
-type StatefulSetsGetter interface {
- StatefulSets(namespace string) StatefulSetInterface
-}
-
-// StatefulSetInterface has methods to work with StatefulSet resources.
-type StatefulSetInterface interface {
- Create(*v1beta2.StatefulSet) (*v1beta2.StatefulSet, error)
- Update(*v1beta2.StatefulSet) (*v1beta2.StatefulSet, error)
- UpdateStatus(*v1beta2.StatefulSet) (*v1beta2.StatefulSet, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta2.StatefulSet, error)
- List(opts v1.ListOptions) (*v1beta2.StatefulSetList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error)
- GetScale(statefulSetName string, options v1.GetOptions) (*v1beta2.Scale, error)
- UpdateScale(statefulSetName string, scale *v1beta2.Scale) (*v1beta2.Scale, error)
-
- StatefulSetExpansion
-}
-
-// statefulSets implements StatefulSetInterface
-type statefulSets struct {
- client rest.Interface
- ns string
-}
-
-// newStatefulSets returns a StatefulSets
-func newStatefulSets(c *AppsV1beta2Client, namespace string) *statefulSets {
- return &statefulSets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
-func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) {
- result = &v1beta2.StatefulSet{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
-func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) {
- result = &v1beta2.StatefulSetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("statefulsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested statefulSets.
-func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("statefulsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
-func (c *statefulSets) Create(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
- result = &v1beta2.StatefulSet{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("statefulsets").
- Body(statefulSet).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
-func (c *statefulSets) Update(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
- result = &v1beta2.StatefulSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(statefulSet.Name).
- Body(statefulSet).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *statefulSets) UpdateStatus(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
- result = &v1beta2.StatefulSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(statefulSet.Name).
- SubResource("status").
- Body(statefulSet).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
-func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("statefulsets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched statefulSet.
-func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) {
- result = &v1beta2.StatefulSet{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("statefulsets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
-
-// GetScale takes name of the statefulSet, and returns the corresponding v1beta2.Scale object, and an error if there is any.
-func (c *statefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) {
- result = &v1beta2.Scale{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(statefulSetName).
- SubResource("scale").
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
-func (c *statefulSets) UpdateScale(statefulSetName string, scale *v1beta2.Scale) (result *v1beta2.Scale, err error) {
- result = &v1beta2.Scale{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("statefulsets").
- Name(statefulSetName).
- SubResource("scale").
- Body(scale).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go
deleted file mode 100644
index 4d0af8c26..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/authentication/v1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AuthenticationV1Interface interface {
- RESTClient() rest.Interface
- TokenReviewsGetter
-}
-
-// AuthenticationV1Client is used to interact with features provided by the authentication.k8s.io group.
-type AuthenticationV1Client struct {
- restClient rest.Interface
-}
-
-func (c *AuthenticationV1Client) TokenReviews() TokenReviewInterface {
- return newTokenReviews(c)
-}
-
-// NewForConfig creates a new AuthenticationV1Client for the given config.
-func NewForConfig(c *rest.Config) (*AuthenticationV1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AuthenticationV1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AuthenticationV1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AuthenticationV1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AuthenticationV1Client for the given RESTClient.
-func New(c rest.Interface) *AuthenticationV1Client {
- return &AuthenticationV1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AuthenticationV1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go
deleted file mode 100644
index 95b44dfa8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go
deleted file mode 100644
index 94adbfbce..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go
deleted file mode 100644
index ab95e6a83..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// TokenReviewsGetter has a method to return a TokenReviewInterface.
-// A group's client should implement this interface.
-type TokenReviewsGetter interface {
- TokenReviews() TokenReviewInterface
-}
-
-// TokenReviewInterface has methods to work with TokenReview resources.
-type TokenReviewInterface interface {
- TokenReviewExpansion
-}
-
-// tokenReviews implements TokenReviewInterface
-type tokenReviews struct {
- client rest.Interface
-}
-
-// newTokenReviews returns a TokenReviews
-func newTokenReviews(c *AuthenticationV1Client) *tokenReviews {
- return &tokenReviews{
- client: c.RESTClient(),
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go
deleted file mode 100644
index ea21f1b4a..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- authenticationapi "k8s.io/api/authentication/v1"
-)
-
-type TokenReviewExpansion interface {
- Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error)
-}
-
-func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) {
- result = &authenticationapi.TokenReview{}
- err = c.client.Post().
- Resource("tokenreviews").
- Body(tokenReview).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go
deleted file mode 100644
index 996de350a..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/authentication/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AuthenticationV1beta1Interface interface {
- RESTClient() rest.Interface
- TokenReviewsGetter
-}
-
-// AuthenticationV1beta1Client is used to interact with features provided by the authentication.k8s.io group.
-type AuthenticationV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface {
- return newTokenReviews(c)
-}
-
-// NewForConfig creates a new AuthenticationV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*AuthenticationV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AuthenticationV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AuthenticationV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AuthenticationV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AuthenticationV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *AuthenticationV1beta1Client {
- return &AuthenticationV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AuthenticationV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go
deleted file mode 100644
index 74ad7fa90..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go
deleted file mode 100644
index eef5a968d..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// TokenReviewsGetter has a method to return a TokenReviewInterface.
-// A group's client should implement this interface.
-type TokenReviewsGetter interface {
- TokenReviews() TokenReviewInterface
-}
-
-// TokenReviewInterface has methods to work with TokenReview resources.
-type TokenReviewInterface interface {
- TokenReviewExpansion
-}
-
-// tokenReviews implements TokenReviewInterface
-type tokenReviews struct {
- client rest.Interface
-}
-
-// newTokenReviews returns a TokenReviews
-func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews {
- return &tokenReviews{
- client: c.RESTClient(),
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go
deleted file mode 100644
index 8f186fa76..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-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 v1beta1
-
-import (
- authenticationapi "k8s.io/api/authentication/v1beta1"
-)
-
-type TokenReviewExpansion interface {
- Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error)
-}
-
-func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) {
- result = &authenticationapi.TokenReview{}
- err = c.client.Post().
- Resource("tokenreviews").
- Body(tokenReview).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go
deleted file mode 100644
index c75cc05b6..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/authorization/v1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AuthorizationV1Interface interface {
- RESTClient() rest.Interface
- LocalSubjectAccessReviewsGetter
- SelfSubjectAccessReviewsGetter
- SelfSubjectRulesReviewsGetter
- SubjectAccessReviewsGetter
-}
-
-// AuthorizationV1Client is used to interact with features provided by the authorization.k8s.io group.
-type AuthorizationV1Client struct {
- restClient rest.Interface
-}
-
-func (c *AuthorizationV1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface {
- return newLocalSubjectAccessReviews(c, namespace)
-}
-
-func (c *AuthorizationV1Client) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface {
- return newSelfSubjectAccessReviews(c)
-}
-
-func (c *AuthorizationV1Client) SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface {
- return newSelfSubjectRulesReviews(c)
-}
-
-func (c *AuthorizationV1Client) SubjectAccessReviews() SubjectAccessReviewInterface {
- return newSubjectAccessReviews(c)
-}
-
-// NewForConfig creates a new AuthorizationV1Client for the given config.
-func NewForConfig(c *rest.Config) (*AuthorizationV1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AuthorizationV1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AuthorizationV1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AuthorizationV1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AuthorizationV1Client for the given RESTClient.
-func New(c rest.Interface) *AuthorizationV1Client {
- return &AuthorizationV1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AuthorizationV1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go
deleted file mode 100644
index 95b44dfa8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go
deleted file mode 100644
index 94adbfbce..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go
deleted file mode 100644
index 7c9ff014f..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface.
-// A group's client should implement this interface.
-type LocalSubjectAccessReviewsGetter interface {
- LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface
-}
-
-// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
-type LocalSubjectAccessReviewInterface interface {
- LocalSubjectAccessReviewExpansion
-}
-
-// localSubjectAccessReviews implements LocalSubjectAccessReviewInterface
-type localSubjectAccessReviews struct {
- client rest.Interface
- ns string
-}
-
-// newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews
-func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *localSubjectAccessReviews {
- return &localSubjectAccessReviews{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go
deleted file mode 100644
index 0c123b07c..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- authorizationapi "k8s.io/api/authorization/v1"
-)
-
-type LocalSubjectAccessReviewExpansion interface {
- Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error)
-}
-
-func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
- result = &authorizationapi.LocalSubjectAccessReview{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("localsubjectaccessreviews").
- Body(sar).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go
deleted file mode 100644
index 0957b231c..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface.
-// A group's client should implement this interface.
-type SelfSubjectAccessReviewsGetter interface {
- SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface
-}
-
-// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
-type SelfSubjectAccessReviewInterface interface {
- SelfSubjectAccessReviewExpansion
-}
-
-// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
-type selfSubjectAccessReviews struct {
- client rest.Interface
-}
-
-// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews
-func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessReviews {
- return &selfSubjectAccessReviews{
- client: c.RESTClient(),
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go
deleted file mode 100644
index 5b70a27dd..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- authorizationapi "k8s.io/api/authorization/v1"
-)
-
-type SelfSubjectAccessReviewExpansion interface {
- Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error)
-}
-
-func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) {
- result = &authorizationapi.SelfSubjectAccessReview{}
- err = c.client.Post().
- Resource("selfsubjectaccessreviews").
- Body(sar).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go
deleted file mode 100644
index 9caaee2a0..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// SelfSubjectRulesReviewsGetter has a method to return a SelfSubjectRulesReviewInterface.
-// A group's client should implement this interface.
-type SelfSubjectRulesReviewsGetter interface {
- SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface
-}
-
-// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
-type SelfSubjectRulesReviewInterface interface {
- SelfSubjectRulesReviewExpansion
-}
-
-// selfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
-type selfSubjectRulesReviews struct {
- client rest.Interface
-}
-
-// newSelfSubjectRulesReviews returns a SelfSubjectRulesReviews
-func newSelfSubjectRulesReviews(c *AuthorizationV1Client) *selfSubjectRulesReviews {
- return &selfSubjectRulesReviews{
- client: c.RESTClient(),
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go
deleted file mode 100644
index e2cad880e..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- authorizationapi "k8s.io/api/authorization/v1"
-)
-
-type SelfSubjectRulesReviewExpansion interface {
- Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error)
-}
-
-func (c *selfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
- result = &authorizationapi.SelfSubjectRulesReview{}
- err = c.client.Post().
- Resource("selfsubjectrulesreviews").
- Body(srr).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go
deleted file mode 100644
index f4557d2ba..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface.
-// A group's client should implement this interface.
-type SubjectAccessReviewsGetter interface {
- SubjectAccessReviews() SubjectAccessReviewInterface
-}
-
-// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
-type SubjectAccessReviewInterface interface {
- SubjectAccessReviewExpansion
-}
-
-// subjectAccessReviews implements SubjectAccessReviewInterface
-type subjectAccessReviews struct {
- client rest.Interface
-}
-
-// newSubjectAccessReviews returns a SubjectAccessReviews
-func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews {
- return &subjectAccessReviews{
- client: c.RESTClient(),
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go
deleted file mode 100644
index b5ed87d30..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- authorizationapi "k8s.io/api/authorization/v1"
-)
-
-// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface.
-type SubjectAccessReviewExpansion interface {
- Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error)
-}
-
-func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
- result = &authorizationapi.SubjectAccessReview{}
- err = c.client.Post().
- Resource("subjectaccessreviews").
- Body(sar).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go
deleted file mode 100644
index 5bf1261ad..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/authorization/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AuthorizationV1beta1Interface interface {
- RESTClient() rest.Interface
- LocalSubjectAccessReviewsGetter
- SelfSubjectAccessReviewsGetter
- SelfSubjectRulesReviewsGetter
- SubjectAccessReviewsGetter
-}
-
-// AuthorizationV1beta1Client is used to interact with features provided by the authorization.k8s.io group.
-type AuthorizationV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *AuthorizationV1beta1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface {
- return newLocalSubjectAccessReviews(c, namespace)
-}
-
-func (c *AuthorizationV1beta1Client) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface {
- return newSelfSubjectAccessReviews(c)
-}
-
-func (c *AuthorizationV1beta1Client) SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface {
- return newSelfSubjectRulesReviews(c)
-}
-
-func (c *AuthorizationV1beta1Client) SubjectAccessReviews() SubjectAccessReviewInterface {
- return newSubjectAccessReviews(c)
-}
-
-// NewForConfig creates a new AuthorizationV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*AuthorizationV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AuthorizationV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AuthorizationV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AuthorizationV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AuthorizationV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *AuthorizationV1beta1Client {
- return &AuthorizationV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AuthorizationV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go
deleted file mode 100644
index 74ad7fa90..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go
deleted file mode 100644
index 18821d72e..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface.
-// A group's client should implement this interface.
-type LocalSubjectAccessReviewsGetter interface {
- LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface
-}
-
-// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
-type LocalSubjectAccessReviewInterface interface {
- LocalSubjectAccessReviewExpansion
-}
-
-// localSubjectAccessReviews implements LocalSubjectAccessReviewInterface
-type localSubjectAccessReviews struct {
- client rest.Interface
- ns string
-}
-
-// newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews
-func newLocalSubjectAccessReviews(c *AuthorizationV1beta1Client, namespace string) *localSubjectAccessReviews {
- return &localSubjectAccessReviews{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go
deleted file mode 100644
index bf1b8a5f1..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-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 v1beta1
-
-import (
- authorizationapi "k8s.io/api/authorization/v1beta1"
-)
-
-type LocalSubjectAccessReviewExpansion interface {
- Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error)
-}
-
-func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
- result = &authorizationapi.LocalSubjectAccessReview{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("localsubjectaccessreviews").
- Body(sar).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go
deleted file mode 100644
index 7bc2a0211..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface.
-// A group's client should implement this interface.
-type SelfSubjectAccessReviewsGetter interface {
- SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface
-}
-
-// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
-type SelfSubjectAccessReviewInterface interface {
- SelfSubjectAccessReviewExpansion
-}
-
-// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
-type selfSubjectAccessReviews struct {
- client rest.Interface
-}
-
-// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews
-func newSelfSubjectAccessReviews(c *AuthorizationV1beta1Client) *selfSubjectAccessReviews {
- return &selfSubjectAccessReviews{
- client: c.RESTClient(),
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go
deleted file mode 100644
index 58fecfd85..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-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 v1beta1
-
-import (
- authorizationapi "k8s.io/api/authorization/v1beta1"
-)
-
-type SelfSubjectAccessReviewExpansion interface {
- Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error)
-}
-
-func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) {
- result = &authorizationapi.SelfSubjectAccessReview{}
- err = c.client.Post().
- Resource("selfsubjectaccessreviews").
- Body(sar).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go
deleted file mode 100644
index 7dfd314d2..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// SelfSubjectRulesReviewsGetter has a method to return a SelfSubjectRulesReviewInterface.
-// A group's client should implement this interface.
-type SelfSubjectRulesReviewsGetter interface {
- SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface
-}
-
-// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
-type SelfSubjectRulesReviewInterface interface {
- SelfSubjectRulesReviewExpansion
-}
-
-// selfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
-type selfSubjectRulesReviews struct {
- client rest.Interface
-}
-
-// newSelfSubjectRulesReviews returns a SelfSubjectRulesReviews
-func newSelfSubjectRulesReviews(c *AuthorizationV1beta1Client) *selfSubjectRulesReviews {
- return &selfSubjectRulesReviews{
- client: c.RESTClient(),
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go
deleted file mode 100644
index 5f1f37ef7..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- authorizationapi "k8s.io/api/authorization/v1beta1"
-)
-
-type SelfSubjectRulesReviewExpansion interface {
- Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error)
-}
-
-func (c *selfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
- result = &authorizationapi.SelfSubjectRulesReview{}
- err = c.client.Post().
- Resource("selfsubjectrulesreviews").
- Body(srr).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go
deleted file mode 100644
index aa4dfcaab..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface.
-// A group's client should implement this interface.
-type SubjectAccessReviewsGetter interface {
- SubjectAccessReviews() SubjectAccessReviewInterface
-}
-
-// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
-type SubjectAccessReviewInterface interface {
- SubjectAccessReviewExpansion
-}
-
-// subjectAccessReviews implements SubjectAccessReviewInterface
-type subjectAccessReviews struct {
- client rest.Interface
-}
-
-// newSubjectAccessReviews returns a SubjectAccessReviews
-func newSubjectAccessReviews(c *AuthorizationV1beta1Client) *subjectAccessReviews {
- return &subjectAccessReviews{
- client: c.RESTClient(),
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go
deleted file mode 100644
index 4f93689e8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-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 v1beta1
-
-import (
- authorizationapi "k8s.io/api/authorization/v1beta1"
-)
-
-// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface.
-type SubjectAccessReviewExpansion interface {
- Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error)
-}
-
-func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
- result = &authorizationapi.SubjectAccessReview{}
- err = c.client.Post().
- Resource("subjectaccessreviews").
- Body(sar).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go
deleted file mode 100644
index 1e504bd0f..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/autoscaling/v1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AutoscalingV1Interface interface {
- RESTClient() rest.Interface
- HorizontalPodAutoscalersGetter
-}
-
-// AutoscalingV1Client is used to interact with features provided by the autoscaling group.
-type AutoscalingV1Client struct {
- restClient rest.Interface
-}
-
-func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
- return newHorizontalPodAutoscalers(c, namespace)
-}
-
-// NewForConfig creates a new AutoscalingV1Client for the given config.
-func NewForConfig(c *rest.Config) (*AutoscalingV1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AutoscalingV1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AutoscalingV1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AutoscalingV1Client for the given RESTClient.
-func New(c rest.Interface) *AutoscalingV1Client {
- return &AutoscalingV1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AutoscalingV1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go
deleted file mode 100644
index 95b44dfa8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go
deleted file mode 100644
index 15ea315c7..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-type HorizontalPodAutoscalerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go
deleted file mode 100644
index 29da3e740..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/autoscaling/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
-// A group's client should implement this interface.
-type HorizontalPodAutoscalersGetter interface {
- HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
-}
-
-// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
-type HorizontalPodAutoscalerInterface interface {
- Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
- Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
- UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
- List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
- HorizontalPodAutoscalerExpansion
-}
-
-// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
-type horizontalPodAutoscalers struct {
- client rest.Interface
- ns string
-}
-
-// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
-func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *horizontalPodAutoscalers {
- return &horizontalPodAutoscalers{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
-func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
- result = &v1.HorizontalPodAutoscaler{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
-func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
- result = &v1.HorizontalPodAutoscalerList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
-func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
-func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
- result = &v1.HorizontalPodAutoscaler{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- Body(horizontalPodAutoscaler).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
-func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
- result = &v1.HorizontalPodAutoscaler{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- Name(horizontalPodAutoscaler.Name).
- Body(horizontalPodAutoscaler).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
- result = &v1.HorizontalPodAutoscaler{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- Name(horizontalPodAutoscaler.Name).
- SubResource("status").
- Body(horizontalPodAutoscaler).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
-func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched horizontalPodAutoscaler.
-func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
- result = &v1.HorizontalPodAutoscaler{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go
deleted file mode 100644
index 95eab7137..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v2beta1
-
-import (
- v2beta1 "k8s.io/api/autoscaling/v2beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type AutoscalingV2beta1Interface interface {
- RESTClient() rest.Interface
- HorizontalPodAutoscalersGetter
-}
-
-// AutoscalingV2beta1Client is used to interact with features provided by the autoscaling group.
-type AutoscalingV2beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *AutoscalingV2beta1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
- return newHorizontalPodAutoscalers(c, namespace)
-}
-
-// NewForConfig creates a new AutoscalingV2beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*AutoscalingV2beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &AutoscalingV2beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new AutoscalingV2beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *AutoscalingV2beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new AutoscalingV2beta1Client for the given RESTClient.
-func New(c rest.Interface) *AutoscalingV2beta1Client {
- return &AutoscalingV2beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v2beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *AutoscalingV2beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/doc.go
deleted file mode 100644
index 57c8c3086..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v2beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/generated_expansion.go
deleted file mode 100644
index 9101766f6..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v2beta1
-
-type HorizontalPodAutoscalerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go
deleted file mode 100644
index b625fdafd..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v2beta1
-
-import (
- v2beta1 "k8s.io/api/autoscaling/v2beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
-// A group's client should implement this interface.
-type HorizontalPodAutoscalersGetter interface {
- HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
-}
-
-// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
-type HorizontalPodAutoscalerInterface interface {
- Create(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
- Update(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
- UpdateStatus(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v2beta1.HorizontalPodAutoscaler, error)
- List(opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error)
- HorizontalPodAutoscalerExpansion
-}
-
-// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
-type horizontalPodAutoscalers struct {
- client rest.Interface
- ns string
-}
-
-// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
-func newHorizontalPodAutoscalers(c *AutoscalingV2beta1Client, namespace string) *horizontalPodAutoscalers {
- return &horizontalPodAutoscalers{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
-func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
- result = &v2beta1.HorizontalPodAutoscaler{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
-func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
- result = &v2beta1.HorizontalPodAutoscalerList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
-func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
-func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
- result = &v2beta1.HorizontalPodAutoscaler{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- Body(horizontalPodAutoscaler).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
-func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
- result = &v2beta1.HorizontalPodAutoscaler{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- Name(horizontalPodAutoscaler.Name).
- Body(horizontalPodAutoscaler).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
- result = &v2beta1.HorizontalPodAutoscaler{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- Name(horizontalPodAutoscaler.Name).
- SubResource("status").
- Body(horizontalPodAutoscaler).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
-func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched horizontalPodAutoscaler.
-func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) {
- result = &v2beta1.HorizontalPodAutoscaler{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("horizontalpodautoscalers").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go
deleted file mode 100644
index 0973bdc5a..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/batch/v1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type BatchV1Interface interface {
- RESTClient() rest.Interface
- JobsGetter
-}
-
-// BatchV1Client is used to interact with features provided by the batch group.
-type BatchV1Client struct {
- restClient rest.Interface
-}
-
-func (c *BatchV1Client) Jobs(namespace string) JobInterface {
- return newJobs(c, namespace)
-}
-
-// NewForConfig creates a new BatchV1Client for the given config.
-func NewForConfig(c *rest.Config) (*BatchV1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &BatchV1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new BatchV1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *BatchV1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new BatchV1Client for the given RESTClient.
-func New(c rest.Interface) *BatchV1Client {
- return &BatchV1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *BatchV1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go
deleted file mode 100644
index 95b44dfa8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go
deleted file mode 100644
index a43cb4a95..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-type JobExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go
deleted file mode 100644
index 8454e576e..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/batch/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// JobsGetter has a method to return a JobInterface.
-// A group's client should implement this interface.
-type JobsGetter interface {
- Jobs(namespace string) JobInterface
-}
-
-// JobInterface has methods to work with Job resources.
-type JobInterface interface {
- Create(*v1.Job) (*v1.Job, error)
- Update(*v1.Job) (*v1.Job, error)
- UpdateStatus(*v1.Job) (*v1.Job, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.Job, error)
- List(opts meta_v1.ListOptions) (*v1.JobList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
- JobExpansion
-}
-
-// jobs implements JobInterface
-type jobs struct {
- client rest.Interface
- ns string
-}
-
-// newJobs returns a Jobs
-func newJobs(c *BatchV1Client, namespace string) *jobs {
- return &jobs{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
-func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err error) {
- result = &v1.Job{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("jobs").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Jobs that match those selectors.
-func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
- result = &v1.JobList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("jobs").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested jobs.
-func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("jobs").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
-func (c *jobs) Create(job *v1.Job) (result *v1.Job, err error) {
- result = &v1.Job{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("jobs").
- Body(job).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
-func (c *jobs) Update(job *v1.Job) (result *v1.Job, err error) {
- result = &v1.Job{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("jobs").
- Name(job.Name).
- Body(job).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) {
- result = &v1.Job{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("jobs").
- Name(job.Name).
- SubResource("status").
- Body(job).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the job and deletes it. Returns an error if one occurs.
-func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("jobs").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("jobs").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched job.
-func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
- result = &v1.Job{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("jobs").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go
deleted file mode 100644
index c46dc6f5d..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/batch/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type BatchV1beta1Interface interface {
- RESTClient() rest.Interface
- CronJobsGetter
-}
-
-// BatchV1beta1Client is used to interact with features provided by the batch group.
-type BatchV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *BatchV1beta1Client) CronJobs(namespace string) CronJobInterface {
- return newCronJobs(c, namespace)
-}
-
-// NewForConfig creates a new BatchV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*BatchV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &BatchV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new BatchV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *BatchV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new BatchV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *BatchV1beta1Client {
- return &BatchV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *BatchV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go
deleted file mode 100644
index 2c61fcf68..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/batch/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// CronJobsGetter has a method to return a CronJobInterface.
-// A group's client should implement this interface.
-type CronJobsGetter interface {
- CronJobs(namespace string) CronJobInterface
-}
-
-// CronJobInterface has methods to work with CronJob resources.
-type CronJobInterface interface {
- Create(*v1beta1.CronJob) (*v1beta1.CronJob, error)
- Update(*v1beta1.CronJob) (*v1beta1.CronJob, error)
- UpdateStatus(*v1beta1.CronJob) (*v1beta1.CronJob, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.CronJob, error)
- List(opts v1.ListOptions) (*v1beta1.CronJobList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error)
- CronJobExpansion
-}
-
-// cronJobs implements CronJobInterface
-type cronJobs struct {
- client rest.Interface
- ns string
-}
-
-// newCronJobs returns a CronJobs
-func newCronJobs(c *BatchV1beta1Client, namespace string) *cronJobs {
- return &cronJobs{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
-func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) {
- result = &v1beta1.CronJob{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("cronjobs").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
-func (c *cronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, err error) {
- result = &v1beta1.CronJobList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("cronjobs").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested cronJobs.
-func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("cronjobs").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any.
-func (c *cronJobs) Create(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
- result = &v1beta1.CronJob{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("cronjobs").
- Body(cronJob).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
-func (c *cronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
- result = &v1beta1.CronJob{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("cronjobs").
- Name(cronJob.Name).
- Body(cronJob).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *cronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
- result = &v1beta1.CronJob{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("cronjobs").
- Name(cronJob.Name).
- SubResource("status").
- Body(cronJob).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
-func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("cronjobs").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("cronjobs").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched cronJob.
-func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) {
- result = &v1beta1.CronJob{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("cronjobs").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/generated_expansion.go
deleted file mode 100644
index 5b7e871b0..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-type CronJobExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go
deleted file mode 100644
index 7d2860999..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v2alpha1
-
-import (
- v2alpha1 "k8s.io/api/batch/v2alpha1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type BatchV2alpha1Interface interface {
- RESTClient() rest.Interface
- CronJobsGetter
-}
-
-// BatchV2alpha1Client is used to interact with features provided by the batch group.
-type BatchV2alpha1Client struct {
- restClient rest.Interface
-}
-
-func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface {
- return newCronJobs(c, namespace)
-}
-
-// NewForConfig creates a new BatchV2alpha1Client for the given config.
-func NewForConfig(c *rest.Config) (*BatchV2alpha1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &BatchV2alpha1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new BatchV2alpha1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *BatchV2alpha1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new BatchV2alpha1Client for the given RESTClient.
-func New(c rest.Interface) *BatchV2alpha1Client {
- return &BatchV2alpha1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v2alpha1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *BatchV2alpha1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go
deleted file mode 100644
index 5f92d35d7..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v2alpha1
-
-import (
- v2alpha1 "k8s.io/api/batch/v2alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// CronJobsGetter has a method to return a CronJobInterface.
-// A group's client should implement this interface.
-type CronJobsGetter interface {
- CronJobs(namespace string) CronJobInterface
-}
-
-// CronJobInterface has methods to work with CronJob resources.
-type CronJobInterface interface {
- Create(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
- Update(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
- UpdateStatus(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v2alpha1.CronJob, error)
- List(opts v1.ListOptions) (*v2alpha1.CronJobList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error)
- CronJobExpansion
-}
-
-// cronJobs implements CronJobInterface
-type cronJobs struct {
- client rest.Interface
- ns string
-}
-
-// newCronJobs returns a CronJobs
-func newCronJobs(c *BatchV2alpha1Client, namespace string) *cronJobs {
- return &cronJobs{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
-func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
- result = &v2alpha1.CronJob{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("cronjobs").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
-func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
- result = &v2alpha1.CronJobList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("cronjobs").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested cronJobs.
-func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("cronjobs").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any.
-func (c *cronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
- result = &v2alpha1.CronJob{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("cronjobs").
- Body(cronJob).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
-func (c *cronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
- result = &v2alpha1.CronJob{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("cronjobs").
- Name(cronJob.Name).
- Body(cronJob).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *cronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
- result = &v2alpha1.CronJob{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("cronjobs").
- Name(cronJob.Name).
- SubResource("status").
- Body(cronJob).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
-func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("cronjobs").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("cronjobs").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched cronJob.
-func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
- result = &v2alpha1.CronJob{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("cronjobs").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go
deleted file mode 100644
index 8739e8628..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v2alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go
deleted file mode 100644
index d30c055a6..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v2alpha1
-
-type CronJobExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go
deleted file mode 100644
index 552056b70..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/certificates/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type CertificatesV1beta1Interface interface {
- RESTClient() rest.Interface
- CertificateSigningRequestsGetter
-}
-
-// CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group.
-type CertificatesV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *CertificatesV1beta1Client) CertificateSigningRequests() CertificateSigningRequestInterface {
- return newCertificateSigningRequests(c)
-}
-
-// NewForConfig creates a new CertificatesV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*CertificatesV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &CertificatesV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new CertificatesV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *CertificatesV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new CertificatesV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *CertificatesV1beta1Client {
- return &CertificatesV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *CertificatesV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go
deleted file mode 100644
index b8c3a5b07..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/certificates/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface.
-// A group's client should implement this interface.
-type CertificateSigningRequestsGetter interface {
- CertificateSigningRequests() CertificateSigningRequestInterface
-}
-
-// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources.
-type CertificateSigningRequestInterface interface {
- Create(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
- Update(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
- UpdateStatus(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.CertificateSigningRequest, error)
- List(opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error)
- CertificateSigningRequestExpansion
-}
-
-// certificateSigningRequests implements CertificateSigningRequestInterface
-type certificateSigningRequests struct {
- client rest.Interface
-}
-
-// newCertificateSigningRequests returns a CertificateSigningRequests
-func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSigningRequests {
- return &certificateSigningRequests{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any.
-func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) {
- result = &v1beta1.CertificateSigningRequest{}
- err = c.client.Get().
- Resource("certificatesigningrequests").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors.
-func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) {
- result = &v1beta1.CertificateSigningRequestList{}
- err = c.client.Get().
- Resource("certificatesigningrequests").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested certificateSigningRequests.
-func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("certificatesigningrequests").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
-func (c *certificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
- result = &v1beta1.CertificateSigningRequest{}
- err = c.client.Post().
- Resource("certificatesigningrequests").
- Body(certificateSigningRequest).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
-func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
- result = &v1beta1.CertificateSigningRequest{}
- err = c.client.Put().
- Resource("certificatesigningrequests").
- Name(certificateSigningRequest.Name).
- Body(certificateSigningRequest).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
- result = &v1beta1.CertificateSigningRequest{}
- err = c.client.Put().
- Resource("certificatesigningrequests").
- Name(certificateSigningRequest.Name).
- SubResource("status").
- Body(certificateSigningRequest).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
-func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("certificatesigningrequests").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("certificatesigningrequests").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched certificateSigningRequest.
-func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) {
- result = &v1beta1.CertificateSigningRequest{}
- err = c.client.Patch(pt).
- Resource("certificatesigningrequests").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go
deleted file mode 100644
index c63b80638..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- certificates "k8s.io/api/certificates/v1beta1"
-)
-
-type CertificateSigningRequestExpansion interface {
- UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error)
-}
-
-func (c *certificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
- result = &certificates.CertificateSigningRequest{}
- err = c.client.Put().
- Resource("certificatesigningrequests").
- Name(certificateSigningRequest.Name).
- Body(certificateSigningRequest).
- SubResource("approval").
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go
deleted file mode 100644
index 74ad7fa90..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go
deleted file mode 100644
index 26e0a7f17..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ComponentStatusesGetter has a method to return a ComponentStatusInterface.
-// A group's client should implement this interface.
-type ComponentStatusesGetter interface {
- ComponentStatuses() ComponentStatusInterface
-}
-
-// ComponentStatusInterface has methods to work with ComponentStatus resources.
-type ComponentStatusInterface interface {
- Create(*v1.ComponentStatus) (*v1.ComponentStatus, error)
- Update(*v1.ComponentStatus) (*v1.ComponentStatus, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.ComponentStatus, error)
- List(opts meta_v1.ListOptions) (*v1.ComponentStatusList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error)
- ComponentStatusExpansion
-}
-
-// componentStatuses implements ComponentStatusInterface
-type componentStatuses struct {
- client rest.Interface
-}
-
-// newComponentStatuses returns a ComponentStatuses
-func newComponentStatuses(c *CoreV1Client) *componentStatuses {
- return &componentStatuses{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any.
-func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result *v1.ComponentStatus, err error) {
- result = &v1.ComponentStatus{}
- err = c.client.Get().
- Resource("componentstatuses").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors.
-func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) {
- result = &v1.ComponentStatusList{}
- err = c.client.Get().
- Resource("componentstatuses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested componentStatuses.
-func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("componentstatuses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any.
-func (c *componentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
- result = &v1.ComponentStatus{}
- err = c.client.Post().
- Resource("componentstatuses").
- Body(componentStatus).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any.
-func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
- result = &v1.ComponentStatus{}
- err = c.client.Put().
- Resource("componentstatuses").
- Name(componentStatus.Name).
- Body(componentStatus).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
-func (c *componentStatuses) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("componentstatuses").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *componentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Resource("componentstatuses").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched componentStatus.
-func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
- result = &v1.ComponentStatus{}
- err = c.client.Patch(pt).
- Resource("componentstatuses").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go
deleted file mode 100644
index df75d2a81..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ConfigMapsGetter has a method to return a ConfigMapInterface.
-// A group's client should implement this interface.
-type ConfigMapsGetter interface {
- ConfigMaps(namespace string) ConfigMapInterface
-}
-
-// ConfigMapInterface has methods to work with ConfigMap resources.
-type ConfigMapInterface interface {
- Create(*v1.ConfigMap) (*v1.ConfigMap, error)
- Update(*v1.ConfigMap) (*v1.ConfigMap, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error)
- List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
- ConfigMapExpansion
-}
-
-// configMaps implements ConfigMapInterface
-type configMaps struct {
- client rest.Interface
- ns string
-}
-
-// newConfigMaps returns a ConfigMaps
-func newConfigMaps(c *CoreV1Client, namespace string) *configMaps {
- return &configMaps{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any.
-func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.ConfigMap, err error) {
- result = &v1.ConfigMap{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("configmaps").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
-func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) {
- result = &v1.ConfigMapList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("configmaps").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested configMaps.
-func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("configmaps").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any.
-func (c *configMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
- result = &v1.ConfigMap{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("configmaps").
- Body(configMap).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any.
-func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
- result = &v1.ConfigMap{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("configmaps").
- Name(configMap.Name).
- Body(configMap).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
-func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("configmaps").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("configmaps").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched configMap.
-func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
- result = &v1.ConfigMap{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("configmaps").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go
deleted file mode 100644
index b75a3dc16..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type CoreV1Interface interface {
- RESTClient() rest.Interface
- ComponentStatusesGetter
- ConfigMapsGetter
- EndpointsGetter
- EventsGetter
- LimitRangesGetter
- NamespacesGetter
- NodesGetter
- PersistentVolumesGetter
- PersistentVolumeClaimsGetter
- PodsGetter
- PodTemplatesGetter
- ReplicationControllersGetter
- ResourceQuotasGetter
- SecretsGetter
- ServicesGetter
- ServiceAccountsGetter
-}
-
-// CoreV1Client is used to interact with features provided by the group.
-type CoreV1Client struct {
- restClient rest.Interface
-}
-
-func (c *CoreV1Client) ComponentStatuses() ComponentStatusInterface {
- return newComponentStatuses(c)
-}
-
-func (c *CoreV1Client) ConfigMaps(namespace string) ConfigMapInterface {
- return newConfigMaps(c, namespace)
-}
-
-func (c *CoreV1Client) Endpoints(namespace string) EndpointsInterface {
- return newEndpoints(c, namespace)
-}
-
-func (c *CoreV1Client) Events(namespace string) EventInterface {
- return newEvents(c, namespace)
-}
-
-func (c *CoreV1Client) LimitRanges(namespace string) LimitRangeInterface {
- return newLimitRanges(c, namespace)
-}
-
-func (c *CoreV1Client) Namespaces() NamespaceInterface {
- return newNamespaces(c)
-}
-
-func (c *CoreV1Client) Nodes() NodeInterface {
- return newNodes(c)
-}
-
-func (c *CoreV1Client) PersistentVolumes() PersistentVolumeInterface {
- return newPersistentVolumes(c)
-}
-
-func (c *CoreV1Client) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface {
- return newPersistentVolumeClaims(c, namespace)
-}
-
-func (c *CoreV1Client) Pods(namespace string) PodInterface {
- return newPods(c, namespace)
-}
-
-func (c *CoreV1Client) PodTemplates(namespace string) PodTemplateInterface {
- return newPodTemplates(c, namespace)
-}
-
-func (c *CoreV1Client) ReplicationControllers(namespace string) ReplicationControllerInterface {
- return newReplicationControllers(c, namespace)
-}
-
-func (c *CoreV1Client) ResourceQuotas(namespace string) ResourceQuotaInterface {
- return newResourceQuotas(c, namespace)
-}
-
-func (c *CoreV1Client) Secrets(namespace string) SecretInterface {
- return newSecrets(c, namespace)
-}
-
-func (c *CoreV1Client) Services(namespace string) ServiceInterface {
- return newServices(c, namespace)
-}
-
-func (c *CoreV1Client) ServiceAccounts(namespace string) ServiceAccountInterface {
- return newServiceAccounts(c, namespace)
-}
-
-// NewForConfig creates a new CoreV1Client for the given config.
-func NewForConfig(c *rest.Config) (*CoreV1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &CoreV1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new CoreV1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *CoreV1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new CoreV1Client for the given RESTClient.
-func New(c rest.Interface) *CoreV1Client {
- return &CoreV1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/api"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *CoreV1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go
deleted file mode 100644
index 95b44dfa8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go
deleted file mode 100644
index f5bc3443a..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// EndpointsGetter has a method to return a EndpointsInterface.
-// A group's client should implement this interface.
-type EndpointsGetter interface {
- Endpoints(namespace string) EndpointsInterface
-}
-
-// EndpointsInterface has methods to work with Endpoints resources.
-type EndpointsInterface interface {
- Create(*v1.Endpoints) (*v1.Endpoints, error)
- Update(*v1.Endpoints) (*v1.Endpoints, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.Endpoints, error)
- List(opts meta_v1.ListOptions) (*v1.EndpointsList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error)
- EndpointsExpansion
-}
-
-// endpoints implements EndpointsInterface
-type endpoints struct {
- client rest.Interface
- ns string
-}
-
-// newEndpoints returns a Endpoints
-func newEndpoints(c *CoreV1Client, namespace string) *endpoints {
- return &endpoints{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any.
-func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.Endpoints, err error) {
- result = &v1.Endpoints{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("endpoints").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Endpoints that match those selectors.
-func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) {
- result = &v1.EndpointsList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("endpoints").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested endpoints.
-func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("endpoints").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any.
-func (c *endpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
- result = &v1.Endpoints{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("endpoints").
- Body(endpoints).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any.
-func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
- result = &v1.Endpoints{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("endpoints").
- Name(endpoints.Name).
- Body(endpoints).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
-func (c *endpoints) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("endpoints").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *endpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("endpoints").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched endpoints.
-func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
- result = &v1.Endpoints{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("endpoints").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go
deleted file mode 100644
index bec36116e..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// EventsGetter has a method to return a EventInterface.
-// A group's client should implement this interface.
-type EventsGetter interface {
- Events(namespace string) EventInterface
-}
-
-// EventInterface has methods to work with Event resources.
-type EventInterface interface {
- Create(*v1.Event) (*v1.Event, error)
- Update(*v1.Event) (*v1.Event, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.Event, error)
- List(opts meta_v1.ListOptions) (*v1.EventList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
- EventExpansion
-}
-
-// events implements EventInterface
-type events struct {
- client rest.Interface
- ns string
-}
-
-// newEvents returns a Events
-func newEvents(c *CoreV1Client, namespace string) *events {
- return &events{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
-func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, err error) {
- result = &v1.Event{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("events").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Events that match those selectors.
-func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
- result = &v1.EventList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("events").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested events.
-func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("events").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.
-func (c *events) Create(event *v1.Event) (result *v1.Event, err error) {
- result = &v1.Event{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("events").
- Body(event).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
-func (c *events) Update(event *v1.Event) (result *v1.Event, err error) {
- result = &v1.Event{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("events").
- Name(event.Name).
- Body(event).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the event and deletes it. Returns an error if one occurs.
-func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("events").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("events").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched event.
-func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
- result = &v1.Event{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("events").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go
deleted file mode 100644
index 6929ade1d..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
-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 v1
-
-import (
- "fmt"
-
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/fields"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/types"
- ref "k8s.io/client-go/tools/reference"
-)
-
-// The EventExpansion interface allows manually adding extra methods to the EventInterface.
-type EventExpansion interface {
- // CreateWithEventNamespace is the same as a Create, except that it sends the request to the event.Namespace.
- CreateWithEventNamespace(event *v1.Event) (*v1.Event, error)
- // UpdateWithEventNamespace is the same as a Update, except that it sends the request to the event.Namespace.
- UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error)
- PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error)
- // Search finds events about the specified object
- Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error)
- // Returns the appropriate field selector based on the API version being used to communicate with the server.
- // The returned field selector can be used with List and Watch to filter desired events.
- GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector
-}
-
-// CreateWithEventNamespace makes a new event. Returns the copy of the event the server returns,
-// or an error. The namespace to create the event within is deduced from the
-// event; it must either match this event client's namespace, or this event
-// client must have been created with the "" namespace.
-func (e *events) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
- if e.ns != "" && event.Namespace != e.ns {
- return nil, fmt.Errorf("can't create an event with namespace '%v' in namespace '%v'", event.Namespace, e.ns)
- }
- result := &v1.Event{}
- err := e.client.Post().
- NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
- Resource("events").
- Body(event).
- Do().
- Into(result)
- return result, err
-}
-
-// UpdateWithEventNamespace modifies an existing event. It returns the copy of the event that the server returns,
-// or an error. The namespace and key to update the event within is deduced from the event. The
-// namespace must either match this event client's namespace, or this event client must have been
-// created with the "" namespace. Update also requires the ResourceVersion to be set in the event
-// object.
-func (e *events) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
- result := &v1.Event{}
- err := e.client.Put().
- NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
- Resource("events").
- Name(event.Name).
- Body(event).
- Do().
- Into(result)
- return result, err
-}
-
-// PatchWithEventNamespace modifies an existing event. It returns the copy of
-// the event that the server returns, or an error. The namespace and name of the
-// target event is deduced from the incompleteEvent. The namespace must either
-// match this event client's namespace, or this event client must have been
-// created with the "" namespace.
-func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) (*v1.Event, error) {
- if e.ns != "" && incompleteEvent.Namespace != e.ns {
- return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns)
- }
- result := &v1.Event{}
- err := e.client.Patch(types.StrategicMergePatchType).
- NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0).
- Resource("events").
- Name(incompleteEvent.Name).
- Body(data).
- Do().
- Into(result)
- return result, err
-}
-
-// Search finds events about the specified object. The namespace of the
-// object must match this event's client namespace unless the event client
-// was made with the "" namespace.
-func (e *events) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) {
- ref, err := ref.GetReference(scheme, objOrRef)
- if err != nil {
- return nil, err
- }
- if e.ns != "" && ref.Namespace != e.ns {
- return nil, fmt.Errorf("won't be able to find any events of namespace '%v' in namespace '%v'", ref.Namespace, e.ns)
- }
- stringRefKind := string(ref.Kind)
- var refKind *string
- if stringRefKind != "" {
- refKind = &stringRefKind
- }
- stringRefUID := string(ref.UID)
- var refUID *string
- if stringRefUID != "" {
- refUID = &stringRefUID
- }
- fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID)
- return e.List(metav1.ListOptions{FieldSelector: fieldSelector.String()})
-}
-
-// Returns the appropriate field selector based on the API version being used to communicate with the server.
-// The returned field selector can be used with List and Watch to filter desired events.
-func (e *events) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
- apiVersion := e.client.APIVersion().String()
- field := fields.Set{}
- if involvedObjectName != nil {
- field[GetInvolvedObjectNameFieldLabel(apiVersion)] = *involvedObjectName
- }
- if involvedObjectNamespace != nil {
- field["involvedObject.namespace"] = *involvedObjectNamespace
- }
- if involvedObjectKind != nil {
- field["involvedObject.kind"] = *involvedObjectKind
- }
- if involvedObjectUID != nil {
- field["involvedObject.uid"] = *involvedObjectUID
- }
- return field.AsSelector()
-}
-
-// Returns the appropriate field label to use for name of the involved object as per the given API version.
-func GetInvolvedObjectNameFieldLabel(version string) string {
- return "involvedObject.name"
-}
-
-// TODO: This is a temporary arrangement and will be removed once all clients are moved to use the clientset.
-type EventSinkImpl struct {
- Interface EventInterface
-}
-
-func (e *EventSinkImpl) Create(event *v1.Event) (*v1.Event, error) {
- return e.Interface.CreateWithEventNamespace(event)
-}
-
-func (e *EventSinkImpl) Update(event *v1.Event) (*v1.Event, error) {
- return e.Interface.UpdateWithEventNamespace(event)
-}
-
-func (e *EventSinkImpl) Patch(event *v1.Event, data []byte) (*v1.Event, error) {
- return e.Interface.PatchWithEventNamespace(event, data)
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go
deleted file mode 100644
index 3f4b5f89c..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-type ComponentStatusExpansion interface{}
-
-type ConfigMapExpansion interface{}
-
-type EndpointsExpansion interface{}
-
-type LimitRangeExpansion interface{}
-
-type PersistentVolumeExpansion interface{}
-
-type PersistentVolumeClaimExpansion interface{}
-
-type PodTemplateExpansion interface{}
-
-type ReplicationControllerExpansion interface{}
-
-type ResourceQuotaExpansion interface{}
-
-type SecretExpansion interface{}
-
-type ServiceAccountExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go
deleted file mode 100644
index a21d09273..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// LimitRangesGetter has a method to return a LimitRangeInterface.
-// A group's client should implement this interface.
-type LimitRangesGetter interface {
- LimitRanges(namespace string) LimitRangeInterface
-}
-
-// LimitRangeInterface has methods to work with LimitRange resources.
-type LimitRangeInterface interface {
- Create(*v1.LimitRange) (*v1.LimitRange, error)
- Update(*v1.LimitRange) (*v1.LimitRange, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.LimitRange, error)
- List(opts meta_v1.ListOptions) (*v1.LimitRangeList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error)
- LimitRangeExpansion
-}
-
-// limitRanges implements LimitRangeInterface
-type limitRanges struct {
- client rest.Interface
- ns string
-}
-
-// newLimitRanges returns a LimitRanges
-func newLimitRanges(c *CoreV1Client, namespace string) *limitRanges {
- return &limitRanges{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any.
-func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.LimitRange, err error) {
- result = &v1.LimitRange{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("limitranges").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of LimitRanges that match those selectors.
-func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) {
- result = &v1.LimitRangeList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("limitranges").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested limitRanges.
-func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("limitranges").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any.
-func (c *limitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
- result = &v1.LimitRange{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("limitranges").
- Body(limitRange).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any.
-func (c *limitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
- result = &v1.LimitRange{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("limitranges").
- Name(limitRange.Name).
- Body(limitRange).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the limitRange and deletes it. Returns an error if one occurs.
-func (c *limitRanges) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("limitranges").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *limitRanges) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("limitranges").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched limitRange.
-func (c *limitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) {
- result = &v1.LimitRange{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("limitranges").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go
deleted file mode 100644
index a1c59959d..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// NamespacesGetter has a method to return a NamespaceInterface.
-// A group's client should implement this interface.
-type NamespacesGetter interface {
- Namespaces() NamespaceInterface
-}
-
-// NamespaceInterface has methods to work with Namespace resources.
-type NamespaceInterface interface {
- Create(*v1.Namespace) (*v1.Namespace, error)
- Update(*v1.Namespace) (*v1.Namespace, error)
- UpdateStatus(*v1.Namespace) (*v1.Namespace, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error)
- List(opts meta_v1.ListOptions) (*v1.NamespaceList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error)
- NamespaceExpansion
-}
-
-// namespaces implements NamespaceInterface
-type namespaces struct {
- client rest.Interface
-}
-
-// newNamespaces returns a Namespaces
-func newNamespaces(c *CoreV1Client) *namespaces {
- return &namespaces{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any.
-func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Namespace, err error) {
- result = &v1.Namespace{}
- err = c.client.Get().
- Resource("namespaces").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
-func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
- result = &v1.NamespaceList{}
- err = c.client.Get().
- Resource("namespaces").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested namespaces.
-func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("namespaces").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any.
-func (c *namespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err error) {
- result = &v1.Namespace{}
- err = c.client.Post().
- Resource("namespaces").
- Body(namespace).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any.
-func (c *namespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err error) {
- result = &v1.Namespace{}
- err = c.client.Put().
- Resource("namespaces").
- Name(namespace.Name).
- Body(namespace).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace, err error) {
- result = &v1.Namespace{}
- err = c.client.Put().
- Resource("namespaces").
- Name(namespace.Name).
- SubResource("status").
- Body(namespace).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
-func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("namespaces").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Resource("namespaces").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched namespace.
-func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
- result = &v1.Namespace{}
- err = c.client.Patch(pt).
- Resource("namespaces").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go
deleted file mode 100644
index 17effe29c..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-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 v1
-
-import "k8s.io/api/core/v1"
-
-// The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface.
-type NamespaceExpansion interface {
- Finalize(item *v1.Namespace) (*v1.Namespace, error)
-}
-
-// Finalize takes the representation of a namespace to update. Returns the server's representation of the namespace, and an error, if it occurs.
-func (c *namespaces) Finalize(namespace *v1.Namespace) (result *v1.Namespace, err error) {
- result = &v1.Namespace{}
- err = c.client.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do().Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go
deleted file mode 100644
index d76251373..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// NodesGetter has a method to return a NodeInterface.
-// A group's client should implement this interface.
-type NodesGetter interface {
- Nodes() NodeInterface
-}
-
-// NodeInterface has methods to work with Node resources.
-type NodeInterface interface {
- Create(*v1.Node) (*v1.Node, error)
- Update(*v1.Node) (*v1.Node, error)
- UpdateStatus(*v1.Node) (*v1.Node, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.Node, error)
- List(opts meta_v1.ListOptions) (*v1.NodeList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error)
- NodeExpansion
-}
-
-// nodes implements NodeInterface
-type nodes struct {
- client rest.Interface
-}
-
-// newNodes returns a Nodes
-func newNodes(c *CoreV1Client) *nodes {
- return &nodes{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the node, and returns the corresponding node object, and an error if there is any.
-func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, err error) {
- result = &v1.Node{}
- err = c.client.Get().
- Resource("nodes").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Nodes that match those selectors.
-func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) {
- result = &v1.NodeList{}
- err = c.client.Get().
- Resource("nodes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested nodes.
-func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("nodes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any.
-func (c *nodes) Create(node *v1.Node) (result *v1.Node, err error) {
- result = &v1.Node{}
- err = c.client.Post().
- Resource("nodes").
- Body(node).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any.
-func (c *nodes) Update(node *v1.Node) (result *v1.Node, err error) {
- result = &v1.Node{}
- err = c.client.Put().
- Resource("nodes").
- Name(node.Name).
- Body(node).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *nodes) UpdateStatus(node *v1.Node) (result *v1.Node, err error) {
- result = &v1.Node{}
- err = c.client.Put().
- Resource("nodes").
- Name(node.Name).
- SubResource("status").
- Body(node).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the node and deletes it. Returns an error if one occurs.
-func (c *nodes) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("nodes").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *nodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Resource("nodes").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched node.
-func (c *nodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) {
- result = &v1.Node{}
- err = c.client.Patch(pt).
- Resource("nodes").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go
deleted file mode 100644
index 5db29c3f7..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-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 v1
-
-import (
- "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/types"
-)
-
-// The NodeExpansion interface allows manually adding extra methods to the NodeInterface.
-type NodeExpansion interface {
- // PatchStatus modifies the status of an existing node. It returns the copy
- // of the node that the server returns, or an error.
- PatchStatus(nodeName string, data []byte) (*v1.Node, error)
-}
-
-// PatchStatus modifies the status of an existing node. It returns the copy of
-// the node that the server returns, or an error.
-func (c *nodes) PatchStatus(nodeName string, data []byte) (*v1.Node, error) {
- result := &v1.Node{}
- err := c.client.Patch(types.StrategicMergePatchType).
- Resource("nodes").
- Name(nodeName).
- SubResource("status").
- Body(data).
- Do().
- Into(result)
- return result, err
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go
deleted file mode 100644
index 36a881772..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// PersistentVolumesGetter has a method to return a PersistentVolumeInterface.
-// A group's client should implement this interface.
-type PersistentVolumesGetter interface {
- PersistentVolumes() PersistentVolumeInterface
-}
-
-// PersistentVolumeInterface has methods to work with PersistentVolume resources.
-type PersistentVolumeInterface interface {
- Create(*v1.PersistentVolume) (*v1.PersistentVolume, error)
- Update(*v1.PersistentVolume) (*v1.PersistentVolume, error)
- UpdateStatus(*v1.PersistentVolume) (*v1.PersistentVolume, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolume, error)
- List(opts meta_v1.ListOptions) (*v1.PersistentVolumeList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error)
- PersistentVolumeExpansion
-}
-
-// persistentVolumes implements PersistentVolumeInterface
-type persistentVolumes struct {
- client rest.Interface
-}
-
-// newPersistentVolumes returns a PersistentVolumes
-func newPersistentVolumes(c *CoreV1Client) *persistentVolumes {
- return &persistentVolumes{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any.
-func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolume, err error) {
- result = &v1.PersistentVolume{}
- err = c.client.Get().
- Resource("persistentvolumes").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors.
-func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) {
- result = &v1.PersistentVolumeList{}
- err = c.client.Get().
- Resource("persistentvolumes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested persistentVolumes.
-func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("persistentvolumes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any.
-func (c *persistentVolumes) Create(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
- result = &v1.PersistentVolume{}
- err = c.client.Post().
- Resource("persistentvolumes").
- Body(persistentVolume).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any.
-func (c *persistentVolumes) Update(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
- result = &v1.PersistentVolume{}
- err = c.client.Put().
- Resource("persistentvolumes").
- Name(persistentVolume.Name).
- Body(persistentVolume).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *persistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
- result = &v1.PersistentVolume{}
- err = c.client.Put().
- Resource("persistentvolumes").
- Name(persistentVolume.Name).
- SubResource("status").
- Body(persistentVolume).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs.
-func (c *persistentVolumes) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("persistentvolumes").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *persistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Resource("persistentvolumes").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched persistentVolume.
-func (c *persistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) {
- result = &v1.PersistentVolume{}
- err = c.client.Patch(pt).
- Resource("persistentvolumes").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go
deleted file mode 100644
index d60566f83..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface.
-// A group's client should implement this interface.
-type PersistentVolumeClaimsGetter interface {
- PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface
-}
-
-// PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources.
-type PersistentVolumeClaimInterface interface {
- Create(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
- Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
- UpdateStatus(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolumeClaim, error)
- List(opts meta_v1.ListOptions) (*v1.PersistentVolumeClaimList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error)
- PersistentVolumeClaimExpansion
-}
-
-// persistentVolumeClaims implements PersistentVolumeClaimInterface
-type persistentVolumeClaims struct {
- client rest.Interface
- ns string
-}
-
-// newPersistentVolumeClaims returns a PersistentVolumeClaims
-func newPersistentVolumeClaims(c *CoreV1Client, namespace string) *persistentVolumeClaims {
- return &persistentVolumeClaims{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any.
-func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolumeClaim, err error) {
- result = &v1.PersistentVolumeClaim{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("persistentvolumeclaims").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors.
-func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) {
- result = &v1.PersistentVolumeClaimList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("persistentvolumeclaims").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
-func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("persistentvolumeclaims").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
-func (c *persistentVolumeClaims) Create(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
- result = &v1.PersistentVolumeClaim{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("persistentvolumeclaims").
- Body(persistentVolumeClaim).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
-func (c *persistentVolumeClaims) Update(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
- result = &v1.PersistentVolumeClaim{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("persistentvolumeclaims").
- Name(persistentVolumeClaim.Name).
- Body(persistentVolumeClaim).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
- result = &v1.PersistentVolumeClaim{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("persistentvolumeclaims").
- Name(persistentVolumeClaim.Name).
- SubResource("status").
- Body(persistentVolumeClaim).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs.
-func (c *persistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("persistentvolumeclaims").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *persistentVolumeClaims) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("persistentvolumeclaims").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched persistentVolumeClaim.
-func (c *persistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) {
- result = &v1.PersistentVolumeClaim{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("persistentvolumeclaims").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go
deleted file mode 100644
index 3825a1cc7..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// PodsGetter has a method to return a PodInterface.
-// A group's client should implement this interface.
-type PodsGetter interface {
- Pods(namespace string) PodInterface
-}
-
-// PodInterface has methods to work with Pod resources.
-type PodInterface interface {
- Create(*v1.Pod) (*v1.Pod, error)
- Update(*v1.Pod) (*v1.Pod, error)
- UpdateStatus(*v1.Pod) (*v1.Pod, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.Pod, error)
- List(opts meta_v1.ListOptions) (*v1.PodList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error)
- PodExpansion
-}
-
-// pods implements PodInterface
-type pods struct {
- client rest.Interface
- ns string
-}
-
-// newPods returns a Pods
-func newPods(c *CoreV1Client, namespace string) *pods {
- return &pods{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any.
-func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err error) {
- result = &v1.Pod{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("pods").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Pods that match those selectors.
-func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) {
- result = &v1.PodList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("pods").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested pods.
-func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("pods").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any.
-func (c *pods) Create(pod *v1.Pod) (result *v1.Pod, err error) {
- result = &v1.Pod{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("pods").
- Body(pod).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any.
-func (c *pods) Update(pod *v1.Pod) (result *v1.Pod, err error) {
- result = &v1.Pod{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("pods").
- Name(pod.Name).
- Body(pod).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) {
- result = &v1.Pod{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("pods").
- Name(pod.Name).
- SubResource("status").
- Body(pod).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the pod and deletes it. Returns an error if one occurs.
-func (c *pods) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("pods").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *pods) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("pods").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched pod.
-func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) {
- result = &v1.Pod{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("pods").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go
deleted file mode 100644
index ed876be8b..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-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 v1
-
-import (
- "k8s.io/api/core/v1"
- policy "k8s.io/api/policy/v1beta1"
- "k8s.io/client-go/kubernetes/scheme"
- restclient "k8s.io/client-go/rest"
-)
-
-// The PodExpansion interface allows manually adding extra methods to the PodInterface.
-type PodExpansion interface {
- Bind(binding *v1.Binding) error
- Evict(eviction *policy.Eviction) error
- GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request
-}
-
-// Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored).
-func (c *pods) Bind(binding *v1.Binding) error {
- return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).SubResource("binding").Body(binding).Do().Error()
-}
-
-func (c *pods) Evict(eviction *policy.Eviction) error {
- return c.client.Post().Namespace(c.ns).Resource("pods").Name(eviction.Name).SubResource("eviction").Body(eviction).Do().Error()
-}
-
-// Get constructs a request for getting the logs for a pod
-func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request {
- return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, scheme.ParameterCodec)
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go
deleted file mode 100644
index 028423adc..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// PodTemplatesGetter has a method to return a PodTemplateInterface.
-// A group's client should implement this interface.
-type PodTemplatesGetter interface {
- PodTemplates(namespace string) PodTemplateInterface
-}
-
-// PodTemplateInterface has methods to work with PodTemplate resources.
-type PodTemplateInterface interface {
- Create(*v1.PodTemplate) (*v1.PodTemplate, error)
- Update(*v1.PodTemplate) (*v1.PodTemplate, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.PodTemplate, error)
- List(opts meta_v1.ListOptions) (*v1.PodTemplateList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error)
- PodTemplateExpansion
-}
-
-// podTemplates implements PodTemplateInterface
-type podTemplates struct {
- client rest.Interface
- ns string
-}
-
-// newPodTemplates returns a PodTemplates
-func newPodTemplates(c *CoreV1Client, namespace string) *podTemplates {
- return &podTemplates{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any.
-func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1.PodTemplate, err error) {
- result = &v1.PodTemplate{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("podtemplates").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of PodTemplates that match those selectors.
-func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateList, err error) {
- result = &v1.PodTemplateList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("podtemplates").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested podTemplates.
-func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("podtemplates").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any.
-func (c *podTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
- result = &v1.PodTemplate{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("podtemplates").
- Body(podTemplate).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any.
-func (c *podTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
- result = &v1.PodTemplate{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("podtemplates").
- Name(podTemplate.Name).
- Body(podTemplate).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs.
-func (c *podTemplates) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("podtemplates").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *podTemplates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("podtemplates").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched podTemplate.
-func (c *podTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) {
- result = &v1.PodTemplate{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("podtemplates").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go
deleted file mode 100644
index 36b3141c8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- v1beta1 "k8s.io/api/extensions/v1beta1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ReplicationControllersGetter has a method to return a ReplicationControllerInterface.
-// A group's client should implement this interface.
-type ReplicationControllersGetter interface {
- ReplicationControllers(namespace string) ReplicationControllerInterface
-}
-
-// ReplicationControllerInterface has methods to work with ReplicationController resources.
-type ReplicationControllerInterface interface {
- Create(*v1.ReplicationController) (*v1.ReplicationController, error)
- Update(*v1.ReplicationController) (*v1.ReplicationController, error)
- UpdateStatus(*v1.ReplicationController) (*v1.ReplicationController, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.ReplicationController, error)
- List(opts meta_v1.ListOptions) (*v1.ReplicationControllerList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error)
- GetScale(replicationControllerName string, options meta_v1.GetOptions) (*v1beta1.Scale, error)
- UpdateScale(replicationControllerName string, scale *v1beta1.Scale) (*v1beta1.Scale, error)
-
- ReplicationControllerExpansion
-}
-
-// replicationControllers implements ReplicationControllerInterface
-type replicationControllers struct {
- client rest.Interface
- ns string
-}
-
-// newReplicationControllers returns a ReplicationControllers
-func newReplicationControllers(c *CoreV1Client, namespace string) *replicationControllers {
- return &replicationControllers{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any.
-func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (result *v1.ReplicationController, err error) {
- result = &v1.ReplicationController{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("replicationcontrollers").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors.
-func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.ReplicationControllerList, err error) {
- result = &v1.ReplicationControllerList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("replicationcontrollers").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested replicationControllers.
-func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("replicationcontrollers").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any.
-func (c *replicationControllers) Create(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
- result = &v1.ReplicationController{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("replicationcontrollers").
- Body(replicationController).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any.
-func (c *replicationControllers) Update(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
- result = &v1.ReplicationController{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("replicationcontrollers").
- Name(replicationController.Name).
- Body(replicationController).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *replicationControllers) UpdateStatus(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
- result = &v1.ReplicationController{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("replicationcontrollers").
- Name(replicationController.Name).
- SubResource("status").
- Body(replicationController).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the replicationController and deletes it. Returns an error if one occurs.
-func (c *replicationControllers) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("replicationcontrollers").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *replicationControllers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("replicationcontrollers").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched replicationController.
-func (c *replicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) {
- result = &v1.ReplicationController{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("replicationcontrollers").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
-
-// GetScale takes name of the replicationController, and returns the corresponding v1beta1.Scale object, and an error if there is any.
-func (c *replicationControllers) GetScale(replicationControllerName string, options meta_v1.GetOptions) (result *v1beta1.Scale, err error) {
- result = &v1beta1.Scale{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("replicationcontrollers").
- Name(replicationControllerName).
- SubResource("scale").
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
-func (c *replicationControllers) UpdateScale(replicationControllerName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
- result = &v1beta1.Scale{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("replicationcontrollers").
- Name(replicationControllerName).
- SubResource("scale").
- Body(scale).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go
deleted file mode 100644
index 990326226..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ResourceQuotasGetter has a method to return a ResourceQuotaInterface.
-// A group's client should implement this interface.
-type ResourceQuotasGetter interface {
- ResourceQuotas(namespace string) ResourceQuotaInterface
-}
-
-// ResourceQuotaInterface has methods to work with ResourceQuota resources.
-type ResourceQuotaInterface interface {
- Create(*v1.ResourceQuota) (*v1.ResourceQuota, error)
- Update(*v1.ResourceQuota) (*v1.ResourceQuota, error)
- UpdateStatus(*v1.ResourceQuota) (*v1.ResourceQuota, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.ResourceQuota, error)
- List(opts meta_v1.ListOptions) (*v1.ResourceQuotaList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error)
- ResourceQuotaExpansion
-}
-
-// resourceQuotas implements ResourceQuotaInterface
-type resourceQuotas struct {
- client rest.Interface
- ns string
-}
-
-// newResourceQuotas returns a ResourceQuotas
-func newResourceQuotas(c *CoreV1Client, namespace string) *resourceQuotas {
- return &resourceQuotas{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any.
-func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v1.ResourceQuota, err error) {
- result = &v1.ResourceQuota{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("resourcequotas").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors.
-func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuotaList, err error) {
- result = &v1.ResourceQuotaList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("resourcequotas").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested resourceQuotas.
-func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("resourcequotas").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any.
-func (c *resourceQuotas) Create(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
- result = &v1.ResourceQuota{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("resourcequotas").
- Body(resourceQuota).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any.
-func (c *resourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
- result = &v1.ResourceQuota{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("resourcequotas").
- Name(resourceQuota.Name).
- Body(resourceQuota).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *resourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
- result = &v1.ResourceQuota{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("resourcequotas").
- Name(resourceQuota.Name).
- SubResource("status").
- Body(resourceQuota).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs.
-func (c *resourceQuotas) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("resourcequotas").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *resourceQuotas) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("resourcequotas").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched resourceQuota.
-func (c *resourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) {
- result = &v1.ResourceQuota{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("resourcequotas").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go
deleted file mode 100644
index a21a2167c..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// SecretsGetter has a method to return a SecretInterface.
-// A group's client should implement this interface.
-type SecretsGetter interface {
- Secrets(namespace string) SecretInterface
-}
-
-// SecretInterface has methods to work with Secret resources.
-type SecretInterface interface {
- Create(*v1.Secret) (*v1.Secret, error)
- Update(*v1.Secret) (*v1.Secret, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.Secret, error)
- List(opts meta_v1.ListOptions) (*v1.SecretList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error)
- SecretExpansion
-}
-
-// secrets implements SecretInterface
-type secrets struct {
- client rest.Interface
- ns string
-}
-
-// newSecrets returns a Secrets
-func newSecrets(c *CoreV1Client, namespace string) *secrets {
- return &secrets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any.
-func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secret, err error) {
- result = &v1.Secret{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("secrets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Secrets that match those selectors.
-func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) {
- result = &v1.SecretList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("secrets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested secrets.
-func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("secrets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any.
-func (c *secrets) Create(secret *v1.Secret) (result *v1.Secret, err error) {
- result = &v1.Secret{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("secrets").
- Body(secret).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any.
-func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
- result = &v1.Secret{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("secrets").
- Name(secret.Name).
- Body(secret).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the secret and deletes it. Returns an error if one occurs.
-func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("secrets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *secrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("secrets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched secret.
-func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) {
- result = &v1.Secret{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("secrets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go
deleted file mode 100644
index 744714740..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ServicesGetter has a method to return a ServiceInterface.
-// A group's client should implement this interface.
-type ServicesGetter interface {
- Services(namespace string) ServiceInterface
-}
-
-// ServiceInterface has methods to work with Service resources.
-type ServiceInterface interface {
- Create(*v1.Service) (*v1.Service, error)
- Update(*v1.Service) (*v1.Service, error)
- UpdateStatus(*v1.Service) (*v1.Service, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.Service, error)
- List(opts meta_v1.ListOptions) (*v1.ServiceList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error)
- ServiceExpansion
-}
-
-// services implements ServiceInterface
-type services struct {
- client rest.Interface
- ns string
-}
-
-// newServices returns a Services
-func newServices(c *CoreV1Client, namespace string) *services {
- return &services{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the service, and returns the corresponding service object, and an error if there is any.
-func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Service, err error) {
- result = &v1.Service{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("services").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Services that match those selectors.
-func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) {
- result = &v1.ServiceList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("services").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested services.
-func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("services").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any.
-func (c *services) Create(service *v1.Service) (result *v1.Service, err error) {
- result = &v1.Service{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("services").
- Body(service).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any.
-func (c *services) Update(service *v1.Service) (result *v1.Service, err error) {
- result = &v1.Service{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("services").
- Name(service.Name).
- Body(service).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err error) {
- result = &v1.Service{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("services").
- Name(service.Name).
- SubResource("status").
- Body(service).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the service and deletes it. Returns an error if one occurs.
-func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("services").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("services").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched service.
-func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
- result = &v1.Service{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("services").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go
deleted file mode 100644
index 4937fd1a3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-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 v1
-
-import (
- "k8s.io/apimachinery/pkg/util/net"
- restclient "k8s.io/client-go/rest"
-)
-
-// The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface.
-type ServiceExpansion interface {
- ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper
-}
-
-// ProxyGet returns a response of the service by calling it through the proxy.
-func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
- request := c.client.Get().
- Namespace(c.ns).
- Resource("services").
- SubResource("proxy").
- Name(net.JoinSchemeNamePort(scheme, name, port)).
- Suffix(path)
- for k, v := range params {
- request = request.Param(k, v)
- }
- return request
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go
deleted file mode 100644
index c3fbebd5e..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ServiceAccountsGetter has a method to return a ServiceAccountInterface.
-// A group's client should implement this interface.
-type ServiceAccountsGetter interface {
- ServiceAccounts(namespace string) ServiceAccountInterface
-}
-
-// ServiceAccountInterface has methods to work with ServiceAccount resources.
-type ServiceAccountInterface interface {
- Create(*v1.ServiceAccount) (*v1.ServiceAccount, error)
- Update(*v1.ServiceAccount) (*v1.ServiceAccount, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.ServiceAccount, error)
- List(opts meta_v1.ListOptions) (*v1.ServiceAccountList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error)
- ServiceAccountExpansion
-}
-
-// serviceAccounts implements ServiceAccountInterface
-type serviceAccounts struct {
- client rest.Interface
- ns string
-}
-
-// newServiceAccounts returns a ServiceAccounts
-func newServiceAccounts(c *CoreV1Client, namespace string) *serviceAccounts {
- return &serviceAccounts{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any.
-func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result *v1.ServiceAccount, err error) {
- result = &v1.ServiceAccount{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("serviceaccounts").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors.
-func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAccountList, err error) {
- result = &v1.ServiceAccountList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("serviceaccounts").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested serviceAccounts.
-func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("serviceaccounts").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any.
-func (c *serviceAccounts) Create(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
- result = &v1.ServiceAccount{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("serviceaccounts").
- Body(serviceAccount).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any.
-func (c *serviceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
- result = &v1.ServiceAccount{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("serviceaccounts").
- Name(serviceAccount.Name).
- Body(serviceAccount).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs.
-func (c *serviceAccounts) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("serviceaccounts").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *serviceAccounts) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("serviceaccounts").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched serviceAccount.
-func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) {
- result = &v1.ServiceAccount{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("serviceaccounts").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go
deleted file mode 100644
index b186b967f..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/events/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// EventsGetter has a method to return a EventInterface.
-// A group's client should implement this interface.
-type EventsGetter interface {
- Events(namespace string) EventInterface
-}
-
-// EventInterface has methods to work with Event resources.
-type EventInterface interface {
- Create(*v1beta1.Event) (*v1beta1.Event, error)
- Update(*v1beta1.Event) (*v1beta1.Event, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.Event, error)
- List(opts v1.ListOptions) (*v1beta1.EventList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error)
- EventExpansion
-}
-
-// events implements EventInterface
-type events struct {
- client rest.Interface
- ns string
-}
-
-// newEvents returns a Events
-func newEvents(c *EventsV1beta1Client, namespace string) *events {
- return &events{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
-func (c *events) Get(name string, options v1.GetOptions) (result *v1beta1.Event, err error) {
- result = &v1beta1.Event{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("events").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Events that match those selectors.
-func (c *events) List(opts v1.ListOptions) (result *v1beta1.EventList, err error) {
- result = &v1beta1.EventList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("events").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested events.
-func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("events").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.
-func (c *events) Create(event *v1beta1.Event) (result *v1beta1.Event, err error) {
- result = &v1beta1.Event{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("events").
- Body(event).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
-func (c *events) Update(event *v1beta1.Event) (result *v1beta1.Event, err error) {
- result = &v1beta1.Event{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("events").
- Name(event.Name).
- Body(event).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the event and deletes it. Returns an error if one occurs.
-func (c *events) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("events").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("events").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched event.
-func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error) {
- result = &v1beta1.Event{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("events").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go
deleted file mode 100644
index 5ae7fbc99..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/events/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type EventsV1beta1Interface interface {
- RESTClient() rest.Interface
- EventsGetter
-}
-
-// EventsV1beta1Client is used to interact with features provided by the events.k8s.io group.
-type EventsV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *EventsV1beta1Client) Events(namespace string) EventInterface {
- return newEvents(c, namespace)
-}
-
-// NewForConfig creates a new EventsV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*EventsV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &EventsV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new EventsV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *EventsV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new EventsV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *EventsV1beta1Client {
- return &EventsV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *EventsV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/generated_expansion.go
deleted file mode 100644
index e2522111d..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-type EventExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go
deleted file mode 100644
index f33ce3eb4..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// DaemonSetsGetter has a method to return a DaemonSetInterface.
-// A group's client should implement this interface.
-type DaemonSetsGetter interface {
- DaemonSets(namespace string) DaemonSetInterface
-}
-
-// DaemonSetInterface has methods to work with DaemonSet resources.
-type DaemonSetInterface interface {
- Create(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
- Update(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
- UpdateStatus(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.DaemonSet, error)
- List(opts v1.ListOptions) (*v1beta1.DaemonSetList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error)
- DaemonSetExpansion
-}
-
-// daemonSets implements DaemonSetInterface
-type daemonSets struct {
- client rest.Interface
- ns string
-}
-
-// newDaemonSets returns a DaemonSets
-func newDaemonSets(c *ExtensionsV1beta1Client, namespace string) *daemonSets {
- return &daemonSets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
-func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) {
- result = &v1beta1.DaemonSet{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
-func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) {
- result = &v1beta1.DaemonSetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("daemonsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested daemonSets.
-func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("daemonsets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.
-func (c *daemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
- result = &v1beta1.DaemonSet{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("daemonsets").
- Body(daemonSet).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
-func (c *daemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
- result = &v1beta1.DaemonSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(daemonSet.Name).
- Body(daemonSet).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *daemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
- result = &v1beta1.DaemonSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(daemonSet.Name).
- SubResource("status").
- Body(daemonSet).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
-func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("daemonsets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("daemonsets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched daemonSet.
-func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) {
- result = &v1beta1.DaemonSet{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("daemonsets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go
deleted file mode 100644
index 91eab950e..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// DeploymentsGetter has a method to return a DeploymentInterface.
-// A group's client should implement this interface.
-type DeploymentsGetter interface {
- Deployments(namespace string) DeploymentInterface
-}
-
-// DeploymentInterface has methods to work with Deployment resources.
-type DeploymentInterface interface {
- Create(*v1beta1.Deployment) (*v1beta1.Deployment, error)
- Update(*v1beta1.Deployment) (*v1beta1.Deployment, error)
- UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error)
- List(opts v1.ListOptions) (*v1beta1.DeploymentList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
- GetScale(deploymentName string, options v1.GetOptions) (*v1beta1.Scale, error)
- UpdateScale(deploymentName string, scale *v1beta1.Scale) (*v1beta1.Scale, error)
-
- DeploymentExpansion
-}
-
-// deployments implements DeploymentInterface
-type deployments struct {
- client rest.Interface
- ns string
-}
-
-// newDeployments returns a Deployments
-func newDeployments(c *ExtensionsV1beta1Client, namespace string) *deployments {
- return &deployments{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
-func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
- result = &v1beta1.Deployment{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Deployments that match those selectors.
-func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
- result = &v1beta1.DeploymentList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested deployments.
-func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
-func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
- result = &v1beta1.Deployment{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("deployments").
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
-func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
- result = &v1beta1.Deployment{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("deployments").
- Name(deployment.Name).
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
- result = &v1beta1.Deployment{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("deployments").
- Name(deployment.Name).
- SubResource("status").
- Body(deployment).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
-func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("deployments").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("deployments").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched deployment.
-func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
- result = &v1beta1.Deployment{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("deployments").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
-
-// GetScale takes name of the deployment, and returns the corresponding v1beta1.Scale object, and an error if there is any.
-func (c *deployments) GetScale(deploymentName string, options v1.GetOptions) (result *v1beta1.Scale, err error) {
- result = &v1beta1.Scale{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("deployments").
- Name(deploymentName).
- SubResource("scale").
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
-func (c *deployments) UpdateScale(deploymentName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
- result = &v1beta1.Scale{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("deployments").
- Name(deploymentName).
- SubResource("scale").
- Body(scale).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go
deleted file mode 100644
index 24734be6a..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-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 v1beta1
-
-import "k8s.io/api/extensions/v1beta1"
-
-// The DeploymentExpansion interface allows manually adding extra methods to the DeploymentInterface.
-type DeploymentExpansion interface {
- Rollback(*v1beta1.DeploymentRollback) error
-}
-
-// Rollback applied the provided DeploymentRollback to the named deployment in the current namespace.
-func (c *deployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error {
- return c.client.Post().Namespace(c.ns).Resource("deployments").Name(deploymentRollback.Name).SubResource("rollback").Body(deploymentRollback).Do().Error()
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go
deleted file mode 100644
index 73128ed3d..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type ExtensionsV1beta1Interface interface {
- RESTClient() rest.Interface
- DaemonSetsGetter
- DeploymentsGetter
- IngressesGetter
- PodSecurityPoliciesGetter
- ReplicaSetsGetter
- ScalesGetter
-}
-
-// ExtensionsV1beta1Client is used to interact with features provided by the extensions group.
-type ExtensionsV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface {
- return newDaemonSets(c, namespace)
-}
-
-func (c *ExtensionsV1beta1Client) Deployments(namespace string) DeploymentInterface {
- return newDeployments(c, namespace)
-}
-
-func (c *ExtensionsV1beta1Client) Ingresses(namespace string) IngressInterface {
- return newIngresses(c, namespace)
-}
-
-func (c *ExtensionsV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface {
- return newPodSecurityPolicies(c)
-}
-
-func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterface {
- return newReplicaSets(c, namespace)
-}
-
-func (c *ExtensionsV1beta1Client) Scales(namespace string) ScaleInterface {
- return newScales(c, namespace)
-}
-
-// NewForConfig creates a new ExtensionsV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &ExtensionsV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new ExtensionsV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *ExtensionsV1beta1Client {
- return &ExtensionsV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go
deleted file mode 100644
index e7062ca2c..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-type DaemonSetExpansion interface{}
-
-type IngressExpansion interface{}
-
-type PodSecurityPolicyExpansion interface{}
-
-type ReplicaSetExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go
deleted file mode 100644
index e9ba108af..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// IngressesGetter has a method to return a IngressInterface.
-// A group's client should implement this interface.
-type IngressesGetter interface {
- Ingresses(namespace string) IngressInterface
-}
-
-// IngressInterface has methods to work with Ingress resources.
-type IngressInterface interface {
- Create(*v1beta1.Ingress) (*v1beta1.Ingress, error)
- Update(*v1beta1.Ingress) (*v1beta1.Ingress, error)
- UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.Ingress, error)
- List(opts v1.ListOptions) (*v1beta1.IngressList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error)
- IngressExpansion
-}
-
-// ingresses implements IngressInterface
-type ingresses struct {
- client rest.Interface
- ns string
-}
-
-// newIngresses returns a Ingresses
-func newIngresses(c *ExtensionsV1beta1Client, namespace string) *ingresses {
- return &ingresses{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any.
-func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) {
- result = &v1beta1.Ingress{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("ingresses").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Ingresses that match those selectors.
-func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) {
- result = &v1beta1.IngressList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("ingresses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested ingresses.
-func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("ingresses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any.
-func (c *ingresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
- result = &v1beta1.Ingress{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("ingresses").
- Body(ingress).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any.
-func (c *ingresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
- result = &v1beta1.Ingress{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("ingresses").
- Name(ingress.Name).
- Body(ingress).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
- result = &v1beta1.Ingress{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("ingresses").
- Name(ingress.Name).
- SubResource("status").
- Body(ingress).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the ingress and deletes it. Returns an error if one occurs.
-func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("ingresses").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("ingresses").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched ingress.
-func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) {
- result = &v1beta1.Ingress{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("ingresses").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go
deleted file mode 100644
index a1c274c2e..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface.
-// A group's client should implement this interface.
-type PodSecurityPoliciesGetter interface {
- PodSecurityPolicies() PodSecurityPolicyInterface
-}
-
-// PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources.
-type PodSecurityPolicyInterface interface {
- Create(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)
- Update(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.PodSecurityPolicy, error)
- List(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error)
- PodSecurityPolicyExpansion
-}
-
-// podSecurityPolicies implements PodSecurityPolicyInterface
-type podSecurityPolicies struct {
- client rest.Interface
-}
-
-// newPodSecurityPolicies returns a PodSecurityPolicies
-func newPodSecurityPolicies(c *ExtensionsV1beta1Client) *podSecurityPolicies {
- return &podSecurityPolicies{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any.
-func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) {
- result = &v1beta1.PodSecurityPolicy{}
- err = c.client.Get().
- Resource("podsecuritypolicies").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors.
-func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) {
- result = &v1beta1.PodSecurityPolicyList{}
- err = c.client.Get().
- Resource("podsecuritypolicies").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested podSecurityPolicies.
-func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("podsecuritypolicies").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
-func (c *podSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
- result = &v1beta1.PodSecurityPolicy{}
- err = c.client.Post().
- Resource("podsecuritypolicies").
- Body(podSecurityPolicy).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
-func (c *podSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
- result = &v1beta1.PodSecurityPolicy{}
- err = c.client.Put().
- Resource("podsecuritypolicies").
- Name(podSecurityPolicy.Name).
- Body(podSecurityPolicy).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs.
-func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("podsecuritypolicies").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("podsecuritypolicies").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched podSecurityPolicy.
-func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) {
- result = &v1beta1.PodSecurityPolicy{}
- err = c.client.Patch(pt).
- Resource("podsecuritypolicies").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go
deleted file mode 100644
index ed68f458b..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
-// A group's client should implement this interface.
-type ReplicaSetsGetter interface {
- ReplicaSets(namespace string) ReplicaSetInterface
-}
-
-// ReplicaSetInterface has methods to work with ReplicaSet resources.
-type ReplicaSetInterface interface {
- Create(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
- Update(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
- UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.ReplicaSet, error)
- List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error)
- GetScale(replicaSetName string, options v1.GetOptions) (*v1beta1.Scale, error)
- UpdateScale(replicaSetName string, scale *v1beta1.Scale) (*v1beta1.Scale, error)
-
- ReplicaSetExpansion
-}
-
-// replicaSets implements ReplicaSetInterface
-type replicaSets struct {
- client rest.Interface
- ns string
-}
-
-// newReplicaSets returns a ReplicaSets
-func newReplicaSets(c *ExtensionsV1beta1Client, namespace string) *replicaSets {
- return &replicaSets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
-func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) {
- result = &v1beta1.ReplicaSet{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("replicasets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
-func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
- result = &v1beta1.ReplicaSetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("replicasets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested replicaSets.
-func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("replicasets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any.
-func (c *replicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
- result = &v1beta1.ReplicaSet{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("replicasets").
- Body(replicaSet).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
-func (c *replicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
- result = &v1beta1.ReplicaSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("replicasets").
- Name(replicaSet.Name).
- Body(replicaSet).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *replicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
- result = &v1beta1.ReplicaSet{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("replicasets").
- Name(replicaSet.Name).
- SubResource("status").
- Body(replicaSet).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
-func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("replicasets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("replicasets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched replicaSet.
-func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) {
- result = &v1beta1.ReplicaSet{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("replicasets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
-
-// GetScale takes name of the replicaSet, and returns the corresponding v1beta1.Scale object, and an error if there is any.
-func (c *replicaSets) GetScale(replicaSetName string, options v1.GetOptions) (result *v1beta1.Scale, err error) {
- result = &v1beta1.Scale{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("replicasets").
- Name(replicaSetName).
- SubResource("scale").
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
-func (c *replicaSets) UpdateScale(replicaSetName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
- result = &v1beta1.Scale{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("replicasets").
- Name(replicaSetName).
- SubResource("scale").
- Body(scale).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go
deleted file mode 100644
index 8d62590ca..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// ScalesGetter has a method to return a ScaleInterface.
-// A group's client should implement this interface.
-type ScalesGetter interface {
- Scales(namespace string) ScaleInterface
-}
-
-// ScaleInterface has methods to work with Scale resources.
-type ScaleInterface interface {
- ScaleExpansion
-}
-
-// scales implements ScaleInterface
-type scales struct {
- client rest.Interface
- ns string
-}
-
-// newScales returns a Scales
-func newScales(c *ExtensionsV1beta1Client, namespace string) *scales {
- return &scales{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go
deleted file mode 100644
index c9733cb28..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-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 v1beta1
-
-import (
- "k8s.io/api/extensions/v1beta1"
- "k8s.io/apimachinery/pkg/api/meta"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// The ScaleExpansion interface allows manually adding extra methods to the ScaleInterface.
-type ScaleExpansion interface {
- Get(kind string, name string) (*v1beta1.Scale, error)
- Update(kind string, scale *v1beta1.Scale) (*v1beta1.Scale, error)
-}
-
-// Get takes the reference to scale subresource and returns the subresource or error, if one occurs.
-func (c *scales) Get(kind string, name string) (result *v1beta1.Scale, err error) {
- result = &v1beta1.Scale{}
-
- // TODO this method needs to take a proper unambiguous kind
- fullyQualifiedKind := schema.GroupVersionKind{Kind: kind}
- resource, _ := meta.UnsafeGuessKindToResource(fullyQualifiedKind)
-
- err = c.client.Get().
- Namespace(c.ns).
- Resource(resource.Resource).
- Name(name).
- SubResource("scale").
- Do().
- Into(result)
- return
-}
-
-func (c *scales) Update(kind string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
- result = &v1beta1.Scale{}
-
- // TODO this method needs to take a proper unambiguous kind
- fullyQualifiedKind := schema.GroupVersionKind{Kind: kind}
- resource, _ := meta.UnsafeGuessKindToResource(fullyQualifiedKind)
-
- err = c.client.Put().
- Namespace(scale.Namespace).
- Resource(resource.Resource).
- Name(scale.Name).
- SubResource("scale").
- Body(scale).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go
deleted file mode 100644
index 95b44dfa8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go
deleted file mode 100644
index 6c72ca5c5..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-type NetworkPolicyExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go
deleted file mode 100644
index d1059d02b..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/networking/v1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type NetworkingV1Interface interface {
- RESTClient() rest.Interface
- NetworkPoliciesGetter
-}
-
-// NetworkingV1Client is used to interact with features provided by the networking.k8s.io group.
-type NetworkingV1Client struct {
- restClient rest.Interface
-}
-
-func (c *NetworkingV1Client) NetworkPolicies(namespace string) NetworkPolicyInterface {
- return newNetworkPolicies(c, namespace)
-}
-
-// NewForConfig creates a new NetworkingV1Client for the given config.
-func NewForConfig(c *rest.Config) (*NetworkingV1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &NetworkingV1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new NetworkingV1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *NetworkingV1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new NetworkingV1Client for the given RESTClient.
-func New(c rest.Interface) *NetworkingV1Client {
- return &NetworkingV1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *NetworkingV1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go
deleted file mode 100644
index 8b1518234..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/networking/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// NetworkPoliciesGetter has a method to return a NetworkPolicyInterface.
-// A group's client should implement this interface.
-type NetworkPoliciesGetter interface {
- NetworkPolicies(namespace string) NetworkPolicyInterface
-}
-
-// NetworkPolicyInterface has methods to work with NetworkPolicy resources.
-type NetworkPolicyInterface interface {
- Create(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
- Update(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.NetworkPolicy, error)
- List(opts meta_v1.ListOptions) (*v1.NetworkPolicyList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error)
- NetworkPolicyExpansion
-}
-
-// networkPolicies implements NetworkPolicyInterface
-type networkPolicies struct {
- client rest.Interface
- ns string
-}
-
-// newNetworkPolicies returns a NetworkPolicies
-func newNetworkPolicies(c *NetworkingV1Client, namespace string) *networkPolicies {
- return &networkPolicies{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any.
-func (c *networkPolicies) Get(name string, options meta_v1.GetOptions) (result *v1.NetworkPolicy, err error) {
- result = &v1.NetworkPolicy{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("networkpolicies").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors.
-func (c *networkPolicies) List(opts meta_v1.ListOptions) (result *v1.NetworkPolicyList, err error) {
- result = &v1.NetworkPolicyList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("networkpolicies").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested networkPolicies.
-func (c *networkPolicies) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("networkpolicies").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any.
-func (c *networkPolicies) Create(networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) {
- result = &v1.NetworkPolicy{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("networkpolicies").
- Body(networkPolicy).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any.
-func (c *networkPolicies) Update(networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) {
- result = &v1.NetworkPolicy{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("networkpolicies").
- Name(networkPolicy.Name).
- Body(networkPolicy).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
-func (c *networkPolicies) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("networkpolicies").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *networkPolicies) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("networkpolicies").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched networkPolicy.
-func (c *networkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error) {
- result = &v1.NetworkPolicy{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("networkpolicies").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go
deleted file mode 100644
index 63e3a6821..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- rest "k8s.io/client-go/rest"
-)
-
-// EvictionsGetter has a method to return a EvictionInterface.
-// A group's client should implement this interface.
-type EvictionsGetter interface {
- Evictions(namespace string) EvictionInterface
-}
-
-// EvictionInterface has methods to work with Eviction resources.
-type EvictionInterface interface {
- EvictionExpansion
-}
-
-// evictions implements EvictionInterface
-type evictions struct {
- client rest.Interface
- ns string
-}
-
-// newEvictions returns a Evictions
-func newEvictions(c *PolicyV1beta1Client, namespace string) *evictions {
- return &evictions{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go
deleted file mode 100644
index 40bad265f..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-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 v1beta1
-
-import (
- policy "k8s.io/api/policy/v1beta1"
-)
-
-// The EvictionExpansion interface allows manually adding extra methods to the ScaleInterface.
-type EvictionExpansion interface {
- Evict(eviction *policy.Eviction) error
-}
-
-func (c *evictions) Evict(eviction *policy.Eviction) error {
- return c.client.Post().
- AbsPath("/api/v1").
- Namespace(eviction.Namespace).
- Resource("pods").
- Name(eviction.Name).
- SubResource("eviction").
- Body(eviction).
- Do().
- Error()
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go
deleted file mode 100644
index a119239ca..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-type PodDisruptionBudgetExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go
deleted file mode 100644
index 45d2c1766..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/policy/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface.
-// A group's client should implement this interface.
-type PodDisruptionBudgetsGetter interface {
- PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface
-}
-
-// PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources.
-type PodDisruptionBudgetInterface interface {
- Create(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error)
- Update(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error)
- UpdateStatus(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.PodDisruptionBudget, error)
- List(opts v1.ListOptions) (*v1beta1.PodDisruptionBudgetList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error)
- PodDisruptionBudgetExpansion
-}
-
-// podDisruptionBudgets implements PodDisruptionBudgetInterface
-type podDisruptionBudgets struct {
- client rest.Interface
- ns string
-}
-
-// newPodDisruptionBudgets returns a PodDisruptionBudgets
-func newPodDisruptionBudgets(c *PolicyV1beta1Client, namespace string) *podDisruptionBudgets {
- return &podDisruptionBudgets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any.
-func (c *podDisruptionBudgets) Get(name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) {
- result = &v1beta1.PodDisruptionBudget{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("poddisruptionbudgets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors.
-func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) {
- result = &v1beta1.PodDisruptionBudgetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("poddisruptionbudgets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested podDisruptionBudgets.
-func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("poddisruptionbudgets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any.
-func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) {
- result = &v1beta1.PodDisruptionBudget{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("poddisruptionbudgets").
- Body(podDisruptionBudget).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any.
-func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) {
- result = &v1beta1.PodDisruptionBudget{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("poddisruptionbudgets").
- Name(podDisruptionBudget.Name).
- Body(podDisruptionBudget).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) {
- result = &v1beta1.PodDisruptionBudget{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("poddisruptionbudgets").
- Name(podDisruptionBudget.Name).
- SubResource("status").
- Body(podDisruptionBudget).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs.
-func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("poddisruptionbudgets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("poddisruptionbudgets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched podDisruptionBudget.
-func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) {
- result = &v1beta1.PodDisruptionBudget{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("poddisruptionbudgets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go
deleted file mode 100644
index f9020d0b7..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/policy/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type PolicyV1beta1Interface interface {
- RESTClient() rest.Interface
- EvictionsGetter
- PodDisruptionBudgetsGetter
-}
-
-// PolicyV1beta1Client is used to interact with features provided by the policy group.
-type PolicyV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *PolicyV1beta1Client) Evictions(namespace string) EvictionInterface {
- return newEvictions(c, namespace)
-}
-
-func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface {
- return newPodDisruptionBudgets(c, namespace)
-}
-
-// NewForConfig creates a new PolicyV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*PolicyV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &PolicyV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new PolicyV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *PolicyV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new PolicyV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *PolicyV1beta1Client {
- return &PolicyV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *PolicyV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go
deleted file mode 100644
index ab27fdf42..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/rbac/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ClusterRolesGetter has a method to return a ClusterRoleInterface.
-// A group's client should implement this interface.
-type ClusterRolesGetter interface {
- ClusterRoles() ClusterRoleInterface
-}
-
-// ClusterRoleInterface has methods to work with ClusterRole resources.
-type ClusterRoleInterface interface {
- Create(*v1.ClusterRole) (*v1.ClusterRole, error)
- Update(*v1.ClusterRole) (*v1.ClusterRole, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.ClusterRole, error)
- List(opts meta_v1.ListOptions) (*v1.ClusterRoleList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRole, err error)
- ClusterRoleExpansion
-}
-
-// clusterRoles implements ClusterRoleInterface
-type clusterRoles struct {
- client rest.Interface
-}
-
-// newClusterRoles returns a ClusterRoles
-func newClusterRoles(c *RbacV1Client) *clusterRoles {
- return &clusterRoles{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any.
-func (c *clusterRoles) Get(name string, options meta_v1.GetOptions) (result *v1.ClusterRole, err error) {
- result = &v1.ClusterRole{}
- err = c.client.Get().
- Resource("clusterroles").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors.
-func (c *clusterRoles) List(opts meta_v1.ListOptions) (result *v1.ClusterRoleList, err error) {
- result = &v1.ClusterRoleList{}
- err = c.client.Get().
- Resource("clusterroles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested clusterRoles.
-func (c *clusterRoles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("clusterroles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any.
-func (c *clusterRoles) Create(clusterRole *v1.ClusterRole) (result *v1.ClusterRole, err error) {
- result = &v1.ClusterRole{}
- err = c.client.Post().
- Resource("clusterroles").
- Body(clusterRole).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any.
-func (c *clusterRoles) Update(clusterRole *v1.ClusterRole) (result *v1.ClusterRole, err error) {
- result = &v1.ClusterRole{}
- err = c.client.Put().
- Resource("clusterroles").
- Name(clusterRole.Name).
- Body(clusterRole).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs.
-func (c *clusterRoles) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("clusterroles").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *clusterRoles) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Resource("clusterroles").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched clusterRole.
-func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRole, err error) {
- result = &v1.ClusterRole{}
- err = c.client.Patch(pt).
- Resource("clusterroles").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go
deleted file mode 100644
index 9bd87e91a..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/rbac/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface.
-// A group's client should implement this interface.
-type ClusterRoleBindingsGetter interface {
- ClusterRoleBindings() ClusterRoleBindingInterface
-}
-
-// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources.
-type ClusterRoleBindingInterface interface {
- Create(*v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error)
- Update(*v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.ClusterRoleBinding, error)
- List(opts meta_v1.ListOptions) (*v1.ClusterRoleBindingList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRoleBinding, err error)
- ClusterRoleBindingExpansion
-}
-
-// clusterRoleBindings implements ClusterRoleBindingInterface
-type clusterRoleBindings struct {
- client rest.Interface
-}
-
-// newClusterRoleBindings returns a ClusterRoleBindings
-func newClusterRoleBindings(c *RbacV1Client) *clusterRoleBindings {
- return &clusterRoleBindings{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any.
-func (c *clusterRoleBindings) Get(name string, options meta_v1.GetOptions) (result *v1.ClusterRoleBinding, err error) {
- result = &v1.ClusterRoleBinding{}
- err = c.client.Get().
- Resource("clusterrolebindings").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors.
-func (c *clusterRoleBindings) List(opts meta_v1.ListOptions) (result *v1.ClusterRoleBindingList, err error) {
- result = &v1.ClusterRoleBindingList{}
- err = c.client.Get().
- Resource("clusterrolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
-func (c *clusterRoleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("clusterrolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
-func (c *clusterRoleBindings) Create(clusterRoleBinding *v1.ClusterRoleBinding) (result *v1.ClusterRoleBinding, err error) {
- result = &v1.ClusterRoleBinding{}
- err = c.client.Post().
- Resource("clusterrolebindings").
- Body(clusterRoleBinding).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
-func (c *clusterRoleBindings) Update(clusterRoleBinding *v1.ClusterRoleBinding) (result *v1.ClusterRoleBinding, err error) {
- result = &v1.ClusterRoleBinding{}
- err = c.client.Put().
- Resource("clusterrolebindings").
- Name(clusterRoleBinding.Name).
- Body(clusterRoleBinding).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs.
-func (c *clusterRoleBindings) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("clusterrolebindings").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *clusterRoleBindings) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Resource("clusterrolebindings").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched clusterRoleBinding.
-func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRoleBinding, err error) {
- result = &v1.ClusterRoleBinding{}
- err = c.client.Patch(pt).
- Resource("clusterrolebindings").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/doc.go
deleted file mode 100644
index 95b44dfa8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/generated_expansion.go
deleted file mode 100644
index 48b91811f..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/generated_expansion.go
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-type ClusterRoleExpansion interface{}
-
-type ClusterRoleBindingExpansion interface{}
-
-type RoleExpansion interface{}
-
-type RoleBindingExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go
deleted file mode 100644
index 82eb8f1f1..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/rbac/v1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type RbacV1Interface interface {
- RESTClient() rest.Interface
- ClusterRolesGetter
- ClusterRoleBindingsGetter
- RolesGetter
- RoleBindingsGetter
-}
-
-// RbacV1Client is used to interact with features provided by the rbac.authorization.k8s.io group.
-type RbacV1Client struct {
- restClient rest.Interface
-}
-
-func (c *RbacV1Client) ClusterRoles() ClusterRoleInterface {
- return newClusterRoles(c)
-}
-
-func (c *RbacV1Client) ClusterRoleBindings() ClusterRoleBindingInterface {
- return newClusterRoleBindings(c)
-}
-
-func (c *RbacV1Client) Roles(namespace string) RoleInterface {
- return newRoles(c, namespace)
-}
-
-func (c *RbacV1Client) RoleBindings(namespace string) RoleBindingInterface {
- return newRoleBindings(c, namespace)
-}
-
-// NewForConfig creates a new RbacV1Client for the given config.
-func NewForConfig(c *rest.Config) (*RbacV1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &RbacV1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new RbacV1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *RbacV1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new RbacV1Client for the given RESTClient.
-func New(c rest.Interface) *RbacV1Client {
- return &RbacV1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *RbacV1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go
deleted file mode 100644
index 1dc65551f..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/rbac/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// RolesGetter has a method to return a RoleInterface.
-// A group's client should implement this interface.
-type RolesGetter interface {
- Roles(namespace string) RoleInterface
-}
-
-// RoleInterface has methods to work with Role resources.
-type RoleInterface interface {
- Create(*v1.Role) (*v1.Role, error)
- Update(*v1.Role) (*v1.Role, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.Role, error)
- List(opts meta_v1.ListOptions) (*v1.RoleList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Role, err error)
- RoleExpansion
-}
-
-// roles implements RoleInterface
-type roles struct {
- client rest.Interface
- ns string
-}
-
-// newRoles returns a Roles
-func newRoles(c *RbacV1Client, namespace string) *roles {
- return &roles{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
-func (c *roles) Get(name string, options meta_v1.GetOptions) (result *v1.Role, err error) {
- result = &v1.Role{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Roles that match those selectors.
-func (c *roles) List(opts meta_v1.ListOptions) (result *v1.RoleList, err error) {
- result = &v1.RoleList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested roles.
-func (c *roles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any.
-func (c *roles) Create(role *v1.Role) (result *v1.Role, err error) {
- result = &v1.Role{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("roles").
- Body(role).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any.
-func (c *roles) Update(role *v1.Role) (result *v1.Role, err error) {
- result = &v1.Role{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("roles").
- Name(role.Name).
- Body(role).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the role and deletes it. Returns an error if one occurs.
-func (c *roles) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("roles").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *roles) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched role.
-func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Role, err error) {
- result = &v1.Role{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("roles").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go
deleted file mode 100644
index d1287da7b..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/rbac/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// RoleBindingsGetter has a method to return a RoleBindingInterface.
-// A group's client should implement this interface.
-type RoleBindingsGetter interface {
- RoleBindings(namespace string) RoleBindingInterface
-}
-
-// RoleBindingInterface has methods to work with RoleBinding resources.
-type RoleBindingInterface interface {
- Create(*v1.RoleBinding) (*v1.RoleBinding, error)
- Update(*v1.RoleBinding) (*v1.RoleBinding, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.RoleBinding, error)
- List(opts meta_v1.ListOptions) (*v1.RoleBindingList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.RoleBinding, err error)
- RoleBindingExpansion
-}
-
-// roleBindings implements RoleBindingInterface
-type roleBindings struct {
- client rest.Interface
- ns string
-}
-
-// newRoleBindings returns a RoleBindings
-func newRoleBindings(c *RbacV1Client, namespace string) *roleBindings {
- return &roleBindings{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any.
-func (c *roleBindings) Get(name string, options meta_v1.GetOptions) (result *v1.RoleBinding, err error) {
- result = &v1.RoleBinding{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("rolebindings").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of RoleBindings that match those selectors.
-func (c *roleBindings) List(opts meta_v1.ListOptions) (result *v1.RoleBindingList, err error) {
- result = &v1.RoleBindingList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("rolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested roleBindings.
-func (c *roleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("rolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any.
-func (c *roleBindings) Create(roleBinding *v1.RoleBinding) (result *v1.RoleBinding, err error) {
- result = &v1.RoleBinding{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("rolebindings").
- Body(roleBinding).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any.
-func (c *roleBindings) Update(roleBinding *v1.RoleBinding) (result *v1.RoleBinding, err error) {
- result = &v1.RoleBinding{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("rolebindings").
- Name(roleBinding.Name).
- Body(roleBinding).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs.
-func (c *roleBindings) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("rolebindings").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *roleBindings) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("rolebindings").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched roleBinding.
-func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.RoleBinding, err error) {
- result = &v1.RoleBinding{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("rolebindings").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go
deleted file mode 100644
index 9eb8bc789..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/rbac/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ClusterRolesGetter has a method to return a ClusterRoleInterface.
-// A group's client should implement this interface.
-type ClusterRolesGetter interface {
- ClusterRoles() ClusterRoleInterface
-}
-
-// ClusterRoleInterface has methods to work with ClusterRole resources.
-type ClusterRoleInterface interface {
- Create(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error)
- Update(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRole, error)
- List(opts v1.ListOptions) (*v1alpha1.ClusterRoleList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error)
- ClusterRoleExpansion
-}
-
-// clusterRoles implements ClusterRoleInterface
-type clusterRoles struct {
- client rest.Interface
-}
-
-// newClusterRoles returns a ClusterRoles
-func newClusterRoles(c *RbacV1alpha1Client) *clusterRoles {
- return &clusterRoles{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any.
-func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) {
- result = &v1alpha1.ClusterRole{}
- err = c.client.Get().
- Resource("clusterroles").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors.
-func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) {
- result = &v1alpha1.ClusterRoleList{}
- err = c.client.Get().
- Resource("clusterroles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested clusterRoles.
-func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("clusterroles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any.
-func (c *clusterRoles) Create(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) {
- result = &v1alpha1.ClusterRole{}
- err = c.client.Post().
- Resource("clusterroles").
- Body(clusterRole).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any.
-func (c *clusterRoles) Update(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) {
- result = &v1alpha1.ClusterRole{}
- err = c.client.Put().
- Resource("clusterroles").
- Name(clusterRole.Name).
- Body(clusterRole).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs.
-func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("clusterroles").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("clusterroles").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched clusterRole.
-func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) {
- result = &v1alpha1.ClusterRole{}
- err = c.client.Patch(pt).
- Resource("clusterroles").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go
deleted file mode 100644
index 6cf383b4f..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/rbac/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface.
-// A group's client should implement this interface.
-type ClusterRoleBindingsGetter interface {
- ClusterRoleBindings() ClusterRoleBindingInterface
-}
-
-// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources.
-type ClusterRoleBindingInterface interface {
- Create(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error)
- Update(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRoleBinding, error)
- List(opts v1.ListOptions) (*v1alpha1.ClusterRoleBindingList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error)
- ClusterRoleBindingExpansion
-}
-
-// clusterRoleBindings implements ClusterRoleBindingInterface
-type clusterRoleBindings struct {
- client rest.Interface
-}
-
-// newClusterRoleBindings returns a ClusterRoleBindings
-func newClusterRoleBindings(c *RbacV1alpha1Client) *clusterRoleBindings {
- return &clusterRoleBindings{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any.
-func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) {
- result = &v1alpha1.ClusterRoleBinding{}
- err = c.client.Get().
- Resource("clusterrolebindings").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors.
-func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) {
- result = &v1alpha1.ClusterRoleBindingList{}
- err = c.client.Get().
- Resource("clusterrolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
-func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("clusterrolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
-func (c *clusterRoleBindings) Create(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
- result = &v1alpha1.ClusterRoleBinding{}
- err = c.client.Post().
- Resource("clusterrolebindings").
- Body(clusterRoleBinding).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
-func (c *clusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
- result = &v1alpha1.ClusterRoleBinding{}
- err = c.client.Put().
- Resource("clusterrolebindings").
- Name(clusterRoleBinding.Name).
- Body(clusterRoleBinding).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs.
-func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("clusterrolebindings").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("clusterrolebindings").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched clusterRoleBinding.
-func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) {
- result = &v1alpha1.ClusterRoleBinding{}
- err = c.client.Patch(pt).
- Resource("clusterrolebindings").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go
deleted file mode 100644
index 08a9c7ceb..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go
deleted file mode 100644
index 9b61a7506..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-type ClusterRoleExpansion interface{}
-
-type ClusterRoleBindingExpansion interface{}
-
-type RoleExpansion interface{}
-
-type RoleBindingExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go
deleted file mode 100644
index 76ebf3166..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/rbac/v1alpha1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type RbacV1alpha1Interface interface {
- RESTClient() rest.Interface
- ClusterRolesGetter
- ClusterRoleBindingsGetter
- RolesGetter
- RoleBindingsGetter
-}
-
-// RbacV1alpha1Client is used to interact with features provided by the rbac.authorization.k8s.io group.
-type RbacV1alpha1Client struct {
- restClient rest.Interface
-}
-
-func (c *RbacV1alpha1Client) ClusterRoles() ClusterRoleInterface {
- return newClusterRoles(c)
-}
-
-func (c *RbacV1alpha1Client) ClusterRoleBindings() ClusterRoleBindingInterface {
- return newClusterRoleBindings(c)
-}
-
-func (c *RbacV1alpha1Client) Roles(namespace string) RoleInterface {
- return newRoles(c, namespace)
-}
-
-func (c *RbacV1alpha1Client) RoleBindings(namespace string) RoleBindingInterface {
- return newRoleBindings(c, namespace)
-}
-
-// NewForConfig creates a new RbacV1alpha1Client for the given config.
-func NewForConfig(c *rest.Config) (*RbacV1alpha1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &RbacV1alpha1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new RbacV1alpha1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *RbacV1alpha1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new RbacV1alpha1Client for the given RESTClient.
-func New(c rest.Interface) *RbacV1alpha1Client {
- return &RbacV1alpha1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1alpha1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *RbacV1alpha1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go
deleted file mode 100644
index 0c7e49f0d..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/rbac/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// RolesGetter has a method to return a RoleInterface.
-// A group's client should implement this interface.
-type RolesGetter interface {
- Roles(namespace string) RoleInterface
-}
-
-// RoleInterface has methods to work with Role resources.
-type RoleInterface interface {
- Create(*v1alpha1.Role) (*v1alpha1.Role, error)
- Update(*v1alpha1.Role) (*v1alpha1.Role, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.Role, error)
- List(opts v1.ListOptions) (*v1alpha1.RoleList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error)
- RoleExpansion
-}
-
-// roles implements RoleInterface
-type roles struct {
- client rest.Interface
- ns string
-}
-
-// newRoles returns a Roles
-func newRoles(c *RbacV1alpha1Client, namespace string) *roles {
- return &roles{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
-func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) {
- result = &v1alpha1.Role{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Roles that match those selectors.
-func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) {
- result = &v1alpha1.RoleList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested roles.
-func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any.
-func (c *roles) Create(role *v1alpha1.Role) (result *v1alpha1.Role, err error) {
- result = &v1alpha1.Role{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("roles").
- Body(role).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any.
-func (c *roles) Update(role *v1alpha1.Role) (result *v1alpha1.Role, err error) {
- result = &v1alpha1.Role{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("roles").
- Name(role.Name).
- Body(role).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the role and deletes it. Returns an error if one occurs.
-func (c *roles) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("roles").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched role.
-func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) {
- result = &v1alpha1.Role{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("roles").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go
deleted file mode 100644
index 1bcfaf88e..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/rbac/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// RoleBindingsGetter has a method to return a RoleBindingInterface.
-// A group's client should implement this interface.
-type RoleBindingsGetter interface {
- RoleBindings(namespace string) RoleBindingInterface
-}
-
-// RoleBindingInterface has methods to work with RoleBinding resources.
-type RoleBindingInterface interface {
- Create(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error)
- Update(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.RoleBinding, error)
- List(opts v1.ListOptions) (*v1alpha1.RoleBindingList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error)
- RoleBindingExpansion
-}
-
-// roleBindings implements RoleBindingInterface
-type roleBindings struct {
- client rest.Interface
- ns string
-}
-
-// newRoleBindings returns a RoleBindings
-func newRoleBindings(c *RbacV1alpha1Client, namespace string) *roleBindings {
- return &roleBindings{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any.
-func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) {
- result = &v1alpha1.RoleBinding{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("rolebindings").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of RoleBindings that match those selectors.
-func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) {
- result = &v1alpha1.RoleBindingList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("rolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested roleBindings.
-func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("rolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any.
-func (c *roleBindings) Create(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) {
- result = &v1alpha1.RoleBinding{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("rolebindings").
- Body(roleBinding).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any.
-func (c *roleBindings) Update(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) {
- result = &v1alpha1.RoleBinding{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("rolebindings").
- Name(roleBinding.Name).
- Body(roleBinding).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs.
-func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("rolebindings").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("rolebindings").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched roleBinding.
-func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) {
- result = &v1alpha1.RoleBinding{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("rolebindings").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go
deleted file mode 100644
index 89494ed13..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/rbac/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ClusterRolesGetter has a method to return a ClusterRoleInterface.
-// A group's client should implement this interface.
-type ClusterRolesGetter interface {
- ClusterRoles() ClusterRoleInterface
-}
-
-// ClusterRoleInterface has methods to work with ClusterRole resources.
-type ClusterRoleInterface interface {
- Create(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error)
- Update(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.ClusterRole, error)
- List(opts v1.ListOptions) (*v1beta1.ClusterRoleList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error)
- ClusterRoleExpansion
-}
-
-// clusterRoles implements ClusterRoleInterface
-type clusterRoles struct {
- client rest.Interface
-}
-
-// newClusterRoles returns a ClusterRoles
-func newClusterRoles(c *RbacV1beta1Client) *clusterRoles {
- return &clusterRoles{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any.
-func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) {
- result = &v1beta1.ClusterRole{}
- err = c.client.Get().
- Resource("clusterroles").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors.
-func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) {
- result = &v1beta1.ClusterRoleList{}
- err = c.client.Get().
- Resource("clusterroles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested clusterRoles.
-func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("clusterroles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any.
-func (c *clusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) {
- result = &v1beta1.ClusterRole{}
- err = c.client.Post().
- Resource("clusterroles").
- Body(clusterRole).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any.
-func (c *clusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) {
- result = &v1beta1.ClusterRole{}
- err = c.client.Put().
- Resource("clusterroles").
- Name(clusterRole.Name).
- Body(clusterRole).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs.
-func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("clusterroles").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("clusterroles").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched clusterRole.
-func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) {
- result = &v1beta1.ClusterRole{}
- err = c.client.Patch(pt).
- Resource("clusterroles").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go
deleted file mode 100644
index 1602f7fce..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/rbac/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface.
-// A group's client should implement this interface.
-type ClusterRoleBindingsGetter interface {
- ClusterRoleBindings() ClusterRoleBindingInterface
-}
-
-// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources.
-type ClusterRoleBindingInterface interface {
- Create(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error)
- Update(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.ClusterRoleBinding, error)
- List(opts v1.ListOptions) (*v1beta1.ClusterRoleBindingList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error)
- ClusterRoleBindingExpansion
-}
-
-// clusterRoleBindings implements ClusterRoleBindingInterface
-type clusterRoleBindings struct {
- client rest.Interface
-}
-
-// newClusterRoleBindings returns a ClusterRoleBindings
-func newClusterRoleBindings(c *RbacV1beta1Client) *clusterRoleBindings {
- return &clusterRoleBindings{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any.
-func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) {
- result = &v1beta1.ClusterRoleBinding{}
- err = c.client.Get().
- Resource("clusterrolebindings").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors.
-func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) {
- result = &v1beta1.ClusterRoleBindingList{}
- err = c.client.Get().
- Resource("clusterrolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
-func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("clusterrolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
-func (c *clusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) {
- result = &v1beta1.ClusterRoleBinding{}
- err = c.client.Post().
- Resource("clusterrolebindings").
- Body(clusterRoleBinding).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
-func (c *clusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) {
- result = &v1beta1.ClusterRoleBinding{}
- err = c.client.Put().
- Resource("clusterrolebindings").
- Name(clusterRoleBinding.Name).
- Body(clusterRoleBinding).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs.
-func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("clusterrolebindings").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("clusterrolebindings").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched clusterRoleBinding.
-func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) {
- result = &v1beta1.ClusterRoleBinding{}
- err = c.client.Patch(pt).
- Resource("clusterrolebindings").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go
deleted file mode 100644
index 8820cfb46..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-type ClusterRoleExpansion interface{}
-
-type ClusterRoleBindingExpansion interface{}
-
-type RoleExpansion interface{}
-
-type RoleBindingExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go
deleted file mode 100644
index 9d4259e43..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/rbac/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type RbacV1beta1Interface interface {
- RESTClient() rest.Interface
- ClusterRolesGetter
- ClusterRoleBindingsGetter
- RolesGetter
- RoleBindingsGetter
-}
-
-// RbacV1beta1Client is used to interact with features provided by the rbac.authorization.k8s.io group.
-type RbacV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *RbacV1beta1Client) ClusterRoles() ClusterRoleInterface {
- return newClusterRoles(c)
-}
-
-func (c *RbacV1beta1Client) ClusterRoleBindings() ClusterRoleBindingInterface {
- return newClusterRoleBindings(c)
-}
-
-func (c *RbacV1beta1Client) Roles(namespace string) RoleInterface {
- return newRoles(c, namespace)
-}
-
-func (c *RbacV1beta1Client) RoleBindings(namespace string) RoleBindingInterface {
- return newRoleBindings(c, namespace)
-}
-
-// NewForConfig creates a new RbacV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*RbacV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &RbacV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new RbacV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *RbacV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new RbacV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *RbacV1beta1Client {
- return &RbacV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *RbacV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go
deleted file mode 100644
index d3d500b5e..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/rbac/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// RolesGetter has a method to return a RoleInterface.
-// A group's client should implement this interface.
-type RolesGetter interface {
- Roles(namespace string) RoleInterface
-}
-
-// RoleInterface has methods to work with Role resources.
-type RoleInterface interface {
- Create(*v1beta1.Role) (*v1beta1.Role, error)
- Update(*v1beta1.Role) (*v1beta1.Role, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.Role, error)
- List(opts v1.ListOptions) (*v1beta1.RoleList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error)
- RoleExpansion
-}
-
-// roles implements RoleInterface
-type roles struct {
- client rest.Interface
- ns string
-}
-
-// newRoles returns a Roles
-func newRoles(c *RbacV1beta1Client, namespace string) *roles {
- return &roles{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
-func (c *roles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, err error) {
- result = &v1beta1.Role{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Roles that match those selectors.
-func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) {
- result = &v1beta1.RoleList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested roles.
-func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any.
-func (c *roles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) {
- result = &v1beta1.Role{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("roles").
- Body(role).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any.
-func (c *roles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) {
- result = &v1beta1.Role{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("roles").
- Name(role.Name).
- Body(role).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the role and deletes it. Returns an error if one occurs.
-func (c *roles) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("roles").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched role.
-func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) {
- result = &v1beta1.Role{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("roles").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go
deleted file mode 100644
index 05da7329c..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/rbac/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// RoleBindingsGetter has a method to return a RoleBindingInterface.
-// A group's client should implement this interface.
-type RoleBindingsGetter interface {
- RoleBindings(namespace string) RoleBindingInterface
-}
-
-// RoleBindingInterface has methods to work with RoleBinding resources.
-type RoleBindingInterface interface {
- Create(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error)
- Update(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.RoleBinding, error)
- List(opts v1.ListOptions) (*v1beta1.RoleBindingList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error)
- RoleBindingExpansion
-}
-
-// roleBindings implements RoleBindingInterface
-type roleBindings struct {
- client rest.Interface
- ns string
-}
-
-// newRoleBindings returns a RoleBindings
-func newRoleBindings(c *RbacV1beta1Client, namespace string) *roleBindings {
- return &roleBindings{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any.
-func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) {
- result = &v1beta1.RoleBinding{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("rolebindings").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of RoleBindings that match those selectors.
-func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) {
- result = &v1beta1.RoleBindingList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("rolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested roleBindings.
-func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("rolebindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any.
-func (c *roleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) {
- result = &v1beta1.RoleBinding{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("rolebindings").
- Body(roleBinding).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any.
-func (c *roleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) {
- result = &v1beta1.RoleBinding{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("rolebindings").
- Name(roleBinding.Name).
- Body(roleBinding).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs.
-func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("rolebindings").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("rolebindings").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched roleBinding.
-func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) {
- result = &v1beta1.RoleBinding{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("rolebindings").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/doc.go
deleted file mode 100644
index 08a9c7ceb..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/generated_expansion.go
deleted file mode 100644
index 832addf07..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-type PriorityClassExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go
deleted file mode 100644
index 0422dc96a..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/scheduling/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// PriorityClassesGetter has a method to return a PriorityClassInterface.
-// A group's client should implement this interface.
-type PriorityClassesGetter interface {
- PriorityClasses() PriorityClassInterface
-}
-
-// PriorityClassInterface has methods to work with PriorityClass resources.
-type PriorityClassInterface interface {
- Create(*v1alpha1.PriorityClass) (*v1alpha1.PriorityClass, error)
- Update(*v1alpha1.PriorityClass) (*v1alpha1.PriorityClass, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.PriorityClass, error)
- List(opts v1.ListOptions) (*v1alpha1.PriorityClassList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityClass, err error)
- PriorityClassExpansion
-}
-
-// priorityClasses implements PriorityClassInterface
-type priorityClasses struct {
- client rest.Interface
-}
-
-// newPriorityClasses returns a PriorityClasses
-func newPriorityClasses(c *SchedulingV1alpha1Client) *priorityClasses {
- return &priorityClasses{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any.
-func (c *priorityClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.PriorityClass, err error) {
- result = &v1alpha1.PriorityClass{}
- err = c.client.Get().
- Resource("priorityclasses").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of PriorityClasses that match those selectors.
-func (c *priorityClasses) List(opts v1.ListOptions) (result *v1alpha1.PriorityClassList, err error) {
- result = &v1alpha1.PriorityClassList{}
- err = c.client.Get().
- Resource("priorityclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested priorityClasses.
-func (c *priorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("priorityclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any.
-func (c *priorityClasses) Create(priorityClass *v1alpha1.PriorityClass) (result *v1alpha1.PriorityClass, err error) {
- result = &v1alpha1.PriorityClass{}
- err = c.client.Post().
- Resource("priorityclasses").
- Body(priorityClass).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any.
-func (c *priorityClasses) Update(priorityClass *v1alpha1.PriorityClass) (result *v1alpha1.PriorityClass, err error) {
- result = &v1alpha1.PriorityClass{}
- err = c.client.Put().
- Resource("priorityclasses").
- Name(priorityClass.Name).
- Body(priorityClass).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the priorityClass and deletes it. Returns an error if one occurs.
-func (c *priorityClasses) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("priorityclasses").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *priorityClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("priorityclasses").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched priorityClass.
-func (c *priorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityClass, err error) {
- result = &v1alpha1.PriorityClass{}
- err = c.client.Patch(pt).
- Resource("priorityclasses").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go
deleted file mode 100644
index a36c44928..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/scheduling/v1alpha1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type SchedulingV1alpha1Interface interface {
- RESTClient() rest.Interface
- PriorityClassesGetter
-}
-
-// SchedulingV1alpha1Client is used to interact with features provided by the scheduling.k8s.io group.
-type SchedulingV1alpha1Client struct {
- restClient rest.Interface
-}
-
-func (c *SchedulingV1alpha1Client) PriorityClasses() PriorityClassInterface {
- return newPriorityClasses(c)
-}
-
-// NewForConfig creates a new SchedulingV1alpha1Client for the given config.
-func NewForConfig(c *rest.Config) (*SchedulingV1alpha1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &SchedulingV1alpha1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new SchedulingV1alpha1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *SchedulingV1alpha1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new SchedulingV1alpha1Client for the given RESTClient.
-func New(c rest.Interface) *SchedulingV1alpha1Client {
- return &SchedulingV1alpha1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1alpha1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *SchedulingV1alpha1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go
deleted file mode 100644
index 08a9c7ceb..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go
deleted file mode 100644
index dc95d90d1..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-type PodPresetExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go
deleted file mode 100644
index 38434cfa5..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/settings/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// PodPresetsGetter has a method to return a PodPresetInterface.
-// A group's client should implement this interface.
-type PodPresetsGetter interface {
- PodPresets(namespace string) PodPresetInterface
-}
-
-// PodPresetInterface has methods to work with PodPreset resources.
-type PodPresetInterface interface {
- Create(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
- Update(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.PodPreset, error)
- List(opts v1.ListOptions) (*v1alpha1.PodPresetList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error)
- PodPresetExpansion
-}
-
-// podPresets implements PodPresetInterface
-type podPresets struct {
- client rest.Interface
- ns string
-}
-
-// newPodPresets returns a PodPresets
-func newPodPresets(c *SettingsV1alpha1Client, namespace string) *podPresets {
- return &podPresets{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any.
-func (c *podPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) {
- result = &v1alpha1.PodPreset{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("podpresets").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of PodPresets that match those selectors.
-func (c *podPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) {
- result = &v1alpha1.PodPresetList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("podpresets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested podPresets.
-func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("podpresets").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any.
-func (c *podPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
- result = &v1alpha1.PodPreset{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("podpresets").
- Body(podPreset).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any.
-func (c *podPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
- result = &v1alpha1.PodPreset{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("podpresets").
- Name(podPreset.Name).
- Body(podPreset).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the podPreset and deletes it. Returns an error if one occurs.
-func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("podpresets").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("podpresets").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched podPreset.
-func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) {
- result = &v1alpha1.PodPreset{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("podpresets").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go
deleted file mode 100644
index 153069dbd..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/settings/v1alpha1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type SettingsV1alpha1Interface interface {
- RESTClient() rest.Interface
- PodPresetsGetter
-}
-
-// SettingsV1alpha1Client is used to interact with features provided by the settings.k8s.io group.
-type SettingsV1alpha1Client struct {
- restClient rest.Interface
-}
-
-func (c *SettingsV1alpha1Client) PodPresets(namespace string) PodPresetInterface {
- return newPodPresets(c, namespace)
-}
-
-// NewForConfig creates a new SettingsV1alpha1Client for the given config.
-func NewForConfig(c *rest.Config) (*SettingsV1alpha1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &SettingsV1alpha1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new SettingsV1alpha1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *SettingsV1alpha1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new SettingsV1alpha1Client for the given RESTClient.
-func New(c rest.Interface) *SettingsV1alpha1Client {
- return &SettingsV1alpha1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1alpha1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *SettingsV1alpha1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go
deleted file mode 100644
index 95b44dfa8..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go
deleted file mode 100644
index c378b8b21..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-type StorageClassExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go
deleted file mode 100644
index b010a58c9..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/storage/v1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type StorageV1Interface interface {
- RESTClient() rest.Interface
- StorageClassesGetter
-}
-
-// StorageV1Client is used to interact with features provided by the storage.k8s.io group.
-type StorageV1Client struct {
- restClient rest.Interface
-}
-
-func (c *StorageV1Client) StorageClasses() StorageClassInterface {
- return newStorageClasses(c)
-}
-
-// NewForConfig creates a new StorageV1Client for the given config.
-func NewForConfig(c *rest.Config) (*StorageV1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &StorageV1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new StorageV1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *StorageV1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new StorageV1Client for the given RESTClient.
-func New(c rest.Interface) *StorageV1Client {
- return &StorageV1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *StorageV1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go
deleted file mode 100644
index 6d9da9b42..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1
-
-import (
- v1 "k8s.io/api/storage/v1"
- meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// StorageClassesGetter has a method to return a StorageClassInterface.
-// A group's client should implement this interface.
-type StorageClassesGetter interface {
- StorageClasses() StorageClassInterface
-}
-
-// StorageClassInterface has methods to work with StorageClass resources.
-type StorageClassInterface interface {
- Create(*v1.StorageClass) (*v1.StorageClass, error)
- Update(*v1.StorageClass) (*v1.StorageClass, error)
- Delete(name string, options *meta_v1.DeleteOptions) error
- DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
- Get(name string, options meta_v1.GetOptions) (*v1.StorageClass, error)
- List(opts meta_v1.ListOptions) (*v1.StorageClassList, error)
- Watch(opts meta_v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error)
- StorageClassExpansion
-}
-
-// storageClasses implements StorageClassInterface
-type storageClasses struct {
- client rest.Interface
-}
-
-// newStorageClasses returns a StorageClasses
-func newStorageClasses(c *StorageV1Client) *storageClasses {
- return &storageClasses{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any.
-func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v1.StorageClass, err error) {
- result = &v1.StorageClass{}
- err = c.client.Get().
- Resource("storageclasses").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of StorageClasses that match those selectors.
-func (c *storageClasses) List(opts meta_v1.ListOptions) (result *v1.StorageClassList, err error) {
- result = &v1.StorageClassList{}
- err = c.client.Get().
- Resource("storageclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested storageClasses.
-func (c *storageClasses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("storageclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any.
-func (c *storageClasses) Create(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) {
- result = &v1.StorageClass{}
- err = c.client.Post().
- Resource("storageclasses").
- Body(storageClass).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any.
-func (c *storageClasses) Update(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) {
- result = &v1.StorageClass{}
- err = c.client.Put().
- Resource("storageclasses").
- Name(storageClass.Name).
- Body(storageClass).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the storageClass and deletes it. Returns an error if one occurs.
-func (c *storageClasses) Delete(name string, options *meta_v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("storageclasses").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *storageClasses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
- return c.client.Delete().
- Resource("storageclasses").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched storageClass.
-func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) {
- result = &v1.StorageClass{}
- err = c.client.Patch(pt).
- Resource("storageclasses").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/doc.go
deleted file mode 100644
index 08a9c7ceb..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go
deleted file mode 100644
index f50925a43..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-type VolumeAttachmentExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go
deleted file mode 100644
index a8d65f8fc..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/storage/v1alpha1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type StorageV1alpha1Interface interface {
- RESTClient() rest.Interface
- VolumeAttachmentsGetter
-}
-
-// StorageV1alpha1Client is used to interact with features provided by the storage.k8s.io group.
-type StorageV1alpha1Client struct {
- restClient rest.Interface
-}
-
-func (c *StorageV1alpha1Client) VolumeAttachments() VolumeAttachmentInterface {
- return newVolumeAttachments(c)
-}
-
-// NewForConfig creates a new StorageV1alpha1Client for the given config.
-func NewForConfig(c *rest.Config) (*StorageV1alpha1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &StorageV1alpha1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new StorageV1alpha1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *StorageV1alpha1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new StorageV1alpha1Client for the given RESTClient.
-func New(c rest.Interface) *StorageV1alpha1Client {
- return &StorageV1alpha1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1alpha1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *StorageV1alpha1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go
deleted file mode 100644
index fd0c3d4bf..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/storage/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// VolumeAttachmentsGetter has a method to return a VolumeAttachmentInterface.
-// A group's client should implement this interface.
-type VolumeAttachmentsGetter interface {
- VolumeAttachments() VolumeAttachmentInterface
-}
-
-// VolumeAttachmentInterface has methods to work with VolumeAttachment resources.
-type VolumeAttachmentInterface interface {
- Create(*v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error)
- Update(*v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error)
- UpdateStatus(*v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.VolumeAttachment, error)
- List(opts v1.ListOptions) (*v1alpha1.VolumeAttachmentList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeAttachment, err error)
- VolumeAttachmentExpansion
-}
-
-// volumeAttachments implements VolumeAttachmentInterface
-type volumeAttachments struct {
- client rest.Interface
-}
-
-// newVolumeAttachments returns a VolumeAttachments
-func newVolumeAttachments(c *StorageV1alpha1Client) *volumeAttachments {
- return &volumeAttachments{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any.
-func (c *volumeAttachments) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeAttachment, err error) {
- result = &v1alpha1.VolumeAttachment{}
- err = c.client.Get().
- Resource("volumeattachments").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors.
-func (c *volumeAttachments) List(opts v1.ListOptions) (result *v1alpha1.VolumeAttachmentList, err error) {
- result = &v1alpha1.VolumeAttachmentList{}
- err = c.client.Get().
- Resource("volumeattachments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested volumeAttachments.
-func (c *volumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("volumeattachments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any.
-func (c *volumeAttachments) Create(volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) {
- result = &v1alpha1.VolumeAttachment{}
- err = c.client.Post().
- Resource("volumeattachments").
- Body(volumeAttachment).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any.
-func (c *volumeAttachments) Update(volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) {
- result = &v1alpha1.VolumeAttachment{}
- err = c.client.Put().
- Resource("volumeattachments").
- Name(volumeAttachment.Name).
- Body(volumeAttachment).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *volumeAttachments) UpdateStatus(volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) {
- result = &v1alpha1.VolumeAttachment{}
- err = c.client.Put().
- Resource("volumeattachments").
- Name(volumeAttachment.Name).
- SubResource("status").
- Body(volumeAttachment).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs.
-func (c *volumeAttachments) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("volumeattachments").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *volumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("volumeattachments").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched volumeAttachment.
-func (c *volumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) {
- result = &v1alpha1.VolumeAttachment{}
- err = c.client.Patch(pt).
- Resource("volumeattachments").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go
deleted file mode 100644
index 35b3db3f3..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This package has the automatically generated typed clients.
-package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go
deleted file mode 100644
index 4b104064d..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-type StorageClassExpansion interface{}
-
-type VolumeAttachmentExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go
deleted file mode 100644
index ad6e5fb34..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/storage/v1beta1"
- serializer "k8s.io/apimachinery/pkg/runtime/serializer"
- "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type StorageV1beta1Interface interface {
- RESTClient() rest.Interface
- StorageClassesGetter
- VolumeAttachmentsGetter
-}
-
-// StorageV1beta1Client is used to interact with features provided by the storage.k8s.io group.
-type StorageV1beta1Client struct {
- restClient rest.Interface
-}
-
-func (c *StorageV1beta1Client) StorageClasses() StorageClassInterface {
- return newStorageClasses(c)
-}
-
-func (c *StorageV1beta1Client) VolumeAttachments() VolumeAttachmentInterface {
- return newVolumeAttachments(c)
-}
-
-// NewForConfig creates a new StorageV1beta1Client for the given config.
-func NewForConfig(c *rest.Config) (*StorageV1beta1Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientFor(&config)
- if err != nil {
- return nil, err
- }
- return &StorageV1beta1Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new StorageV1beta1Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *StorageV1beta1Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new StorageV1beta1Client for the given RESTClient.
-func New(c rest.Interface) *StorageV1beta1Client {
- return &StorageV1beta1Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v1beta1.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *StorageV1beta1Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go
deleted file mode 100644
index bf18a6c87..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/storage/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// StorageClassesGetter has a method to return a StorageClassInterface.
-// A group's client should implement this interface.
-type StorageClassesGetter interface {
- StorageClasses() StorageClassInterface
-}
-
-// StorageClassInterface has methods to work with StorageClass resources.
-type StorageClassInterface interface {
- Create(*v1beta1.StorageClass) (*v1beta1.StorageClass, error)
- Update(*v1beta1.StorageClass) (*v1beta1.StorageClass, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.StorageClass, error)
- List(opts v1.ListOptions) (*v1beta1.StorageClassList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error)
- StorageClassExpansion
-}
-
-// storageClasses implements StorageClassInterface
-type storageClasses struct {
- client rest.Interface
-}
-
-// newStorageClasses returns a StorageClasses
-func newStorageClasses(c *StorageV1beta1Client) *storageClasses {
- return &storageClasses{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any.
-func (c *storageClasses) Get(name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) {
- result = &v1beta1.StorageClass{}
- err = c.client.Get().
- Resource("storageclasses").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of StorageClasses that match those selectors.
-func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) {
- result = &v1beta1.StorageClassList{}
- err = c.client.Get().
- Resource("storageclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested storageClasses.
-func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("storageclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any.
-func (c *storageClasses) Create(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) {
- result = &v1beta1.StorageClass{}
- err = c.client.Post().
- Resource("storageclasses").
- Body(storageClass).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any.
-func (c *storageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) {
- result = &v1beta1.StorageClass{}
- err = c.client.Put().
- Resource("storageclasses").
- Name(storageClass.Name).
- Body(storageClass).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the storageClass and deletes it. Returns an error if one occurs.
-func (c *storageClasses) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("storageclasses").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("storageclasses").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched storageClass.
-func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) {
- result = &v1beta1.StorageClass{}
- err = c.client.Patch(pt).
- Resource("storageclasses").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go
deleted file mode 100644
index 6b3703970..000000000
--- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/storage/v1beta1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- scheme "k8s.io/client-go/kubernetes/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-// VolumeAttachmentsGetter has a method to return a VolumeAttachmentInterface.
-// A group's client should implement this interface.
-type VolumeAttachmentsGetter interface {
- VolumeAttachments() VolumeAttachmentInterface
-}
-
-// VolumeAttachmentInterface has methods to work with VolumeAttachment resources.
-type VolumeAttachmentInterface interface {
- Create(*v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error)
- Update(*v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error)
- UpdateStatus(*v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1beta1.VolumeAttachment, error)
- List(opts v1.ListOptions) (*v1beta1.VolumeAttachmentList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeAttachment, err error)
- VolumeAttachmentExpansion
-}
-
-// volumeAttachments implements VolumeAttachmentInterface
-type volumeAttachments struct {
- client rest.Interface
-}
-
-// newVolumeAttachments returns a VolumeAttachments
-func newVolumeAttachments(c *StorageV1beta1Client) *volumeAttachments {
- return &volumeAttachments{
- client: c.RESTClient(),
- }
-}
-
-// Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any.
-func (c *volumeAttachments) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeAttachment, err error) {
- result = &v1beta1.VolumeAttachment{}
- err = c.client.Get().
- Resource("volumeattachments").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors.
-func (c *volumeAttachments) List(opts v1.ListOptions) (result *v1beta1.VolumeAttachmentList, err error) {
- result = &v1beta1.VolumeAttachmentList{}
- err = c.client.Get().
- Resource("volumeattachments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested volumeAttachments.
-func (c *volumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("volumeattachments").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
-// Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any.
-func (c *volumeAttachments) Create(volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) {
- result = &v1beta1.VolumeAttachment{}
- err = c.client.Post().
- Resource("volumeattachments").
- Body(volumeAttachment).
- Do().
- Into(result)
- return
-}
-
-// Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any.
-func (c *volumeAttachments) Update(volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) {
- result = &v1beta1.VolumeAttachment{}
- err = c.client.Put().
- Resource("volumeattachments").
- Name(volumeAttachment.Name).
- Body(volumeAttachment).
- Do().
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-
-func (c *volumeAttachments) UpdateStatus(volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) {
- result = &v1beta1.VolumeAttachment{}
- err = c.client.Put().
- Resource("volumeattachments").
- Name(volumeAttachment.Name).
- SubResource("status").
- Body(volumeAttachment).
- Do().
- Into(result)
- return
-}
-
-// Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs.
-func (c *volumeAttachments) Delete(name string, options *v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("volumeattachments").
- Name(name).
- Body(options).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *volumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
- return c.client.Delete().
- Resource("volumeattachments").
- VersionedParams(&listOptions, scheme.ParameterCodec).
- Body(options).
- Do().
- Error()
-}
-
-// Patch applies the patch and returns the patched volumeAttachment.
-func (c *volumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeAttachment, err error) {
- result = &v1beta1.VolumeAttachment{}
- err = c.client.Patch(pt).
- Resource("volumeattachments").
- SubResource(subresources...).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return
-}
diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go
deleted file mode 100644
index 827c06371..000000000
--- a/vendor/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-// InitializerConfigurationListerExpansion allows custom methods to be added to
-// InitializerConfigurationLister.
-type InitializerConfigurationListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go
deleted file mode 100644
index 4fa845728..000000000
--- a/vendor/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// InitializerConfigurationLister helps list InitializerConfigurations.
-type InitializerConfigurationLister interface {
- // List lists all InitializerConfigurations in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.InitializerConfiguration, err error)
- // Get retrieves the InitializerConfiguration from the index for a given name.
- Get(name string) (*v1alpha1.InitializerConfiguration, error)
- InitializerConfigurationListerExpansion
-}
-
-// initializerConfigurationLister implements the InitializerConfigurationLister interface.
-type initializerConfigurationLister struct {
- indexer cache.Indexer
-}
-
-// NewInitializerConfigurationLister returns a new InitializerConfigurationLister.
-func NewInitializerConfigurationLister(indexer cache.Indexer) InitializerConfigurationLister {
- return &initializerConfigurationLister{indexer: indexer}
-}
-
-// List lists all InitializerConfigurations in the indexer.
-func (s *initializerConfigurationLister) List(selector labels.Selector) (ret []*v1alpha1.InitializerConfiguration, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.InitializerConfiguration))
- })
- return ret, err
-}
-
-// Get retrieves the InitializerConfiguration from the index for a given name.
-func (s *initializerConfigurationLister) Get(name string) (*v1alpha1.InitializerConfiguration, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("initializerconfiguration"), name)
- }
- return obj.(*v1alpha1.InitializerConfiguration), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/expansion_generated.go
deleted file mode 100644
index 42d7e50ad..000000000
--- a/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-// MutatingWebhookConfigurationListerExpansion allows custom methods to be added to
-// MutatingWebhookConfigurationLister.
-type MutatingWebhookConfigurationListerExpansion interface{}
-
-// ValidatingWebhookConfigurationListerExpansion allows custom methods to be added to
-// ValidatingWebhookConfigurationLister.
-type ValidatingWebhookConfigurationListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go
deleted file mode 100644
index 2bb3bccb8..000000000
--- a/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/admissionregistration/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// MutatingWebhookConfigurationLister helps list MutatingWebhookConfigurations.
-type MutatingWebhookConfigurationLister interface {
- // List lists all MutatingWebhookConfigurations in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.MutatingWebhookConfiguration, err error)
- // Get retrieves the MutatingWebhookConfiguration from the index for a given name.
- Get(name string) (*v1beta1.MutatingWebhookConfiguration, error)
- MutatingWebhookConfigurationListerExpansion
-}
-
-// mutatingWebhookConfigurationLister implements the MutatingWebhookConfigurationLister interface.
-type mutatingWebhookConfigurationLister struct {
- indexer cache.Indexer
-}
-
-// NewMutatingWebhookConfigurationLister returns a new MutatingWebhookConfigurationLister.
-func NewMutatingWebhookConfigurationLister(indexer cache.Indexer) MutatingWebhookConfigurationLister {
- return &mutatingWebhookConfigurationLister{indexer: indexer}
-}
-
-// List lists all MutatingWebhookConfigurations in the indexer.
-func (s *mutatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*v1beta1.MutatingWebhookConfiguration, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.MutatingWebhookConfiguration))
- })
- return ret, err
-}
-
-// Get retrieves the MutatingWebhookConfiguration from the index for a given name.
-func (s *mutatingWebhookConfigurationLister) Get(name string) (*v1beta1.MutatingWebhookConfiguration, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("mutatingwebhookconfiguration"), name)
- }
- return obj.(*v1beta1.MutatingWebhookConfiguration), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go
deleted file mode 100644
index 910e4f48e..000000000
--- a/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/admissionregistration/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ValidatingWebhookConfigurationLister helps list ValidatingWebhookConfigurations.
-type ValidatingWebhookConfigurationLister interface {
- // List lists all ValidatingWebhookConfigurations in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.ValidatingWebhookConfiguration, err error)
- // Get retrieves the ValidatingWebhookConfiguration from the index for a given name.
- Get(name string) (*v1beta1.ValidatingWebhookConfiguration, error)
- ValidatingWebhookConfigurationListerExpansion
-}
-
-// validatingWebhookConfigurationLister implements the ValidatingWebhookConfigurationLister interface.
-type validatingWebhookConfigurationLister struct {
- indexer cache.Indexer
-}
-
-// NewValidatingWebhookConfigurationLister returns a new ValidatingWebhookConfigurationLister.
-func NewValidatingWebhookConfigurationLister(indexer cache.Indexer) ValidatingWebhookConfigurationLister {
- return &validatingWebhookConfigurationLister{indexer: indexer}
-}
-
-// List lists all ValidatingWebhookConfigurations in the indexer.
-func (s *validatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*v1beta1.ValidatingWebhookConfiguration, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.ValidatingWebhookConfiguration))
- })
- return ret, err
-}
-
-// Get retrieves the ValidatingWebhookConfiguration from the index for a given name.
-func (s *validatingWebhookConfigurationLister) Get(name string) (*v1beta1.ValidatingWebhookConfiguration, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("validatingwebhookconfiguration"), name)
- }
- return obj.(*v1beta1.ValidatingWebhookConfiguration), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1/controllerrevision.go b/vendor/k8s.io/client-go/listers/apps/v1/controllerrevision.go
deleted file mode 100644
index ce53507f0..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1/controllerrevision.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ControllerRevisionLister helps list ControllerRevisions.
-type ControllerRevisionLister interface {
- // List lists all ControllerRevisions in the indexer.
- List(selector labels.Selector) (ret []*v1.ControllerRevision, err error)
- // ControllerRevisions returns an object that can list and get ControllerRevisions.
- ControllerRevisions(namespace string) ControllerRevisionNamespaceLister
- ControllerRevisionListerExpansion
-}
-
-// controllerRevisionLister implements the ControllerRevisionLister interface.
-type controllerRevisionLister struct {
- indexer cache.Indexer
-}
-
-// NewControllerRevisionLister returns a new ControllerRevisionLister.
-func NewControllerRevisionLister(indexer cache.Indexer) ControllerRevisionLister {
- return &controllerRevisionLister{indexer: indexer}
-}
-
-// List lists all ControllerRevisions in the indexer.
-func (s *controllerRevisionLister) List(selector labels.Selector) (ret []*v1.ControllerRevision, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ControllerRevision))
- })
- return ret, err
-}
-
-// ControllerRevisions returns an object that can list and get ControllerRevisions.
-func (s *controllerRevisionLister) ControllerRevisions(namespace string) ControllerRevisionNamespaceLister {
- return controllerRevisionNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ControllerRevisionNamespaceLister helps list and get ControllerRevisions.
-type ControllerRevisionNamespaceLister interface {
- // List lists all ControllerRevisions in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.ControllerRevision, err error)
- // Get retrieves the ControllerRevision from the indexer for a given namespace and name.
- Get(name string) (*v1.ControllerRevision, error)
- ControllerRevisionNamespaceListerExpansion
-}
-
-// controllerRevisionNamespaceLister implements the ControllerRevisionNamespaceLister
-// interface.
-type controllerRevisionNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ControllerRevisions in the indexer for a given namespace.
-func (s controllerRevisionNamespaceLister) List(selector labels.Selector) (ret []*v1.ControllerRevision, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ControllerRevision))
- })
- return ret, err
-}
-
-// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
-func (s controllerRevisionNamespaceLister) Get(name string) (*v1.ControllerRevision, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("controllerrevision"), name)
- }
- return obj.(*v1.ControllerRevision), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1/daemonset.go b/vendor/k8s.io/client-go/listers/apps/v1/daemonset.go
deleted file mode 100644
index 527cab1c9..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1/daemonset.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// DaemonSetLister helps list DaemonSets.
-type DaemonSetLister interface {
- // List lists all DaemonSets in the indexer.
- List(selector labels.Selector) (ret []*v1.DaemonSet, err error)
- // DaemonSets returns an object that can list and get DaemonSets.
- DaemonSets(namespace string) DaemonSetNamespaceLister
- DaemonSetListerExpansion
-}
-
-// daemonSetLister implements the DaemonSetLister interface.
-type daemonSetLister struct {
- indexer cache.Indexer
-}
-
-// NewDaemonSetLister returns a new DaemonSetLister.
-func NewDaemonSetLister(indexer cache.Indexer) DaemonSetLister {
- return &daemonSetLister{indexer: indexer}
-}
-
-// List lists all DaemonSets in the indexer.
-func (s *daemonSetLister) List(selector labels.Selector) (ret []*v1.DaemonSet, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.DaemonSet))
- })
- return ret, err
-}
-
-// DaemonSets returns an object that can list and get DaemonSets.
-func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister {
- return daemonSetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// DaemonSetNamespaceLister helps list and get DaemonSets.
-type DaemonSetNamespaceLister interface {
- // List lists all DaemonSets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.DaemonSet, err error)
- // Get retrieves the DaemonSet from the indexer for a given namespace and name.
- Get(name string) (*v1.DaemonSet, error)
- DaemonSetNamespaceListerExpansion
-}
-
-// daemonSetNamespaceLister implements the DaemonSetNamespaceLister
-// interface.
-type daemonSetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all DaemonSets in the indexer for a given namespace.
-func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1.DaemonSet, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.DaemonSet))
- })
- return ret, err
-}
-
-// Get retrieves the DaemonSet from the indexer for a given namespace and name.
-func (s daemonSetNamespaceLister) Get(name string) (*v1.DaemonSet, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("daemonset"), name)
- }
- return obj.(*v1.DaemonSet), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1/daemonset_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1/daemonset_expansion.go
deleted file mode 100644
index 83435561a..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1/daemonset_expansion.go
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "fmt"
-
- apps "k8s.io/api/apps/v1"
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// DaemonSetListerExpansion allows custom methods to be added to
-// DaemonSetLister.
-type DaemonSetListerExpansion interface {
- GetPodDaemonSets(pod *v1.Pod) ([]*apps.DaemonSet, error)
- GetHistoryDaemonSets(history *apps.ControllerRevision) ([]*apps.DaemonSet, error)
-}
-
-// DaemonSetNamespaceListerExpansion allows custom methods to be added to
-// DaemonSetNamespaceLister.
-type DaemonSetNamespaceListerExpansion interface{}
-
-// GetPodDaemonSets returns a list of DaemonSets that potentially match a pod.
-// Only the one specified in the Pod's ControllerRef will actually manage it.
-// Returns an error only if no matching DaemonSets are found.
-func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*apps.DaemonSet, error) {
- var selector labels.Selector
- var daemonSet *apps.DaemonSet
-
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name)
- }
-
- list, err := s.DaemonSets(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var daemonSets []*apps.DaemonSet
- for i := range list {
- daemonSet = list[i]
- if daemonSet.Namespace != pod.Namespace {
- continue
- }
- selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector)
- if err != nil {
- // this should not happen if the DaemonSet passed validation
- return nil, err
- }
-
- // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- daemonSets = append(daemonSets, daemonSet)
- }
-
- if len(daemonSets) == 0 {
- return nil, fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return daemonSets, nil
-}
-
-// GetHistoryDaemonSets returns a list of DaemonSets that potentially
-// match a ControllerRevision. Only the one specified in the ControllerRevision's ControllerRef
-// will actually manage it.
-// Returns an error only if no matching DaemonSets are found.
-func (s *daemonSetLister) GetHistoryDaemonSets(history *apps.ControllerRevision) ([]*apps.DaemonSet, error) {
- if len(history.Labels) == 0 {
- return nil, fmt.Errorf("no DaemonSet found for ControllerRevision %s because it has no labels", history.Name)
- }
-
- list, err := s.DaemonSets(history.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var daemonSets []*apps.DaemonSet
- for _, ds := range list {
- selector, err := metav1.LabelSelectorAsSelector(ds.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid label selector: %v", err)
- }
- // If a DaemonSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(history.Labels)) {
- continue
- }
- daemonSets = append(daemonSets, ds)
- }
-
- if len(daemonSets) == 0 {
- return nil, fmt.Errorf("could not find DaemonSets for ControllerRevision %s in namespace %s with labels: %v", history.Name, history.Namespace, history.Labels)
- }
-
- return daemonSets, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1/deployment.go b/vendor/k8s.io/client-go/listers/apps/v1/deployment.go
deleted file mode 100644
index 85c566861..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1/deployment.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// DeploymentLister helps list Deployments.
-type DeploymentLister interface {
- // List lists all Deployments in the indexer.
- List(selector labels.Selector) (ret []*v1.Deployment, err error)
- // Deployments returns an object that can list and get Deployments.
- Deployments(namespace string) DeploymentNamespaceLister
- DeploymentListerExpansion
-}
-
-// deploymentLister implements the DeploymentLister interface.
-type deploymentLister struct {
- indexer cache.Indexer
-}
-
-// NewDeploymentLister returns a new DeploymentLister.
-func NewDeploymentLister(indexer cache.Indexer) DeploymentLister {
- return &deploymentLister{indexer: indexer}
-}
-
-// List lists all Deployments in the indexer.
-func (s *deploymentLister) List(selector labels.Selector) (ret []*v1.Deployment, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Deployment))
- })
- return ret, err
-}
-
-// Deployments returns an object that can list and get Deployments.
-func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceLister {
- return deploymentNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// DeploymentNamespaceLister helps list and get Deployments.
-type DeploymentNamespaceLister interface {
- // List lists all Deployments in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.Deployment, err error)
- // Get retrieves the Deployment from the indexer for a given namespace and name.
- Get(name string) (*v1.Deployment, error)
- DeploymentNamespaceListerExpansion
-}
-
-// deploymentNamespaceLister implements the DeploymentNamespaceLister
-// interface.
-type deploymentNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Deployments in the indexer for a given namespace.
-func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1.Deployment, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Deployment))
- })
- return ret, err
-}
-
-// Get retrieves the Deployment from the indexer for a given namespace and name.
-func (s deploymentNamespaceLister) Get(name string) (*v1.Deployment, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("deployment"), name)
- }
- return obj.(*v1.Deployment), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1/deployment_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1/deployment_expansion.go
deleted file mode 100644
index 7802eca5a..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1/deployment_expansion.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "fmt"
-
- apps "k8s.io/api/apps/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// DeploymentListerExpansion allows custom methods to be added to
-// DeploymentLister.
-type DeploymentListerExpansion interface {
- GetDeploymentsForReplicaSet(rs *apps.ReplicaSet) ([]*apps.Deployment, error)
-}
-
-// DeploymentNamespaceListerExpansion allows custom methods to be added to
-// DeploymentNamespaceLister.
-type DeploymentNamespaceListerExpansion interface{}
-
-// GetDeploymentsForReplicaSet returns a list of Deployments that potentially
-// match a ReplicaSet. Only the one specified in the ReplicaSet's ControllerRef
-// will actually manage it.
-// Returns an error only if no matching Deployments are found.
-func (s *deploymentLister) GetDeploymentsForReplicaSet(rs *apps.ReplicaSet) ([]*apps.Deployment, error) {
- if len(rs.Labels) == 0 {
- return nil, fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name)
- }
-
- // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label
- dList, err := s.Deployments(rs.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var deployments []*apps.Deployment
- for _, d := range dList {
- selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid label selector: %v", err)
- }
- // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) {
- continue
- }
- deployments = append(deployments, d)
- }
-
- if len(deployments) == 0 {
- return nil, fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels)
- }
-
- return deployments, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/apps/v1/expansion_generated.go
deleted file mode 100644
index 447c08796..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-// ControllerRevisionListerExpansion allows custom methods to be added to
-// ControllerRevisionLister.
-type ControllerRevisionListerExpansion interface{}
-
-// ControllerRevisionNamespaceListerExpansion allows custom methods to be added to
-// ControllerRevisionNamespaceLister.
-type ControllerRevisionNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1/replicaset.go b/vendor/k8s.io/client-go/listers/apps/v1/replicaset.go
deleted file mode 100644
index d68f15ce4..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1/replicaset.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ReplicaSetLister helps list ReplicaSets.
-type ReplicaSetLister interface {
- // List lists all ReplicaSets in the indexer.
- List(selector labels.Selector) (ret []*v1.ReplicaSet, err error)
- // ReplicaSets returns an object that can list and get ReplicaSets.
- ReplicaSets(namespace string) ReplicaSetNamespaceLister
- ReplicaSetListerExpansion
-}
-
-// replicaSetLister implements the ReplicaSetLister interface.
-type replicaSetLister struct {
- indexer cache.Indexer
-}
-
-// NewReplicaSetLister returns a new ReplicaSetLister.
-func NewReplicaSetLister(indexer cache.Indexer) ReplicaSetLister {
- return &replicaSetLister{indexer: indexer}
-}
-
-// List lists all ReplicaSets in the indexer.
-func (s *replicaSetLister) List(selector labels.Selector) (ret []*v1.ReplicaSet, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ReplicaSet))
- })
- return ret, err
-}
-
-// ReplicaSets returns an object that can list and get ReplicaSets.
-func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceLister {
- return replicaSetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ReplicaSetNamespaceLister helps list and get ReplicaSets.
-type ReplicaSetNamespaceLister interface {
- // List lists all ReplicaSets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.ReplicaSet, err error)
- // Get retrieves the ReplicaSet from the indexer for a given namespace and name.
- Get(name string) (*v1.ReplicaSet, error)
- ReplicaSetNamespaceListerExpansion
-}
-
-// replicaSetNamespaceLister implements the ReplicaSetNamespaceLister
-// interface.
-type replicaSetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ReplicaSets in the indexer for a given namespace.
-func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1.ReplicaSet, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ReplicaSet))
- })
- return ret, err
-}
-
-// Get retrieves the ReplicaSet from the indexer for a given namespace and name.
-func (s replicaSetNamespaceLister) Get(name string) (*v1.ReplicaSet, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("replicaset"), name)
- }
- return obj.(*v1.ReplicaSet), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1/replicaset_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1/replicaset_expansion.go
deleted file mode 100644
index 675e615ae..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1/replicaset_expansion.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "fmt"
-
- apps "k8s.io/api/apps/v1"
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// ReplicaSetListerExpansion allows custom methods to be added to
-// ReplicaSetLister.
-type ReplicaSetListerExpansion interface {
- GetPodReplicaSets(pod *v1.Pod) ([]*apps.ReplicaSet, error)
-}
-
-// ReplicaSetNamespaceListerExpansion allows custom methods to be added to
-// ReplicaSetNamespaceLister.
-type ReplicaSetNamespaceListerExpansion interface{}
-
-// GetPodReplicaSets returns a list of ReplicaSets that potentially match a pod.
-// Only the one specified in the Pod's ControllerRef will actually manage it.
-// Returns an error only if no matching ReplicaSets are found.
-func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*apps.ReplicaSet, error) {
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no ReplicaSets found for pod %v because it has no labels", pod.Name)
- }
-
- list, err := s.ReplicaSets(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var rss []*apps.ReplicaSet
- for _, rs := range list {
- if rs.Namespace != pod.Namespace {
- continue
- }
- selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid selector: %v", err)
- }
-
- // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- rss = append(rss, rs)
- }
-
- if len(rss) == 0 {
- return nil, fmt.Errorf("could not find ReplicaSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return rss, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1/statefulset.go b/vendor/k8s.io/client-go/listers/apps/v1/statefulset.go
deleted file mode 100644
index b4bdff2e9..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1/statefulset.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/apps/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// StatefulSetLister helps list StatefulSets.
-type StatefulSetLister interface {
- // List lists all StatefulSets in the indexer.
- List(selector labels.Selector) (ret []*v1.StatefulSet, err error)
- // StatefulSets returns an object that can list and get StatefulSets.
- StatefulSets(namespace string) StatefulSetNamespaceLister
- StatefulSetListerExpansion
-}
-
-// statefulSetLister implements the StatefulSetLister interface.
-type statefulSetLister struct {
- indexer cache.Indexer
-}
-
-// NewStatefulSetLister returns a new StatefulSetLister.
-func NewStatefulSetLister(indexer cache.Indexer) StatefulSetLister {
- return &statefulSetLister{indexer: indexer}
-}
-
-// List lists all StatefulSets in the indexer.
-func (s *statefulSetLister) List(selector labels.Selector) (ret []*v1.StatefulSet, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.StatefulSet))
- })
- return ret, err
-}
-
-// StatefulSets returns an object that can list and get StatefulSets.
-func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceLister {
- return statefulSetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// StatefulSetNamespaceLister helps list and get StatefulSets.
-type StatefulSetNamespaceLister interface {
- // List lists all StatefulSets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.StatefulSet, err error)
- // Get retrieves the StatefulSet from the indexer for a given namespace and name.
- Get(name string) (*v1.StatefulSet, error)
- StatefulSetNamespaceListerExpansion
-}
-
-// statefulSetNamespaceLister implements the StatefulSetNamespaceLister
-// interface.
-type statefulSetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all StatefulSets in the indexer for a given namespace.
-func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1.StatefulSet, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.StatefulSet))
- })
- return ret, err
-}
-
-// Get retrieves the StatefulSet from the indexer for a given namespace and name.
-func (s statefulSetNamespaceLister) Get(name string) (*v1.StatefulSet, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("statefulset"), name)
- }
- return obj.(*v1.StatefulSet), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1/statefulset_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1/statefulset_expansion.go
deleted file mode 100644
index b4912976b..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1/statefulset_expansion.go
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "fmt"
-
- apps "k8s.io/api/apps/v1"
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// StatefulSetListerExpansion allows custom methods to be added to
-// StatefulSetLister.
-type StatefulSetListerExpansion interface {
- GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error)
-}
-
-// StatefulSetNamespaceListerExpansion allows custom methods to be added to
-// StatefulSetNamespaceLister.
-type StatefulSetNamespaceListerExpansion interface{}
-
-// GetPodStatefulSets returns a list of StatefulSets that potentially match a pod.
-// Only the one specified in the Pod's ControllerRef will actually manage it.
-// Returns an error only if no matching StatefulSets are found.
-func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error) {
- var selector labels.Selector
- var ps *apps.StatefulSet
-
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name)
- }
-
- list, err := s.StatefulSets(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var psList []*apps.StatefulSet
- for i := range list {
- ps = list[i]
- if ps.Namespace != pod.Namespace {
- continue
- }
- selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid selector: %v", err)
- }
-
- // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- psList = append(psList, ps)
- }
-
- if len(psList) == 0 {
- return nil, fmt.Errorf("could not find StatefulSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return psList, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go b/vendor/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go
deleted file mode 100644
index c0db171c0..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/apps/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ControllerRevisionLister helps list ControllerRevisions.
-type ControllerRevisionLister interface {
- // List lists all ControllerRevisions in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error)
- // ControllerRevisions returns an object that can list and get ControllerRevisions.
- ControllerRevisions(namespace string) ControllerRevisionNamespaceLister
- ControllerRevisionListerExpansion
-}
-
-// controllerRevisionLister implements the ControllerRevisionLister interface.
-type controllerRevisionLister struct {
- indexer cache.Indexer
-}
-
-// NewControllerRevisionLister returns a new ControllerRevisionLister.
-func NewControllerRevisionLister(indexer cache.Indexer) ControllerRevisionLister {
- return &controllerRevisionLister{indexer: indexer}
-}
-
-// List lists all ControllerRevisions in the indexer.
-func (s *controllerRevisionLister) List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.ControllerRevision))
- })
- return ret, err
-}
-
-// ControllerRevisions returns an object that can list and get ControllerRevisions.
-func (s *controllerRevisionLister) ControllerRevisions(namespace string) ControllerRevisionNamespaceLister {
- return controllerRevisionNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ControllerRevisionNamespaceLister helps list and get ControllerRevisions.
-type ControllerRevisionNamespaceLister interface {
- // List lists all ControllerRevisions in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error)
- // Get retrieves the ControllerRevision from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.ControllerRevision, error)
- ControllerRevisionNamespaceListerExpansion
-}
-
-// controllerRevisionNamespaceLister implements the ControllerRevisionNamespaceLister
-// interface.
-type controllerRevisionNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ControllerRevisions in the indexer for a given namespace.
-func (s controllerRevisionNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.ControllerRevision))
- })
- return ret, err
-}
-
-// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
-func (s controllerRevisionNamespaceLister) Get(name string) (*v1beta1.ControllerRevision, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("controllerrevision"), name)
- }
- return obj.(*v1beta1.ControllerRevision), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta1/deployment.go b/vendor/k8s.io/client-go/listers/apps/v1beta1/deployment.go
deleted file mode 100644
index fb1796bad..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta1/deployment.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/apps/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// DeploymentLister helps list Deployments.
-type DeploymentLister interface {
- // List lists all Deployments in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.Deployment, err error)
- // Deployments returns an object that can list and get Deployments.
- Deployments(namespace string) DeploymentNamespaceLister
- DeploymentListerExpansion
-}
-
-// deploymentLister implements the DeploymentLister interface.
-type deploymentLister struct {
- indexer cache.Indexer
-}
-
-// NewDeploymentLister returns a new DeploymentLister.
-func NewDeploymentLister(indexer cache.Indexer) DeploymentLister {
- return &deploymentLister{indexer: indexer}
-}
-
-// List lists all Deployments in the indexer.
-func (s *deploymentLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Deployment))
- })
- return ret, err
-}
-
-// Deployments returns an object that can list and get Deployments.
-func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceLister {
- return deploymentNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// DeploymentNamespaceLister helps list and get Deployments.
-type DeploymentNamespaceLister interface {
- // List lists all Deployments in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.Deployment, err error)
- // Get retrieves the Deployment from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.Deployment, error)
- DeploymentNamespaceListerExpansion
-}
-
-// deploymentNamespaceLister implements the DeploymentNamespaceLister
-// interface.
-type deploymentNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Deployments in the indexer for a given namespace.
-func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Deployment))
- })
- return ret, err
-}
-
-// Get retrieves the Deployment from the indexer for a given namespace and name.
-func (s deploymentNamespaceLister) Get(name string) (*v1beta1.Deployment, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("deployment"), name)
- }
- return obj.(*v1beta1.Deployment), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go
deleted file mode 100644
index 338fcd633..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-// ControllerRevisionListerExpansion allows custom methods to be added to
-// ControllerRevisionLister.
-type ControllerRevisionListerExpansion interface{}
-
-// ControllerRevisionNamespaceListerExpansion allows custom methods to be added to
-// ControllerRevisionNamespaceLister.
-type ControllerRevisionNamespaceListerExpansion interface{}
-
-// DeploymentListerExpansion allows custom methods to be added to
-// DeploymentLister.
-type DeploymentListerExpansion interface{}
-
-// DeploymentNamespaceListerExpansion allows custom methods to be added to
-// DeploymentNamespaceLister.
-type DeploymentNamespaceListerExpansion interface{}
-
-// ScaleListerExpansion allows custom methods to be added to
-// ScaleLister.
-type ScaleListerExpansion interface{}
-
-// ScaleNamespaceListerExpansion allows custom methods to be added to
-// ScaleNamespaceLister.
-type ScaleNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta1/scale.go b/vendor/k8s.io/client-go/listers/apps/v1beta1/scale.go
deleted file mode 100644
index a0e7086e1..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta1/scale.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/apps/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ScaleLister helps list Scales.
-type ScaleLister interface {
- // List lists all Scales in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.Scale, err error)
- // Scales returns an object that can list and get Scales.
- Scales(namespace string) ScaleNamespaceLister
- ScaleListerExpansion
-}
-
-// scaleLister implements the ScaleLister interface.
-type scaleLister struct {
- indexer cache.Indexer
-}
-
-// NewScaleLister returns a new ScaleLister.
-func NewScaleLister(indexer cache.Indexer) ScaleLister {
- return &scaleLister{indexer: indexer}
-}
-
-// List lists all Scales in the indexer.
-func (s *scaleLister) List(selector labels.Selector) (ret []*v1beta1.Scale, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Scale))
- })
- return ret, err
-}
-
-// Scales returns an object that can list and get Scales.
-func (s *scaleLister) Scales(namespace string) ScaleNamespaceLister {
- return scaleNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ScaleNamespaceLister helps list and get Scales.
-type ScaleNamespaceLister interface {
- // List lists all Scales in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.Scale, err error)
- // Get retrieves the Scale from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.Scale, error)
- ScaleNamespaceListerExpansion
-}
-
-// scaleNamespaceLister implements the ScaleNamespaceLister
-// interface.
-type scaleNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Scales in the indexer for a given namespace.
-func (s scaleNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Scale, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Scale))
- })
- return ret, err
-}
-
-// Get retrieves the Scale from the indexer for a given namespace and name.
-func (s scaleNamespaceLister) Get(name string) (*v1beta1.Scale, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("scale"), name)
- }
- return obj.(*v1beta1.Scale), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset.go b/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset.go
deleted file mode 100644
index 2fc4042b4..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/apps/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// StatefulSetLister helps list StatefulSets.
-type StatefulSetLister interface {
- // List lists all StatefulSets in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error)
- // StatefulSets returns an object that can list and get StatefulSets.
- StatefulSets(namespace string) StatefulSetNamespaceLister
- StatefulSetListerExpansion
-}
-
-// statefulSetLister implements the StatefulSetLister interface.
-type statefulSetLister struct {
- indexer cache.Indexer
-}
-
-// NewStatefulSetLister returns a new StatefulSetLister.
-func NewStatefulSetLister(indexer cache.Indexer) StatefulSetLister {
- return &statefulSetLister{indexer: indexer}
-}
-
-// List lists all StatefulSets in the indexer.
-func (s *statefulSetLister) List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.StatefulSet))
- })
- return ret, err
-}
-
-// StatefulSets returns an object that can list and get StatefulSets.
-func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceLister {
- return statefulSetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// StatefulSetNamespaceLister helps list and get StatefulSets.
-type StatefulSetNamespaceLister interface {
- // List lists all StatefulSets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error)
- // Get retrieves the StatefulSet from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.StatefulSet, error)
- StatefulSetNamespaceListerExpansion
-}
-
-// statefulSetNamespaceLister implements the StatefulSetNamespaceLister
-// interface.
-type statefulSetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all StatefulSets in the indexer for a given namespace.
-func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.StatefulSet))
- })
- return ret, err
-}
-
-// Get retrieves the StatefulSet from the indexer for a given namespace and name.
-func (s statefulSetNamespaceLister) Get(name string) (*v1beta1.StatefulSet, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("statefulset"), name)
- }
- return obj.(*v1beta1.StatefulSet), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go
deleted file mode 100644
index 0741792ac..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- "fmt"
-
- apps "k8s.io/api/apps/v1beta1"
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// StatefulSetListerExpansion allows custom methods to be added to
-// StatefulSetLister.
-type StatefulSetListerExpansion interface {
- GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error)
-}
-
-// StatefulSetNamespaceListerExpansion allows custom methods to be added to
-// StatefulSetNamespaceLister.
-type StatefulSetNamespaceListerExpansion interface{}
-
-// GetPodStatefulSets returns a list of StatefulSets that potentially match a pod.
-// Only the one specified in the Pod's ControllerRef will actually manage it.
-// Returns an error only if no matching StatefulSets are found.
-func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error) {
- var selector labels.Selector
- var ps *apps.StatefulSet
-
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name)
- }
-
- list, err := s.StatefulSets(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var psList []*apps.StatefulSet
- for i := range list {
- ps = list[i]
- if ps.Namespace != pod.Namespace {
- continue
- }
- selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid selector: %v", err)
- }
-
- // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- psList = append(psList, ps)
- }
-
- if len(psList) == 0 {
- return nil, fmt.Errorf("could not find StatefulSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return psList, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go
deleted file mode 100644
index 02ad95d6c..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ControllerRevisionLister helps list ControllerRevisions.
-type ControllerRevisionLister interface {
- // List lists all ControllerRevisions in the indexer.
- List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error)
- // ControllerRevisions returns an object that can list and get ControllerRevisions.
- ControllerRevisions(namespace string) ControllerRevisionNamespaceLister
- ControllerRevisionListerExpansion
-}
-
-// controllerRevisionLister implements the ControllerRevisionLister interface.
-type controllerRevisionLister struct {
- indexer cache.Indexer
-}
-
-// NewControllerRevisionLister returns a new ControllerRevisionLister.
-func NewControllerRevisionLister(indexer cache.Indexer) ControllerRevisionLister {
- return &controllerRevisionLister{indexer: indexer}
-}
-
-// List lists all ControllerRevisions in the indexer.
-func (s *controllerRevisionLister) List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.ControllerRevision))
- })
- return ret, err
-}
-
-// ControllerRevisions returns an object that can list and get ControllerRevisions.
-func (s *controllerRevisionLister) ControllerRevisions(namespace string) ControllerRevisionNamespaceLister {
- return controllerRevisionNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ControllerRevisionNamespaceLister helps list and get ControllerRevisions.
-type ControllerRevisionNamespaceLister interface {
- // List lists all ControllerRevisions in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error)
- // Get retrieves the ControllerRevision from the indexer for a given namespace and name.
- Get(name string) (*v1beta2.ControllerRevision, error)
- ControllerRevisionNamespaceListerExpansion
-}
-
-// controllerRevisionNamespaceLister implements the ControllerRevisionNamespaceLister
-// interface.
-type controllerRevisionNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ControllerRevisions in the indexer for a given namespace.
-func (s controllerRevisionNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.ControllerRevision))
- })
- return ret, err
-}
-
-// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
-func (s controllerRevisionNamespaceLister) Get(name string) (*v1beta2.ControllerRevision, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta2.Resource("controllerrevision"), name)
- }
- return obj.(*v1beta2.ControllerRevision), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset.go
deleted file mode 100644
index c05957b4c..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// DaemonSetLister helps list DaemonSets.
-type DaemonSetLister interface {
- // List lists all DaemonSets in the indexer.
- List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error)
- // DaemonSets returns an object that can list and get DaemonSets.
- DaemonSets(namespace string) DaemonSetNamespaceLister
- DaemonSetListerExpansion
-}
-
-// daemonSetLister implements the DaemonSetLister interface.
-type daemonSetLister struct {
- indexer cache.Indexer
-}
-
-// NewDaemonSetLister returns a new DaemonSetLister.
-func NewDaemonSetLister(indexer cache.Indexer) DaemonSetLister {
- return &daemonSetLister{indexer: indexer}
-}
-
-// List lists all DaemonSets in the indexer.
-func (s *daemonSetLister) List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.DaemonSet))
- })
- return ret, err
-}
-
-// DaemonSets returns an object that can list and get DaemonSets.
-func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister {
- return daemonSetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// DaemonSetNamespaceLister helps list and get DaemonSets.
-type DaemonSetNamespaceLister interface {
- // List lists all DaemonSets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error)
- // Get retrieves the DaemonSet from the indexer for a given namespace and name.
- Get(name string) (*v1beta2.DaemonSet, error)
- DaemonSetNamespaceListerExpansion
-}
-
-// daemonSetNamespaceLister implements the DaemonSetNamespaceLister
-// interface.
-type daemonSetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all DaemonSets in the indexer for a given namespace.
-func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.DaemonSet))
- })
- return ret, err
-}
-
-// Get retrieves the DaemonSet from the indexer for a given namespace and name.
-func (s daemonSetNamespaceLister) Get(name string) (*v1beta2.DaemonSet, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta2.Resource("daemonset"), name)
- }
- return obj.(*v1beta2.DaemonSet), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset_expansion.go
deleted file mode 100644
index 3b01aaa48..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset_expansion.go
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-Copyright 2017 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 v1beta2
-
-import (
- "fmt"
-
- apps "k8s.io/api/apps/v1beta2"
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// DaemonSetListerExpansion allows custom methods to be added to
-// DaemonSetLister.
-type DaemonSetListerExpansion interface {
- GetPodDaemonSets(pod *v1.Pod) ([]*apps.DaemonSet, error)
- GetHistoryDaemonSets(history *apps.ControllerRevision) ([]*apps.DaemonSet, error)
-}
-
-// DaemonSetNamespaceListerExpansion allows custom methods to be added to
-// DaemonSetNamespaceLister.
-type DaemonSetNamespaceListerExpansion interface{}
-
-// GetPodDaemonSets returns a list of DaemonSets that potentially match a pod.
-// Only the one specified in the Pod's ControllerRef will actually manage it.
-// Returns an error only if no matching DaemonSets are found.
-func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*apps.DaemonSet, error) {
- var selector labels.Selector
- var daemonSet *apps.DaemonSet
-
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name)
- }
-
- list, err := s.DaemonSets(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var daemonSets []*apps.DaemonSet
- for i := range list {
- daemonSet = list[i]
- if daemonSet.Namespace != pod.Namespace {
- continue
- }
- selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector)
- if err != nil {
- // this should not happen if the DaemonSet passed validation
- return nil, err
- }
-
- // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- daemonSets = append(daemonSets, daemonSet)
- }
-
- if len(daemonSets) == 0 {
- return nil, fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return daemonSets, nil
-}
-
-// GetHistoryDaemonSets returns a list of DaemonSets that potentially
-// match a ControllerRevision. Only the one specified in the ControllerRevision's ControllerRef
-// will actually manage it.
-// Returns an error only if no matching DaemonSets are found.
-func (s *daemonSetLister) GetHistoryDaemonSets(history *apps.ControllerRevision) ([]*apps.DaemonSet, error) {
- if len(history.Labels) == 0 {
- return nil, fmt.Errorf("no DaemonSet found for ControllerRevision %s because it has no labels", history.Name)
- }
-
- list, err := s.DaemonSets(history.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var daemonSets []*apps.DaemonSet
- for _, ds := range list {
- selector, err := metav1.LabelSelectorAsSelector(ds.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid label selector: %v", err)
- }
- // If a DaemonSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(history.Labels)) {
- continue
- }
- daemonSets = append(daemonSets, ds)
- }
-
- if len(daemonSets) == 0 {
- return nil, fmt.Errorf("could not find DaemonSets for ControllerRevision %s in namespace %s with labels: %v", history.Name, history.Namespace, history.Labels)
- }
-
- return daemonSets, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment.go
deleted file mode 100644
index 7184a7468..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// DeploymentLister helps list Deployments.
-type DeploymentLister interface {
- // List lists all Deployments in the indexer.
- List(selector labels.Selector) (ret []*v1beta2.Deployment, err error)
- // Deployments returns an object that can list and get Deployments.
- Deployments(namespace string) DeploymentNamespaceLister
- DeploymentListerExpansion
-}
-
-// deploymentLister implements the DeploymentLister interface.
-type deploymentLister struct {
- indexer cache.Indexer
-}
-
-// NewDeploymentLister returns a new DeploymentLister.
-func NewDeploymentLister(indexer cache.Indexer) DeploymentLister {
- return &deploymentLister{indexer: indexer}
-}
-
-// List lists all Deployments in the indexer.
-func (s *deploymentLister) List(selector labels.Selector) (ret []*v1beta2.Deployment, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.Deployment))
- })
- return ret, err
-}
-
-// Deployments returns an object that can list and get Deployments.
-func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceLister {
- return deploymentNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// DeploymentNamespaceLister helps list and get Deployments.
-type DeploymentNamespaceLister interface {
- // List lists all Deployments in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta2.Deployment, err error)
- // Get retrieves the Deployment from the indexer for a given namespace and name.
- Get(name string) (*v1beta2.Deployment, error)
- DeploymentNamespaceListerExpansion
-}
-
-// deploymentNamespaceLister implements the DeploymentNamespaceLister
-// interface.
-type deploymentNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Deployments in the indexer for a given namespace.
-func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.Deployment, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.Deployment))
- })
- return ret, err
-}
-
-// Get retrieves the Deployment from the indexer for a given namespace and name.
-func (s deploymentNamespaceLister) Get(name string) (*v1beta2.Deployment, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta2.Resource("deployment"), name)
- }
- return obj.(*v1beta2.Deployment), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment_expansion.go
deleted file mode 100644
index 1537167a0..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment_expansion.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2017 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 v1beta2
-
-import (
- "fmt"
-
- apps "k8s.io/api/apps/v1beta2"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// DeploymentListerExpansion allows custom methods to be added to
-// DeploymentLister.
-type DeploymentListerExpansion interface {
- GetDeploymentsForReplicaSet(rs *apps.ReplicaSet) ([]*apps.Deployment, error)
-}
-
-// DeploymentNamespaceListerExpansion allows custom methods to be added to
-// DeploymentNamespaceLister.
-type DeploymentNamespaceListerExpansion interface{}
-
-// GetDeploymentsForReplicaSet returns a list of Deployments that potentially
-// match a ReplicaSet. Only the one specified in the ReplicaSet's ControllerRef
-// will actually manage it.
-// Returns an error only if no matching Deployments are found.
-func (s *deploymentLister) GetDeploymentsForReplicaSet(rs *apps.ReplicaSet) ([]*apps.Deployment, error) {
- if len(rs.Labels) == 0 {
- return nil, fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name)
- }
-
- // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label
- dList, err := s.Deployments(rs.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var deployments []*apps.Deployment
- for _, d := range dList {
- selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid label selector: %v", err)
- }
- // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) {
- continue
- }
- deployments = append(deployments, d)
- }
-
- if len(deployments) == 0 {
- return nil, fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels)
- }
-
- return deployments, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go
deleted file mode 100644
index 846f1f621..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta2
-
-// ControllerRevisionListerExpansion allows custom methods to be added to
-// ControllerRevisionLister.
-type ControllerRevisionListerExpansion interface{}
-
-// ControllerRevisionNamespaceListerExpansion allows custom methods to be added to
-// ControllerRevisionNamespaceLister.
-type ControllerRevisionNamespaceListerExpansion interface{}
-
-// ScaleListerExpansion allows custom methods to be added to
-// ScaleLister.
-type ScaleListerExpansion interface{}
-
-// ScaleNamespaceListerExpansion allows custom methods to be added to
-// ScaleNamespaceLister.
-type ScaleNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset.go
deleted file mode 100644
index 8cdf0dccd..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ReplicaSetLister helps list ReplicaSets.
-type ReplicaSetLister interface {
- // List lists all ReplicaSets in the indexer.
- List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error)
- // ReplicaSets returns an object that can list and get ReplicaSets.
- ReplicaSets(namespace string) ReplicaSetNamespaceLister
- ReplicaSetListerExpansion
-}
-
-// replicaSetLister implements the ReplicaSetLister interface.
-type replicaSetLister struct {
- indexer cache.Indexer
-}
-
-// NewReplicaSetLister returns a new ReplicaSetLister.
-func NewReplicaSetLister(indexer cache.Indexer) ReplicaSetLister {
- return &replicaSetLister{indexer: indexer}
-}
-
-// List lists all ReplicaSets in the indexer.
-func (s *replicaSetLister) List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.ReplicaSet))
- })
- return ret, err
-}
-
-// ReplicaSets returns an object that can list and get ReplicaSets.
-func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceLister {
- return replicaSetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ReplicaSetNamespaceLister helps list and get ReplicaSets.
-type ReplicaSetNamespaceLister interface {
- // List lists all ReplicaSets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error)
- // Get retrieves the ReplicaSet from the indexer for a given namespace and name.
- Get(name string) (*v1beta2.ReplicaSet, error)
- ReplicaSetNamespaceListerExpansion
-}
-
-// replicaSetNamespaceLister implements the ReplicaSetNamespaceLister
-// interface.
-type replicaSetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ReplicaSets in the indexer for a given namespace.
-func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.ReplicaSet))
- })
- return ret, err
-}
-
-// Get retrieves the ReplicaSet from the indexer for a given namespace and name.
-func (s replicaSetNamespaceLister) Get(name string) (*v1beta2.ReplicaSet, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta2.Resource("replicaset"), name)
- }
- return obj.(*v1beta2.ReplicaSet), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset_expansion.go
deleted file mode 100644
index 7562fe996..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset_expansion.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-Copyright 2017 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 v1beta2
-
-import (
- "fmt"
-
- apps "k8s.io/api/apps/v1beta2"
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// ReplicaSetListerExpansion allows custom methods to be added to
-// ReplicaSetLister.
-type ReplicaSetListerExpansion interface {
- GetPodReplicaSets(pod *v1.Pod) ([]*apps.ReplicaSet, error)
-}
-
-// ReplicaSetNamespaceListerExpansion allows custom methods to be added to
-// ReplicaSetNamespaceLister.
-type ReplicaSetNamespaceListerExpansion interface{}
-
-// GetPodReplicaSets returns a list of ReplicaSets that potentially match a pod.
-// Only the one specified in the Pod's ControllerRef will actually manage it.
-// Returns an error only if no matching ReplicaSets are found.
-func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*apps.ReplicaSet, error) {
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no ReplicaSets found for pod %v because it has no labels", pod.Name)
- }
-
- list, err := s.ReplicaSets(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var rss []*apps.ReplicaSet
- for _, rs := range list {
- if rs.Namespace != pod.Namespace {
- continue
- }
- selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid selector: %v", err)
- }
-
- // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- rss = append(rss, rs)
- }
-
- if len(rss) == 0 {
- return nil, fmt.Errorf("could not find ReplicaSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return rss, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/scale.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/scale.go
deleted file mode 100644
index 27e76c366..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/scale.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ScaleLister helps list Scales.
-type ScaleLister interface {
- // List lists all Scales in the indexer.
- List(selector labels.Selector) (ret []*v1beta2.Scale, err error)
- // Scales returns an object that can list and get Scales.
- Scales(namespace string) ScaleNamespaceLister
- ScaleListerExpansion
-}
-
-// scaleLister implements the ScaleLister interface.
-type scaleLister struct {
- indexer cache.Indexer
-}
-
-// NewScaleLister returns a new ScaleLister.
-func NewScaleLister(indexer cache.Indexer) ScaleLister {
- return &scaleLister{indexer: indexer}
-}
-
-// List lists all Scales in the indexer.
-func (s *scaleLister) List(selector labels.Selector) (ret []*v1beta2.Scale, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.Scale))
- })
- return ret, err
-}
-
-// Scales returns an object that can list and get Scales.
-func (s *scaleLister) Scales(namespace string) ScaleNamespaceLister {
- return scaleNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ScaleNamespaceLister helps list and get Scales.
-type ScaleNamespaceLister interface {
- // List lists all Scales in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta2.Scale, err error)
- // Get retrieves the Scale from the indexer for a given namespace and name.
- Get(name string) (*v1beta2.Scale, error)
- ScaleNamespaceListerExpansion
-}
-
-// scaleNamespaceLister implements the ScaleNamespaceLister
-// interface.
-type scaleNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Scales in the indexer for a given namespace.
-func (s scaleNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.Scale, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.Scale))
- })
- return ret, err
-}
-
-// Get retrieves the Scale from the indexer for a given namespace and name.
-func (s scaleNamespaceLister) Get(name string) (*v1beta2.Scale, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta2.Resource("scale"), name)
- }
- return obj.(*v1beta2.Scale), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset.go
deleted file mode 100644
index fd0510435..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta2
-
-import (
- v1beta2 "k8s.io/api/apps/v1beta2"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// StatefulSetLister helps list StatefulSets.
-type StatefulSetLister interface {
- // List lists all StatefulSets in the indexer.
- List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error)
- // StatefulSets returns an object that can list and get StatefulSets.
- StatefulSets(namespace string) StatefulSetNamespaceLister
- StatefulSetListerExpansion
-}
-
-// statefulSetLister implements the StatefulSetLister interface.
-type statefulSetLister struct {
- indexer cache.Indexer
-}
-
-// NewStatefulSetLister returns a new StatefulSetLister.
-func NewStatefulSetLister(indexer cache.Indexer) StatefulSetLister {
- return &statefulSetLister{indexer: indexer}
-}
-
-// List lists all StatefulSets in the indexer.
-func (s *statefulSetLister) List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.StatefulSet))
- })
- return ret, err
-}
-
-// StatefulSets returns an object that can list and get StatefulSets.
-func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceLister {
- return statefulSetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// StatefulSetNamespaceLister helps list and get StatefulSets.
-type StatefulSetNamespaceLister interface {
- // List lists all StatefulSets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error)
- // Get retrieves the StatefulSet from the indexer for a given namespace and name.
- Get(name string) (*v1beta2.StatefulSet, error)
- StatefulSetNamespaceListerExpansion
-}
-
-// statefulSetNamespaceLister implements the StatefulSetNamespaceLister
-// interface.
-type statefulSetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all StatefulSets in the indexer for a given namespace.
-func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta2.StatefulSet))
- })
- return ret, err
-}
-
-// Get retrieves the StatefulSet from the indexer for a given namespace and name.
-func (s statefulSetNamespaceLister) Get(name string) (*v1beta2.StatefulSet, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta2.Resource("statefulset"), name)
- }
- return obj.(*v1beta2.StatefulSet), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset_expansion.go
deleted file mode 100644
index 6fa6b9144..000000000
--- a/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset_expansion.go
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-Copyright 2017 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 v1beta2
-
-import (
- "fmt"
-
- apps "k8s.io/api/apps/v1beta2"
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// StatefulSetListerExpansion allows custom methods to be added to
-// StatefulSetLister.
-type StatefulSetListerExpansion interface {
- GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error)
-}
-
-// StatefulSetNamespaceListerExpansion allows custom methods to be added to
-// StatefulSetNamespaceLister.
-type StatefulSetNamespaceListerExpansion interface{}
-
-// GetPodStatefulSets returns a list of StatefulSets that potentially match a pod.
-// Only the one specified in the Pod's ControllerRef will actually manage it.
-// Returns an error only if no matching StatefulSets are found.
-func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error) {
- var selector labels.Selector
- var ps *apps.StatefulSet
-
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name)
- }
-
- list, err := s.StatefulSets(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var psList []*apps.StatefulSet
- for i := range list {
- ps = list[i]
- if ps.Namespace != pod.Namespace {
- continue
- }
- selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid selector: %v", err)
- }
-
- // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- psList = append(psList, ps)
- }
-
- if len(psList) == 0 {
- return nil, fmt.Errorf("could not find StatefulSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return psList, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go
deleted file mode 100644
index 831f9adff..000000000
--- a/vendor/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-// HorizontalPodAutoscalerListerExpansion allows custom methods to be added to
-// HorizontalPodAutoscalerLister.
-type HorizontalPodAutoscalerListerExpansion interface{}
-
-// HorizontalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to
-// HorizontalPodAutoscalerNamespaceLister.
-type HorizontalPodAutoscalerNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
deleted file mode 100644
index d9a840385..000000000
--- a/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/autoscaling/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers.
-type HorizontalPodAutoscalerLister interface {
- // List lists all HorizontalPodAutoscalers in the indexer.
- List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error)
- // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
- HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister
- HorizontalPodAutoscalerListerExpansion
-}
-
-// horizontalPodAutoscalerLister implements the HorizontalPodAutoscalerLister interface.
-type horizontalPodAutoscalerLister struct {
- indexer cache.Indexer
-}
-
-// NewHorizontalPodAutoscalerLister returns a new HorizontalPodAutoscalerLister.
-func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutoscalerLister {
- return &horizontalPodAutoscalerLister{indexer: indexer}
-}
-
-// List lists all HorizontalPodAutoscalers in the indexer.
-func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.HorizontalPodAutoscaler))
- })
- return ret, err
-}
-
-// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
-func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister {
- return horizontalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers.
-type HorizontalPodAutoscalerNamespaceLister interface {
- // List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error)
- // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
- Get(name string) (*v1.HorizontalPodAutoscaler, error)
- HorizontalPodAutoscalerNamespaceListerExpansion
-}
-
-// horizontalPodAutoscalerNamespaceLister implements the HorizontalPodAutoscalerNamespaceLister
-// interface.
-type horizontalPodAutoscalerNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
-func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.HorizontalPodAutoscaler))
- })
- return ret, err
-}
-
-// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
-func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v1.HorizontalPodAutoscaler, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("horizontalpodautoscaler"), name)
- }
- return obj.(*v1.HorizontalPodAutoscaler), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/expansion_generated.go
deleted file mode 100644
index dc3da8a0e..000000000
--- a/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v2beta1
-
-// HorizontalPodAutoscalerListerExpansion allows custom methods to be added to
-// HorizontalPodAutoscalerLister.
-type HorizontalPodAutoscalerListerExpansion interface{}
-
-// HorizontalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to
-// HorizontalPodAutoscalerNamespaceLister.
-type HorizontalPodAutoscalerNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
deleted file mode 100644
index b1b593931..000000000
--- a/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v2beta1
-
-import (
- v2beta1 "k8s.io/api/autoscaling/v2beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers.
-type HorizontalPodAutoscalerLister interface {
- // List lists all HorizontalPodAutoscalers in the indexer.
- List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error)
- // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
- HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister
- HorizontalPodAutoscalerListerExpansion
-}
-
-// horizontalPodAutoscalerLister implements the HorizontalPodAutoscalerLister interface.
-type horizontalPodAutoscalerLister struct {
- indexer cache.Indexer
-}
-
-// NewHorizontalPodAutoscalerLister returns a new HorizontalPodAutoscalerLister.
-func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutoscalerLister {
- return &horizontalPodAutoscalerLister{indexer: indexer}
-}
-
-// List lists all HorizontalPodAutoscalers in the indexer.
-func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v2beta1.HorizontalPodAutoscaler))
- })
- return ret, err
-}
-
-// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
-func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister {
- return horizontalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers.
-type HorizontalPodAutoscalerNamespaceLister interface {
- // List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error)
- // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
- Get(name string) (*v2beta1.HorizontalPodAutoscaler, error)
- HorizontalPodAutoscalerNamespaceListerExpansion
-}
-
-// horizontalPodAutoscalerNamespaceLister implements the HorizontalPodAutoscalerNamespaceLister
-// interface.
-type horizontalPodAutoscalerNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
-func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v2beta1.HorizontalPodAutoscaler))
- })
- return ret, err
-}
-
-// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
-func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2beta1.HorizontalPodAutoscaler, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v2beta1.Resource("horizontalpodautoscaler"), name)
- }
- return obj.(*v2beta1.HorizontalPodAutoscaler), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/batch/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/batch/v1/expansion_generated.go
deleted file mode 100644
index 6abde7f89..000000000
--- a/vendor/k8s.io/client-go/listers/batch/v1/expansion_generated.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
diff --git a/vendor/k8s.io/client-go/listers/batch/v1/job.go b/vendor/k8s.io/client-go/listers/batch/v1/job.go
deleted file mode 100644
index 948d53a73..000000000
--- a/vendor/k8s.io/client-go/listers/batch/v1/job.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/batch/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// JobLister helps list Jobs.
-type JobLister interface {
- // List lists all Jobs in the indexer.
- List(selector labels.Selector) (ret []*v1.Job, err error)
- // Jobs returns an object that can list and get Jobs.
- Jobs(namespace string) JobNamespaceLister
- JobListerExpansion
-}
-
-// jobLister implements the JobLister interface.
-type jobLister struct {
- indexer cache.Indexer
-}
-
-// NewJobLister returns a new JobLister.
-func NewJobLister(indexer cache.Indexer) JobLister {
- return &jobLister{indexer: indexer}
-}
-
-// List lists all Jobs in the indexer.
-func (s *jobLister) List(selector labels.Selector) (ret []*v1.Job, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Job))
- })
- return ret, err
-}
-
-// Jobs returns an object that can list and get Jobs.
-func (s *jobLister) Jobs(namespace string) JobNamespaceLister {
- return jobNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// JobNamespaceLister helps list and get Jobs.
-type JobNamespaceLister interface {
- // List lists all Jobs in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.Job, err error)
- // Get retrieves the Job from the indexer for a given namespace and name.
- Get(name string) (*v1.Job, error)
- JobNamespaceListerExpansion
-}
-
-// jobNamespaceLister implements the JobNamespaceLister
-// interface.
-type jobNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Jobs in the indexer for a given namespace.
-func (s jobNamespaceLister) List(selector labels.Selector) (ret []*v1.Job, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Job))
- })
- return ret, err
-}
-
-// Get retrieves the Job from the indexer for a given namespace and name.
-func (s jobNamespaceLister) Get(name string) (*v1.Job, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("job"), name)
- }
- return obj.(*v1.Job), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/batch/v1/job_expansion.go b/vendor/k8s.io/client-go/listers/batch/v1/job_expansion.go
deleted file mode 100644
index fdcd5f32e..000000000
--- a/vendor/k8s.io/client-go/listers/batch/v1/job_expansion.go
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-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 v1
-
-import (
- "fmt"
-
- batch "k8s.io/api/batch/v1"
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// JobListerExpansion allows custom methods to be added to
-// JobLister.
-type JobListerExpansion interface {
- // GetPodJobs returns a list of Jobs that potentially
- // match a Pod. Only the one specified in the Pod's ControllerRef
- // will actually manage it.
- // Returns an error only if no matching Jobs are found.
- GetPodJobs(pod *v1.Pod) (jobs []batch.Job, err error)
-}
-
-// GetPodJobs returns a list of Jobs that potentially
-// match a Pod. Only the one specified in the Pod's ControllerRef
-// will actually manage it.
-// Returns an error only if no matching Jobs are found.
-func (l *jobLister) GetPodJobs(pod *v1.Pod) (jobs []batch.Job, err error) {
- if len(pod.Labels) == 0 {
- err = fmt.Errorf("no jobs found for pod %v because it has no labels", pod.Name)
- return
- }
-
- var list []*batch.Job
- list, err = l.Jobs(pod.Namespace).List(labels.Everything())
- if err != nil {
- return
- }
- for _, job := range list {
- selector, _ := metav1.LabelSelectorAsSelector(job.Spec.Selector)
- if !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- jobs = append(jobs, *job)
- }
- if len(jobs) == 0 {
- err = fmt.Errorf("could not find jobs for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
- return
-}
-
-// JobNamespaceListerExpansion allows custom methods to be added to
-// JobNamespaceLister.
-type JobNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/batch/v1beta1/cronjob.go b/vendor/k8s.io/client-go/listers/batch/v1beta1/cronjob.go
deleted file mode 100644
index 10c3c3839..000000000
--- a/vendor/k8s.io/client-go/listers/batch/v1beta1/cronjob.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/batch/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// CronJobLister helps list CronJobs.
-type CronJobLister interface {
- // List lists all CronJobs in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.CronJob, err error)
- // CronJobs returns an object that can list and get CronJobs.
- CronJobs(namespace string) CronJobNamespaceLister
- CronJobListerExpansion
-}
-
-// cronJobLister implements the CronJobLister interface.
-type cronJobLister struct {
- indexer cache.Indexer
-}
-
-// NewCronJobLister returns a new CronJobLister.
-func NewCronJobLister(indexer cache.Indexer) CronJobLister {
- return &cronJobLister{indexer: indexer}
-}
-
-// List lists all CronJobs in the indexer.
-func (s *cronJobLister) List(selector labels.Selector) (ret []*v1beta1.CronJob, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.CronJob))
- })
- return ret, err
-}
-
-// CronJobs returns an object that can list and get CronJobs.
-func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister {
- return cronJobNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// CronJobNamespaceLister helps list and get CronJobs.
-type CronJobNamespaceLister interface {
- // List lists all CronJobs in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.CronJob, err error)
- // Get retrieves the CronJob from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.CronJob, error)
- CronJobNamespaceListerExpansion
-}
-
-// cronJobNamespaceLister implements the CronJobNamespaceLister
-// interface.
-type cronJobNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all CronJobs in the indexer for a given namespace.
-func (s cronJobNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.CronJob, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.CronJob))
- })
- return ret, err
-}
-
-// Get retrieves the CronJob from the indexer for a given namespace and name.
-func (s cronJobNamespaceLister) Get(name string) (*v1beta1.CronJob, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("cronjob"), name)
- }
- return obj.(*v1beta1.CronJob), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/batch/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/batch/v1beta1/expansion_generated.go
deleted file mode 100644
index debf39dcd..000000000
--- a/vendor/k8s.io/client-go/listers/batch/v1beta1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-// CronJobListerExpansion allows custom methods to be added to
-// CronJobLister.
-type CronJobListerExpansion interface{}
-
-// CronJobNamespaceListerExpansion allows custom methods to be added to
-// CronJobNamespaceLister.
-type CronJobNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go b/vendor/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go
deleted file mode 100644
index fe144014a..000000000
--- a/vendor/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v2alpha1
-
-import (
- v2alpha1 "k8s.io/api/batch/v2alpha1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// CronJobLister helps list CronJobs.
-type CronJobLister interface {
- // List lists all CronJobs in the indexer.
- List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error)
- // CronJobs returns an object that can list and get CronJobs.
- CronJobs(namespace string) CronJobNamespaceLister
- CronJobListerExpansion
-}
-
-// cronJobLister implements the CronJobLister interface.
-type cronJobLister struct {
- indexer cache.Indexer
-}
-
-// NewCronJobLister returns a new CronJobLister.
-func NewCronJobLister(indexer cache.Indexer) CronJobLister {
- return &cronJobLister{indexer: indexer}
-}
-
-// List lists all CronJobs in the indexer.
-func (s *cronJobLister) List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v2alpha1.CronJob))
- })
- return ret, err
-}
-
-// CronJobs returns an object that can list and get CronJobs.
-func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister {
- return cronJobNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// CronJobNamespaceLister helps list and get CronJobs.
-type CronJobNamespaceLister interface {
- // List lists all CronJobs in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error)
- // Get retrieves the CronJob from the indexer for a given namespace and name.
- Get(name string) (*v2alpha1.CronJob, error)
- CronJobNamespaceListerExpansion
-}
-
-// cronJobNamespaceLister implements the CronJobNamespaceLister
-// interface.
-type cronJobNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all CronJobs in the indexer for a given namespace.
-func (s cronJobNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v2alpha1.CronJob))
- })
- return ret, err
-}
-
-// Get retrieves the CronJob from the indexer for a given namespace and name.
-func (s cronJobNamespaceLister) Get(name string) (*v2alpha1.CronJob, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v2alpha1.Resource("cronjob"), name)
- }
- return obj.(*v2alpha1.CronJob), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go b/vendor/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go
deleted file mode 100644
index f630c1a7c..000000000
--- a/vendor/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v2alpha1
-
-// CronJobListerExpansion allows custom methods to be added to
-// CronJobLister.
-type CronJobListerExpansion interface{}
-
-// CronJobNamespaceListerExpansion allows custom methods to be added to
-// CronJobNamespaceLister.
-type CronJobNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go b/vendor/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go
deleted file mode 100644
index 08550be05..000000000
--- a/vendor/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/certificates/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// CertificateSigningRequestLister helps list CertificateSigningRequests.
-type CertificateSigningRequestLister interface {
- // List lists all CertificateSigningRequests in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error)
- // Get retrieves the CertificateSigningRequest from the index for a given name.
- Get(name string) (*v1beta1.CertificateSigningRequest, error)
- CertificateSigningRequestListerExpansion
-}
-
-// certificateSigningRequestLister implements the CertificateSigningRequestLister interface.
-type certificateSigningRequestLister struct {
- indexer cache.Indexer
-}
-
-// NewCertificateSigningRequestLister returns a new CertificateSigningRequestLister.
-func NewCertificateSigningRequestLister(indexer cache.Indexer) CertificateSigningRequestLister {
- return &certificateSigningRequestLister{indexer: indexer}
-}
-
-// List lists all CertificateSigningRequests in the indexer.
-func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.CertificateSigningRequest))
- })
- return ret, err
-}
-
-// Get retrieves the CertificateSigningRequest from the index for a given name.
-func (s *certificateSigningRequestLister) Get(name string) (*v1beta1.CertificateSigningRequest, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("certificatesigningrequest"), name)
- }
- return obj.(*v1beta1.CertificateSigningRequest), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go
deleted file mode 100644
index 5c241556b..000000000
--- a/vendor/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-// CertificateSigningRequestListerExpansion allows custom methods to be added to
-// CertificateSigningRequestLister.
-type CertificateSigningRequestListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/componentstatus.go b/vendor/k8s.io/client-go/listers/core/v1/componentstatus.go
deleted file mode 100644
index 76f097f37..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/componentstatus.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ComponentStatusLister helps list ComponentStatuses.
-type ComponentStatusLister interface {
- // List lists all ComponentStatuses in the indexer.
- List(selector labels.Selector) (ret []*v1.ComponentStatus, err error)
- // Get retrieves the ComponentStatus from the index for a given name.
- Get(name string) (*v1.ComponentStatus, error)
- ComponentStatusListerExpansion
-}
-
-// componentStatusLister implements the ComponentStatusLister interface.
-type componentStatusLister struct {
- indexer cache.Indexer
-}
-
-// NewComponentStatusLister returns a new ComponentStatusLister.
-func NewComponentStatusLister(indexer cache.Indexer) ComponentStatusLister {
- return &componentStatusLister{indexer: indexer}
-}
-
-// List lists all ComponentStatuses in the indexer.
-func (s *componentStatusLister) List(selector labels.Selector) (ret []*v1.ComponentStatus, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ComponentStatus))
- })
- return ret, err
-}
-
-// Get retrieves the ComponentStatus from the index for a given name.
-func (s *componentStatusLister) Get(name string) (*v1.ComponentStatus, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("componentstatus"), name)
- }
- return obj.(*v1.ComponentStatus), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/configmap.go b/vendor/k8s.io/client-go/listers/core/v1/configmap.go
deleted file mode 100644
index 6e45dfc7a..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/configmap.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ConfigMapLister helps list ConfigMaps.
-type ConfigMapLister interface {
- // List lists all ConfigMaps in the indexer.
- List(selector labels.Selector) (ret []*v1.ConfigMap, err error)
- // ConfigMaps returns an object that can list and get ConfigMaps.
- ConfigMaps(namespace string) ConfigMapNamespaceLister
- ConfigMapListerExpansion
-}
-
-// configMapLister implements the ConfigMapLister interface.
-type configMapLister struct {
- indexer cache.Indexer
-}
-
-// NewConfigMapLister returns a new ConfigMapLister.
-func NewConfigMapLister(indexer cache.Indexer) ConfigMapLister {
- return &configMapLister{indexer: indexer}
-}
-
-// List lists all ConfigMaps in the indexer.
-func (s *configMapLister) List(selector labels.Selector) (ret []*v1.ConfigMap, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ConfigMap))
- })
- return ret, err
-}
-
-// ConfigMaps returns an object that can list and get ConfigMaps.
-func (s *configMapLister) ConfigMaps(namespace string) ConfigMapNamespaceLister {
- return configMapNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ConfigMapNamespaceLister helps list and get ConfigMaps.
-type ConfigMapNamespaceLister interface {
- // List lists all ConfigMaps in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.ConfigMap, err error)
- // Get retrieves the ConfigMap from the indexer for a given namespace and name.
- Get(name string) (*v1.ConfigMap, error)
- ConfigMapNamespaceListerExpansion
-}
-
-// configMapNamespaceLister implements the ConfigMapNamespaceLister
-// interface.
-type configMapNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ConfigMaps in the indexer for a given namespace.
-func (s configMapNamespaceLister) List(selector labels.Selector) (ret []*v1.ConfigMap, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ConfigMap))
- })
- return ret, err
-}
-
-// Get retrieves the ConfigMap from the indexer for a given namespace and name.
-func (s configMapNamespaceLister) Get(name string) (*v1.ConfigMap, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("configmap"), name)
- }
- return obj.(*v1.ConfigMap), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/endpoints.go b/vendor/k8s.io/client-go/listers/core/v1/endpoints.go
deleted file mode 100644
index f6215474d..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/endpoints.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// EndpointsLister helps list Endpoints.
-type EndpointsLister interface {
- // List lists all Endpoints in the indexer.
- List(selector labels.Selector) (ret []*v1.Endpoints, err error)
- // Endpoints returns an object that can list and get Endpoints.
- Endpoints(namespace string) EndpointsNamespaceLister
- EndpointsListerExpansion
-}
-
-// endpointsLister implements the EndpointsLister interface.
-type endpointsLister struct {
- indexer cache.Indexer
-}
-
-// NewEndpointsLister returns a new EndpointsLister.
-func NewEndpointsLister(indexer cache.Indexer) EndpointsLister {
- return &endpointsLister{indexer: indexer}
-}
-
-// List lists all Endpoints in the indexer.
-func (s *endpointsLister) List(selector labels.Selector) (ret []*v1.Endpoints, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Endpoints))
- })
- return ret, err
-}
-
-// Endpoints returns an object that can list and get Endpoints.
-func (s *endpointsLister) Endpoints(namespace string) EndpointsNamespaceLister {
- return endpointsNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// EndpointsNamespaceLister helps list and get Endpoints.
-type EndpointsNamespaceLister interface {
- // List lists all Endpoints in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.Endpoints, err error)
- // Get retrieves the Endpoints from the indexer for a given namespace and name.
- Get(name string) (*v1.Endpoints, error)
- EndpointsNamespaceListerExpansion
-}
-
-// endpointsNamespaceLister implements the EndpointsNamespaceLister
-// interface.
-type endpointsNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Endpoints in the indexer for a given namespace.
-func (s endpointsNamespaceLister) List(selector labels.Selector) (ret []*v1.Endpoints, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Endpoints))
- })
- return ret, err
-}
-
-// Get retrieves the Endpoints from the indexer for a given namespace and name.
-func (s endpointsNamespaceLister) Get(name string) (*v1.Endpoints, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("endpoints"), name)
- }
- return obj.(*v1.Endpoints), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/event.go b/vendor/k8s.io/client-go/listers/core/v1/event.go
deleted file mode 100644
index 533e656c3..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/event.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// EventLister helps list Events.
-type EventLister interface {
- // List lists all Events in the indexer.
- List(selector labels.Selector) (ret []*v1.Event, err error)
- // Events returns an object that can list and get Events.
- Events(namespace string) EventNamespaceLister
- EventListerExpansion
-}
-
-// eventLister implements the EventLister interface.
-type eventLister struct {
- indexer cache.Indexer
-}
-
-// NewEventLister returns a new EventLister.
-func NewEventLister(indexer cache.Indexer) EventLister {
- return &eventLister{indexer: indexer}
-}
-
-// List lists all Events in the indexer.
-func (s *eventLister) List(selector labels.Selector) (ret []*v1.Event, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Event))
- })
- return ret, err
-}
-
-// Events returns an object that can list and get Events.
-func (s *eventLister) Events(namespace string) EventNamespaceLister {
- return eventNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// EventNamespaceLister helps list and get Events.
-type EventNamespaceLister interface {
- // List lists all Events in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.Event, err error)
- // Get retrieves the Event from the indexer for a given namespace and name.
- Get(name string) (*v1.Event, error)
- EventNamespaceListerExpansion
-}
-
-// eventNamespaceLister implements the EventNamespaceLister
-// interface.
-type eventNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Events in the indexer for a given namespace.
-func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1.Event, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Event))
- })
- return ret, err
-}
-
-// Get retrieves the Event from the indexer for a given namespace and name.
-func (s eventNamespaceLister) Get(name string) (*v1.Event, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("event"), name)
- }
- return obj.(*v1.Event), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go
deleted file mode 100644
index 247610a8c..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-// ComponentStatusListerExpansion allows custom methods to be added to
-// ComponentStatusLister.
-type ComponentStatusListerExpansion interface{}
-
-// ConfigMapListerExpansion allows custom methods to be added to
-// ConfigMapLister.
-type ConfigMapListerExpansion interface{}
-
-// ConfigMapNamespaceListerExpansion allows custom methods to be added to
-// ConfigMapNamespaceLister.
-type ConfigMapNamespaceListerExpansion interface{}
-
-// EndpointsListerExpansion allows custom methods to be added to
-// EndpointsLister.
-type EndpointsListerExpansion interface{}
-
-// EndpointsNamespaceListerExpansion allows custom methods to be added to
-// EndpointsNamespaceLister.
-type EndpointsNamespaceListerExpansion interface{}
-
-// EventListerExpansion allows custom methods to be added to
-// EventLister.
-type EventListerExpansion interface{}
-
-// EventNamespaceListerExpansion allows custom methods to be added to
-// EventNamespaceLister.
-type EventNamespaceListerExpansion interface{}
-
-// LimitRangeListerExpansion allows custom methods to be added to
-// LimitRangeLister.
-type LimitRangeListerExpansion interface{}
-
-// LimitRangeNamespaceListerExpansion allows custom methods to be added to
-// LimitRangeNamespaceLister.
-type LimitRangeNamespaceListerExpansion interface{}
-
-// NamespaceListerExpansion allows custom methods to be added to
-// NamespaceLister.
-type NamespaceListerExpansion interface{}
-
-// PersistentVolumeListerExpansion allows custom methods to be added to
-// PersistentVolumeLister.
-type PersistentVolumeListerExpansion interface{}
-
-// PersistentVolumeClaimListerExpansion allows custom methods to be added to
-// PersistentVolumeClaimLister.
-type PersistentVolumeClaimListerExpansion interface{}
-
-// PersistentVolumeClaimNamespaceListerExpansion allows custom methods to be added to
-// PersistentVolumeClaimNamespaceLister.
-type PersistentVolumeClaimNamespaceListerExpansion interface{}
-
-// PodListerExpansion allows custom methods to be added to
-// PodLister.
-type PodListerExpansion interface{}
-
-// PodNamespaceListerExpansion allows custom methods to be added to
-// PodNamespaceLister.
-type PodNamespaceListerExpansion interface{}
-
-// PodTemplateListerExpansion allows custom methods to be added to
-// PodTemplateLister.
-type PodTemplateListerExpansion interface{}
-
-// PodTemplateNamespaceListerExpansion allows custom methods to be added to
-// PodTemplateNamespaceLister.
-type PodTemplateNamespaceListerExpansion interface{}
-
-// ResourceQuotaListerExpansion allows custom methods to be added to
-// ResourceQuotaLister.
-type ResourceQuotaListerExpansion interface{}
-
-// ResourceQuotaNamespaceListerExpansion allows custom methods to be added to
-// ResourceQuotaNamespaceLister.
-type ResourceQuotaNamespaceListerExpansion interface{}
-
-// SecretListerExpansion allows custom methods to be added to
-// SecretLister.
-type SecretListerExpansion interface{}
-
-// SecretNamespaceListerExpansion allows custom methods to be added to
-// SecretNamespaceLister.
-type SecretNamespaceListerExpansion interface{}
-
-// ServiceAccountListerExpansion allows custom methods to be added to
-// ServiceAccountLister.
-type ServiceAccountListerExpansion interface{}
-
-// ServiceAccountNamespaceListerExpansion allows custom methods to be added to
-// ServiceAccountNamespaceLister.
-type ServiceAccountNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/limitrange.go b/vendor/k8s.io/client-go/listers/core/v1/limitrange.go
deleted file mode 100644
index f872726b3..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/limitrange.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// LimitRangeLister helps list LimitRanges.
-type LimitRangeLister interface {
- // List lists all LimitRanges in the indexer.
- List(selector labels.Selector) (ret []*v1.LimitRange, err error)
- // LimitRanges returns an object that can list and get LimitRanges.
- LimitRanges(namespace string) LimitRangeNamespaceLister
- LimitRangeListerExpansion
-}
-
-// limitRangeLister implements the LimitRangeLister interface.
-type limitRangeLister struct {
- indexer cache.Indexer
-}
-
-// NewLimitRangeLister returns a new LimitRangeLister.
-func NewLimitRangeLister(indexer cache.Indexer) LimitRangeLister {
- return &limitRangeLister{indexer: indexer}
-}
-
-// List lists all LimitRanges in the indexer.
-func (s *limitRangeLister) List(selector labels.Selector) (ret []*v1.LimitRange, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.LimitRange))
- })
- return ret, err
-}
-
-// LimitRanges returns an object that can list and get LimitRanges.
-func (s *limitRangeLister) LimitRanges(namespace string) LimitRangeNamespaceLister {
- return limitRangeNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// LimitRangeNamespaceLister helps list and get LimitRanges.
-type LimitRangeNamespaceLister interface {
- // List lists all LimitRanges in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.LimitRange, err error)
- // Get retrieves the LimitRange from the indexer for a given namespace and name.
- Get(name string) (*v1.LimitRange, error)
- LimitRangeNamespaceListerExpansion
-}
-
-// limitRangeNamespaceLister implements the LimitRangeNamespaceLister
-// interface.
-type limitRangeNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all LimitRanges in the indexer for a given namespace.
-func (s limitRangeNamespaceLister) List(selector labels.Selector) (ret []*v1.LimitRange, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.LimitRange))
- })
- return ret, err
-}
-
-// Get retrieves the LimitRange from the indexer for a given namespace and name.
-func (s limitRangeNamespaceLister) Get(name string) (*v1.LimitRange, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("limitrange"), name)
- }
- return obj.(*v1.LimitRange), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/namespace.go b/vendor/k8s.io/client-go/listers/core/v1/namespace.go
deleted file mode 100644
index 909b4a87c..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/namespace.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// NamespaceLister helps list Namespaces.
-type NamespaceLister interface {
- // List lists all Namespaces in the indexer.
- List(selector labels.Selector) (ret []*v1.Namespace, err error)
- // Get retrieves the Namespace from the index for a given name.
- Get(name string) (*v1.Namespace, error)
- NamespaceListerExpansion
-}
-
-// namespaceLister implements the NamespaceLister interface.
-type namespaceLister struct {
- indexer cache.Indexer
-}
-
-// NewNamespaceLister returns a new NamespaceLister.
-func NewNamespaceLister(indexer cache.Indexer) NamespaceLister {
- return &namespaceLister{indexer: indexer}
-}
-
-// List lists all Namespaces in the indexer.
-func (s *namespaceLister) List(selector labels.Selector) (ret []*v1.Namespace, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Namespace))
- })
- return ret, err
-}
-
-// Get retrieves the Namespace from the index for a given name.
-func (s *namespaceLister) Get(name string) (*v1.Namespace, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("namespace"), name)
- }
- return obj.(*v1.Namespace), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/node.go b/vendor/k8s.io/client-go/listers/core/v1/node.go
deleted file mode 100644
index 3c79200f3..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/node.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// NodeLister helps list Nodes.
-type NodeLister interface {
- // List lists all Nodes in the indexer.
- List(selector labels.Selector) (ret []*v1.Node, err error)
- // Get retrieves the Node from the index for a given name.
- Get(name string) (*v1.Node, error)
- NodeListerExpansion
-}
-
-// nodeLister implements the NodeLister interface.
-type nodeLister struct {
- indexer cache.Indexer
-}
-
-// NewNodeLister returns a new NodeLister.
-func NewNodeLister(indexer cache.Indexer) NodeLister {
- return &nodeLister{indexer: indexer}
-}
-
-// List lists all Nodes in the indexer.
-func (s *nodeLister) List(selector labels.Selector) (ret []*v1.Node, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Node))
- })
- return ret, err
-}
-
-// Get retrieves the Node from the index for a given name.
-func (s *nodeLister) Get(name string) (*v1.Node, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("node"), name)
- }
- return obj.(*v1.Node), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/node_expansion.go b/vendor/k8s.io/client-go/listers/core/v1/node_expansion.go
deleted file mode 100644
index 9e5c55ab3..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/node_expansion.go
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// NodeConditionPredicate is a function that indicates whether the given node's conditions meet
-// some set of criteria defined by the function.
-type NodeConditionPredicate func(node *v1.Node) bool
-
-// NodeListerExpansion allows custom methods to be added to
-// NodeLister.
-type NodeListerExpansion interface {
- ListWithPredicate(predicate NodeConditionPredicate) ([]*v1.Node, error)
-}
-
-func (l *nodeLister) ListWithPredicate(predicate NodeConditionPredicate) ([]*v1.Node, error) {
- nodes, err := l.List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var filtered []*v1.Node
- for i := range nodes {
- if predicate(nodes[i]) {
- filtered = append(filtered, nodes[i])
- }
- }
-
- return filtered, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go
deleted file mode 100644
index f3231d2e3..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// PersistentVolumeLister helps list PersistentVolumes.
-type PersistentVolumeLister interface {
- // List lists all PersistentVolumes in the indexer.
- List(selector labels.Selector) (ret []*v1.PersistentVolume, err error)
- // Get retrieves the PersistentVolume from the index for a given name.
- Get(name string) (*v1.PersistentVolume, error)
- PersistentVolumeListerExpansion
-}
-
-// persistentVolumeLister implements the PersistentVolumeLister interface.
-type persistentVolumeLister struct {
- indexer cache.Indexer
-}
-
-// NewPersistentVolumeLister returns a new PersistentVolumeLister.
-func NewPersistentVolumeLister(indexer cache.Indexer) PersistentVolumeLister {
- return &persistentVolumeLister{indexer: indexer}
-}
-
-// List lists all PersistentVolumes in the indexer.
-func (s *persistentVolumeLister) List(selector labels.Selector) (ret []*v1.PersistentVolume, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.PersistentVolume))
- })
- return ret, err
-}
-
-// Get retrieves the PersistentVolume from the index for a given name.
-func (s *persistentVolumeLister) Get(name string) (*v1.PersistentVolume, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("persistentvolume"), name)
- }
- return obj.(*v1.PersistentVolume), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go
deleted file mode 100644
index e7298f18b..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// PersistentVolumeClaimLister helps list PersistentVolumeClaims.
-type PersistentVolumeClaimLister interface {
- // List lists all PersistentVolumeClaims in the indexer.
- List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error)
- // PersistentVolumeClaims returns an object that can list and get PersistentVolumeClaims.
- PersistentVolumeClaims(namespace string) PersistentVolumeClaimNamespaceLister
- PersistentVolumeClaimListerExpansion
-}
-
-// persistentVolumeClaimLister implements the PersistentVolumeClaimLister interface.
-type persistentVolumeClaimLister struct {
- indexer cache.Indexer
-}
-
-// NewPersistentVolumeClaimLister returns a new PersistentVolumeClaimLister.
-func NewPersistentVolumeClaimLister(indexer cache.Indexer) PersistentVolumeClaimLister {
- return &persistentVolumeClaimLister{indexer: indexer}
-}
-
-// List lists all PersistentVolumeClaims in the indexer.
-func (s *persistentVolumeClaimLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.PersistentVolumeClaim))
- })
- return ret, err
-}
-
-// PersistentVolumeClaims returns an object that can list and get PersistentVolumeClaims.
-func (s *persistentVolumeClaimLister) PersistentVolumeClaims(namespace string) PersistentVolumeClaimNamespaceLister {
- return persistentVolumeClaimNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// PersistentVolumeClaimNamespaceLister helps list and get PersistentVolumeClaims.
-type PersistentVolumeClaimNamespaceLister interface {
- // List lists all PersistentVolumeClaims in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error)
- // Get retrieves the PersistentVolumeClaim from the indexer for a given namespace and name.
- Get(name string) (*v1.PersistentVolumeClaim, error)
- PersistentVolumeClaimNamespaceListerExpansion
-}
-
-// persistentVolumeClaimNamespaceLister implements the PersistentVolumeClaimNamespaceLister
-// interface.
-type persistentVolumeClaimNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all PersistentVolumeClaims in the indexer for a given namespace.
-func (s persistentVolumeClaimNamespaceLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.PersistentVolumeClaim))
- })
- return ret, err
-}
-
-// Get retrieves the PersistentVolumeClaim from the indexer for a given namespace and name.
-func (s persistentVolumeClaimNamespaceLister) Get(name string) (*v1.PersistentVolumeClaim, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("persistentvolumeclaim"), name)
- }
- return obj.(*v1.PersistentVolumeClaim), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/pod.go b/vendor/k8s.io/client-go/listers/core/v1/pod.go
deleted file mode 100644
index 0762cd802..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/pod.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// PodLister helps list Pods.
-type PodLister interface {
- // List lists all Pods in the indexer.
- List(selector labels.Selector) (ret []*v1.Pod, err error)
- // Pods returns an object that can list and get Pods.
- Pods(namespace string) PodNamespaceLister
- PodListerExpansion
-}
-
-// podLister implements the PodLister interface.
-type podLister struct {
- indexer cache.Indexer
-}
-
-// NewPodLister returns a new PodLister.
-func NewPodLister(indexer cache.Indexer) PodLister {
- return &podLister{indexer: indexer}
-}
-
-// List lists all Pods in the indexer.
-func (s *podLister) List(selector labels.Selector) (ret []*v1.Pod, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Pod))
- })
- return ret, err
-}
-
-// Pods returns an object that can list and get Pods.
-func (s *podLister) Pods(namespace string) PodNamespaceLister {
- return podNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// PodNamespaceLister helps list and get Pods.
-type PodNamespaceLister interface {
- // List lists all Pods in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.Pod, err error)
- // Get retrieves the Pod from the indexer for a given namespace and name.
- Get(name string) (*v1.Pod, error)
- PodNamespaceListerExpansion
-}
-
-// podNamespaceLister implements the PodNamespaceLister
-// interface.
-type podNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Pods in the indexer for a given namespace.
-func (s podNamespaceLister) List(selector labels.Selector) (ret []*v1.Pod, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Pod))
- })
- return ret, err
-}
-
-// Get retrieves the Pod from the indexer for a given namespace and name.
-func (s podNamespaceLister) Get(name string) (*v1.Pod, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("pod"), name)
- }
- return obj.(*v1.Pod), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/podtemplate.go b/vendor/k8s.io/client-go/listers/core/v1/podtemplate.go
deleted file mode 100644
index 14774acbf..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/podtemplate.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// PodTemplateLister helps list PodTemplates.
-type PodTemplateLister interface {
- // List lists all PodTemplates in the indexer.
- List(selector labels.Selector) (ret []*v1.PodTemplate, err error)
- // PodTemplates returns an object that can list and get PodTemplates.
- PodTemplates(namespace string) PodTemplateNamespaceLister
- PodTemplateListerExpansion
-}
-
-// podTemplateLister implements the PodTemplateLister interface.
-type podTemplateLister struct {
- indexer cache.Indexer
-}
-
-// NewPodTemplateLister returns a new PodTemplateLister.
-func NewPodTemplateLister(indexer cache.Indexer) PodTemplateLister {
- return &podTemplateLister{indexer: indexer}
-}
-
-// List lists all PodTemplates in the indexer.
-func (s *podTemplateLister) List(selector labels.Selector) (ret []*v1.PodTemplate, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.PodTemplate))
- })
- return ret, err
-}
-
-// PodTemplates returns an object that can list and get PodTemplates.
-func (s *podTemplateLister) PodTemplates(namespace string) PodTemplateNamespaceLister {
- return podTemplateNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// PodTemplateNamespaceLister helps list and get PodTemplates.
-type PodTemplateNamespaceLister interface {
- // List lists all PodTemplates in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.PodTemplate, err error)
- // Get retrieves the PodTemplate from the indexer for a given namespace and name.
- Get(name string) (*v1.PodTemplate, error)
- PodTemplateNamespaceListerExpansion
-}
-
-// podTemplateNamespaceLister implements the PodTemplateNamespaceLister
-// interface.
-type podTemplateNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all PodTemplates in the indexer for a given namespace.
-func (s podTemplateNamespaceLister) List(selector labels.Selector) (ret []*v1.PodTemplate, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.PodTemplate))
- })
- return ret, err
-}
-
-// Get retrieves the PodTemplate from the indexer for a given namespace and name.
-func (s podTemplateNamespaceLister) Get(name string) (*v1.PodTemplate, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("podtemplate"), name)
- }
- return obj.(*v1.PodTemplate), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go
deleted file mode 100644
index a1cbe21fa..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ReplicationControllerLister helps list ReplicationControllers.
-type ReplicationControllerLister interface {
- // List lists all ReplicationControllers in the indexer.
- List(selector labels.Selector) (ret []*v1.ReplicationController, err error)
- // ReplicationControllers returns an object that can list and get ReplicationControllers.
- ReplicationControllers(namespace string) ReplicationControllerNamespaceLister
- ReplicationControllerListerExpansion
-}
-
-// replicationControllerLister implements the ReplicationControllerLister interface.
-type replicationControllerLister struct {
- indexer cache.Indexer
-}
-
-// NewReplicationControllerLister returns a new ReplicationControllerLister.
-func NewReplicationControllerLister(indexer cache.Indexer) ReplicationControllerLister {
- return &replicationControllerLister{indexer: indexer}
-}
-
-// List lists all ReplicationControllers in the indexer.
-func (s *replicationControllerLister) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ReplicationController))
- })
- return ret, err
-}
-
-// ReplicationControllers returns an object that can list and get ReplicationControllers.
-func (s *replicationControllerLister) ReplicationControllers(namespace string) ReplicationControllerNamespaceLister {
- return replicationControllerNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ReplicationControllerNamespaceLister helps list and get ReplicationControllers.
-type ReplicationControllerNamespaceLister interface {
- // List lists all ReplicationControllers in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.ReplicationController, err error)
- // Get retrieves the ReplicationController from the indexer for a given namespace and name.
- Get(name string) (*v1.ReplicationController, error)
- ReplicationControllerNamespaceListerExpansion
-}
-
-// replicationControllerNamespaceLister implements the ReplicationControllerNamespaceLister
-// interface.
-type replicationControllerNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ReplicationControllers in the indexer for a given namespace.
-func (s replicationControllerNamespaceLister) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ReplicationController))
- })
- return ret, err
-}
-
-// Get retrieves the ReplicationController from the indexer for a given namespace and name.
-func (s replicationControllerNamespaceLister) Get(name string) (*v1.ReplicationController, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("replicationcontroller"), name)
- }
- return obj.(*v1.ReplicationController), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go b/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go
deleted file mode 100644
index b031d5217..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "fmt"
-
- "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// ReplicationControllerListerExpansion allows custom methods to be added to
-// ReplicationControllerLister.
-type ReplicationControllerListerExpansion interface {
- GetPodControllers(pod *v1.Pod) ([]*v1.ReplicationController, error)
-}
-
-// ReplicationControllerNamespaceListerExpansion allows custom methods to be added to
-// ReplicationControllerNamespaceLister.
-type ReplicationControllerNamespaceListerExpansion interface{}
-
-// GetPodControllers returns a list of ReplicationControllers that potentially match a pod.
-// Only the one specified in the Pod's ControllerRef will actually manage it.
-// Returns an error only if no matching ReplicationControllers are found.
-func (s *replicationControllerLister) GetPodControllers(pod *v1.Pod) ([]*v1.ReplicationController, error) {
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no controllers found for pod %v because it has no labels", pod.Name)
- }
-
- items, err := s.ReplicationControllers(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var controllers []*v1.ReplicationController
- for i := range items {
- rc := items[i]
- selector := labels.Set(rc.Spec.Selector).AsSelectorPreValidated()
-
- // If an rc with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- controllers = append(controllers, rc)
- }
-
- if len(controllers) == 0 {
- return nil, fmt.Errorf("could not find controller for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return controllers, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/resourcequota.go b/vendor/k8s.io/client-go/listers/core/v1/resourcequota.go
deleted file mode 100644
index 3da91223b..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/resourcequota.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ResourceQuotaLister helps list ResourceQuotas.
-type ResourceQuotaLister interface {
- // List lists all ResourceQuotas in the indexer.
- List(selector labels.Selector) (ret []*v1.ResourceQuota, err error)
- // ResourceQuotas returns an object that can list and get ResourceQuotas.
- ResourceQuotas(namespace string) ResourceQuotaNamespaceLister
- ResourceQuotaListerExpansion
-}
-
-// resourceQuotaLister implements the ResourceQuotaLister interface.
-type resourceQuotaLister struct {
- indexer cache.Indexer
-}
-
-// NewResourceQuotaLister returns a new ResourceQuotaLister.
-func NewResourceQuotaLister(indexer cache.Indexer) ResourceQuotaLister {
- return &resourceQuotaLister{indexer: indexer}
-}
-
-// List lists all ResourceQuotas in the indexer.
-func (s *resourceQuotaLister) List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ResourceQuota))
- })
- return ret, err
-}
-
-// ResourceQuotas returns an object that can list and get ResourceQuotas.
-func (s *resourceQuotaLister) ResourceQuotas(namespace string) ResourceQuotaNamespaceLister {
- return resourceQuotaNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ResourceQuotaNamespaceLister helps list and get ResourceQuotas.
-type ResourceQuotaNamespaceLister interface {
- // List lists all ResourceQuotas in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.ResourceQuota, err error)
- // Get retrieves the ResourceQuota from the indexer for a given namespace and name.
- Get(name string) (*v1.ResourceQuota, error)
- ResourceQuotaNamespaceListerExpansion
-}
-
-// resourceQuotaNamespaceLister implements the ResourceQuotaNamespaceLister
-// interface.
-type resourceQuotaNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ResourceQuotas in the indexer for a given namespace.
-func (s resourceQuotaNamespaceLister) List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ResourceQuota))
- })
- return ret, err
-}
-
-// Get retrieves the ResourceQuota from the indexer for a given namespace and name.
-func (s resourceQuotaNamespaceLister) Get(name string) (*v1.ResourceQuota, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("resourcequota"), name)
- }
- return obj.(*v1.ResourceQuota), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/secret.go b/vendor/k8s.io/client-go/listers/core/v1/secret.go
deleted file mode 100644
index 8f7ce949c..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/secret.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// SecretLister helps list Secrets.
-type SecretLister interface {
- // List lists all Secrets in the indexer.
- List(selector labels.Selector) (ret []*v1.Secret, err error)
- // Secrets returns an object that can list and get Secrets.
- Secrets(namespace string) SecretNamespaceLister
- SecretListerExpansion
-}
-
-// secretLister implements the SecretLister interface.
-type secretLister struct {
- indexer cache.Indexer
-}
-
-// NewSecretLister returns a new SecretLister.
-func NewSecretLister(indexer cache.Indexer) SecretLister {
- return &secretLister{indexer: indexer}
-}
-
-// List lists all Secrets in the indexer.
-func (s *secretLister) List(selector labels.Selector) (ret []*v1.Secret, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Secret))
- })
- return ret, err
-}
-
-// Secrets returns an object that can list and get Secrets.
-func (s *secretLister) Secrets(namespace string) SecretNamespaceLister {
- return secretNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// SecretNamespaceLister helps list and get Secrets.
-type SecretNamespaceLister interface {
- // List lists all Secrets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.Secret, err error)
- // Get retrieves the Secret from the indexer for a given namespace and name.
- Get(name string) (*v1.Secret, error)
- SecretNamespaceListerExpansion
-}
-
-// secretNamespaceLister implements the SecretNamespaceLister
-// interface.
-type secretNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Secrets in the indexer for a given namespace.
-func (s secretNamespaceLister) List(selector labels.Selector) (ret []*v1.Secret, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Secret))
- })
- return ret, err
-}
-
-// Get retrieves the Secret from the indexer for a given namespace and name.
-func (s secretNamespaceLister) Get(name string) (*v1.Secret, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("secret"), name)
- }
- return obj.(*v1.Secret), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/service.go b/vendor/k8s.io/client-go/listers/core/v1/service.go
deleted file mode 100644
index 5b464ac2f..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/service.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ServiceLister helps list Services.
-type ServiceLister interface {
- // List lists all Services in the indexer.
- List(selector labels.Selector) (ret []*v1.Service, err error)
- // Services returns an object that can list and get Services.
- Services(namespace string) ServiceNamespaceLister
- ServiceListerExpansion
-}
-
-// serviceLister implements the ServiceLister interface.
-type serviceLister struct {
- indexer cache.Indexer
-}
-
-// NewServiceLister returns a new ServiceLister.
-func NewServiceLister(indexer cache.Indexer) ServiceLister {
- return &serviceLister{indexer: indexer}
-}
-
-// List lists all Services in the indexer.
-func (s *serviceLister) List(selector labels.Selector) (ret []*v1.Service, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Service))
- })
- return ret, err
-}
-
-// Services returns an object that can list and get Services.
-func (s *serviceLister) Services(namespace string) ServiceNamespaceLister {
- return serviceNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ServiceNamespaceLister helps list and get Services.
-type ServiceNamespaceLister interface {
- // List lists all Services in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.Service, err error)
- // Get retrieves the Service from the indexer for a given namespace and name.
- Get(name string) (*v1.Service, error)
- ServiceNamespaceListerExpansion
-}
-
-// serviceNamespaceLister implements the ServiceNamespaceLister
-// interface.
-type serviceNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Services in the indexer for a given namespace.
-func (s serviceNamespaceLister) List(selector labels.Selector) (ret []*v1.Service, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Service))
- })
- return ret, err
-}
-
-// Get retrieves the Service from the indexer for a given namespace and name.
-func (s serviceNamespaceLister) Get(name string) (*v1.Service, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("service"), name)
- }
- return obj.(*v1.Service), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/service_expansion.go b/vendor/k8s.io/client-go/listers/core/v1/service_expansion.go
deleted file mode 100644
index e283d2509..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/service_expansion.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Copyright 2017 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 v1
-
-import (
- "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// ServiceListerExpansion allows custom methods to be added to
-// ServiceLister.
-type ServiceListerExpansion interface {
- GetPodServices(pod *v1.Pod) ([]*v1.Service, error)
-}
-
-// ServiceNamespaceListerExpansion allows custom methods to be added to
-// ServiceNamespaceLister.
-type ServiceNamespaceListerExpansion interface{}
-
-// TODO: Move this back to scheduler as a helper function that takes a Store,
-// rather than a method of ServiceLister.
-func (s *serviceLister) GetPodServices(pod *v1.Pod) ([]*v1.Service, error) {
- allServices, err := s.Services(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var services []*v1.Service
- for i := range allServices {
- service := allServices[i]
- if service.Spec.Selector == nil {
- // services with nil selectors match nothing, not everything.
- continue
- }
- selector := labels.Set(service.Spec.Selector).AsSelectorPreValidated()
- if selector.Matches(labels.Set(pod.Labels)) {
- services = append(services, service)
- }
- }
-
- return services, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go
deleted file mode 100644
index 35de315e2..000000000
--- a/vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ServiceAccountLister helps list ServiceAccounts.
-type ServiceAccountLister interface {
- // List lists all ServiceAccounts in the indexer.
- List(selector labels.Selector) (ret []*v1.ServiceAccount, err error)
- // ServiceAccounts returns an object that can list and get ServiceAccounts.
- ServiceAccounts(namespace string) ServiceAccountNamespaceLister
- ServiceAccountListerExpansion
-}
-
-// serviceAccountLister implements the ServiceAccountLister interface.
-type serviceAccountLister struct {
- indexer cache.Indexer
-}
-
-// NewServiceAccountLister returns a new ServiceAccountLister.
-func NewServiceAccountLister(indexer cache.Indexer) ServiceAccountLister {
- return &serviceAccountLister{indexer: indexer}
-}
-
-// List lists all ServiceAccounts in the indexer.
-func (s *serviceAccountLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ServiceAccount))
- })
- return ret, err
-}
-
-// ServiceAccounts returns an object that can list and get ServiceAccounts.
-func (s *serviceAccountLister) ServiceAccounts(namespace string) ServiceAccountNamespaceLister {
- return serviceAccountNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ServiceAccountNamespaceLister helps list and get ServiceAccounts.
-type ServiceAccountNamespaceLister interface {
- // List lists all ServiceAccounts in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.ServiceAccount, err error)
- // Get retrieves the ServiceAccount from the indexer for a given namespace and name.
- Get(name string) (*v1.ServiceAccount, error)
- ServiceAccountNamespaceListerExpansion
-}
-
-// serviceAccountNamespaceLister implements the ServiceAccountNamespaceLister
-// interface.
-type serviceAccountNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ServiceAccounts in the indexer for a given namespace.
-func (s serviceAccountNamespaceLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ServiceAccount))
- })
- return ret, err
-}
-
-// Get retrieves the ServiceAccount from the indexer for a given namespace and name.
-func (s serviceAccountNamespaceLister) Get(name string) (*v1.ServiceAccount, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("serviceaccount"), name)
- }
- return obj.(*v1.ServiceAccount), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/events/v1beta1/event.go b/vendor/k8s.io/client-go/listers/events/v1beta1/event.go
deleted file mode 100644
index 0f1dcfe50..000000000
--- a/vendor/k8s.io/client-go/listers/events/v1beta1/event.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/events/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// EventLister helps list Events.
-type EventLister interface {
- // List lists all Events in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.Event, err error)
- // Events returns an object that can list and get Events.
- Events(namespace string) EventNamespaceLister
- EventListerExpansion
-}
-
-// eventLister implements the EventLister interface.
-type eventLister struct {
- indexer cache.Indexer
-}
-
-// NewEventLister returns a new EventLister.
-func NewEventLister(indexer cache.Indexer) EventLister {
- return &eventLister{indexer: indexer}
-}
-
-// List lists all Events in the indexer.
-func (s *eventLister) List(selector labels.Selector) (ret []*v1beta1.Event, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Event))
- })
- return ret, err
-}
-
-// Events returns an object that can list and get Events.
-func (s *eventLister) Events(namespace string) EventNamespaceLister {
- return eventNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// EventNamespaceLister helps list and get Events.
-type EventNamespaceLister interface {
- // List lists all Events in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.Event, err error)
- // Get retrieves the Event from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.Event, error)
- EventNamespaceListerExpansion
-}
-
-// eventNamespaceLister implements the EventNamespaceLister
-// interface.
-type eventNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Events in the indexer for a given namespace.
-func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Event, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Event))
- })
- return ret, err
-}
-
-// Get retrieves the Event from the indexer for a given namespace and name.
-func (s eventNamespaceLister) Get(name string) (*v1beta1.Event, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("event"), name)
- }
- return obj.(*v1beta1.Event), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/events/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/events/v1beta1/expansion_generated.go
deleted file mode 100644
index dae23607b..000000000
--- a/vendor/k8s.io/client-go/listers/events/v1beta1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-// EventListerExpansion allows custom methods to be added to
-// EventLister.
-type EventListerExpansion interface{}
-
-// EventNamespaceListerExpansion allows custom methods to be added to
-// EventNamespaceLister.
-type EventNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go
deleted file mode 100644
index aa6741df2..000000000
--- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// DaemonSetLister helps list DaemonSets.
-type DaemonSetLister interface {
- // List lists all DaemonSets in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error)
- // DaemonSets returns an object that can list and get DaemonSets.
- DaemonSets(namespace string) DaemonSetNamespaceLister
- DaemonSetListerExpansion
-}
-
-// daemonSetLister implements the DaemonSetLister interface.
-type daemonSetLister struct {
- indexer cache.Indexer
-}
-
-// NewDaemonSetLister returns a new DaemonSetLister.
-func NewDaemonSetLister(indexer cache.Indexer) DaemonSetLister {
- return &daemonSetLister{indexer: indexer}
-}
-
-// List lists all DaemonSets in the indexer.
-func (s *daemonSetLister) List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.DaemonSet))
- })
- return ret, err
-}
-
-// DaemonSets returns an object that can list and get DaemonSets.
-func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister {
- return daemonSetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// DaemonSetNamespaceLister helps list and get DaemonSets.
-type DaemonSetNamespaceLister interface {
- // List lists all DaemonSets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error)
- // Get retrieves the DaemonSet from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.DaemonSet, error)
- DaemonSetNamespaceListerExpansion
-}
-
-// daemonSetNamespaceLister implements the DaemonSetNamespaceLister
-// interface.
-type daemonSetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all DaemonSets in the indexer for a given namespace.
-func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.DaemonSet))
- })
- return ret, err
-}
-
-// Get retrieves the DaemonSet from the indexer for a given namespace and name.
-func (s daemonSetNamespaceLister) Get(name string) (*v1beta1.DaemonSet, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("daemonset"), name)
- }
- return obj.(*v1beta1.DaemonSet), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go
deleted file mode 100644
index 336a4ed83..000000000
--- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- "fmt"
-
- apps "k8s.io/api/apps/v1beta1"
- "k8s.io/api/core/v1"
- "k8s.io/api/extensions/v1beta1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// DaemonSetListerExpansion allows custom methods to be added to
-// DaemonSetLister.
-type DaemonSetListerExpansion interface {
- GetPodDaemonSets(pod *v1.Pod) ([]*v1beta1.DaemonSet, error)
- GetHistoryDaemonSets(history *apps.ControllerRevision) ([]*v1beta1.DaemonSet, error)
-}
-
-// DaemonSetNamespaceListerExpansion allows custom methods to be added to
-// DaemonSetNamespaceLister.
-type DaemonSetNamespaceListerExpansion interface{}
-
-// GetPodDaemonSets returns a list of DaemonSets that potentially match a pod.
-// Only the one specified in the Pod's ControllerRef will actually manage it.
-// Returns an error only if no matching DaemonSets are found.
-func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*v1beta1.DaemonSet, error) {
- var selector labels.Selector
- var daemonSet *v1beta1.DaemonSet
-
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name)
- }
-
- list, err := s.DaemonSets(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var daemonSets []*v1beta1.DaemonSet
- for i := range list {
- daemonSet = list[i]
- if daemonSet.Namespace != pod.Namespace {
- continue
- }
- selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector)
- if err != nil {
- // this should not happen if the DaemonSet passed validation
- return nil, err
- }
-
- // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- daemonSets = append(daemonSets, daemonSet)
- }
-
- if len(daemonSets) == 0 {
- return nil, fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return daemonSets, nil
-}
-
-// GetHistoryDaemonSets returns a list of DaemonSets that potentially
-// match a ControllerRevision. Only the one specified in the ControllerRevision's ControllerRef
-// will actually manage it.
-// Returns an error only if no matching DaemonSets are found.
-func (s *daemonSetLister) GetHistoryDaemonSets(history *apps.ControllerRevision) ([]*v1beta1.DaemonSet, error) {
- if len(history.Labels) == 0 {
- return nil, fmt.Errorf("no DaemonSet found for ControllerRevision %s because it has no labels", history.Name)
- }
-
- list, err := s.DaemonSets(history.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var daemonSets []*v1beta1.DaemonSet
- for _, ds := range list {
- selector, err := metav1.LabelSelectorAsSelector(ds.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid label selector: %v", err)
- }
- // If a DaemonSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(history.Labels)) {
- continue
- }
- daemonSets = append(daemonSets, ds)
- }
-
- if len(daemonSets) == 0 {
- return nil, fmt.Errorf("could not find DaemonSets for ControllerRevision %s in namespace %s with labels: %v", history.Name, history.Namespace, history.Labels)
- }
-
- return daemonSets, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go
deleted file mode 100644
index 09ce2e20a..000000000
--- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// DeploymentLister helps list Deployments.
-type DeploymentLister interface {
- // List lists all Deployments in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.Deployment, err error)
- // Deployments returns an object that can list and get Deployments.
- Deployments(namespace string) DeploymentNamespaceLister
- DeploymentListerExpansion
-}
-
-// deploymentLister implements the DeploymentLister interface.
-type deploymentLister struct {
- indexer cache.Indexer
-}
-
-// NewDeploymentLister returns a new DeploymentLister.
-func NewDeploymentLister(indexer cache.Indexer) DeploymentLister {
- return &deploymentLister{indexer: indexer}
-}
-
-// List lists all Deployments in the indexer.
-func (s *deploymentLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Deployment))
- })
- return ret, err
-}
-
-// Deployments returns an object that can list and get Deployments.
-func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceLister {
- return deploymentNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// DeploymentNamespaceLister helps list and get Deployments.
-type DeploymentNamespaceLister interface {
- // List lists all Deployments in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.Deployment, err error)
- // Get retrieves the Deployment from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.Deployment, error)
- DeploymentNamespaceListerExpansion
-}
-
-// deploymentNamespaceLister implements the DeploymentNamespaceLister
-// interface.
-type deploymentNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Deployments in the indexer for a given namespace.
-func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Deployment))
- })
- return ret, err
-}
-
-// Get retrieves the Deployment from the indexer for a given namespace and name.
-func (s deploymentNamespaceLister) Get(name string) (*v1beta1.Deployment, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("deployment"), name)
- }
- return obj.(*v1beta1.Deployment), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go
deleted file mode 100644
index b9a14167e..000000000
--- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- "fmt"
-
- extensions "k8s.io/api/extensions/v1beta1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// DeploymentListerExpansion allows custom methods to be added to
-// DeploymentLister.
-type DeploymentListerExpansion interface {
- GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error)
-}
-
-// DeploymentNamespaceListerExpansion allows custom methods to be added to
-// DeploymentNamespaceLister.
-type DeploymentNamespaceListerExpansion interface{}
-
-// GetDeploymentsForReplicaSet returns a list of Deployments that potentially
-// match a ReplicaSet. Only the one specified in the ReplicaSet's ControllerRef
-// will actually manage it.
-// Returns an error only if no matching Deployments are found.
-func (s *deploymentLister) GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) {
- if len(rs.Labels) == 0 {
- return nil, fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name)
- }
-
- // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label
- dList, err := s.Deployments(rs.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var deployments []*extensions.Deployment
- for _, d := range dList {
- selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid label selector: %v", err)
- }
- // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) {
- continue
- }
- deployments = append(deployments, d)
- }
-
- if len(deployments) == 0 {
- return nil, fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels)
- }
-
- return deployments, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go
deleted file mode 100644
index 2c99c42ca..000000000
--- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-// IngressListerExpansion allows custom methods to be added to
-// IngressLister.
-type IngressListerExpansion interface{}
-
-// IngressNamespaceListerExpansion allows custom methods to be added to
-// IngressNamespaceLister.
-type IngressNamespaceListerExpansion interface{}
-
-// PodSecurityPolicyListerExpansion allows custom methods to be added to
-// PodSecurityPolicyLister.
-type PodSecurityPolicyListerExpansion interface{}
-
-// ScaleListerExpansion allows custom methods to be added to
-// ScaleLister.
-type ScaleListerExpansion interface{}
-
-// ScaleNamespaceListerExpansion allows custom methods to be added to
-// ScaleNamespaceLister.
-type ScaleNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go
deleted file mode 100644
index 8489e0b24..000000000
--- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// IngressLister helps list Ingresses.
-type IngressLister interface {
- // List lists all Ingresses in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.Ingress, err error)
- // Ingresses returns an object that can list and get Ingresses.
- Ingresses(namespace string) IngressNamespaceLister
- IngressListerExpansion
-}
-
-// ingressLister implements the IngressLister interface.
-type ingressLister struct {
- indexer cache.Indexer
-}
-
-// NewIngressLister returns a new IngressLister.
-func NewIngressLister(indexer cache.Indexer) IngressLister {
- return &ingressLister{indexer: indexer}
-}
-
-// List lists all Ingresses in the indexer.
-func (s *ingressLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Ingress))
- })
- return ret, err
-}
-
-// Ingresses returns an object that can list and get Ingresses.
-func (s *ingressLister) Ingresses(namespace string) IngressNamespaceLister {
- return ingressNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// IngressNamespaceLister helps list and get Ingresses.
-type IngressNamespaceLister interface {
- // List lists all Ingresses in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.Ingress, err error)
- // Get retrieves the Ingress from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.Ingress, error)
- IngressNamespaceListerExpansion
-}
-
-// ingressNamespaceLister implements the IngressNamespaceLister
-// interface.
-type ingressNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Ingresses in the indexer for a given namespace.
-func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Ingress))
- })
- return ret, err
-}
-
-// Get retrieves the Ingress from the indexer for a given namespace and name.
-func (s ingressNamespaceLister) Get(name string) (*v1beta1.Ingress, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("ingress"), name)
- }
- return obj.(*v1beta1.Ingress), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go
deleted file mode 100644
index 8b44f1793..000000000
--- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// PodSecurityPolicyLister helps list PodSecurityPolicies.
-type PodSecurityPolicyLister interface {
- // List lists all PodSecurityPolicies in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error)
- // Get retrieves the PodSecurityPolicy from the index for a given name.
- Get(name string) (*v1beta1.PodSecurityPolicy, error)
- PodSecurityPolicyListerExpansion
-}
-
-// podSecurityPolicyLister implements the PodSecurityPolicyLister interface.
-type podSecurityPolicyLister struct {
- indexer cache.Indexer
-}
-
-// NewPodSecurityPolicyLister returns a new PodSecurityPolicyLister.
-func NewPodSecurityPolicyLister(indexer cache.Indexer) PodSecurityPolicyLister {
- return &podSecurityPolicyLister{indexer: indexer}
-}
-
-// List lists all PodSecurityPolicies in the indexer.
-func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.PodSecurityPolicy))
- })
- return ret, err
-}
-
-// Get retrieves the PodSecurityPolicy from the index for a given name.
-func (s *podSecurityPolicyLister) Get(name string) (*v1beta1.PodSecurityPolicy, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("podsecuritypolicy"), name)
- }
- return obj.(*v1beta1.PodSecurityPolicy), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go
deleted file mode 100644
index 111bc02a6..000000000
--- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ReplicaSetLister helps list ReplicaSets.
-type ReplicaSetLister interface {
- // List lists all ReplicaSets in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error)
- // ReplicaSets returns an object that can list and get ReplicaSets.
- ReplicaSets(namespace string) ReplicaSetNamespaceLister
- ReplicaSetListerExpansion
-}
-
-// replicaSetLister implements the ReplicaSetLister interface.
-type replicaSetLister struct {
- indexer cache.Indexer
-}
-
-// NewReplicaSetLister returns a new ReplicaSetLister.
-func NewReplicaSetLister(indexer cache.Indexer) ReplicaSetLister {
- return &replicaSetLister{indexer: indexer}
-}
-
-// List lists all ReplicaSets in the indexer.
-func (s *replicaSetLister) List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.ReplicaSet))
- })
- return ret, err
-}
-
-// ReplicaSets returns an object that can list and get ReplicaSets.
-func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceLister {
- return replicaSetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ReplicaSetNamespaceLister helps list and get ReplicaSets.
-type ReplicaSetNamespaceLister interface {
- // List lists all ReplicaSets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error)
- // Get retrieves the ReplicaSet from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.ReplicaSet, error)
- ReplicaSetNamespaceListerExpansion
-}
-
-// replicaSetNamespaceLister implements the ReplicaSetNamespaceLister
-// interface.
-type replicaSetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ReplicaSets in the indexer for a given namespace.
-func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.ReplicaSet))
- })
- return ret, err
-}
-
-// Get retrieves the ReplicaSet from the indexer for a given namespace and name.
-func (s replicaSetNamespaceLister) Get(name string) (*v1beta1.ReplicaSet, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("replicaset"), name)
- }
- return obj.(*v1beta1.ReplicaSet), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go
deleted file mode 100644
index 1f72644cc..000000000
--- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- "fmt"
-
- "k8s.io/api/core/v1"
- extensions "k8s.io/api/extensions/v1beta1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// ReplicaSetListerExpansion allows custom methods to be added to
-// ReplicaSetLister.
-type ReplicaSetListerExpansion interface {
- GetPodReplicaSets(pod *v1.Pod) ([]*extensions.ReplicaSet, error)
-}
-
-// ReplicaSetNamespaceListerExpansion allows custom methods to be added to
-// ReplicaSetNamespaceLister.
-type ReplicaSetNamespaceListerExpansion interface{}
-
-// GetPodReplicaSets returns a list of ReplicaSets that potentially match a pod.
-// Only the one specified in the Pod's ControllerRef will actually manage it.
-// Returns an error only if no matching ReplicaSets are found.
-func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*extensions.ReplicaSet, error) {
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no ReplicaSets found for pod %v because it has no labels", pod.Name)
- }
-
- list, err := s.ReplicaSets(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var rss []*extensions.ReplicaSet
- for _, rs := range list {
- if rs.Namespace != pod.Namespace {
- continue
- }
- selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector)
- if err != nil {
- return nil, fmt.Errorf("invalid selector: %v", err)
- }
-
- // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- rss = append(rss, rs)
- }
-
- if len(rss) == 0 {
- return nil, fmt.Errorf("could not find ReplicaSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return rss, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/scale.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/scale.go
deleted file mode 100644
index 2f6c9f977..000000000
--- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/scale.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/extensions/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ScaleLister helps list Scales.
-type ScaleLister interface {
- // List lists all Scales in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.Scale, err error)
- // Scales returns an object that can list and get Scales.
- Scales(namespace string) ScaleNamespaceLister
- ScaleListerExpansion
-}
-
-// scaleLister implements the ScaleLister interface.
-type scaleLister struct {
- indexer cache.Indexer
-}
-
-// NewScaleLister returns a new ScaleLister.
-func NewScaleLister(indexer cache.Indexer) ScaleLister {
- return &scaleLister{indexer: indexer}
-}
-
-// List lists all Scales in the indexer.
-func (s *scaleLister) List(selector labels.Selector) (ret []*v1beta1.Scale, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Scale))
- })
- return ret, err
-}
-
-// Scales returns an object that can list and get Scales.
-func (s *scaleLister) Scales(namespace string) ScaleNamespaceLister {
- return scaleNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// ScaleNamespaceLister helps list and get Scales.
-type ScaleNamespaceLister interface {
- // List lists all Scales in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.Scale, err error)
- // Get retrieves the Scale from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.Scale, error)
- ScaleNamespaceListerExpansion
-}
-
-// scaleNamespaceLister implements the ScaleNamespaceLister
-// interface.
-type scaleNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Scales in the indexer for a given namespace.
-func (s scaleNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Scale, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Scale))
- })
- return ret, err
-}
-
-// Get retrieves the Scale from the indexer for a given namespace and name.
-func (s scaleNamespaceLister) Get(name string) (*v1beta1.Scale, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("scale"), name)
- }
- return obj.(*v1beta1.Scale), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/networking/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/networking/v1/expansion_generated.go
deleted file mode 100644
index f8a9d1533..000000000
--- a/vendor/k8s.io/client-go/listers/networking/v1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-// NetworkPolicyListerExpansion allows custom methods to be added to
-// NetworkPolicyLister.
-type NetworkPolicyListerExpansion interface{}
-
-// NetworkPolicyNamespaceListerExpansion allows custom methods to be added to
-// NetworkPolicyNamespaceLister.
-type NetworkPolicyNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go b/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
deleted file mode 100644
index c385aac62..000000000
--- a/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/networking/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// NetworkPolicyLister helps list NetworkPolicies.
-type NetworkPolicyLister interface {
- // List lists all NetworkPolicies in the indexer.
- List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error)
- // NetworkPolicies returns an object that can list and get NetworkPolicies.
- NetworkPolicies(namespace string) NetworkPolicyNamespaceLister
- NetworkPolicyListerExpansion
-}
-
-// networkPolicyLister implements the NetworkPolicyLister interface.
-type networkPolicyLister struct {
- indexer cache.Indexer
-}
-
-// NewNetworkPolicyLister returns a new NetworkPolicyLister.
-func NewNetworkPolicyLister(indexer cache.Indexer) NetworkPolicyLister {
- return &networkPolicyLister{indexer: indexer}
-}
-
-// List lists all NetworkPolicies in the indexer.
-func (s *networkPolicyLister) List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.NetworkPolicy))
- })
- return ret, err
-}
-
-// NetworkPolicies returns an object that can list and get NetworkPolicies.
-func (s *networkPolicyLister) NetworkPolicies(namespace string) NetworkPolicyNamespaceLister {
- return networkPolicyNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// NetworkPolicyNamespaceLister helps list and get NetworkPolicies.
-type NetworkPolicyNamespaceLister interface {
- // List lists all NetworkPolicies in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error)
- // Get retrieves the NetworkPolicy from the indexer for a given namespace and name.
- Get(name string) (*v1.NetworkPolicy, error)
- NetworkPolicyNamespaceListerExpansion
-}
-
-// networkPolicyNamespaceLister implements the NetworkPolicyNamespaceLister
-// interface.
-type networkPolicyNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all NetworkPolicies in the indexer for a given namespace.
-func (s networkPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.NetworkPolicy))
- })
- return ret, err
-}
-
-// Get retrieves the NetworkPolicy from the indexer for a given namespace and name.
-func (s networkPolicyNamespaceLister) Get(name string) (*v1.NetworkPolicy, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("networkpolicy"), name)
- }
- return obj.(*v1.NetworkPolicy), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go b/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
deleted file mode 100644
index 2dc7f5757..000000000
--- a/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/policy/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// EvictionLister helps list Evictions.
-type EvictionLister interface {
- // List lists all Evictions in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.Eviction, err error)
- // Evictions returns an object that can list and get Evictions.
- Evictions(namespace string) EvictionNamespaceLister
- EvictionListerExpansion
-}
-
-// evictionLister implements the EvictionLister interface.
-type evictionLister struct {
- indexer cache.Indexer
-}
-
-// NewEvictionLister returns a new EvictionLister.
-func NewEvictionLister(indexer cache.Indexer) EvictionLister {
- return &evictionLister{indexer: indexer}
-}
-
-// List lists all Evictions in the indexer.
-func (s *evictionLister) List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Eviction))
- })
- return ret, err
-}
-
-// Evictions returns an object that can list and get Evictions.
-func (s *evictionLister) Evictions(namespace string) EvictionNamespaceLister {
- return evictionNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// EvictionNamespaceLister helps list and get Evictions.
-type EvictionNamespaceLister interface {
- // List lists all Evictions in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.Eviction, err error)
- // Get retrieves the Eviction from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.Eviction, error)
- EvictionNamespaceListerExpansion
-}
-
-// evictionNamespaceLister implements the EvictionNamespaceLister
-// interface.
-type evictionNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Evictions in the indexer for a given namespace.
-func (s evictionNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Eviction))
- })
- return ret, err
-}
-
-// Get retrieves the Eviction from the indexer for a given namespace and name.
-func (s evictionNamespaceLister) Get(name string) (*v1beta1.Eviction, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("eviction"), name)
- }
- return obj.(*v1beta1.Eviction), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go
deleted file mode 100644
index 090199ade..000000000
--- a/vendor/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-// EvictionListerExpansion allows custom methods to be added to
-// EvictionLister.
-type EvictionListerExpansion interface{}
-
-// EvictionNamespaceListerExpansion allows custom methods to be added to
-// EvictionNamespaceLister.
-type EvictionNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
deleted file mode 100644
index dfad3515a..000000000
--- a/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/policy/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// PodDisruptionBudgetLister helps list PodDisruptionBudgets.
-type PodDisruptionBudgetLister interface {
- // List lists all PodDisruptionBudgets in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error)
- // PodDisruptionBudgets returns an object that can list and get PodDisruptionBudgets.
- PodDisruptionBudgets(namespace string) PodDisruptionBudgetNamespaceLister
- PodDisruptionBudgetListerExpansion
-}
-
-// podDisruptionBudgetLister implements the PodDisruptionBudgetLister interface.
-type podDisruptionBudgetLister struct {
- indexer cache.Indexer
-}
-
-// NewPodDisruptionBudgetLister returns a new PodDisruptionBudgetLister.
-func NewPodDisruptionBudgetLister(indexer cache.Indexer) PodDisruptionBudgetLister {
- return &podDisruptionBudgetLister{indexer: indexer}
-}
-
-// List lists all PodDisruptionBudgets in the indexer.
-func (s *podDisruptionBudgetLister) List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.PodDisruptionBudget))
- })
- return ret, err
-}
-
-// PodDisruptionBudgets returns an object that can list and get PodDisruptionBudgets.
-func (s *podDisruptionBudgetLister) PodDisruptionBudgets(namespace string) PodDisruptionBudgetNamespaceLister {
- return podDisruptionBudgetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// PodDisruptionBudgetNamespaceLister helps list and get PodDisruptionBudgets.
-type PodDisruptionBudgetNamespaceLister interface {
- // List lists all PodDisruptionBudgets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error)
- // Get retrieves the PodDisruptionBudget from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.PodDisruptionBudget, error)
- PodDisruptionBudgetNamespaceListerExpansion
-}
-
-// podDisruptionBudgetNamespaceLister implements the PodDisruptionBudgetNamespaceLister
-// interface.
-type podDisruptionBudgetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all PodDisruptionBudgets in the indexer for a given namespace.
-func (s podDisruptionBudgetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.PodDisruptionBudget))
- })
- return ret, err
-}
-
-// Get retrieves the PodDisruptionBudget from the indexer for a given namespace and name.
-func (s podDisruptionBudgetNamespaceLister) Get(name string) (*v1beta1.PodDisruptionBudget, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("poddisruptionbudget"), name)
- }
- return obj.(*v1beta1.PodDisruptionBudget), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go b/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go
deleted file mode 100644
index c0ab9d3ed..000000000
--- a/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-Copyright 2017 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 v1beta1
-
-import (
- "fmt"
-
- "github.com/golang/glog"
- "k8s.io/api/core/v1"
- policy "k8s.io/api/policy/v1beta1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
-)
-
-// PodDisruptionBudgetListerExpansion allows custom methods to be added to
-// PodDisruptionBudgetLister.
-type PodDisruptionBudgetListerExpansion interface {
- GetPodPodDisruptionBudgets(pod *v1.Pod) ([]*policy.PodDisruptionBudget, error)
-}
-
-// PodDisruptionBudgetNamespaceListerExpansion allows custom methods to be added to
-// PodDisruptionBudgetNamespaceLister.
-type PodDisruptionBudgetNamespaceListerExpansion interface{}
-
-// GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod. Returns an error only if no matching PodDisruptionBudgets are found.
-func (s *podDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) ([]*policy.PodDisruptionBudget, error) {
- var selector labels.Selector
-
- if len(pod.Labels) == 0 {
- return nil, fmt.Errorf("no PodDisruptionBudgets found for pod %v because it has no labels", pod.Name)
- }
-
- list, err := s.PodDisruptionBudgets(pod.Namespace).List(labels.Everything())
- if err != nil {
- return nil, err
- }
-
- var pdbList []*policy.PodDisruptionBudget
- for i := range list {
- pdb := list[i]
- selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector)
- if err != nil {
- glog.Warningf("invalid selector: %v", err)
- // TODO(mml): add an event to the PDB
- continue
- }
-
- // If a PDB with a nil or empty selector creeps in, it should match nothing, not everything.
- if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
- continue
- }
- pdbList = append(pdbList, pdb)
- }
-
- if len(pdbList) == 0 {
- return nil, fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
- }
-
- return pdbList, nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1/clusterrole.go b/vendor/k8s.io/client-go/listers/rbac/v1/clusterrole.go
deleted file mode 100644
index c806bb610..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1/clusterrole.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/rbac/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleLister helps list ClusterRoles.
-type ClusterRoleLister interface {
- // List lists all ClusterRoles in the indexer.
- List(selector labels.Selector) (ret []*v1.ClusterRole, err error)
- // Get retrieves the ClusterRole from the index for a given name.
- Get(name string) (*v1.ClusterRole, error)
- ClusterRoleListerExpansion
-}
-
-// clusterRoleLister implements the ClusterRoleLister interface.
-type clusterRoleLister struct {
- indexer cache.Indexer
-}
-
-// NewClusterRoleLister returns a new ClusterRoleLister.
-func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister {
- return &clusterRoleLister{indexer: indexer}
-}
-
-// List lists all ClusterRoles in the indexer.
-func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1.ClusterRole, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ClusterRole))
- })
- return ret, err
-}
-
-// Get retrieves the ClusterRole from the index for a given name.
-func (s *clusterRoleLister) Get(name string) (*v1.ClusterRole, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("clusterrole"), name)
- }
- return obj.(*v1.ClusterRole), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go
deleted file mode 100644
index b7d43faea..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/rbac/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleBindingLister helps list ClusterRoleBindings.
-type ClusterRoleBindingLister interface {
- // List lists all ClusterRoleBindings in the indexer.
- List(selector labels.Selector) (ret []*v1.ClusterRoleBinding, err error)
- // Get retrieves the ClusterRoleBinding from the index for a given name.
- Get(name string) (*v1.ClusterRoleBinding, error)
- ClusterRoleBindingListerExpansion
-}
-
-// clusterRoleBindingLister implements the ClusterRoleBindingLister interface.
-type clusterRoleBindingLister struct {
- indexer cache.Indexer
-}
-
-// NewClusterRoleBindingLister returns a new ClusterRoleBindingLister.
-func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister {
- return &clusterRoleBindingLister{indexer: indexer}
-}
-
-// List lists all ClusterRoleBindings in the indexer.
-func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1.ClusterRoleBinding, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.ClusterRoleBinding))
- })
- return ret, err
-}
-
-// Get retrieves the ClusterRoleBinding from the index for a given name.
-func (s *clusterRoleBindingLister) Get(name string) (*v1.ClusterRoleBinding, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("clusterrolebinding"), name)
- }
- return obj.(*v1.ClusterRoleBinding), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/rbac/v1/expansion_generated.go
deleted file mode 100644
index 998b5739a..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1/expansion_generated.go
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-// ClusterRoleListerExpansion allows custom methods to be added to
-// ClusterRoleLister.
-type ClusterRoleListerExpansion interface{}
-
-// ClusterRoleBindingListerExpansion allows custom methods to be added to
-// ClusterRoleBindingLister.
-type ClusterRoleBindingListerExpansion interface{}
-
-// RoleListerExpansion allows custom methods to be added to
-// RoleLister.
-type RoleListerExpansion interface{}
-
-// RoleNamespaceListerExpansion allows custom methods to be added to
-// RoleNamespaceLister.
-type RoleNamespaceListerExpansion interface{}
-
-// RoleBindingListerExpansion allows custom methods to be added to
-// RoleBindingLister.
-type RoleBindingListerExpansion interface{}
-
-// RoleBindingNamespaceListerExpansion allows custom methods to be added to
-// RoleBindingNamespaceLister.
-type RoleBindingNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1/role.go b/vendor/k8s.io/client-go/listers/rbac/v1/role.go
deleted file mode 100644
index 7f6e43bfb..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1/role.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/rbac/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// RoleLister helps list Roles.
-type RoleLister interface {
- // List lists all Roles in the indexer.
- List(selector labels.Selector) (ret []*v1.Role, err error)
- // Roles returns an object that can list and get Roles.
- Roles(namespace string) RoleNamespaceLister
- RoleListerExpansion
-}
-
-// roleLister implements the RoleLister interface.
-type roleLister struct {
- indexer cache.Indexer
-}
-
-// NewRoleLister returns a new RoleLister.
-func NewRoleLister(indexer cache.Indexer) RoleLister {
- return &roleLister{indexer: indexer}
-}
-
-// List lists all Roles in the indexer.
-func (s *roleLister) List(selector labels.Selector) (ret []*v1.Role, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Role))
- })
- return ret, err
-}
-
-// Roles returns an object that can list and get Roles.
-func (s *roleLister) Roles(namespace string) RoleNamespaceLister {
- return roleNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// RoleNamespaceLister helps list and get Roles.
-type RoleNamespaceLister interface {
- // List lists all Roles in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.Role, err error)
- // Get retrieves the Role from the indexer for a given namespace and name.
- Get(name string) (*v1.Role, error)
- RoleNamespaceListerExpansion
-}
-
-// roleNamespaceLister implements the RoleNamespaceLister
-// interface.
-type roleNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Roles in the indexer for a given namespace.
-func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1.Role, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Role))
- })
- return ret, err
-}
-
-// Get retrieves the Role from the indexer for a given namespace and name.
-func (s roleNamespaceLister) Get(name string) (*v1.Role, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("role"), name)
- }
- return obj.(*v1.Role), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1/rolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1/rolebinding.go
deleted file mode 100644
index f32f6e4cc..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1/rolebinding.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/rbac/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// RoleBindingLister helps list RoleBindings.
-type RoleBindingLister interface {
- // List lists all RoleBindings in the indexer.
- List(selector labels.Selector) (ret []*v1.RoleBinding, err error)
- // RoleBindings returns an object that can list and get RoleBindings.
- RoleBindings(namespace string) RoleBindingNamespaceLister
- RoleBindingListerExpansion
-}
-
-// roleBindingLister implements the RoleBindingLister interface.
-type roleBindingLister struct {
- indexer cache.Indexer
-}
-
-// NewRoleBindingLister returns a new RoleBindingLister.
-func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister {
- return &roleBindingLister{indexer: indexer}
-}
-
-// List lists all RoleBindings in the indexer.
-func (s *roleBindingLister) List(selector labels.Selector) (ret []*v1.RoleBinding, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.RoleBinding))
- })
- return ret, err
-}
-
-// RoleBindings returns an object that can list and get RoleBindings.
-func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceLister {
- return roleBindingNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// RoleBindingNamespaceLister helps list and get RoleBindings.
-type RoleBindingNamespaceLister interface {
- // List lists all RoleBindings in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1.RoleBinding, err error)
- // Get retrieves the RoleBinding from the indexer for a given namespace and name.
- Get(name string) (*v1.RoleBinding, error)
- RoleBindingNamespaceListerExpansion
-}
-
-// roleBindingNamespaceLister implements the RoleBindingNamespaceLister
-// interface.
-type roleBindingNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all RoleBindings in the indexer for a given namespace.
-func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1.RoleBinding, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.RoleBinding))
- })
- return ret, err
-}
-
-// Get retrieves the RoleBinding from the indexer for a given namespace and name.
-func (s roleBindingNamespaceLister) Get(name string) (*v1.RoleBinding, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("rolebinding"), name)
- }
- return obj.(*v1.RoleBinding), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go
deleted file mode 100644
index cf6ec2587..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/rbac/v1alpha1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleLister helps list ClusterRoles.
-type ClusterRoleLister interface {
- // List lists all ClusterRoles in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.ClusterRole, err error)
- // Get retrieves the ClusterRole from the index for a given name.
- Get(name string) (*v1alpha1.ClusterRole, error)
- ClusterRoleListerExpansion
-}
-
-// clusterRoleLister implements the ClusterRoleLister interface.
-type clusterRoleLister struct {
- indexer cache.Indexer
-}
-
-// NewClusterRoleLister returns a new ClusterRoleLister.
-func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister {
- return &clusterRoleLister{indexer: indexer}
-}
-
-// List lists all ClusterRoles in the indexer.
-func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1alpha1.ClusterRole, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.ClusterRole))
- })
- return ret, err
-}
-
-// Get retrieves the ClusterRole from the index for a given name.
-func (s *clusterRoleLister) Get(name string) (*v1alpha1.ClusterRole, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("clusterrole"), name)
- }
- return obj.(*v1alpha1.ClusterRole), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go
deleted file mode 100644
index 9ddd6bf34..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/rbac/v1alpha1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleBindingLister helps list ClusterRoleBindings.
-type ClusterRoleBindingLister interface {
- // List lists all ClusterRoleBindings in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.ClusterRoleBinding, err error)
- // Get retrieves the ClusterRoleBinding from the index for a given name.
- Get(name string) (*v1alpha1.ClusterRoleBinding, error)
- ClusterRoleBindingListerExpansion
-}
-
-// clusterRoleBindingLister implements the ClusterRoleBindingLister interface.
-type clusterRoleBindingLister struct {
- indexer cache.Indexer
-}
-
-// NewClusterRoleBindingLister returns a new ClusterRoleBindingLister.
-func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister {
- return &clusterRoleBindingLister{indexer: indexer}
-}
-
-// List lists all ClusterRoleBindings in the indexer.
-func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1alpha1.ClusterRoleBinding, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.ClusterRoleBinding))
- })
- return ret, err
-}
-
-// Get retrieves the ClusterRoleBinding from the index for a given name.
-func (s *clusterRoleBindingLister) Get(name string) (*v1alpha1.ClusterRoleBinding, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("clusterrolebinding"), name)
- }
- return obj.(*v1alpha1.ClusterRoleBinding), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go
deleted file mode 100644
index 0ab9deba2..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-// ClusterRoleListerExpansion allows custom methods to be added to
-// ClusterRoleLister.
-type ClusterRoleListerExpansion interface{}
-
-// ClusterRoleBindingListerExpansion allows custom methods to be added to
-// ClusterRoleBindingLister.
-type ClusterRoleBindingListerExpansion interface{}
-
-// RoleListerExpansion allows custom methods to be added to
-// RoleLister.
-type RoleListerExpansion interface{}
-
-// RoleNamespaceListerExpansion allows custom methods to be added to
-// RoleNamespaceLister.
-type RoleNamespaceListerExpansion interface{}
-
-// RoleBindingListerExpansion allows custom methods to be added to
-// RoleBindingLister.
-type RoleBindingListerExpansion interface{}
-
-// RoleBindingNamespaceListerExpansion allows custom methods to be added to
-// RoleBindingNamespaceLister.
-type RoleBindingNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/role.go b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/role.go
deleted file mode 100644
index 5aad1e1c8..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/role.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/rbac/v1alpha1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// RoleLister helps list Roles.
-type RoleLister interface {
- // List lists all Roles in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.Role, err error)
- // Roles returns an object that can list and get Roles.
- Roles(namespace string) RoleNamespaceLister
- RoleListerExpansion
-}
-
-// roleLister implements the RoleLister interface.
-type roleLister struct {
- indexer cache.Indexer
-}
-
-// NewRoleLister returns a new RoleLister.
-func NewRoleLister(indexer cache.Indexer) RoleLister {
- return &roleLister{indexer: indexer}
-}
-
-// List lists all Roles in the indexer.
-func (s *roleLister) List(selector labels.Selector) (ret []*v1alpha1.Role, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.Role))
- })
- return ret, err
-}
-
-// Roles returns an object that can list and get Roles.
-func (s *roleLister) Roles(namespace string) RoleNamespaceLister {
- return roleNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// RoleNamespaceLister helps list and get Roles.
-type RoleNamespaceLister interface {
- // List lists all Roles in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1alpha1.Role, err error)
- // Get retrieves the Role from the indexer for a given namespace and name.
- Get(name string) (*v1alpha1.Role, error)
- RoleNamespaceListerExpansion
-}
-
-// roleNamespaceLister implements the RoleNamespaceLister
-// interface.
-type roleNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Roles in the indexer for a given namespace.
-func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Role, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.Role))
- })
- return ret, err
-}
-
-// Get retrieves the Role from the indexer for a given namespace and name.
-func (s roleNamespaceLister) Get(name string) (*v1alpha1.Role, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("role"), name)
- }
- return obj.(*v1alpha1.Role), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go
deleted file mode 100644
index f1a539e67..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/rbac/v1alpha1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// RoleBindingLister helps list RoleBindings.
-type RoleBindingLister interface {
- // List lists all RoleBindings in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error)
- // RoleBindings returns an object that can list and get RoleBindings.
- RoleBindings(namespace string) RoleBindingNamespaceLister
- RoleBindingListerExpansion
-}
-
-// roleBindingLister implements the RoleBindingLister interface.
-type roleBindingLister struct {
- indexer cache.Indexer
-}
-
-// NewRoleBindingLister returns a new RoleBindingLister.
-func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister {
- return &roleBindingLister{indexer: indexer}
-}
-
-// List lists all RoleBindings in the indexer.
-func (s *roleBindingLister) List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.RoleBinding))
- })
- return ret, err
-}
-
-// RoleBindings returns an object that can list and get RoleBindings.
-func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceLister {
- return roleBindingNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// RoleBindingNamespaceLister helps list and get RoleBindings.
-type RoleBindingNamespaceLister interface {
- // List lists all RoleBindings in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error)
- // Get retrieves the RoleBinding from the indexer for a given namespace and name.
- Get(name string) (*v1alpha1.RoleBinding, error)
- RoleBindingNamespaceListerExpansion
-}
-
-// roleBindingNamespaceLister implements the RoleBindingNamespaceLister
-// interface.
-type roleBindingNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all RoleBindings in the indexer for a given namespace.
-func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.RoleBinding))
- })
- return ret, err
-}
-
-// Get retrieves the RoleBinding from the indexer for a given namespace and name.
-func (s roleBindingNamespaceLister) Get(name string) (*v1alpha1.RoleBinding, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("rolebinding"), name)
- }
- return obj.(*v1alpha1.RoleBinding), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go
deleted file mode 100644
index 4e3bd46bb..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/rbac/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleLister helps list ClusterRoles.
-type ClusterRoleLister interface {
- // List lists all ClusterRoles in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.ClusterRole, err error)
- // Get retrieves the ClusterRole from the index for a given name.
- Get(name string) (*v1beta1.ClusterRole, error)
- ClusterRoleListerExpansion
-}
-
-// clusterRoleLister implements the ClusterRoleLister interface.
-type clusterRoleLister struct {
- indexer cache.Indexer
-}
-
-// NewClusterRoleLister returns a new ClusterRoleLister.
-func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister {
- return &clusterRoleLister{indexer: indexer}
-}
-
-// List lists all ClusterRoles in the indexer.
-func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1beta1.ClusterRole, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.ClusterRole))
- })
- return ret, err
-}
-
-// Get retrieves the ClusterRole from the index for a given name.
-func (s *clusterRoleLister) Get(name string) (*v1beta1.ClusterRole, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("clusterrole"), name)
- }
- return obj.(*v1beta1.ClusterRole), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go
deleted file mode 100644
index 911c86167..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/rbac/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ClusterRoleBindingLister helps list ClusterRoleBindings.
-type ClusterRoleBindingLister interface {
- // List lists all ClusterRoleBindings in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error)
- // Get retrieves the ClusterRoleBinding from the index for a given name.
- Get(name string) (*v1beta1.ClusterRoleBinding, error)
- ClusterRoleBindingListerExpansion
-}
-
-// clusterRoleBindingLister implements the ClusterRoleBindingLister interface.
-type clusterRoleBindingLister struct {
- indexer cache.Indexer
-}
-
-// NewClusterRoleBindingLister returns a new ClusterRoleBindingLister.
-func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister {
- return &clusterRoleBindingLister{indexer: indexer}
-}
-
-// List lists all ClusterRoleBindings in the indexer.
-func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.ClusterRoleBinding))
- })
- return ret, err
-}
-
-// Get retrieves the ClusterRoleBinding from the index for a given name.
-func (s *clusterRoleBindingLister) Get(name string) (*v1beta1.ClusterRoleBinding, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("clusterrolebinding"), name)
- }
- return obj.(*v1beta1.ClusterRoleBinding), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go
deleted file mode 100644
index 9352061dd..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-// ClusterRoleListerExpansion allows custom methods to be added to
-// ClusterRoleLister.
-type ClusterRoleListerExpansion interface{}
-
-// ClusterRoleBindingListerExpansion allows custom methods to be added to
-// ClusterRoleBindingLister.
-type ClusterRoleBindingListerExpansion interface{}
-
-// RoleListerExpansion allows custom methods to be added to
-// RoleLister.
-type RoleListerExpansion interface{}
-
-// RoleNamespaceListerExpansion allows custom methods to be added to
-// RoleNamespaceLister.
-type RoleNamespaceListerExpansion interface{}
-
-// RoleBindingListerExpansion allows custom methods to be added to
-// RoleBindingLister.
-type RoleBindingListerExpansion interface{}
-
-// RoleBindingNamespaceListerExpansion allows custom methods to be added to
-// RoleBindingNamespaceLister.
-type RoleBindingNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1beta1/role.go b/vendor/k8s.io/client-go/listers/rbac/v1beta1/role.go
deleted file mode 100644
index 694a29759..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1beta1/role.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/rbac/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// RoleLister helps list Roles.
-type RoleLister interface {
- // List lists all Roles in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.Role, err error)
- // Roles returns an object that can list and get Roles.
- Roles(namespace string) RoleNamespaceLister
- RoleListerExpansion
-}
-
-// roleLister implements the RoleLister interface.
-type roleLister struct {
- indexer cache.Indexer
-}
-
-// NewRoleLister returns a new RoleLister.
-func NewRoleLister(indexer cache.Indexer) RoleLister {
- return &roleLister{indexer: indexer}
-}
-
-// List lists all Roles in the indexer.
-func (s *roleLister) List(selector labels.Selector) (ret []*v1beta1.Role, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Role))
- })
- return ret, err
-}
-
-// Roles returns an object that can list and get Roles.
-func (s *roleLister) Roles(namespace string) RoleNamespaceLister {
- return roleNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// RoleNamespaceLister helps list and get Roles.
-type RoleNamespaceLister interface {
- // List lists all Roles in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.Role, err error)
- // Get retrieves the Role from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.Role, error)
- RoleNamespaceListerExpansion
-}
-
-// roleNamespaceLister implements the RoleNamespaceLister
-// interface.
-type roleNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Roles in the indexer for a given namespace.
-func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Role, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Role))
- })
- return ret, err
-}
-
-// Get retrieves the Role from the indexer for a given namespace and name.
-func (s roleNamespaceLister) Get(name string) (*v1beta1.Role, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("role"), name)
- }
- return obj.(*v1beta1.Role), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go
deleted file mode 100644
index 8feb8358f..000000000
--- a/vendor/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/rbac/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// RoleBindingLister helps list RoleBindings.
-type RoleBindingLister interface {
- // List lists all RoleBindings in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error)
- // RoleBindings returns an object that can list and get RoleBindings.
- RoleBindings(namespace string) RoleBindingNamespaceLister
- RoleBindingListerExpansion
-}
-
-// roleBindingLister implements the RoleBindingLister interface.
-type roleBindingLister struct {
- indexer cache.Indexer
-}
-
-// NewRoleBindingLister returns a new RoleBindingLister.
-func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister {
- return &roleBindingLister{indexer: indexer}
-}
-
-// List lists all RoleBindings in the indexer.
-func (s *roleBindingLister) List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.RoleBinding))
- })
- return ret, err
-}
-
-// RoleBindings returns an object that can list and get RoleBindings.
-func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceLister {
- return roleBindingNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// RoleBindingNamespaceLister helps list and get RoleBindings.
-type RoleBindingNamespaceLister interface {
- // List lists all RoleBindings in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error)
- // Get retrieves the RoleBinding from the indexer for a given namespace and name.
- Get(name string) (*v1beta1.RoleBinding, error)
- RoleBindingNamespaceListerExpansion
-}
-
-// roleBindingNamespaceLister implements the RoleBindingNamespaceLister
-// interface.
-type roleBindingNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all RoleBindings in the indexer for a given namespace.
-func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.RoleBinding))
- })
- return ret, err
-}
-
-// Get retrieves the RoleBinding from the indexer for a given namespace and name.
-func (s roleBindingNamespaceLister) Get(name string) (*v1beta1.RoleBinding, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("rolebinding"), name)
- }
- return obj.(*v1beta1.RoleBinding), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/scheduling/v1alpha1/expansion_generated.go b/vendor/k8s.io/client-go/listers/scheduling/v1alpha1/expansion_generated.go
deleted file mode 100644
index a92884a8c..000000000
--- a/vendor/k8s.io/client-go/listers/scheduling/v1alpha1/expansion_generated.go
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-// PriorityClassListerExpansion allows custom methods to be added to
-// PriorityClassLister.
-type PriorityClassListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go b/vendor/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go
deleted file mode 100644
index 1dbe2f242..000000000
--- a/vendor/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/scheduling/v1alpha1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// PriorityClassLister helps list PriorityClasses.
-type PriorityClassLister interface {
- // List lists all PriorityClasses in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.PriorityClass, err error)
- // Get retrieves the PriorityClass from the index for a given name.
- Get(name string) (*v1alpha1.PriorityClass, error)
- PriorityClassListerExpansion
-}
-
-// priorityClassLister implements the PriorityClassLister interface.
-type priorityClassLister struct {
- indexer cache.Indexer
-}
-
-// NewPriorityClassLister returns a new PriorityClassLister.
-func NewPriorityClassLister(indexer cache.Indexer) PriorityClassLister {
- return &priorityClassLister{indexer: indexer}
-}
-
-// List lists all PriorityClasses in the indexer.
-func (s *priorityClassLister) List(selector labels.Selector) (ret []*v1alpha1.PriorityClass, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.PriorityClass))
- })
- return ret, err
-}
-
-// Get retrieves the PriorityClass from the index for a given name.
-func (s *priorityClassLister) Get(name string) (*v1alpha1.PriorityClass, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("priorityclass"), name)
- }
- return obj.(*v1alpha1.PriorityClass), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go b/vendor/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go
deleted file mode 100644
index 39f5b2d57..000000000
--- a/vendor/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-// PodPresetListerExpansion allows custom methods to be added to
-// PodPresetLister.
-type PodPresetListerExpansion interface{}
-
-// PodPresetNamespaceListerExpansion allows custom methods to be added to
-// PodPresetNamespaceLister.
-type PodPresetNamespaceListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go b/vendor/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go
deleted file mode 100644
index fc8cbbe38..000000000
--- a/vendor/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/settings/v1alpha1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// PodPresetLister helps list PodPresets.
-type PodPresetLister interface {
- // List lists all PodPresets in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error)
- // PodPresets returns an object that can list and get PodPresets.
- PodPresets(namespace string) PodPresetNamespaceLister
- PodPresetListerExpansion
-}
-
-// podPresetLister implements the PodPresetLister interface.
-type podPresetLister struct {
- indexer cache.Indexer
-}
-
-// NewPodPresetLister returns a new PodPresetLister.
-func NewPodPresetLister(indexer cache.Indexer) PodPresetLister {
- return &podPresetLister{indexer: indexer}
-}
-
-// List lists all PodPresets in the indexer.
-func (s *podPresetLister) List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.PodPreset))
- })
- return ret, err
-}
-
-// PodPresets returns an object that can list and get PodPresets.
-func (s *podPresetLister) PodPresets(namespace string) PodPresetNamespaceLister {
- return podPresetNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// PodPresetNamespaceLister helps list and get PodPresets.
-type PodPresetNamespaceLister interface {
- // List lists all PodPresets in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error)
- // Get retrieves the PodPreset from the indexer for a given namespace and name.
- Get(name string) (*v1alpha1.PodPreset, error)
- PodPresetNamespaceListerExpansion
-}
-
-// podPresetNamespaceLister implements the PodPresetNamespaceLister
-// interface.
-type podPresetNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all PodPresets in the indexer for a given namespace.
-func (s podPresetNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.PodPreset))
- })
- return ret, err
-}
-
-// Get retrieves the PodPreset from the indexer for a given namespace and name.
-func (s podPresetNamespaceLister) Get(name string) (*v1alpha1.PodPreset, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("podpreset"), name)
- }
- return obj.(*v1alpha1.PodPreset), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go
deleted file mode 100644
index a4141351d..000000000
--- a/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-// StorageClassListerExpansion allows custom methods to be added to
-// StorageClassLister.
-type StorageClassListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/storage/v1/storageclass.go b/vendor/k8s.io/client-go/listers/storage/v1/storageclass.go
deleted file mode 100644
index 023a55d52..000000000
--- a/vendor/k8s.io/client-go/listers/storage/v1/storageclass.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1
-
-import (
- v1 "k8s.io/api/storage/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// StorageClassLister helps list StorageClasses.
-type StorageClassLister interface {
- // List lists all StorageClasses in the indexer.
- List(selector labels.Selector) (ret []*v1.StorageClass, err error)
- // Get retrieves the StorageClass from the index for a given name.
- Get(name string) (*v1.StorageClass, error)
- StorageClassListerExpansion
-}
-
-// storageClassLister implements the StorageClassLister interface.
-type storageClassLister struct {
- indexer cache.Indexer
-}
-
-// NewStorageClassLister returns a new StorageClassLister.
-func NewStorageClassLister(indexer cache.Indexer) StorageClassLister {
- return &storageClassLister{indexer: indexer}
-}
-
-// List lists all StorageClasses in the indexer.
-func (s *storageClassLister) List(selector labels.Selector) (ret []*v1.StorageClass, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.StorageClass))
- })
- return ret, err
-}
-
-// Get retrieves the StorageClass from the index for a given name.
-func (s *storageClassLister) Get(name string) (*v1.StorageClass, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("storageclass"), name)
- }
- return obj.(*v1.StorageClass), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go b/vendor/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go
deleted file mode 100644
index ca8816b4d..000000000
--- a/vendor/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-// VolumeAttachmentListerExpansion allows custom methods to be added to
-// VolumeAttachmentLister.
-type VolumeAttachmentListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go b/vendor/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go
deleted file mode 100644
index 2300bd24a..000000000
--- a/vendor/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1alpha1
-
-import (
- v1alpha1 "k8s.io/api/storage/v1alpha1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// VolumeAttachmentLister helps list VolumeAttachments.
-type VolumeAttachmentLister interface {
- // List lists all VolumeAttachments in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.VolumeAttachment, err error)
- // Get retrieves the VolumeAttachment from the index for a given name.
- Get(name string) (*v1alpha1.VolumeAttachment, error)
- VolumeAttachmentListerExpansion
-}
-
-// volumeAttachmentLister implements the VolumeAttachmentLister interface.
-type volumeAttachmentLister struct {
- indexer cache.Indexer
-}
-
-// NewVolumeAttachmentLister returns a new VolumeAttachmentLister.
-func NewVolumeAttachmentLister(indexer cache.Indexer) VolumeAttachmentLister {
- return &volumeAttachmentLister{indexer: indexer}
-}
-
-// List lists all VolumeAttachments in the indexer.
-func (s *volumeAttachmentLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeAttachment, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.VolumeAttachment))
- })
- return ret, err
-}
-
-// Get retrieves the VolumeAttachment from the index for a given name.
-func (s *volumeAttachmentLister) Get(name string) (*v1alpha1.VolumeAttachment, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("volumeattachment"), name)
- }
- return obj.(*v1alpha1.VolumeAttachment), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go
deleted file mode 100644
index 6866b0e5a..000000000
--- a/vendor/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-// StorageClassListerExpansion allows custom methods to be added to
-// StorageClassLister.
-type StorageClassListerExpansion interface{}
-
-// VolumeAttachmentListerExpansion allows custom methods to be added to
-// VolumeAttachmentLister.
-type VolumeAttachmentListerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go b/vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go
deleted file mode 100644
index f52ac413c..000000000
--- a/vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/storage/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// StorageClassLister helps list StorageClasses.
-type StorageClassLister interface {
- // List lists all StorageClasses in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.StorageClass, err error)
- // Get retrieves the StorageClass from the index for a given name.
- Get(name string) (*v1beta1.StorageClass, error)
- StorageClassListerExpansion
-}
-
-// storageClassLister implements the StorageClassLister interface.
-type storageClassLister struct {
- indexer cache.Indexer
-}
-
-// NewStorageClassLister returns a new StorageClassLister.
-func NewStorageClassLister(indexer cache.Indexer) StorageClassLister {
- return &storageClassLister{indexer: indexer}
-}
-
-// List lists all StorageClasses in the indexer.
-func (s *storageClassLister) List(selector labels.Selector) (ret []*v1beta1.StorageClass, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.StorageClass))
- })
- return ret, err
-}
-
-// Get retrieves the StorageClass from the index for a given name.
-func (s *storageClassLister) Get(name string) (*v1beta1.StorageClass, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("storageclass"), name)
- }
- return obj.(*v1beta1.StorageClass), nil
-}
diff --git a/vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go b/vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go
deleted file mode 100644
index ee7eff199..000000000
--- a/vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was automatically generated by lister-gen
-
-package v1beta1
-
-import (
- v1beta1 "k8s.io/api/storage/v1beta1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// VolumeAttachmentLister helps list VolumeAttachments.
-type VolumeAttachmentLister interface {
- // List lists all VolumeAttachments in the indexer.
- List(selector labels.Selector) (ret []*v1beta1.VolumeAttachment, err error)
- // Get retrieves the VolumeAttachment from the index for a given name.
- Get(name string) (*v1beta1.VolumeAttachment, error)
- VolumeAttachmentListerExpansion
-}
-
-// volumeAttachmentLister implements the VolumeAttachmentLister interface.
-type volumeAttachmentLister struct {
- indexer cache.Indexer
-}
-
-// NewVolumeAttachmentLister returns a new VolumeAttachmentLister.
-func NewVolumeAttachmentLister(indexer cache.Indexer) VolumeAttachmentLister {
- return &volumeAttachmentLister{indexer: indexer}
-}
-
-// List lists all VolumeAttachments in the indexer.
-func (s *volumeAttachmentLister) List(selector labels.Selector) (ret []*v1beta1.VolumeAttachment, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.VolumeAttachment))
- })
- return ret, err
-}
-
-// Get retrieves the VolumeAttachment from the index for a given name.
-func (s *volumeAttachmentLister) Get(name string) (*v1beta1.VolumeAttachment, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("volumeattachment"), name)
- }
- return obj.(*v1beta1.VolumeAttachment), nil
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go
deleted file mode 100644
index e7b98befa..000000000
--- a/vendor/k8s.io/client-go/tools/cache/controller.go
+++ /dev/null
@@ -1,394 +0,0 @@
-/*
-Copyright 2015 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 cache
-
-import (
- "sync"
- "time"
-
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/clock"
- utilruntime "k8s.io/apimachinery/pkg/util/runtime"
- "k8s.io/apimachinery/pkg/util/wait"
-)
-
-// Config contains all the settings for a Controller.
-type Config struct {
- // The queue for your objects; either a FIFO or
- // a DeltaFIFO. Your Process() function should accept
- // the output of this Queue's Pop() method.
- Queue
-
- // Something that can list and watch your objects.
- ListerWatcher
-
- // Something that can process your objects.
- Process ProcessFunc
-
- // The type of your objects.
- ObjectType runtime.Object
-
- // Reprocess everything at least this often.
- // Note that if it takes longer for you to clear the queue than this
- // period, you will end up processing items in the order determined
- // by FIFO.Replace(). Currently, this is random. If this is a
- // problem, we can change that replacement policy to append new
- // things to the end of the queue instead of replacing the entire
- // queue.
- FullResyncPeriod time.Duration
-
- // ShouldResync, if specified, is invoked when the controller's reflector determines the next
- // periodic sync should occur. If this returns true, it means the reflector should proceed with
- // the resync.
- ShouldResync ShouldResyncFunc
-
- // If true, when Process() returns an error, re-enqueue the object.
- // TODO: add interface to let you inject a delay/backoff or drop
- // the object completely if desired. Pass the object in
- // question to this interface as a parameter.
- RetryOnError bool
-}
-
-// ShouldResyncFunc is a type of function that indicates if a reflector should perform a
-// resync or not. It can be used by a shared informer to support multiple event handlers with custom
-// resync periods.
-type ShouldResyncFunc func() bool
-
-// ProcessFunc processes a single object.
-type ProcessFunc func(obj interface{}) error
-
-// Controller is a generic controller framework.
-type controller struct {
- config Config
- reflector *Reflector
- reflectorMutex sync.RWMutex
- clock clock.Clock
-}
-
-type Controller interface {
- Run(stopCh <-chan struct{})
- HasSynced() bool
- LastSyncResourceVersion() string
-}
-
-// New makes a new Controller from the given Config.
-func New(c *Config) Controller {
- ctlr := &controller{
- config: *c,
- clock: &clock.RealClock{},
- }
- return ctlr
-}
-
-// Run begins processing items, and will continue until a value is sent down stopCh.
-// It's an error to call Run more than once.
-// Run blocks; call via go.
-func (c *controller) Run(stopCh <-chan struct{}) {
- defer utilruntime.HandleCrash()
- go func() {
- <-stopCh
- c.config.Queue.Close()
- }()
- r := NewReflector(
- c.config.ListerWatcher,
- c.config.ObjectType,
- c.config.Queue,
- c.config.FullResyncPeriod,
- )
- r.ShouldResync = c.config.ShouldResync
- r.clock = c.clock
-
- c.reflectorMutex.Lock()
- c.reflector = r
- c.reflectorMutex.Unlock()
-
- var wg wait.Group
- defer wg.Wait()
-
- wg.StartWithChannel(stopCh, r.Run)
-
- wait.Until(c.processLoop, time.Second, stopCh)
-}
-
-// Returns true once this controller has completed an initial resource listing
-func (c *controller) HasSynced() bool {
- return c.config.Queue.HasSynced()
-}
-
-func (c *controller) LastSyncResourceVersion() string {
- if c.reflector == nil {
- return ""
- }
- return c.reflector.LastSyncResourceVersion()
-}
-
-// processLoop drains the work queue.
-// TODO: Consider doing the processing in parallel. This will require a little thought
-// to make sure that we don't end up processing the same object multiple times
-// concurrently.
-//
-// TODO: Plumb through the stopCh here (and down to the queue) so that this can
-// actually exit when the controller is stopped. Or just give up on this stuff
-// ever being stoppable. Converting this whole package to use Context would
-// also be helpful.
-func (c *controller) processLoop() {
- for {
- obj, err := c.config.Queue.Pop(PopProcessFunc(c.config.Process))
- if err != nil {
- if err == FIFOClosedError {
- return
- }
- if c.config.RetryOnError {
- // This is the safe way to re-enqueue.
- c.config.Queue.AddIfNotPresent(obj)
- }
- }
- }
-}
-
-// ResourceEventHandler can handle notifications for events that happen to a
-// resource. The events are informational only, so you can't return an
-// error.
-// * OnAdd is called when an object is added.
-// * OnUpdate is called when an object is modified. Note that oldObj is the
-// last known state of the object-- it is possible that several changes
-// were combined together, so you can't use this to see every single
-// change. OnUpdate is also called when a re-list happens, and it will
-// get called even if nothing changed. This is useful for periodically
-// evaluating or syncing something.
-// * OnDelete will get the final state of the item if it is known, otherwise
-// it will get an object of type DeletedFinalStateUnknown. This can
-// happen if the watch is closed and misses the delete event and we don't
-// notice the deletion until the subsequent re-list.
-type ResourceEventHandler interface {
- OnAdd(obj interface{})
- OnUpdate(oldObj, newObj interface{})
- OnDelete(obj interface{})
-}
-
-// ResourceEventHandlerFuncs is an adaptor to let you easily specify as many or
-// as few of the notification functions as you want while still implementing
-// ResourceEventHandler.
-type ResourceEventHandlerFuncs struct {
- AddFunc func(obj interface{})
- UpdateFunc func(oldObj, newObj interface{})
- DeleteFunc func(obj interface{})
-}
-
-// OnAdd calls AddFunc if it's not nil.
-func (r ResourceEventHandlerFuncs) OnAdd(obj interface{}) {
- if r.AddFunc != nil {
- r.AddFunc(obj)
- }
-}
-
-// OnUpdate calls UpdateFunc if it's not nil.
-func (r ResourceEventHandlerFuncs) OnUpdate(oldObj, newObj interface{}) {
- if r.UpdateFunc != nil {
- r.UpdateFunc(oldObj, newObj)
- }
-}
-
-// OnDelete calls DeleteFunc if it's not nil.
-func (r ResourceEventHandlerFuncs) OnDelete(obj interface{}) {
- if r.DeleteFunc != nil {
- r.DeleteFunc(obj)
- }
-}
-
-// FilteringResourceEventHandler applies the provided filter to all events coming
-// in, ensuring the appropriate nested handler method is invoked. An object
-// that starts passing the filter after an update is considered an add, and an
-// object that stops passing the filter after an update is considered a delete.
-type FilteringResourceEventHandler struct {
- FilterFunc func(obj interface{}) bool
- Handler ResourceEventHandler
-}
-
-// OnAdd calls the nested handler only if the filter succeeds
-func (r FilteringResourceEventHandler) OnAdd(obj interface{}) {
- if !r.FilterFunc(obj) {
- return
- }
- r.Handler.OnAdd(obj)
-}
-
-// OnUpdate ensures the proper handler is called depending on whether the filter matches
-func (r FilteringResourceEventHandler) OnUpdate(oldObj, newObj interface{}) {
- newer := r.FilterFunc(newObj)
- older := r.FilterFunc(oldObj)
- switch {
- case newer && older:
- r.Handler.OnUpdate(oldObj, newObj)
- case newer && !older:
- r.Handler.OnAdd(newObj)
- case !newer && older:
- r.Handler.OnDelete(oldObj)
- default:
- // do nothing
- }
-}
-
-// OnDelete calls the nested handler only if the filter succeeds
-func (r FilteringResourceEventHandler) OnDelete(obj interface{}) {
- if !r.FilterFunc(obj) {
- return
- }
- r.Handler.OnDelete(obj)
-}
-
-// DeletionHandlingMetaNamespaceKeyFunc checks for
-// DeletedFinalStateUnknown objects before calling
-// MetaNamespaceKeyFunc.
-func DeletionHandlingMetaNamespaceKeyFunc(obj interface{}) (string, error) {
- if d, ok := obj.(DeletedFinalStateUnknown); ok {
- return d.Key, nil
- }
- return MetaNamespaceKeyFunc(obj)
-}
-
-// NewInformer returns a Store and a controller for populating the store
-// while also providing event notifications. You should only used the returned
-// Store for Get/List operations; Add/Modify/Deletes will cause the event
-// notifications to be faulty.
-//
-// Parameters:
-// * lw is list and watch functions for the source of the resource you want to
-// be informed of.
-// * objType is an object of the type that you expect to receive.
-// * resyncPeriod: if non-zero, will re-list this often (you will get OnUpdate
-// calls, even if nothing changed). Otherwise, re-list will be delayed as
-// long as possible (until the upstream source closes the watch or times out,
-// or you stop the controller).
-// * h is the object you want notifications sent to.
-//
-func NewInformer(
- lw ListerWatcher,
- objType runtime.Object,
- resyncPeriod time.Duration,
- h ResourceEventHandler,
-) (Store, Controller) {
- // This will hold the client state, as we know it.
- clientState := NewStore(DeletionHandlingMetaNamespaceKeyFunc)
-
- // This will hold incoming changes. Note how we pass clientState in as a
- // KeyLister, that way resync operations will result in the correct set
- // of update/delete deltas.
- fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, nil, clientState)
-
- cfg := &Config{
- Queue: fifo,
- ListerWatcher: lw,
- ObjectType: objType,
- FullResyncPeriod: resyncPeriod,
- RetryOnError: false,
-
- Process: func(obj interface{}) error {
- // from oldest to newest
- for _, d := range obj.(Deltas) {
- switch d.Type {
- case Sync, Added, Updated:
- if old, exists, err := clientState.Get(d.Object); err == nil && exists {
- if err := clientState.Update(d.Object); err != nil {
- return err
- }
- h.OnUpdate(old, d.Object)
- } else {
- if err := clientState.Add(d.Object); err != nil {
- return err
- }
- h.OnAdd(d.Object)
- }
- case Deleted:
- if err := clientState.Delete(d.Object); err != nil {
- return err
- }
- h.OnDelete(d.Object)
- }
- }
- return nil
- },
- }
- return clientState, New(cfg)
-}
-
-// NewIndexerInformer returns a Indexer and a controller for populating the index
-// while also providing event notifications. You should only used the returned
-// Index for Get/List operations; Add/Modify/Deletes will cause the event
-// notifications to be faulty.
-//
-// Parameters:
-// * lw is list and watch functions for the source of the resource you want to
-// be informed of.
-// * objType is an object of the type that you expect to receive.
-// * resyncPeriod: if non-zero, will re-list this often (you will get OnUpdate
-// calls, even if nothing changed). Otherwise, re-list will be delayed as
-// long as possible (until the upstream source closes the watch or times out,
-// or you stop the controller).
-// * h is the object you want notifications sent to.
-// * indexers is the indexer for the received object type.
-//
-func NewIndexerInformer(
- lw ListerWatcher,
- objType runtime.Object,
- resyncPeriod time.Duration,
- h ResourceEventHandler,
- indexers Indexers,
-) (Indexer, Controller) {
- // This will hold the client state, as we know it.
- clientState := NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers)
-
- // This will hold incoming changes. Note how we pass clientState in as a
- // KeyLister, that way resync operations will result in the correct set
- // of update/delete deltas.
- fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, nil, clientState)
-
- cfg := &Config{
- Queue: fifo,
- ListerWatcher: lw,
- ObjectType: objType,
- FullResyncPeriod: resyncPeriod,
- RetryOnError: false,
-
- Process: func(obj interface{}) error {
- // from oldest to newest
- for _, d := range obj.(Deltas) {
- switch d.Type {
- case Sync, Added, Updated:
- if old, exists, err := clientState.Get(d.Object); err == nil && exists {
- if err := clientState.Update(d.Object); err != nil {
- return err
- }
- h.OnUpdate(old, d.Object)
- } else {
- if err := clientState.Add(d.Object); err != nil {
- return err
- }
- h.OnAdd(d.Object)
- }
- case Deleted:
- if err := clientState.Delete(d.Object); err != nil {
- return err
- }
- h.OnDelete(d.Object)
- }
- }
- return nil
- },
- }
- return clientState, New(cfg)
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/delta_fifo.go b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go
deleted file mode 100644
index f06d1c5b1..000000000
--- a/vendor/k8s.io/client-go/tools/cache/delta_fifo.go
+++ /dev/null
@@ -1,685 +0,0 @@
-/*
-Copyright 2014 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 cache
-
-import (
- "errors"
- "fmt"
- "sync"
-
- "k8s.io/apimachinery/pkg/util/sets"
-
- "github.com/golang/glog"
-)
-
-// NewDeltaFIFO returns a Store which can be used process changes to items.
-//
-// keyFunc is used to figure out what key an object should have. (It's
-// exposed in the returned DeltaFIFO's KeyOf() method, with bonus features.)
-//
-// 'compressor' may compress as many or as few items as it wants
-// (including returning an empty slice), but it should do what it
-// does quickly since it is called while the queue is locked.
-// 'compressor' may be nil if you don't want any delta compression.
-//
-// 'keyLister' is expected to return a list of keys that the consumer of
-// this queue "knows about". It is used to decide which items are missing
-// when Replace() is called; 'Deleted' deltas are produced for these items.
-// It may be nil if you don't need to detect all deletions.
-// TODO: consider merging keyLister with this object, tracking a list of
-// "known" keys when Pop() is called. Have to think about how that
-// affects error retrying.
-// TODO(lavalamp): I believe there is a possible race only when using an
-// external known object source that the above TODO would
-// fix.
-//
-// Also see the comment on DeltaFIFO.
-func NewDeltaFIFO(keyFunc KeyFunc, compressor DeltaCompressor, knownObjects KeyListerGetter) *DeltaFIFO {
- f := &DeltaFIFO{
- items: map[string]Deltas{},
- queue: []string{},
- keyFunc: keyFunc,
- deltaCompressor: compressor,
- knownObjects: knownObjects,
- }
- f.cond.L = &f.lock
- return f
-}
-
-// DeltaFIFO is like FIFO, but allows you to process deletes.
-//
-// DeltaFIFO is a producer-consumer queue, where a Reflector is
-// intended to be the producer, and the consumer is whatever calls
-// the Pop() method.
-//
-// DeltaFIFO solves this use case:
-// * You want to process every object change (delta) at most once.
-// * When you process an object, you want to see everything
-// that's happened to it since you last processed it.
-// * You want to process the deletion of objects.
-// * You might want to periodically reprocess objects.
-//
-// DeltaFIFO's Pop(), Get(), and GetByKey() methods return
-// interface{} to satisfy the Store/Queue interfaces, but it
-// will always return an object of type Deltas.
-//
-// A note on threading: If you call Pop() in parallel from multiple
-// threads, you could end up with multiple threads processing slightly
-// different versions of the same object.
-//
-// A note on the KeyLister used by the DeltaFIFO: It's main purpose is
-// to list keys that are "known", for the purpose of figuring out which
-// items have been deleted when Replace() or Delete() are called. The deleted
-// object will be included in the DeleteFinalStateUnknown markers. These objects
-// could be stale.
-//
-// You may provide a function to compress deltas (e.g., represent a
-// series of Updates as a single Update).
-type DeltaFIFO struct {
- // lock/cond protects access to 'items' and 'queue'.
- lock sync.RWMutex
- cond sync.Cond
-
- // We depend on the property that items in the set are in
- // the queue and vice versa, and that all Deltas in this
- // map have at least one Delta.
- items map[string]Deltas
- queue []string
-
- // populated is true if the first batch of items inserted by Replace() has been populated
- // or Delete/Add/Update was called first.
- populated bool
- // initialPopulationCount is the number of items inserted by the first call of Replace()
- initialPopulationCount int
-
- // keyFunc is used to make the key used for queued item
- // insertion and retrieval, and should be deterministic.
- keyFunc KeyFunc
-
- // deltaCompressor tells us how to combine two or more
- // deltas. It may be nil.
- deltaCompressor DeltaCompressor
-
- // knownObjects list keys that are "known", for the
- // purpose of figuring out which items have been deleted
- // when Replace() or Delete() is called.
- knownObjects KeyListerGetter
-
- // Indication the queue is closed.
- // Used to indicate a queue is closed so a control loop can exit when a queue is empty.
- // Currently, not used to gate any of CRED operations.
- closed bool
- closedLock sync.Mutex
-}
-
-var (
- _ = Queue(&DeltaFIFO{}) // DeltaFIFO is a Queue
-)
-
-var (
- // ErrZeroLengthDeltasObject is returned in a KeyError if a Deltas
- // object with zero length is encountered (should be impossible,
- // even if such an object is accidentally produced by a DeltaCompressor--
- // but included for completeness).
- ErrZeroLengthDeltasObject = errors.New("0 length Deltas object; can't get key")
-)
-
-// Close the queue.
-func (f *DeltaFIFO) Close() {
- f.closedLock.Lock()
- defer f.closedLock.Unlock()
- f.closed = true
- f.cond.Broadcast()
-}
-
-// KeyOf exposes f's keyFunc, but also detects the key of a Deltas object or
-// DeletedFinalStateUnknown objects.
-func (f *DeltaFIFO) KeyOf(obj interface{}) (string, error) {
- if d, ok := obj.(Deltas); ok {
- if len(d) == 0 {
- return "", KeyError{obj, ErrZeroLengthDeltasObject}
- }
- obj = d.Newest().Object
- }
- if d, ok := obj.(DeletedFinalStateUnknown); ok {
- return d.Key, nil
- }
- return f.keyFunc(obj)
-}
-
-// Return true if an Add/Update/Delete/AddIfNotPresent are called first,
-// or an Update called first but the first batch of items inserted by Replace() has been popped
-func (f *DeltaFIFO) HasSynced() bool {
- f.lock.Lock()
- defer f.lock.Unlock()
- return f.populated && f.initialPopulationCount == 0
-}
-
-// Add inserts an item, and puts it in the queue. The item is only enqueued
-// if it doesn't already exist in the set.
-func (f *DeltaFIFO) Add(obj interface{}) error {
- f.lock.Lock()
- defer f.lock.Unlock()
- f.populated = true
- return f.queueActionLocked(Added, obj)
-}
-
-// Update is just like Add, but makes an Updated Delta.
-func (f *DeltaFIFO) Update(obj interface{}) error {
- f.lock.Lock()
- defer f.lock.Unlock()
- f.populated = true
- return f.queueActionLocked(Updated, obj)
-}
-
-// Delete is just like Add, but makes an Deleted Delta. If the item does not
-// already exist, it will be ignored. (It may have already been deleted by a
-// Replace (re-list), for example.
-func (f *DeltaFIFO) Delete(obj interface{}) error {
- id, err := f.KeyOf(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- f.lock.Lock()
- defer f.lock.Unlock()
- f.populated = true
- if f.knownObjects == nil {
- if _, exists := f.items[id]; !exists {
- // Presumably, this was deleted when a relist happened.
- // Don't provide a second report of the same deletion.
- return nil
- }
- } else {
- // We only want to skip the "deletion" action if the object doesn't
- // exist in knownObjects and it doesn't have corresponding item in items.
- // Note that even if there is a "deletion" action in items, we can ignore it,
- // because it will be deduped automatically in "queueActionLocked"
- _, exists, err := f.knownObjects.GetByKey(id)
- _, itemsExist := f.items[id]
- if err == nil && !exists && !itemsExist {
- // Presumably, this was deleted when a relist happened.
- // Don't provide a second report of the same deletion.
- // TODO(lavalamp): This may be racy-- we aren't properly locked
- // with knownObjects.
- return nil
- }
- }
-
- return f.queueActionLocked(Deleted, obj)
-}
-
-// AddIfNotPresent inserts an item, and puts it in the queue. If the item is already
-// present in the set, it is neither enqueued nor added to the set.
-//
-// This is useful in a single producer/consumer scenario so that the consumer can
-// safely retry items without contending with the producer and potentially enqueueing
-// stale items.
-//
-// Important: obj must be a Deltas (the output of the Pop() function). Yes, this is
-// different from the Add/Update/Delete functions.
-func (f *DeltaFIFO) AddIfNotPresent(obj interface{}) error {
- deltas, ok := obj.(Deltas)
- if !ok {
- return fmt.Errorf("object must be of type deltas, but got: %#v", obj)
- }
- id, err := f.KeyOf(deltas.Newest().Object)
- if err != nil {
- return KeyError{obj, err}
- }
- f.lock.Lock()
- defer f.lock.Unlock()
- f.addIfNotPresent(id, deltas)
- return nil
-}
-
-// addIfNotPresent inserts deltas under id if it does not exist, and assumes the caller
-// already holds the fifo lock.
-func (f *DeltaFIFO) addIfNotPresent(id string, deltas Deltas) {
- f.populated = true
- if _, exists := f.items[id]; exists {
- return
- }
-
- f.queue = append(f.queue, id)
- f.items[id] = deltas
- f.cond.Broadcast()
-}
-
-// re-listing and watching can deliver the same update multiple times in any
-// order. This will combine the most recent two deltas if they are the same.
-func dedupDeltas(deltas Deltas) Deltas {
- n := len(deltas)
- if n < 2 {
- return deltas
- }
- a := &deltas[n-1]
- b := &deltas[n-2]
- if out := isDup(a, b); out != nil {
- d := append(Deltas{}, deltas[:n-2]...)
- return append(d, *out)
- }
- return deltas
-}
-
-// If a & b represent the same event, returns the delta that ought to be kept.
-// Otherwise, returns nil.
-// TODO: is there anything other than deletions that need deduping?
-func isDup(a, b *Delta) *Delta {
- if out := isDeletionDup(a, b); out != nil {
- return out
- }
- // TODO: Detect other duplicate situations? Are there any?
- return nil
-}
-
-// keep the one with the most information if both are deletions.
-func isDeletionDup(a, b *Delta) *Delta {
- if b.Type != Deleted || a.Type != Deleted {
- return nil
- }
- // Do more sophisticated checks, or is this sufficient?
- if _, ok := b.Object.(DeletedFinalStateUnknown); ok {
- return a
- }
- return b
-}
-
-// willObjectBeDeletedLocked returns true only if the last delta for the
-// given object is Delete. Caller must lock first.
-func (f *DeltaFIFO) willObjectBeDeletedLocked(id string) bool {
- deltas := f.items[id]
- return len(deltas) > 0 && deltas[len(deltas)-1].Type == Deleted
-}
-
-// queueActionLocked appends to the delta list for the object, calling
-// f.deltaCompressor if needed. Caller must lock first.
-func (f *DeltaFIFO) queueActionLocked(actionType DeltaType, obj interface{}) error {
- id, err := f.KeyOf(obj)
- if err != nil {
- return KeyError{obj, err}
- }
-
- // If object is supposed to be deleted (last event is Deleted),
- // then we should ignore Sync events, because it would result in
- // recreation of this object.
- if actionType == Sync && f.willObjectBeDeletedLocked(id) {
- return nil
- }
-
- newDeltas := append(f.items[id], Delta{actionType, obj})
- newDeltas = dedupDeltas(newDeltas)
- if f.deltaCompressor != nil {
- newDeltas = f.deltaCompressor.Compress(newDeltas)
- }
-
- _, exists := f.items[id]
- if len(newDeltas) > 0 {
- if !exists {
- f.queue = append(f.queue, id)
- }
- f.items[id] = newDeltas
- f.cond.Broadcast()
- } else if exists {
- // The compression step removed all deltas, so
- // we need to remove this from our map (extra items
- // in the queue are ignored if they are not in the
- // map).
- delete(f.items, id)
- }
- return nil
-}
-
-// List returns a list of all the items; it returns the object
-// from the most recent Delta.
-// You should treat the items returned inside the deltas as immutable.
-func (f *DeltaFIFO) List() []interface{} {
- f.lock.RLock()
- defer f.lock.RUnlock()
- return f.listLocked()
-}
-
-func (f *DeltaFIFO) listLocked() []interface{} {
- list := make([]interface{}, 0, len(f.items))
- for _, item := range f.items {
- // Copy item's slice so operations on this slice (delta
- // compression) won't interfere with the object we return.
- item = copyDeltas(item)
- list = append(list, item.Newest().Object)
- }
- return list
-}
-
-// ListKeys returns a list of all the keys of the objects currently
-// in the FIFO.
-func (f *DeltaFIFO) ListKeys() []string {
- f.lock.RLock()
- defer f.lock.RUnlock()
- list := make([]string, 0, len(f.items))
- for key := range f.items {
- list = append(list, key)
- }
- return list
-}
-
-// Get returns the complete list of deltas for the requested item,
-// or sets exists=false.
-// You should treat the items returned inside the deltas as immutable.
-func (f *DeltaFIFO) Get(obj interface{}) (item interface{}, exists bool, err error) {
- key, err := f.KeyOf(obj)
- if err != nil {
- return nil, false, KeyError{obj, err}
- }
- return f.GetByKey(key)
-}
-
-// GetByKey returns the complete list of deltas for the requested item,
-// setting exists=false if that list is empty.
-// You should treat the items returned inside the deltas as immutable.
-func (f *DeltaFIFO) GetByKey(key string) (item interface{}, exists bool, err error) {
- f.lock.RLock()
- defer f.lock.RUnlock()
- d, exists := f.items[key]
- if exists {
- // Copy item's slice so operations on this slice (delta
- // compression) won't interfere with the object we return.
- d = copyDeltas(d)
- }
- return d, exists, nil
-}
-
-// Checks if the queue is closed
-func (f *DeltaFIFO) IsClosed() bool {
- f.closedLock.Lock()
- defer f.closedLock.Unlock()
- if f.closed {
- return true
- }
- return false
-}
-
-// Pop blocks until an item is added to the queue, and then returns it. If
-// multiple items are ready, they are returned in the order in which they were
-// added/updated. The item is removed from the queue (and the store) before it
-// is returned, so if you don't successfully process it, you need to add it back
-// with AddIfNotPresent().
-// process function is called under lock, so it is safe update data structures
-// in it that need to be in sync with the queue (e.g. knownKeys). The PopProcessFunc
-// may return an instance of ErrRequeue with a nested error to indicate the current
-// item should be requeued (equivalent to calling AddIfNotPresent under the lock).
-//
-// Pop returns a 'Deltas', which has a complete list of all the things
-// that happened to the object (deltas) while it was sitting in the queue.
-func (f *DeltaFIFO) Pop(process PopProcessFunc) (interface{}, error) {
- f.lock.Lock()
- defer f.lock.Unlock()
- for {
- for len(f.queue) == 0 {
- // When the queue is empty, invocation of Pop() is blocked until new item is enqueued.
- // When Close() is called, the f.closed is set and the condition is broadcasted.
- // Which causes this loop to continue and return from the Pop().
- if f.IsClosed() {
- return nil, FIFOClosedError
- }
-
- f.cond.Wait()
- }
- id := f.queue[0]
- f.queue = f.queue[1:]
- item, ok := f.items[id]
- if f.initialPopulationCount > 0 {
- f.initialPopulationCount--
- }
- if !ok {
- // Item may have been deleted subsequently.
- continue
- }
- delete(f.items, id)
- err := process(item)
- if e, ok := err.(ErrRequeue); ok {
- f.addIfNotPresent(id, item)
- err = e.Err
- }
- // Don't need to copyDeltas here, because we're transferring
- // ownership to the caller.
- return item, err
- }
-}
-
-// Replace will delete the contents of 'f', using instead the given map.
-// 'f' takes ownership of the map, you should not reference the map again
-// after calling this function. f's queue is reset, too; upon return, it
-// will contain the items in the map, in no particular order.
-func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error {
- f.lock.Lock()
- defer f.lock.Unlock()
- keys := make(sets.String, len(list))
-
- for _, item := range list {
- key, err := f.KeyOf(item)
- if err != nil {
- return KeyError{item, err}
- }
- keys.Insert(key)
- if err := f.queueActionLocked(Sync, item); err != nil {
- return fmt.Errorf("couldn't enqueue object: %v", err)
- }
- }
-
- if f.knownObjects == nil {
- // Do deletion detection against our own list.
- for k, oldItem := range f.items {
- if keys.Has(k) {
- continue
- }
- var deletedObj interface{}
- if n := oldItem.Newest(); n != nil {
- deletedObj = n.Object
- }
- if err := f.queueActionLocked(Deleted, DeletedFinalStateUnknown{k, deletedObj}); err != nil {
- return err
- }
- }
-
- if !f.populated {
- f.populated = true
- f.initialPopulationCount = len(list)
- }
-
- return nil
- }
-
- // Detect deletions not already in the queue.
- // TODO(lavalamp): This may be racy-- we aren't properly locked
- // with knownObjects. Unproven.
- knownKeys := f.knownObjects.ListKeys()
- queuedDeletions := 0
- for _, k := range knownKeys {
- if keys.Has(k) {
- continue
- }
-
- deletedObj, exists, err := f.knownObjects.GetByKey(k)
- if err != nil {
- deletedObj = nil
- glog.Errorf("Unexpected error %v during lookup of key %v, placing DeleteFinalStateUnknown marker without object", err, k)
- } else if !exists {
- deletedObj = nil
- glog.Infof("Key %v does not exist in known objects store, placing DeleteFinalStateUnknown marker without object", k)
- }
- queuedDeletions++
- if err := f.queueActionLocked(Deleted, DeletedFinalStateUnknown{k, deletedObj}); err != nil {
- return err
- }
- }
-
- if !f.populated {
- f.populated = true
- f.initialPopulationCount = len(list) + queuedDeletions
- }
-
- return nil
-}
-
-// Resync will send a sync event for each item
-func (f *DeltaFIFO) Resync() error {
- f.lock.Lock()
- defer f.lock.Unlock()
-
- if f.knownObjects == nil {
- return nil
- }
-
- keys := f.knownObjects.ListKeys()
- for _, k := range keys {
- if err := f.syncKeyLocked(k); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (f *DeltaFIFO) syncKey(key string) error {
- f.lock.Lock()
- defer f.lock.Unlock()
-
- return f.syncKeyLocked(key)
-}
-
-func (f *DeltaFIFO) syncKeyLocked(key string) error {
- obj, exists, err := f.knownObjects.GetByKey(key)
- if err != nil {
- glog.Errorf("Unexpected error %v during lookup of key %v, unable to queue object for sync", err, key)
- return nil
- } else if !exists {
- glog.Infof("Key %v does not exist in known objects store, unable to queue object for sync", key)
- return nil
- }
-
- // If we are doing Resync() and there is already an event queued for that object,
- // we ignore the Resync for it. This is to avoid the race, in which the resync
- // comes with the previous value of object (since queueing an event for the object
- // doesn't trigger changing the underlying store <knownObjects>.
- id, err := f.KeyOf(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- if len(f.items[id]) > 0 {
- return nil
- }
-
- if err := f.queueActionLocked(Sync, obj); err != nil {
- return fmt.Errorf("couldn't queue object: %v", err)
- }
- return nil
-}
-
-// A KeyListerGetter is anything that knows how to list its keys and look up by key.
-type KeyListerGetter interface {
- KeyLister
- KeyGetter
-}
-
-// A KeyLister is anything that knows how to list its keys.
-type KeyLister interface {
- ListKeys() []string
-}
-
-// A KeyGetter is anything that knows how to get the value stored under a given key.
-type KeyGetter interface {
- GetByKey(key string) (interface{}, bool, error)
-}
-
-// DeltaCompressor is an algorithm that removes redundant changes.
-type DeltaCompressor interface {
- Compress(Deltas) Deltas
-}
-
-// DeltaCompressorFunc should remove redundant changes; but changes that
-// are redundant depend on one's desired semantics, so this is an
-// injectable function.
-//
-// DeltaCompressorFunc adapts a raw function to be a DeltaCompressor.
-type DeltaCompressorFunc func(Deltas) Deltas
-
-// Compress just calls dc.
-func (dc DeltaCompressorFunc) Compress(d Deltas) Deltas {
- return dc(d)
-}
-
-// DeltaType is the type of a change (addition, deletion, etc)
-type DeltaType string
-
-const (
- Added DeltaType = "Added"
- Updated DeltaType = "Updated"
- Deleted DeltaType = "Deleted"
- // The other types are obvious. You'll get Sync deltas when:
- // * A watch expires/errors out and a new list/watch cycle is started.
- // * You've turned on periodic syncs.
- // (Anything that trigger's DeltaFIFO's Replace() method.)
- Sync DeltaType = "Sync"
-)
-
-// Delta is the type stored by a DeltaFIFO. It tells you what change
-// happened, and the object's state after* that change.
-//
-// [*] Unless the change is a deletion, and then you'll get the final
-// state of the object before it was deleted.
-type Delta struct {
- Type DeltaType
- Object interface{}
-}
-
-// Deltas is a list of one or more 'Delta's to an individual object.
-// The oldest delta is at index 0, the newest delta is the last one.
-type Deltas []Delta
-
-// Oldest is a convenience function that returns the oldest delta, or
-// nil if there are no deltas.
-func (d Deltas) Oldest() *Delta {
- if len(d) > 0 {
- return &d[0]
- }
- return nil
-}
-
-// Newest is a convenience function that returns the newest delta, or
-// nil if there are no deltas.
-func (d Deltas) Newest() *Delta {
- if n := len(d); n > 0 {
- return &d[n-1]
- }
- return nil
-}
-
-// copyDeltas returns a shallow copy of d; that is, it copies the slice but not
-// the objects in the slice. This allows Get/List to return an object that we
-// know won't be clobbered by a subsequent call to a delta compressor.
-func copyDeltas(d Deltas) Deltas {
- d2 := make(Deltas, len(d))
- copy(d2, d)
- return d2
-}
-
-// DeletedFinalStateUnknown is placed into a DeltaFIFO in the case where
-// an object was deleted but the watch deletion event was missed. In this
-// case we don't know the final "resting" state of the object, so there's
-// a chance the included `Obj` is stale.
-type DeletedFinalStateUnknown struct {
- Key string
- Obj interface{}
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/doc.go b/vendor/k8s.io/client-go/tools/cache/doc.go
deleted file mode 100644
index 56b61d300..000000000
--- a/vendor/k8s.io/client-go/tools/cache/doc.go
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-Copyright 2014 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 cache is a client-side caching mechanism. It is useful for
-// reducing the number of server calls you'd otherwise need to make.
-// Reflector watches a server and updates a Store. Two stores are provided;
-// one that simply caches objects (for example, to allow a scheduler to
-// list currently available nodes), and one that additionally acts as
-// a FIFO queue (for example, to allow a scheduler to process incoming
-// pods).
-package cache // import "k8s.io/client-go/tools/cache"
diff --git a/vendor/k8s.io/client-go/tools/cache/expiration_cache.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go
deleted file mode 100644
index fa88fc407..000000000
--- a/vendor/k8s.io/client-go/tools/cache/expiration_cache.go
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
-Copyright 2014 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 cache
-
-import (
- "sync"
- "time"
-
- "github.com/golang/glog"
- "k8s.io/apimachinery/pkg/util/clock"
-)
-
-// ExpirationCache implements the store interface
-// 1. All entries are automatically time stamped on insert
-// a. The key is computed based off the original item/keyFunc
-// b. The value inserted under that key is the timestamped item
-// 2. Expiration happens lazily on read based on the expiration policy
-// a. No item can be inserted into the store while we're expiring
-// *any* item in the cache.
-// 3. Time-stamps are stripped off unexpired entries before return
-// Note that the ExpirationCache is inherently slower than a normal
-// threadSafeStore because it takes a write lock every time it checks if
-// an item has expired.
-type ExpirationCache struct {
- cacheStorage ThreadSafeStore
- keyFunc KeyFunc
- clock clock.Clock
- expirationPolicy ExpirationPolicy
- // expirationLock is a write lock used to guarantee that we don't clobber
- // newly inserted objects because of a stale expiration timestamp comparison
- expirationLock sync.Mutex
-}
-
-// ExpirationPolicy dictates when an object expires. Currently only abstracted out
-// so unittests don't rely on the system clock.
-type ExpirationPolicy interface {
- IsExpired(obj *timestampedEntry) bool
-}
-
-// TTLPolicy implements a ttl based ExpirationPolicy.
-type TTLPolicy struct {
- // >0: Expire entries with an age > ttl
- // <=0: Don't expire any entry
- Ttl time.Duration
-
- // Clock used to calculate ttl expiration
- Clock clock.Clock
-}
-
-// IsExpired returns true if the given object is older than the ttl, or it can't
-// determine its age.
-func (p *TTLPolicy) IsExpired(obj *timestampedEntry) bool {
- return p.Ttl > 0 && p.Clock.Since(obj.timestamp) > p.Ttl
-}
-
-// timestampedEntry is the only type allowed in a ExpirationCache.
-type timestampedEntry struct {
- obj interface{}
- timestamp time.Time
-}
-
-// getTimestampedEntry returns the timestampedEntry stored under the given key.
-func (c *ExpirationCache) getTimestampedEntry(key string) (*timestampedEntry, bool) {
- item, _ := c.cacheStorage.Get(key)
- if tsEntry, ok := item.(*timestampedEntry); ok {
- return tsEntry, true
- }
- return nil, false
-}
-
-// getOrExpire retrieves the object from the timestampedEntry if and only if it hasn't
-// already expired. It holds a write lock across deletion.
-func (c *ExpirationCache) getOrExpire(key string) (interface{}, bool) {
- // Prevent all inserts from the time we deem an item as "expired" to when we
- // delete it, so an un-expired item doesn't sneak in under the same key, just
- // before the Delete.
- c.expirationLock.Lock()
- defer c.expirationLock.Unlock()
- timestampedItem, exists := c.getTimestampedEntry(key)
- if !exists {
- return nil, false
- }
- if c.expirationPolicy.IsExpired(timestampedItem) {
- glog.V(4).Infof("Entry %v: %+v has expired", key, timestampedItem.obj)
- c.cacheStorage.Delete(key)
- return nil, false
- }
- return timestampedItem.obj, true
-}
-
-// GetByKey returns the item stored under the key, or sets exists=false.
-func (c *ExpirationCache) GetByKey(key string) (interface{}, bool, error) {
- obj, exists := c.getOrExpire(key)
- return obj, exists, nil
-}
-
-// Get returns unexpired items. It purges the cache of expired items in the
-// process.
-func (c *ExpirationCache) Get(obj interface{}) (interface{}, bool, error) {
- key, err := c.keyFunc(obj)
- if err != nil {
- return nil, false, KeyError{obj, err}
- }
- obj, exists := c.getOrExpire(key)
- return obj, exists, nil
-}
-
-// List retrieves a list of unexpired items. It purges the cache of expired
-// items in the process.
-func (c *ExpirationCache) List() []interface{} {
- items := c.cacheStorage.List()
-
- list := make([]interface{}, 0, len(items))
- for _, item := range items {
- obj := item.(*timestampedEntry).obj
- if key, err := c.keyFunc(obj); err != nil {
- list = append(list, obj)
- } else if obj, exists := c.getOrExpire(key); exists {
- list = append(list, obj)
- }
- }
- return list
-}
-
-// ListKeys returns a list of all keys in the expiration cache.
-func (c *ExpirationCache) ListKeys() []string {
- return c.cacheStorage.ListKeys()
-}
-
-// Add timestamps an item and inserts it into the cache, overwriting entries
-// that might exist under the same key.
-func (c *ExpirationCache) Add(obj interface{}) error {
- c.expirationLock.Lock()
- defer c.expirationLock.Unlock()
-
- key, err := c.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- c.cacheStorage.Add(key, &timestampedEntry{obj, c.clock.Now()})
- return nil
-}
-
-// Update has not been implemented yet for lack of a use case, so this method
-// simply calls `Add`. This effectively refreshes the timestamp.
-func (c *ExpirationCache) Update(obj interface{}) error {
- return c.Add(obj)
-}
-
-// Delete removes an item from the cache.
-func (c *ExpirationCache) Delete(obj interface{}) error {
- c.expirationLock.Lock()
- defer c.expirationLock.Unlock()
- key, err := c.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- c.cacheStorage.Delete(key)
- return nil
-}
-
-// Replace will convert all items in the given list to TimestampedEntries
-// before attempting the replace operation. The replace operation will
-// delete the contents of the ExpirationCache `c`.
-func (c *ExpirationCache) Replace(list []interface{}, resourceVersion string) error {
- c.expirationLock.Lock()
- defer c.expirationLock.Unlock()
- items := map[string]interface{}{}
- ts := c.clock.Now()
- for _, item := range list {
- key, err := c.keyFunc(item)
- if err != nil {
- return KeyError{item, err}
- }
- items[key] = &timestampedEntry{item, ts}
- }
- c.cacheStorage.Replace(items, resourceVersion)
- return nil
-}
-
-// Resync will touch all objects to put them into the processing queue
-func (c *ExpirationCache) Resync() error {
- return c.cacheStorage.Resync()
-}
-
-// NewTTLStore creates and returns a ExpirationCache with a TTLPolicy
-func NewTTLStore(keyFunc KeyFunc, ttl time.Duration) Store {
- return &ExpirationCache{
- cacheStorage: NewThreadSafeStore(Indexers{}, Indices{}),
- keyFunc: keyFunc,
- clock: clock.RealClock{},
- expirationPolicy: &TTLPolicy{ttl, clock.RealClock{}},
- }
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go
deleted file mode 100644
index a096765f6..000000000
--- a/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-Copyright 2014 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 cache
-
-import (
- "k8s.io/apimachinery/pkg/util/clock"
- "k8s.io/apimachinery/pkg/util/sets"
-)
-
-type fakeThreadSafeMap struct {
- ThreadSafeStore
- deletedKeys chan<- string
-}
-
-func (c *fakeThreadSafeMap) Delete(key string) {
- if c.deletedKeys != nil {
- c.ThreadSafeStore.Delete(key)
- c.deletedKeys <- key
- }
-}
-
-type FakeExpirationPolicy struct {
- NeverExpire sets.String
- RetrieveKeyFunc KeyFunc
-}
-
-func (p *FakeExpirationPolicy) IsExpired(obj *timestampedEntry) bool {
- key, _ := p.RetrieveKeyFunc(obj)
- return !p.NeverExpire.Has(key)
-}
-
-func NewFakeExpirationStore(keyFunc KeyFunc, deletedKeys chan<- string, expirationPolicy ExpirationPolicy, cacheClock clock.Clock) Store {
- cacheStorage := NewThreadSafeStore(Indexers{}, Indices{})
- return &ExpirationCache{
- cacheStorage: &fakeThreadSafeMap{cacheStorage, deletedKeys},
- keyFunc: keyFunc,
- clock: cacheClock,
- expirationPolicy: expirationPolicy,
- }
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/fake_custom_store.go b/vendor/k8s.io/client-go/tools/cache/fake_custom_store.go
deleted file mode 100644
index 8d71c2474..000000000
--- a/vendor/k8s.io/client-go/tools/cache/fake_custom_store.go
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
-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 cache
-
-// FakeStore lets you define custom functions for store operations
-type FakeCustomStore struct {
- AddFunc func(obj interface{}) error
- UpdateFunc func(obj interface{}) error
- DeleteFunc func(obj interface{}) error
- ListFunc func() []interface{}
- ListKeysFunc func() []string
- GetFunc func(obj interface{}) (item interface{}, exists bool, err error)
- GetByKeyFunc func(key string) (item interface{}, exists bool, err error)
- ReplaceFunc func(list []interface{}, resourceVerion string) error
- ResyncFunc func() error
-}
-
-// Add calls the custom Add function if defined
-func (f *FakeCustomStore) Add(obj interface{}) error {
- if f.AddFunc != nil {
- return f.AddFunc(obj)
- }
- return nil
-}
-
-// Update calls the custom Update function if defined
-func (f *FakeCustomStore) Update(obj interface{}) error {
- if f.UpdateFunc != nil {
- return f.Update(obj)
- }
- return nil
-}
-
-// Delete calls the custom Delete function if defined
-func (f *FakeCustomStore) Delete(obj interface{}) error {
- if f.DeleteFunc != nil {
- return f.DeleteFunc(obj)
- }
- return nil
-}
-
-// List calls the custom List function if defined
-func (f *FakeCustomStore) List() []interface{} {
- if f.ListFunc != nil {
- return f.ListFunc()
- }
- return nil
-}
-
-// ListKeys calls the custom ListKeys function if defined
-func (f *FakeCustomStore) ListKeys() []string {
- if f.ListKeysFunc != nil {
- return f.ListKeysFunc()
- }
- return nil
-}
-
-// Get calls the custom Get function if defined
-func (f *FakeCustomStore) Get(obj interface{}) (item interface{}, exists bool, err error) {
- if f.GetFunc != nil {
- return f.GetFunc(obj)
- }
- return nil, false, nil
-}
-
-// GetByKey calls the custom GetByKey function if defined
-func (f *FakeCustomStore) GetByKey(key string) (item interface{}, exists bool, err error) {
- if f.GetByKeyFunc != nil {
- return f.GetByKeyFunc(key)
- }
- return nil, false, nil
-}
-
-// Replace calls the custom Replace function if defined
-func (f *FakeCustomStore) Replace(list []interface{}, resourceVersion string) error {
- if f.ReplaceFunc != nil {
- return f.ReplaceFunc(list, resourceVersion)
- }
- return nil
-}
-
-// Resync calls the custom Resync function if defined
-func (f *FakeCustomStore) Resync() error {
- if f.ResyncFunc != nil {
- return f.ResyncFunc()
- }
- return nil
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/fifo.go b/vendor/k8s.io/client-go/tools/cache/fifo.go
deleted file mode 100644
index e05c01ee2..000000000
--- a/vendor/k8s.io/client-go/tools/cache/fifo.go
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
-Copyright 2014 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 cache
-
-import (
- "errors"
- "sync"
-
- "k8s.io/apimachinery/pkg/util/sets"
-)
-
-// PopProcessFunc is passed to Pop() method of Queue interface.
-// It is supposed to process the element popped from the queue.
-type PopProcessFunc func(interface{}) error
-
-// ErrRequeue may be returned by a PopProcessFunc to safely requeue
-// the current item. The value of Err will be returned from Pop.
-type ErrRequeue struct {
- // Err is returned by the Pop function
- Err error
-}
-
-var FIFOClosedError error = errors.New("DeltaFIFO: manipulating with closed queue")
-
-func (e ErrRequeue) Error() string {
- if e.Err == nil {
- return "the popped item should be requeued without returning an error"
- }
- return e.Err.Error()
-}
-
-// Queue is exactly like a Store, but has a Pop() method too.
-type Queue interface {
- Store
-
- // Pop blocks until it has something to process.
- // It returns the object that was process and the result of processing.
- // The PopProcessFunc may return an ErrRequeue{...} to indicate the item
- // should be requeued before releasing the lock on the queue.
- Pop(PopProcessFunc) (interface{}, error)
-
- // AddIfNotPresent adds a value previously
- // returned by Pop back into the queue as long
- // as nothing else (presumably more recent)
- // has since been added.
- AddIfNotPresent(interface{}) error
-
- // HasSynced returns true if the first batch of items has been popped
- HasSynced() bool
-
- // Close queue
- Close()
-}
-
-// Helper function for popping from Queue.
-// WARNING: Do NOT use this function in non-test code to avoid races
-// unless you really really really really know what you are doing.
-func Pop(queue Queue) interface{} {
- var result interface{}
- queue.Pop(func(obj interface{}) error {
- result = obj
- return nil
- })
- return result
-}
-
-// FIFO receives adds and updates from a Reflector, and puts them in a queue for
-// FIFO order processing. If multiple adds/updates of a single item happen while
-// an item is in the queue before it has been processed, it will only be
-// processed once, and when it is processed, the most recent version will be
-// processed. This can't be done with a channel.
-//
-// FIFO solves this use case:
-// * You want to process every object (exactly) once.
-// * You want to process the most recent version of the object when you process it.
-// * You do not want to process deleted objects, they should be removed from the queue.
-// * You do not want to periodically reprocess objects.
-// Compare with DeltaFIFO for other use cases.
-type FIFO struct {
- lock sync.RWMutex
- cond sync.Cond
- // We depend on the property that items in the set are in the queue and vice versa.
- items map[string]interface{}
- queue []string
-
- // populated is true if the first batch of items inserted by Replace() has been populated
- // or Delete/Add/Update was called first.
- populated bool
- // initialPopulationCount is the number of items inserted by the first call of Replace()
- initialPopulationCount int
-
- // keyFunc is used to make the key used for queued item insertion and retrieval, and
- // should be deterministic.
- keyFunc KeyFunc
-
- // Indication the queue is closed.
- // Used to indicate a queue is closed so a control loop can exit when a queue is empty.
- // Currently, not used to gate any of CRED operations.
- closed bool
- closedLock sync.Mutex
-}
-
-var (
- _ = Queue(&FIFO{}) // FIFO is a Queue
-)
-
-// Close the queue.
-func (f *FIFO) Close() {
- f.closedLock.Lock()
- defer f.closedLock.Unlock()
- f.closed = true
- f.cond.Broadcast()
-}
-
-// Return true if an Add/Update/Delete/AddIfNotPresent are called first,
-// or an Update called first but the first batch of items inserted by Replace() has been popped
-func (f *FIFO) HasSynced() bool {
- f.lock.Lock()
- defer f.lock.Unlock()
- return f.populated && f.initialPopulationCount == 0
-}
-
-// Add inserts an item, and puts it in the queue. The item is only enqueued
-// if it doesn't already exist in the set.
-func (f *FIFO) Add(obj interface{}) error {
- id, err := f.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- f.lock.Lock()
- defer f.lock.Unlock()
- f.populated = true
- if _, exists := f.items[id]; !exists {
- f.queue = append(f.queue, id)
- }
- f.items[id] = obj
- f.cond.Broadcast()
- return nil
-}
-
-// AddIfNotPresent inserts an item, and puts it in the queue. If the item is already
-// present in the set, it is neither enqueued nor added to the set.
-//
-// This is useful in a single producer/consumer scenario so that the consumer can
-// safely retry items without contending with the producer and potentially enqueueing
-// stale items.
-func (f *FIFO) AddIfNotPresent(obj interface{}) error {
- id, err := f.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- f.lock.Lock()
- defer f.lock.Unlock()
- f.addIfNotPresent(id, obj)
- return nil
-}
-
-// addIfNotPresent assumes the fifo lock is already held and adds the provided
-// item to the queue under id if it does not already exist.
-func (f *FIFO) addIfNotPresent(id string, obj interface{}) {
- f.populated = true
- if _, exists := f.items[id]; exists {
- return
- }
-
- f.queue = append(f.queue, id)
- f.items[id] = obj
- f.cond.Broadcast()
-}
-
-// Update is the same as Add in this implementation.
-func (f *FIFO) Update(obj interface{}) error {
- return f.Add(obj)
-}
-
-// Delete removes an item. It doesn't add it to the queue, because
-// this implementation assumes the consumer only cares about the objects,
-// not the order in which they were created/added.
-func (f *FIFO) Delete(obj interface{}) error {
- id, err := f.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- f.lock.Lock()
- defer f.lock.Unlock()
- f.populated = true
- delete(f.items, id)
- return err
-}
-
-// List returns a list of all the items.
-func (f *FIFO) List() []interface{} {
- f.lock.RLock()
- defer f.lock.RUnlock()
- list := make([]interface{}, 0, len(f.items))
- for _, item := range f.items {
- list = append(list, item)
- }
- return list
-}
-
-// ListKeys returns a list of all the keys of the objects currently
-// in the FIFO.
-func (f *FIFO) ListKeys() []string {
- f.lock.RLock()
- defer f.lock.RUnlock()
- list := make([]string, 0, len(f.items))
- for key := range f.items {
- list = append(list, key)
- }
- return list
-}
-
-// Get returns the requested item, or sets exists=false.
-func (f *FIFO) Get(obj interface{}) (item interface{}, exists bool, err error) {
- key, err := f.keyFunc(obj)
- if err != nil {
- return nil, false, KeyError{obj, err}
- }
- return f.GetByKey(key)
-}
-
-// GetByKey returns the requested item, or sets exists=false.
-func (f *FIFO) GetByKey(key string) (item interface{}, exists bool, err error) {
- f.lock.RLock()
- defer f.lock.RUnlock()
- item, exists = f.items[key]
- return item, exists, nil
-}
-
-// Checks if the queue is closed
-func (f *FIFO) IsClosed() bool {
- f.closedLock.Lock()
- defer f.closedLock.Unlock()
- if f.closed {
- return true
- }
- return false
-}
-
-// Pop waits until an item is ready and processes it. If multiple items are
-// ready, they are returned in the order in which they were added/updated.
-// The item is removed from the queue (and the store) before it is processed,
-// so if you don't successfully process it, it should be added back with
-// AddIfNotPresent(). process function is called under lock, so it is safe
-// update data structures in it that need to be in sync with the queue.
-func (f *FIFO) Pop(process PopProcessFunc) (interface{}, error) {
- f.lock.Lock()
- defer f.lock.Unlock()
- for {
- for len(f.queue) == 0 {
- // When the queue is empty, invocation of Pop() is blocked until new item is enqueued.
- // When Close() is called, the f.closed is set and the condition is broadcasted.
- // Which causes this loop to continue and return from the Pop().
- if f.IsClosed() {
- return nil, FIFOClosedError
- }
-
- f.cond.Wait()
- }
- id := f.queue[0]
- f.queue = f.queue[1:]
- if f.initialPopulationCount > 0 {
- f.initialPopulationCount--
- }
- item, ok := f.items[id]
- if !ok {
- // Item may have been deleted subsequently.
- continue
- }
- delete(f.items, id)
- err := process(item)
- if e, ok := err.(ErrRequeue); ok {
- f.addIfNotPresent(id, item)
- err = e.Err
- }
- return item, err
- }
-}
-
-// Replace will delete the contents of 'f', using instead the given map.
-// 'f' takes ownership of the map, you should not reference the map again
-// after calling this function. f's queue is reset, too; upon return, it
-// will contain the items in the map, in no particular order.
-func (f *FIFO) Replace(list []interface{}, resourceVersion string) error {
- items := map[string]interface{}{}
- for _, item := range list {
- key, err := f.keyFunc(item)
- if err != nil {
- return KeyError{item, err}
- }
- items[key] = item
- }
-
- f.lock.Lock()
- defer f.lock.Unlock()
-
- if !f.populated {
- f.populated = true
- f.initialPopulationCount = len(items)
- }
-
- f.items = items
- f.queue = f.queue[:0]
- for id := range items {
- f.queue = append(f.queue, id)
- }
- if len(f.queue) > 0 {
- f.cond.Broadcast()
- }
- return nil
-}
-
-// Resync will touch all objects to put them into the processing queue
-func (f *FIFO) Resync() error {
- f.lock.Lock()
- defer f.lock.Unlock()
-
- inQueue := sets.NewString()
- for _, id := range f.queue {
- inQueue.Insert(id)
- }
- for id := range f.items {
- if !inQueue.Has(id) {
- f.queue = append(f.queue, id)
- }
- }
- if len(f.queue) > 0 {
- f.cond.Broadcast()
- }
- return nil
-}
-
-// NewFIFO returns a Store which can be used to queue up items to
-// process.
-func NewFIFO(keyFunc KeyFunc) *FIFO {
- f := &FIFO{
- items: map[string]interface{}{},
- queue: []string{},
- keyFunc: keyFunc,
- }
- f.cond.L = &f.lock
- return f
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/heap.go b/vendor/k8s.io/client-go/tools/cache/heap.go
deleted file mode 100644
index 78e492455..000000000
--- a/vendor/k8s.io/client-go/tools/cache/heap.go
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
-Copyright 2017 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 implements a heap data structure.
-
-package cache
-
-import (
- "container/heap"
- "fmt"
- "sync"
-)
-
-const (
- closedMsg = "heap is closed"
-)
-
-type LessFunc func(interface{}, interface{}) bool
-type heapItem struct {
- obj interface{} // The object which is stored in the heap.
- index int // The index of the object's key in the Heap.queue.
-}
-
-type itemKeyValue struct {
- key string
- obj interface{}
-}
-
-// heapData is an internal struct that implements the standard heap interface
-// and keeps the data stored in the heap.
-type heapData struct {
- // items is a map from key of the objects to the objects and their index.
- // We depend on the property that items in the map are in the queue and vice versa.
- items map[string]*heapItem
- // queue implements a heap data structure and keeps the order of elements
- // according to the heap invariant. The queue keeps the keys of objects stored
- // in "items".
- queue []string
-
- // keyFunc is used to make the key used for queued item insertion and retrieval, and
- // should be deterministic.
- keyFunc KeyFunc
- // lessFunc is used to compare two objects in the heap.
- lessFunc LessFunc
-}
-
-var (
- _ = heap.Interface(&heapData{}) // heapData is a standard heap
-)
-
-// Less compares two objects and returns true if the first one should go
-// in front of the second one in the heap.
-func (h *heapData) Less(i, j int) bool {
- if i > len(h.queue) || j > len(h.queue) {
- return false
- }
- itemi, ok := h.items[h.queue[i]]
- if !ok {
- return false
- }
- itemj, ok := h.items[h.queue[j]]
- if !ok {
- return false
- }
- return h.lessFunc(itemi.obj, itemj.obj)
-}
-
-// Len returns the number of items in the Heap.
-func (h *heapData) Len() int { return len(h.queue) }
-
-// Swap implements swapping of two elements in the heap. This is a part of standard
-// heap interface and should never be called directly.
-func (h *heapData) Swap(i, j int) {
- h.queue[i], h.queue[j] = h.queue[j], h.queue[i]
- item := h.items[h.queue[i]]
- item.index = i
- item = h.items[h.queue[j]]
- item.index = j
-}
-
-// Push is supposed to be called by heap.Push only.
-func (h *heapData) Push(kv interface{}) {
- keyValue := kv.(*itemKeyValue)
- n := len(h.queue)
- h.items[keyValue.key] = &heapItem{keyValue.obj, n}
- h.queue = append(h.queue, keyValue.key)
-}
-
-// Pop is supposed to be called by heap.Pop only.
-func (h *heapData) Pop() interface{} {
- key := h.queue[len(h.queue)-1]
- h.queue = h.queue[0 : len(h.queue)-1]
- item, ok := h.items[key]
- if !ok {
- // This is an error
- return nil
- }
- delete(h.items, key)
- return item.obj
-}
-
-// Heap is a thread-safe producer/consumer queue that implements a heap data structure.
-// It can be used to implement priority queues and similar data structures.
-type Heap struct {
- lock sync.RWMutex
- cond sync.Cond
-
- // data stores objects and has a queue that keeps their ordering according
- // to the heap invariant.
- data *heapData
-
- // closed indicates that the queue is closed.
- // It is mainly used to let Pop() exit its control loop while waiting for an item.
- closed bool
-}
-
-// Close the Heap and signals condition variables that may be waiting to pop
-// items from the heap.
-func (h *Heap) Close() {
- h.lock.Lock()
- defer h.lock.Unlock()
- h.closed = true
- h.cond.Broadcast()
-}
-
-// Add inserts an item, and puts it in the queue. The item is updated if it
-// already exists.
-func (h *Heap) Add(obj interface{}) error {
- key, err := h.data.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- h.lock.Lock()
- defer h.lock.Unlock()
- if h.closed {
- return fmt.Errorf(closedMsg)
- }
- if _, exists := h.data.items[key]; exists {
- h.data.items[key].obj = obj
- heap.Fix(h.data, h.data.items[key].index)
- } else {
- h.addIfNotPresentLocked(key, obj)
- }
- h.cond.Broadcast()
- return nil
-}
-
-// Adds all the items in the list to the queue and then signals the condition
-// variable. It is useful when the caller would like to add all of the items
-// to the queue before consumer starts processing them.
-func (h *Heap) BulkAdd(list []interface{}) error {
- h.lock.Lock()
- defer h.lock.Unlock()
- if h.closed {
- return fmt.Errorf(closedMsg)
- }
- for _, obj := range list {
- key, err := h.data.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- if _, exists := h.data.items[key]; exists {
- h.data.items[key].obj = obj
- heap.Fix(h.data, h.data.items[key].index)
- } else {
- h.addIfNotPresentLocked(key, obj)
- }
- }
- h.cond.Broadcast()
- return nil
-}
-
-// AddIfNotPresent inserts an item, and puts it in the queue. If an item with
-// the key is present in the map, no changes is made to the item.
-//
-// This is useful in a single producer/consumer scenario so that the consumer can
-// safely retry items without contending with the producer and potentially enqueueing
-// stale items.
-func (h *Heap) AddIfNotPresent(obj interface{}) error {
- id, err := h.data.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- h.lock.Lock()
- defer h.lock.Unlock()
- if h.closed {
- return fmt.Errorf(closedMsg)
- }
- h.addIfNotPresentLocked(id, obj)
- h.cond.Broadcast()
- return nil
-}
-
-// addIfNotPresentLocked assumes the lock is already held and adds the the provided
-// item to the queue if it does not already exist.
-func (h *Heap) addIfNotPresentLocked(key string, obj interface{}) {
- if _, exists := h.data.items[key]; exists {
- return
- }
- heap.Push(h.data, &itemKeyValue{key, obj})
-}
-
-// Update is the same as Add in this implementation. When the item does not
-// exist, it is added.
-func (h *Heap) Update(obj interface{}) error {
- return h.Add(obj)
-}
-
-// Delete removes an item.
-func (h *Heap) Delete(obj interface{}) error {
- key, err := h.data.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- h.lock.Lock()
- defer h.lock.Unlock()
- if item, ok := h.data.items[key]; ok {
- heap.Remove(h.data, item.index)
- return nil
- }
- return fmt.Errorf("object not found")
-}
-
-// Pop waits until an item is ready. If multiple items are
-// ready, they are returned in the order given by Heap.data.lessFunc.
-func (h *Heap) Pop() (interface{}, error) {
- h.lock.Lock()
- defer h.lock.Unlock()
- for len(h.data.queue) == 0 {
- // When the queue is empty, invocation of Pop() is blocked until new item is enqueued.
- // When Close() is called, the h.closed is set and the condition is broadcast,
- // which causes this loop to continue and return from the Pop().
- if h.closed {
- return nil, fmt.Errorf("heap is closed")
- }
- h.cond.Wait()
- }
- obj := heap.Pop(h.data)
- if obj != nil {
- return obj, nil
- } else {
- return nil, fmt.Errorf("object was removed from heap data")
- }
-}
-
-// List returns a list of all the items.
-func (h *Heap) List() []interface{} {
- h.lock.RLock()
- defer h.lock.RUnlock()
- list := make([]interface{}, 0, len(h.data.items))
- for _, item := range h.data.items {
- list = append(list, item.obj)
- }
- return list
-}
-
-// ListKeys returns a list of all the keys of the objects currently in the Heap.
-func (h *Heap) ListKeys() []string {
- h.lock.RLock()
- defer h.lock.RUnlock()
- list := make([]string, 0, len(h.data.items))
- for key := range h.data.items {
- list = append(list, key)
- }
- return list
-}
-
-// Get returns the requested item, or sets exists=false.
-func (h *Heap) Get(obj interface{}) (interface{}, bool, error) {
- key, err := h.data.keyFunc(obj)
- if err != nil {
- return nil, false, KeyError{obj, err}
- }
- return h.GetByKey(key)
-}
-
-// GetByKey returns the requested item, or sets exists=false.
-func (h *Heap) GetByKey(key string) (interface{}, bool, error) {
- h.lock.RLock()
- defer h.lock.RUnlock()
- item, exists := h.data.items[key]
- if !exists {
- return nil, false, nil
- }
- return item.obj, true, nil
-}
-
-// IsClosed returns true if the queue is closed.
-func (h *Heap) IsClosed() bool {
- h.lock.RLock()
- defer h.lock.RUnlock()
- if h.closed {
- return true
- }
- return false
-}
-
-// NewHeap returns a Heap which can be used to queue up items to process.
-func NewHeap(keyFn KeyFunc, lessFn LessFunc) *Heap {
- h := &Heap{
- data: &heapData{
- items: map[string]*heapItem{},
- queue: []string{},
- keyFunc: keyFn,
- lessFunc: lessFn,
- },
- }
- h.cond.L = &h.lock
- return h
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/index.go b/vendor/k8s.io/client-go/tools/cache/index.go
deleted file mode 100644
index 15acb168e..000000000
--- a/vendor/k8s.io/client-go/tools/cache/index.go
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-Copyright 2014 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 cache
-
-import (
- "fmt"
-
- "k8s.io/apimachinery/pkg/api/meta"
- "k8s.io/apimachinery/pkg/util/sets"
-)
-
-// Indexer is a storage interface that lets you list objects using multiple indexing functions
-type Indexer interface {
- Store
- // Retrieve list of objects that match on the named indexing function
- Index(indexName string, obj interface{}) ([]interface{}, error)
- // IndexKeys returns the set of keys that match on the named indexing function.
- IndexKeys(indexName, indexKey string) ([]string, error)
- // ListIndexFuncValues returns the list of generated values of an Index func
- ListIndexFuncValues(indexName string) []string
- // ByIndex lists object that match on the named indexing function with the exact key
- ByIndex(indexName, indexKey string) ([]interface{}, error)
- // GetIndexer return the indexers
- GetIndexers() Indexers
-
- // AddIndexers adds more indexers to this store. If you call this after you already have data
- // in the store, the results are undefined.
- AddIndexers(newIndexers Indexers) error
-}
-
-// IndexFunc knows how to provide an indexed value for an object.
-type IndexFunc func(obj interface{}) ([]string, error)
-
-// IndexFuncToKeyFuncAdapter adapts an indexFunc to a keyFunc. This is only useful if your index function returns
-// unique values for every object. This is conversion can create errors when more than one key is found. You
-// should prefer to make proper key and index functions.
-func IndexFuncToKeyFuncAdapter(indexFunc IndexFunc) KeyFunc {
- return func(obj interface{}) (string, error) {
- indexKeys, err := indexFunc(obj)
- if err != nil {
- return "", err
- }
- if len(indexKeys) > 1 {
- return "", fmt.Errorf("too many keys: %v", indexKeys)
- }
- if len(indexKeys) == 0 {
- return "", fmt.Errorf("unexpected empty indexKeys")
- }
- return indexKeys[0], nil
- }
-}
-
-const (
- NamespaceIndex string = "namespace"
-)
-
-// MetaNamespaceIndexFunc is a default index function that indexes based on an object's namespace
-func MetaNamespaceIndexFunc(obj interface{}) ([]string, error) {
- meta, err := meta.Accessor(obj)
- if err != nil {
- return []string{""}, fmt.Errorf("object has no meta: %v", err)
- }
- return []string{meta.GetNamespace()}, nil
-}
-
-// Index maps the indexed value to a set of keys in the store that match on that value
-type Index map[string]sets.String
-
-// Indexers maps a name to a IndexFunc
-type Indexers map[string]IndexFunc
-
-// Indices maps a name to an Index
-type Indices map[string]Index
diff --git a/vendor/k8s.io/client-go/tools/cache/listers.go b/vendor/k8s.io/client-go/tools/cache/listers.go
deleted file mode 100644
index 27d51a6b3..000000000
--- a/vendor/k8s.io/client-go/tools/cache/listers.go
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
-Copyright 2014 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 cache
-
-import (
- "github.com/golang/glog"
-
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/api/meta"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// AppendFunc is used to add a matching item to whatever list the caller is using
-type AppendFunc func(interface{})
-
-func ListAll(store Store, selector labels.Selector, appendFn AppendFunc) error {
- for _, m := range store.List() {
- metadata, err := meta.Accessor(m)
- if err != nil {
- return err
- }
- if selector.Matches(labels.Set(metadata.GetLabels())) {
- appendFn(m)
- }
- }
- return nil
-}
-
-func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selector, appendFn AppendFunc) error {
- if namespace == metav1.NamespaceAll {
- for _, m := range indexer.List() {
- metadata, err := meta.Accessor(m)
- if err != nil {
- return err
- }
- if selector.Matches(labels.Set(metadata.GetLabels())) {
- appendFn(m)
- }
- }
- return nil
- }
-
- items, err := indexer.Index(NamespaceIndex, &metav1.ObjectMeta{Namespace: namespace})
- if err != nil {
- // Ignore error; do slow search without index.
- glog.Warningf("can not retrieve list of objects using index : %v", err)
- for _, m := range indexer.List() {
- metadata, err := meta.Accessor(m)
- if err != nil {
- return err
- }
- if metadata.GetNamespace() == namespace && selector.Matches(labels.Set(metadata.GetLabels())) {
- appendFn(m)
- }
-
- }
- return nil
- }
- for _, m := range items {
- metadata, err := meta.Accessor(m)
- if err != nil {
- return err
- }
- if selector.Matches(labels.Set(metadata.GetLabels())) {
- appendFn(m)
- }
- }
-
- return nil
-}
-
-// GenericLister is a lister skin on a generic Indexer
-type GenericLister interface {
- // List will return all objects across namespaces
- List(selector labels.Selector) (ret []runtime.Object, err error)
- // Get will attempt to retrieve assuming that name==key
- Get(name string) (runtime.Object, error)
- // ByNamespace will give you a GenericNamespaceLister for one namespace
- ByNamespace(namespace string) GenericNamespaceLister
-}
-
-// GenericNamespaceLister is a lister skin on a generic Indexer
-type GenericNamespaceLister interface {
- // List will return all objects in this namespace
- List(selector labels.Selector) (ret []runtime.Object, err error)
- // Get will attempt to retrieve by namespace and name
- Get(name string) (runtime.Object, error)
-}
-
-func NewGenericLister(indexer Indexer, resource schema.GroupResource) GenericLister {
- return &genericLister{indexer: indexer, resource: resource}
-}
-
-type genericLister struct {
- indexer Indexer
- resource schema.GroupResource
-}
-
-func (s *genericLister) List(selector labels.Selector) (ret []runtime.Object, err error) {
- err = ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(runtime.Object))
- })
- return ret, err
-}
-
-func (s *genericLister) ByNamespace(namespace string) GenericNamespaceLister {
- return &genericNamespaceLister{indexer: s.indexer, namespace: namespace, resource: s.resource}
-}
-
-func (s *genericLister) Get(name string) (runtime.Object, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(s.resource, name)
- }
- return obj.(runtime.Object), nil
-}
-
-type genericNamespaceLister struct {
- indexer Indexer
- namespace string
- resource schema.GroupResource
-}
-
-func (s *genericNamespaceLister) List(selector labels.Selector) (ret []runtime.Object, err error) {
- err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(runtime.Object))
- })
- return ret, err
-}
-
-func (s *genericNamespaceLister) Get(name string) (runtime.Object, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(s.resource, name)
- }
- return obj.(runtime.Object), nil
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/listwatch.go b/vendor/k8s.io/client-go/tools/cache/listwatch.go
deleted file mode 100644
index 06657a3b0..000000000
--- a/vendor/k8s.io/client-go/tools/cache/listwatch.go
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-Copyright 2015 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 cache
-
-import (
- "time"
-
- "golang.org/x/net/context"
-
- "k8s.io/apimachinery/pkg/api/meta"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/fields"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/wait"
- "k8s.io/apimachinery/pkg/watch"
- restclient "k8s.io/client-go/rest"
- "k8s.io/client-go/tools/pager"
-)
-
-// ListerWatcher is any object that knows how to perform an initial list and start a watch on a resource.
-type ListerWatcher interface {
- // List should return a list type object; the Items field will be extracted, and the
- // ResourceVersion field will be used to start the watch in the right place.
- List(options metav1.ListOptions) (runtime.Object, error)
- // Watch should begin a watch at the specified version.
- Watch(options metav1.ListOptions) (watch.Interface, error)
-}
-
-// ListFunc knows how to list resources
-type ListFunc func(options metav1.ListOptions) (runtime.Object, error)
-
-// WatchFunc knows how to watch resources
-type WatchFunc func(options metav1.ListOptions) (watch.Interface, error)
-
-// ListWatch knows how to list and watch a set of apiserver resources. It satisfies the ListerWatcher interface.
-// It is a convenience function for users of NewReflector, etc.
-// ListFunc and WatchFunc must not be nil
-type ListWatch struct {
- ListFunc ListFunc
- WatchFunc WatchFunc
- // DisableChunking requests no chunking for this list watcher.
- DisableChunking bool
-}
-
-// Getter interface knows how to access Get method from RESTClient.
-type Getter interface {
- Get() *restclient.Request
-}
-
-// NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector.
-func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch {
- optionsModifier := func(options *metav1.ListOptions) {
- options.FieldSelector = fieldSelector.String()
- }
- return NewFilteredListWatchFromClient(c, resource, namespace, optionsModifier)
-}
-
-// NewFilteredListWatchFromClient creates a new ListWatch from the specified client, resource, namespace, and option modifier.
-// Option modifier is a function takes a ListOptions and modifies the consumed ListOptions. Provide customized modifier function
-// to apply modification to ListOptions with a field selector, a label selector, or any other desired options.
-func NewFilteredListWatchFromClient(c Getter, resource string, namespace string, optionsModifier func(options *metav1.ListOptions)) *ListWatch {
- listFunc := func(options metav1.ListOptions) (runtime.Object, error) {
- optionsModifier(&options)
- return c.Get().
- Namespace(namespace).
- Resource(resource).
- VersionedParams(&options, metav1.ParameterCodec).
- Do().
- Get()
- }
- watchFunc := func(options metav1.ListOptions) (watch.Interface, error) {
- options.Watch = true
- optionsModifier(&options)
- return c.Get().
- Namespace(namespace).
- Resource(resource).
- VersionedParams(&options, metav1.ParameterCodec).
- Watch()
- }
- return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc}
-}
-
-func timeoutFromListOptions(options metav1.ListOptions) time.Duration {
- if options.TimeoutSeconds != nil {
- return time.Duration(*options.TimeoutSeconds) * time.Second
- }
- return 0
-}
-
-// List a set of apiserver resources
-func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) {
- if !lw.DisableChunking {
- return pager.New(pager.SimplePageFunc(lw.ListFunc)).List(context.TODO(), options)
- }
- return lw.ListFunc(options)
-}
-
-// Watch a set of apiserver resources
-func (lw *ListWatch) Watch(options metav1.ListOptions) (watch.Interface, error) {
- return lw.WatchFunc(options)
-}
-
-// ListWatchUntil checks the provided conditions against the items returned by the list watcher, returning wait.ErrWaitTimeout
-// if timeout is exceeded without all conditions returning true, or an error if an error occurs.
-// TODO: check for watch expired error and retry watch from latest point? Same issue exists for Until.
-func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch.ConditionFunc) (*watch.Event, error) {
- if len(conditions) == 0 {
- return nil, nil
- }
-
- list, err := lw.List(metav1.ListOptions{})
- if err != nil {
- return nil, err
- }
- initialItems, err := meta.ExtractList(list)
- if err != nil {
- return nil, err
- }
-
- // use the initial items as simulated "adds"
- var lastEvent *watch.Event
- currIndex := 0
- passedConditions := 0
- for _, condition := range conditions {
- // check the next condition against the previous event and short circuit waiting for the next watch
- if lastEvent != nil {
- done, err := condition(*lastEvent)
- if err != nil {
- return lastEvent, err
- }
- if done {
- passedConditions = passedConditions + 1
- continue
- }
- }
-
- ConditionSucceeded:
- for currIndex < len(initialItems) {
- lastEvent = &watch.Event{Type: watch.Added, Object: initialItems[currIndex]}
- currIndex++
-
- done, err := condition(*lastEvent)
- if err != nil {
- return lastEvent, err
- }
- if done {
- passedConditions = passedConditions + 1
- break ConditionSucceeded
- }
- }
- }
- if passedConditions == len(conditions) {
- return lastEvent, nil
- }
- remainingConditions := conditions[passedConditions:]
-
- metaObj, err := meta.ListAccessor(list)
- if err != nil {
- return nil, err
- }
- currResourceVersion := metaObj.GetResourceVersion()
-
- watchInterface, err := lw.Watch(metav1.ListOptions{ResourceVersion: currResourceVersion})
- if err != nil {
- return nil, err
- }
-
- evt, err := watch.Until(timeout, watchInterface, remainingConditions...)
- if err == watch.ErrWatchClosed {
- // present a consistent error interface to callers
- err = wait.ErrWaitTimeout
- }
- return evt, err
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_cache.go b/vendor/k8s.io/client-go/tools/cache/mutation_cache.go
deleted file mode 100644
index cbb6434eb..000000000
--- a/vendor/k8s.io/client-go/tools/cache/mutation_cache.go
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
-Copyright 2017 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 cache
-
-import (
- "fmt"
- "strconv"
- "sync"
- "time"
-
- "github.com/golang/glog"
-
- "k8s.io/apimachinery/pkg/api/meta"
- "k8s.io/apimachinery/pkg/runtime"
- utilcache "k8s.io/apimachinery/pkg/util/cache"
- utilruntime "k8s.io/apimachinery/pkg/util/runtime"
- "k8s.io/apimachinery/pkg/util/sets"
-)
-
-// MutationCache is able to take the result of update operations and stores them in an LRU
-// that can be used to provide a more current view of a requested object. It requires interpreting
-// resourceVersions for comparisons.
-// Implementations must be thread-safe.
-// TODO find a way to layer this into an informer/lister
-type MutationCache interface {
- GetByKey(key string) (interface{}, bool, error)
- ByIndex(indexName, indexKey string) ([]interface{}, error)
- Mutation(interface{})
-}
-
-type ResourceVersionComparator interface {
- CompareResourceVersion(lhs, rhs runtime.Object) int
-}
-
-// NewIntegerResourceVersionMutationCache returns a MutationCache that understands how to
-// deal with objects that have a resource version that:
-//
-// - is an integer
-// - increases when updated
-// - is comparable across the same resource in a namespace
-//
-// Most backends will have these semantics. Indexer may be nil. ttl controls how long an item
-// remains in the mutation cache before it is removed.
-//
-// If includeAdds is true, objects in the mutation cache will be returned even if they don't exist
-// in the underlying store. This is only safe if your use of the cache can handle mutation entries
-// remaining in the cache for up to ttl when mutations and deletes occur very closely in time.
-func NewIntegerResourceVersionMutationCache(backingCache Store, indexer Indexer, ttl time.Duration, includeAdds bool) MutationCache {
- return &mutationCache{
- backingCache: backingCache,
- indexer: indexer,
- mutationCache: utilcache.NewLRUExpireCache(100),
- comparator: etcdObjectVersioner{},
- ttl: ttl,
- includeAdds: includeAdds,
- }
-}
-
-// mutationCache doesn't guarantee that it returns values added via Mutation since they can page out and
-// since you can't distinguish between, "didn't observe create" and "was deleted after create",
-// if the key is missing from the backing cache, we always return it as missing
-type mutationCache struct {
- lock sync.Mutex
- backingCache Store
- indexer Indexer
- mutationCache *utilcache.LRUExpireCache
- includeAdds bool
- ttl time.Duration
-
- comparator ResourceVersionComparator
-}
-
-// GetByKey is never guaranteed to return back the value set in Mutation. It could be paged out, it could
-// be older than another copy, the backingCache may be more recent or, you might have written twice into the same key.
-// You get a value that was valid at some snapshot of time and will always return the newer of backingCache and mutationCache.
-func (c *mutationCache) GetByKey(key string) (interface{}, bool, error) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- obj, exists, err := c.backingCache.GetByKey(key)
- if err != nil {
- return nil, false, err
- }
- if !exists {
- if !c.includeAdds {
- // we can't distinguish between, "didn't observe create" and "was deleted after create", so
- // if the key is missing, we always return it as missing
- return nil, false, nil
- }
- obj, exists = c.mutationCache.Get(key)
- if !exists {
- return nil, false, nil
- }
- }
- objRuntime, ok := obj.(runtime.Object)
- if !ok {
- return obj, true, nil
- }
- return c.newerObject(key, objRuntime), true, nil
-}
-
-// ByIndex returns the newer objects that match the provided index and indexer key.
-// Will return an error if no indexer was provided.
-func (c *mutationCache) ByIndex(name string, indexKey string) ([]interface{}, error) {
- c.lock.Lock()
- defer c.lock.Unlock()
- if c.indexer == nil {
- return nil, fmt.Errorf("no indexer has been provided to the mutation cache")
- }
- keys, err := c.indexer.IndexKeys(name, indexKey)
- if err != nil {
- return nil, err
- }
- var items []interface{}
- keySet := sets.NewString()
- for _, key := range keys {
- keySet.Insert(key)
- obj, exists, err := c.indexer.GetByKey(key)
- if err != nil {
- return nil, err
- }
- if !exists {
- continue
- }
- if objRuntime, ok := obj.(runtime.Object); ok {
- items = append(items, c.newerObject(key, objRuntime))
- } else {
- items = append(items, obj)
- }
- }
-
- if c.includeAdds {
- fn := c.indexer.GetIndexers()[name]
- // Keys() is returned oldest to newest, so full traversal does not alter the LRU behavior
- for _, key := range c.mutationCache.Keys() {
- updated, ok := c.mutationCache.Get(key)
- if !ok {
- continue
- }
- if keySet.Has(key.(string)) {
- continue
- }
- elements, err := fn(updated)
- if err != nil {
- glog.V(4).Infof("Unable to calculate an index entry for mutation cache entry %s: %v", key, err)
- continue
- }
- for _, inIndex := range elements {
- if inIndex != indexKey {
- continue
- }
- items = append(items, updated)
- break
- }
- }
- }
-
- return items, nil
-}
-
-// newerObject checks the mutation cache for a newer object and returns one if found. If the
-// mutated object is older than the backing object, it is removed from the Must be
-// called while the lock is held.
-func (c *mutationCache) newerObject(key string, backing runtime.Object) runtime.Object {
- mutatedObj, exists := c.mutationCache.Get(key)
- if !exists {
- return backing
- }
- mutatedObjRuntime, ok := mutatedObj.(runtime.Object)
- if !ok {
- return backing
- }
- if c.comparator.CompareResourceVersion(backing, mutatedObjRuntime) >= 0 {
- c.mutationCache.Remove(key)
- return backing
- }
- return mutatedObjRuntime
-}
-
-// Mutation adds a change to the cache that can be returned in GetByKey if it is newer than the backingCache
-// copy. If you call Mutation twice with the same object on different threads, one will win, but its not defined
-// which one. This doesn't affect correctness, since the GetByKey guaranteed of "later of these two caches" is
-// preserved, but you may not get the version of the object you want. The object you get is only guaranteed to
-// "one that was valid at some point in time", not "the one that I want".
-func (c *mutationCache) Mutation(obj interface{}) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- key, err := DeletionHandlingMetaNamespaceKeyFunc(obj)
- if err != nil {
- // this is a "nice to have", so failures shouldn't do anything weird
- utilruntime.HandleError(err)
- return
- }
-
- if objRuntime, ok := obj.(runtime.Object); ok {
- if mutatedObj, exists := c.mutationCache.Get(key); exists {
- if mutatedObjRuntime, ok := mutatedObj.(runtime.Object); ok {
- if c.comparator.CompareResourceVersion(objRuntime, mutatedObjRuntime) < 0 {
- return
- }
- }
- }
- }
- c.mutationCache.Add(key, obj, c.ttl)
-}
-
-// etcdObjectVersioner implements versioning and extracting etcd node information
-// for objects that have an embedded ObjectMeta or ListMeta field.
-type etcdObjectVersioner struct{}
-
-// ObjectResourceVersion implements Versioner
-func (a etcdObjectVersioner) ObjectResourceVersion(obj runtime.Object) (uint64, error) {
- accessor, err := meta.Accessor(obj)
- if err != nil {
- return 0, err
- }
- version := accessor.GetResourceVersion()
- if len(version) == 0 {
- return 0, nil
- }
- return strconv.ParseUint(version, 10, 64)
-}
-
-// CompareResourceVersion compares etcd resource versions. Outside this API they are all strings,
-// but etcd resource versions are special, they're actually ints, so we can easily compare them.
-func (a etcdObjectVersioner) CompareResourceVersion(lhs, rhs runtime.Object) int {
- lhsVersion, err := a.ObjectResourceVersion(lhs)
- if err != nil {
- // coder error
- panic(err)
- }
- rhsVersion, err := a.ObjectResourceVersion(rhs)
- if err != nil {
- // coder error
- panic(err)
- }
-
- if lhsVersion == rhsVersion {
- return 0
- }
- if lhsVersion < rhsVersion {
- return -1
- }
-
- return 1
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_detector.go b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go
deleted file mode 100644
index 8e6338a1b..000000000
--- a/vendor/k8s.io/client-go/tools/cache/mutation_detector.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-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 cache
-
-import (
- "fmt"
- "os"
- "reflect"
- "strconv"
- "sync"
- "time"
-
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/diff"
-)
-
-var mutationDetectionEnabled = false
-
-func init() {
- mutationDetectionEnabled, _ = strconv.ParseBool(os.Getenv("KUBE_CACHE_MUTATION_DETECTOR"))
-}
-
-type CacheMutationDetector interface {
- AddObject(obj interface{})
- Run(stopCh <-chan struct{})
-}
-
-func NewCacheMutationDetector(name string) CacheMutationDetector {
- if !mutationDetectionEnabled {
- return dummyMutationDetector{}
- }
- return &defaultCacheMutationDetector{name: name, period: 1 * time.Second}
-}
-
-type dummyMutationDetector struct{}
-
-func (dummyMutationDetector) Run(stopCh <-chan struct{}) {
-}
-func (dummyMutationDetector) AddObject(obj interface{}) {
-}
-
-// defaultCacheMutationDetector gives a way to detect if a cached object has been mutated
-// It has a list of cached objects and their copies. I haven't thought of a way
-// to see WHO is mutating it, just that it's getting mutated.
-type defaultCacheMutationDetector struct {
- name string
- period time.Duration
-
- lock sync.Mutex
- cachedObjs []cacheObj
-
- // failureFunc is injectable for unit testing. If you don't have it, the process will panic.
- // This panic is intentional, since turning on this detection indicates you want a strong
- // failure signal. This failure is effectively a p0 bug and you can't trust process results
- // after a mutation anyway.
- failureFunc func(message string)
-}
-
-// cacheObj holds the actual object and a copy
-type cacheObj struct {
- cached interface{}
- copied interface{}
-}
-
-func (d *defaultCacheMutationDetector) Run(stopCh <-chan struct{}) {
- // we DON'T want protection from panics. If we're running this code, we want to die
- for {
- d.CompareObjects()
-
- select {
- case <-stopCh:
- return
- case <-time.After(d.period):
- }
- }
-}
-
-// AddObject makes a deep copy of the object for later comparison. It only works on runtime.Object
-// but that covers the vast majority of our cached objects
-func (d *defaultCacheMutationDetector) AddObject(obj interface{}) {
- if _, ok := obj.(DeletedFinalStateUnknown); ok {
- return
- }
- if obj, ok := obj.(runtime.Object); ok {
- copiedObj := obj.DeepCopyObject()
-
- d.lock.Lock()
- defer d.lock.Unlock()
- d.cachedObjs = append(d.cachedObjs, cacheObj{cached: obj, copied: copiedObj})
- }
-}
-
-func (d *defaultCacheMutationDetector) CompareObjects() {
- d.lock.Lock()
- defer d.lock.Unlock()
-
- altered := false
- for i, obj := range d.cachedObjs {
- if !reflect.DeepEqual(obj.cached, obj.copied) {
- fmt.Printf("CACHE %s[%d] ALTERED!\n%v\n", d.name, i, diff.ObjectDiff(obj.cached, obj.copied))
- altered = true
- }
- }
-
- if altered {
- msg := fmt.Sprintf("cache %s modified", d.name)
- if d.failureFunc != nil {
- d.failureFunc(msg)
- return
- }
- panic(msg)
- }
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/reflector.go b/vendor/k8s.io/client-go/tools/cache/reflector.go
deleted file mode 100644
index 054a7373c..000000000
--- a/vendor/k8s.io/client-go/tools/cache/reflector.go
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
-Copyright 2014 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 cache
-
-import (
- "errors"
- "fmt"
- "io"
- "math/rand"
- "net"
- "net/url"
- "reflect"
- "regexp"
- goruntime "runtime"
- "runtime/debug"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "syscall"
- "time"
-
- "github.com/golang/glog"
- apierrs "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/api/meta"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/clock"
- utilruntime "k8s.io/apimachinery/pkg/util/runtime"
- "k8s.io/apimachinery/pkg/util/wait"
- "k8s.io/apimachinery/pkg/watch"
-)
-
-// Reflector watches a specified resource and causes all changes to be reflected in the given store.
-type Reflector struct {
- // name identifies this reflector. By default it will be a file:line if possible.
- name string
- // metrics tracks basic metric information about the reflector
- metrics *reflectorMetrics
-
- // The type of object we expect to place in the store.
- expectedType reflect.Type
- // The destination to sync up with the watch source
- store Store
- // listerWatcher is used to perform lists and watches.
- listerWatcher ListerWatcher
- // period controls timing between one watch ending and
- // the beginning of the next one.
- period time.Duration
- resyncPeriod time.Duration
- ShouldResync func() bool
- // clock allows tests to manipulate time
- clock clock.Clock
- // lastSyncResourceVersion is the resource version token last
- // observed when doing a sync with the underlying store
- // it is thread safe, but not synchronized with the underlying store
- lastSyncResourceVersion string
- // lastSyncResourceVersionMutex guards read/write access to lastSyncResourceVersion
- lastSyncResourceVersionMutex sync.RWMutex
-}
-
-var (
- // We try to spread the load on apiserver by setting timeouts for
- // watch requests - it is random in [minWatchTimeout, 2*minWatchTimeout].
- // However, it can be modified to avoid periodic resync to break the
- // TCP connection.
- minWatchTimeout = 5 * time.Minute
-)
-
-// NewNamespaceKeyedIndexerAndReflector creates an Indexer and a Reflector
-// The indexer is configured to key on namespace
-func NewNamespaceKeyedIndexerAndReflector(lw ListerWatcher, expectedType interface{}, resyncPeriod time.Duration) (indexer Indexer, reflector *Reflector) {
- indexer = NewIndexer(MetaNamespaceKeyFunc, Indexers{"namespace": MetaNamespaceIndexFunc})
- reflector = NewReflector(lw, expectedType, indexer, resyncPeriod)
- return indexer, reflector
-}
-
-// NewReflector creates a new Reflector object which will keep the given store up to
-// date with the server's contents for the given resource. Reflector promises to
-// only put things in the store that have the type of expectedType, unless expectedType
-// is nil. If resyncPeriod is non-zero, then lists will be executed after every
-// resyncPeriod, so that you can use reflectors to periodically process everything as
-// well as incrementally processing the things that change.
-func NewReflector(lw ListerWatcher, expectedType interface{}, store Store, resyncPeriod time.Duration) *Reflector {
- return NewNamedReflector(getDefaultReflectorName(internalPackages...), lw, expectedType, store, resyncPeriod)
-}
-
-// reflectorDisambiguator is used to disambiguate started reflectors.
-// initialized to an unstable value to ensure meaning isn't attributed to the suffix.
-var reflectorDisambiguator = int64(time.Now().UnixNano() % 12345)
-
-// NewNamedReflector same as NewReflector, but with a specified name for logging
-func NewNamedReflector(name string, lw ListerWatcher, expectedType interface{}, store Store, resyncPeriod time.Duration) *Reflector {
- reflectorSuffix := atomic.AddInt64(&reflectorDisambiguator, 1)
- r := &Reflector{
- name: name,
- // we need this to be unique per process (some names are still the same) but obvious who it belongs to
- metrics: newReflectorMetrics(makeValidPrometheusMetricLabel(fmt.Sprintf("reflector_"+name+"_%d", reflectorSuffix))),
- listerWatcher: lw,
- store: store,
- expectedType: reflect.TypeOf(expectedType),
- period: time.Second,
- resyncPeriod: resyncPeriod,
- clock: &clock.RealClock{},
- }
- return r
-}
-
-func makeValidPrometheusMetricLabel(in string) string {
- // this isn't perfect, but it removes our common characters
- return strings.NewReplacer("/", "_", ".", "_", "-", "_", ":", "_").Replace(in)
-}
-
-// internalPackages are packages that ignored when creating a default reflector name. These packages are in the common
-// call chains to NewReflector, so they'd be low entropy names for reflectors
-var internalPackages = []string{"client-go/tools/cache/", "/runtime/asm_"}
-
-// getDefaultReflectorName walks back through the call stack until we find a caller from outside of the ignoredPackages
-// it returns back a shortpath/filename:line to aid in identification of this reflector when it starts logging
-func getDefaultReflectorName(ignoredPackages ...string) string {
- name := "????"
- const maxStack = 10
- for i := 1; i < maxStack; i++ {
- _, file, line, ok := goruntime.Caller(i)
- if !ok {
- file, line, ok = extractStackCreator()
- if !ok {
- break
- }
- i += maxStack
- }
- if hasPackage(file, ignoredPackages) {
- continue
- }
-
- file = trimPackagePrefix(file)
- name = fmt.Sprintf("%s:%d", file, line)
- break
- }
- return name
-}
-
-// hasPackage returns true if the file is in one of the ignored packages.
-func hasPackage(file string, ignoredPackages []string) bool {
- for _, ignoredPackage := range ignoredPackages {
- if strings.Contains(file, ignoredPackage) {
- return true
- }
- }
- return false
-}
-
-// trimPackagePrefix reduces duplicate values off the front of a package name.
-func trimPackagePrefix(file string) string {
- if l := strings.LastIndex(file, "k8s.io/client-go/pkg/"); l >= 0 {
- return file[l+len("k8s.io/client-go/"):]
- }
- if l := strings.LastIndex(file, "/src/"); l >= 0 {
- return file[l+5:]
- }
- if l := strings.LastIndex(file, "/pkg/"); l >= 0 {
- return file[l+1:]
- }
- return file
-}
-
-var stackCreator = regexp.MustCompile(`(?m)^created by (.*)\n\s+(.*):(\d+) \+0x[[:xdigit:]]+$`)
-
-// extractStackCreator retrieves the goroutine file and line that launched this stack. Returns false
-// if the creator cannot be located.
-// TODO: Go does not expose this via runtime https://github.com/golang/go/issues/11440
-func extractStackCreator() (string, int, bool) {
- stack := debug.Stack()
- matches := stackCreator.FindStringSubmatch(string(stack))
- if matches == nil || len(matches) != 4 {
- return "", 0, false
- }
- line, err := strconv.Atoi(matches[3])
- if err != nil {
- return "", 0, false
- }
- return matches[2], line, true
-}
-
-// Run starts a watch and handles watch events. Will restart the watch if it is closed.
-// Run will exit when stopCh is closed.
-func (r *Reflector) Run(stopCh <-chan struct{}) {
- glog.V(3).Infof("Starting reflector %v (%s) from %s", r.expectedType, r.resyncPeriod, r.name)
- wait.Until(func() {
- if err := r.ListAndWatch(stopCh); err != nil {
- utilruntime.HandleError(err)
- }
- }, r.period, stopCh)
-}
-
-var (
- // nothing will ever be sent down this channel
- neverExitWatch <-chan time.Time = make(chan time.Time)
-
- // Used to indicate that watching stopped so that a resync could happen.
- errorResyncRequested = errors.New("resync channel fired")
-
- // Used to indicate that watching stopped because of a signal from the stop
- // channel passed in from a client of the reflector.
- errorStopRequested = errors.New("Stop requested")
-)
-
-// resyncChan returns a channel which will receive something when a resync is
-// required, and a cleanup function.
-func (r *Reflector) resyncChan() (<-chan time.Time, func() bool) {
- if r.resyncPeriod == 0 {
- return neverExitWatch, func() bool { return false }
- }
- // The cleanup function is required: imagine the scenario where watches
- // always fail so we end up listing frequently. Then, if we don't
- // manually stop the timer, we could end up with many timers active
- // concurrently.
- t := r.clock.NewTimer(r.resyncPeriod)
- return t.C(), t.Stop
-}
-
-// ListAndWatch first lists all items and get the resource version at the moment of call,
-// and then use the resource version to watch.
-// It returns error if ListAndWatch didn't even try to initialize watch.
-func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
- glog.V(3).Infof("Listing and watching %v from %s", r.expectedType, r.name)
- var resourceVersion string
-
- // Explicitly set "0" as resource version - it's fine for the List()
- // to be served from cache and potentially be delayed relative to
- // etcd contents. Reflector framework will catch up via Watch() eventually.
- options := metav1.ListOptions{ResourceVersion: "0"}
- r.metrics.numberOfLists.Inc()
- start := r.clock.Now()
- list, err := r.listerWatcher.List(options)
- if err != nil {
- return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedType, err)
- }
- r.metrics.listDuration.Observe(time.Since(start).Seconds())
- listMetaInterface, err := meta.ListAccessor(list)
- if err != nil {
- return fmt.Errorf("%s: Unable to understand list result %#v: %v", r.name, list, err)
- }
- resourceVersion = listMetaInterface.GetResourceVersion()
- items, err := meta.ExtractList(list)
- if err != nil {
- return fmt.Errorf("%s: Unable to understand list result %#v (%v)", r.name, list, err)
- }
- r.metrics.numberOfItemsInList.Observe(float64(len(items)))
- if err := r.syncWith(items, resourceVersion); err != nil {
- return fmt.Errorf("%s: Unable to sync list result: %v", r.name, err)
- }
- r.setLastSyncResourceVersion(resourceVersion)
-
- resyncerrc := make(chan error, 1)
- cancelCh := make(chan struct{})
- defer close(cancelCh)
- go func() {
- resyncCh, cleanup := r.resyncChan()
- defer func() {
- cleanup() // Call the last one written into cleanup
- }()
- for {
- select {
- case <-resyncCh:
- case <-stopCh:
- return
- case <-cancelCh:
- return
- }
- if r.ShouldResync == nil || r.ShouldResync() {
- glog.V(4).Infof("%s: forcing resync", r.name)
- if err := r.store.Resync(); err != nil {
- resyncerrc <- err
- return
- }
- }
- cleanup()
- resyncCh, cleanup = r.resyncChan()
- }
- }()
-
- for {
- // give the stopCh a chance to stop the loop, even in case of continue statements further down on errors
- select {
- case <-stopCh:
- return nil
- default:
- }
-
- timeoutSeconds := int64(minWatchTimeout.Seconds() * (rand.Float64() + 1.0))
- options = metav1.ListOptions{
- ResourceVersion: resourceVersion,
- // We want to avoid situations of hanging watchers. Stop any wachers that do not
- // receive any events within the timeout window.
- TimeoutSeconds: &timeoutSeconds,
- }
-
- r.metrics.numberOfWatches.Inc()
- w, err := r.listerWatcher.Watch(options)
- if err != nil {
- switch err {
- case io.EOF:
- // watch closed normally
- case io.ErrUnexpectedEOF:
- glog.V(1).Infof("%s: Watch for %v closed with unexpected EOF: %v", r.name, r.expectedType, err)
- default:
- utilruntime.HandleError(fmt.Errorf("%s: Failed to watch %v: %v", r.name, r.expectedType, err))
- }
- // If this is "connection refused" error, it means that most likely apiserver is not responsive.
- // It doesn't make sense to re-list all objects because most likely we will be able to restart
- // watch where we ended.
- // If that's the case wait and resend watch request.
- if urlError, ok := err.(*url.Error); ok {
- if opError, ok := urlError.Err.(*net.OpError); ok {
- if errno, ok := opError.Err.(syscall.Errno); ok && errno == syscall.ECONNREFUSED {
- time.Sleep(time.Second)
- continue
- }
- }
- }
- return nil
- }
-
- if err := r.watchHandler(w, &resourceVersion, resyncerrc, stopCh); err != nil {
- if err != errorStopRequested {
- glog.Warningf("%s: watch of %v ended with: %v", r.name, r.expectedType, err)
- }
- return nil
- }
- }
-}
-
-// syncWith replaces the store's items with the given list.
-func (r *Reflector) syncWith(items []runtime.Object, resourceVersion string) error {
- found := make([]interface{}, 0, len(items))
- for _, item := range items {
- found = append(found, item)
- }
- return r.store.Replace(found, resourceVersion)
-}
-
-// watchHandler watches w and keeps *resourceVersion up to date.
-func (r *Reflector) watchHandler(w watch.Interface, resourceVersion *string, errc chan error, stopCh <-chan struct{}) error {
- start := r.clock.Now()
- eventCount := 0
-
- // Stopping the watcher should be idempotent and if we return from this function there's no way
- // we're coming back in with the same watch interface.
- defer w.Stop()
- // update metrics
- defer func() {
- r.metrics.numberOfItemsInWatch.Observe(float64(eventCount))
- r.metrics.watchDuration.Observe(time.Since(start).Seconds())
- }()
-
-loop:
- for {
- select {
- case <-stopCh:
- return errorStopRequested
- case err := <-errc:
- return err
- case event, ok := <-w.ResultChan():
- if !ok {
- break loop
- }
- if event.Type == watch.Error {
- return apierrs.FromObject(event.Object)
- }
- if e, a := r.expectedType, reflect.TypeOf(event.Object); e != nil && e != a {
- utilruntime.HandleError(fmt.Errorf("%s: expected type %v, but watch event object had type %v", r.name, e, a))
- continue
- }
- meta, err := meta.Accessor(event.Object)
- if err != nil {
- utilruntime.HandleError(fmt.Errorf("%s: unable to understand watch event %#v", r.name, event))
- continue
- }
- newResourceVersion := meta.GetResourceVersion()
- switch event.Type {
- case watch.Added:
- err := r.store.Add(event.Object)
- if err != nil {
- utilruntime.HandleError(fmt.Errorf("%s: unable to add watch event object (%#v) to store: %v", r.name, event.Object, err))
- }
- case watch.Modified:
- err := r.store.Update(event.Object)
- if err != nil {
- utilruntime.HandleError(fmt.Errorf("%s: unable to update watch event object (%#v) to store: %v", r.name, event.Object, err))
- }
- case watch.Deleted:
- // TODO: Will any consumers need access to the "last known
- // state", which is passed in event.Object? If so, may need
- // to change this.
- err := r.store.Delete(event.Object)
- if err != nil {
- utilruntime.HandleError(fmt.Errorf("%s: unable to delete watch event object (%#v) from store: %v", r.name, event.Object, err))
- }
- default:
- utilruntime.HandleError(fmt.Errorf("%s: unable to understand watch event %#v", r.name, event))
- }
- *resourceVersion = newResourceVersion
- r.setLastSyncResourceVersion(newResourceVersion)
- eventCount++
- }
- }
-
- watchDuration := r.clock.Now().Sub(start)
- if watchDuration < 1*time.Second && eventCount == 0 {
- r.metrics.numberOfShortWatches.Inc()
- return fmt.Errorf("very short watch: %s: Unexpected watch close - watch lasted less than a second and no items received", r.name)
- }
- glog.V(4).Infof("%s: Watch close - %v total %v items received", r.name, r.expectedType, eventCount)
- return nil
-}
-
-// LastSyncResourceVersion is the resource version observed when last sync with the underlying store
-// The value returned is not synchronized with access to the underlying store and is not thread-safe
-func (r *Reflector) LastSyncResourceVersion() string {
- r.lastSyncResourceVersionMutex.RLock()
- defer r.lastSyncResourceVersionMutex.RUnlock()
- return r.lastSyncResourceVersion
-}
-
-func (r *Reflector) setLastSyncResourceVersion(v string) {
- r.lastSyncResourceVersionMutex.Lock()
- defer r.lastSyncResourceVersionMutex.Unlock()
- r.lastSyncResourceVersion = v
-
- rv, err := strconv.Atoi(v)
- if err == nil {
- r.metrics.lastResourceVersion.Set(float64(rv))
- }
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/reflector_metrics.go b/vendor/k8s.io/client-go/tools/cache/reflector_metrics.go
deleted file mode 100644
index 0945e5c3a..000000000
--- a/vendor/k8s.io/client-go/tools/cache/reflector_metrics.go
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
-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 provides abstractions for setting the provider (e.g., prometheus)
-// of metrics.
-
-package cache
-
-import (
- "sync"
-)
-
-// GaugeMetric represents a single numerical value that can arbitrarily go up
-// and down.
-type GaugeMetric interface {
- Set(float64)
-}
-
-// CounterMetric represents a single numerical value that only ever
-// goes up.
-type CounterMetric interface {
- Inc()
-}
-
-// SummaryMetric captures individual observations.
-type SummaryMetric interface {
- Observe(float64)
-}
-
-type noopMetric struct{}
-
-func (noopMetric) Inc() {}
-func (noopMetric) Dec() {}
-func (noopMetric) Observe(float64) {}
-func (noopMetric) Set(float64) {}
-
-type reflectorMetrics struct {
- numberOfLists CounterMetric
- listDuration SummaryMetric
- numberOfItemsInList SummaryMetric
-
- numberOfWatches CounterMetric
- numberOfShortWatches CounterMetric
- watchDuration SummaryMetric
- numberOfItemsInWatch SummaryMetric
-
- lastResourceVersion GaugeMetric
-}
-
-// MetricsProvider generates various metrics used by the reflector.
-type MetricsProvider interface {
- NewListsMetric(name string) CounterMetric
- NewListDurationMetric(name string) SummaryMetric
- NewItemsInListMetric(name string) SummaryMetric
-
- NewWatchesMetric(name string) CounterMetric
- NewShortWatchesMetric(name string) CounterMetric
- NewWatchDurationMetric(name string) SummaryMetric
- NewItemsInWatchMetric(name string) SummaryMetric
-
- NewLastResourceVersionMetric(name string) GaugeMetric
-}
-
-type noopMetricsProvider struct{}
-
-func (noopMetricsProvider) NewListsMetric(name string) CounterMetric { return noopMetric{} }
-func (noopMetricsProvider) NewListDurationMetric(name string) SummaryMetric { return noopMetric{} }
-func (noopMetricsProvider) NewItemsInListMetric(name string) SummaryMetric { return noopMetric{} }
-func (noopMetricsProvider) NewWatchesMetric(name string) CounterMetric { return noopMetric{} }
-func (noopMetricsProvider) NewShortWatchesMetric(name string) CounterMetric { return noopMetric{} }
-func (noopMetricsProvider) NewWatchDurationMetric(name string) SummaryMetric { return noopMetric{} }
-func (noopMetricsProvider) NewItemsInWatchMetric(name string) SummaryMetric { return noopMetric{} }
-func (noopMetricsProvider) NewLastResourceVersionMetric(name string) GaugeMetric {
- return noopMetric{}
-}
-
-var metricsFactory = struct {
- metricsProvider MetricsProvider
- setProviders sync.Once
-}{
- metricsProvider: noopMetricsProvider{},
-}
-
-func newReflectorMetrics(name string) *reflectorMetrics {
- var ret *reflectorMetrics
- if len(name) == 0 {
- return ret
- }
- return &reflectorMetrics{
- numberOfLists: metricsFactory.metricsProvider.NewListsMetric(name),
- listDuration: metricsFactory.metricsProvider.NewListDurationMetric(name),
- numberOfItemsInList: metricsFactory.metricsProvider.NewItemsInListMetric(name),
- numberOfWatches: metricsFactory.metricsProvider.NewWatchesMetric(name),
- numberOfShortWatches: metricsFactory.metricsProvider.NewShortWatchesMetric(name),
- watchDuration: metricsFactory.metricsProvider.NewWatchDurationMetric(name),
- numberOfItemsInWatch: metricsFactory.metricsProvider.NewItemsInWatchMetric(name),
- lastResourceVersion: metricsFactory.metricsProvider.NewLastResourceVersionMetric(name),
- }
-}
-
-// SetReflectorMetricsProvider sets the metrics provider
-func SetReflectorMetricsProvider(metricsProvider MetricsProvider) {
- metricsFactory.setProviders.Do(func() {
- metricsFactory.metricsProvider = metricsProvider
- })
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go
deleted file mode 100644
index f6ce07f7a..000000000
--- a/vendor/k8s.io/client-go/tools/cache/shared_informer.go
+++ /dev/null
@@ -1,600 +0,0 @@
-/*
-Copyright 2015 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 cache
-
-import (
- "fmt"
- "sync"
- "time"
-
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/clock"
- utilruntime "k8s.io/apimachinery/pkg/util/runtime"
- "k8s.io/apimachinery/pkg/util/wait"
- "k8s.io/client-go/util/buffer"
- "k8s.io/client-go/util/retry"
-
- "github.com/golang/glog"
-)
-
-// SharedInformer has a shared data cache and is capable of distributing notifications for changes
-// to the cache to multiple listeners who registered via AddEventHandler. If you use this, there is
-// one behavior change compared to a standard Informer. When you receive a notification, the cache
-// will be AT LEAST as fresh as the notification, but it MAY be more fresh. You should NOT depend
-// on the contents of the cache exactly matching the notification you've received in handler
-// functions. If there was a create, followed by a delete, the cache may NOT have your item. This
-// has advantages over the broadcaster since it allows us to share a common cache across many
-// controllers. Extending the broadcaster would have required us keep duplicate caches for each
-// watch.
-type SharedInformer interface {
- // AddEventHandler adds an event handler to the shared informer using the shared informer's resync
- // period. Events to a single handler are delivered sequentially, but there is no coordination
- // between different handlers.
- AddEventHandler(handler ResourceEventHandler)
- // AddEventHandlerWithResyncPeriod adds an event handler to the shared informer using the
- // specified resync period. Events to a single handler are delivered sequentially, but there is
- // no coordination between different handlers.
- AddEventHandlerWithResyncPeriod(handler ResourceEventHandler, resyncPeriod time.Duration)
- // GetStore returns the Store.
- GetStore() Store
- // GetController gives back a synthetic interface that "votes" to start the informer
- GetController() Controller
- // Run starts the shared informer, which will be stopped when stopCh is closed.
- Run(stopCh <-chan struct{})
- // HasSynced returns true if the shared informer's store has synced.
- HasSynced() bool
- // LastSyncResourceVersion is the resource version observed when last synced with the underlying
- // store. The value returned is not synchronized with access to the underlying store and is not
- // thread-safe.
- LastSyncResourceVersion() string
-}
-
-type SharedIndexInformer interface {
- SharedInformer
- // AddIndexers add indexers to the informer before it starts.
- AddIndexers(indexers Indexers) error
- GetIndexer() Indexer
-}
-
-// NewSharedInformer creates a new instance for the listwatcher.
-func NewSharedInformer(lw ListerWatcher, objType runtime.Object, resyncPeriod time.Duration) SharedInformer {
- return NewSharedIndexInformer(lw, objType, resyncPeriod, Indexers{})
-}
-
-// NewSharedIndexInformer creates a new instance for the listwatcher.
-func NewSharedIndexInformer(lw ListerWatcher, objType runtime.Object, defaultEventHandlerResyncPeriod time.Duration, indexers Indexers) SharedIndexInformer {
- realClock := &clock.RealClock{}
- sharedIndexInformer := &sharedIndexInformer{
- processor: &sharedProcessor{clock: realClock},
- indexer: NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers),
- listerWatcher: lw,
- objectType: objType,
- resyncCheckPeriod: defaultEventHandlerResyncPeriod,
- defaultEventHandlerResyncPeriod: defaultEventHandlerResyncPeriod,
- cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", objType)),
- clock: realClock,
- }
- return sharedIndexInformer
-}
-
-// InformerSynced is a function that can be used to determine if an informer has synced. This is useful for determining if caches have synced.
-type InformerSynced func() bool
-
-const (
- // syncedPollPeriod controls how often you look at the status of your sync funcs
- syncedPollPeriod = 100 * time.Millisecond
-
- // initialBufferSize is the initial number of event notifications that can be buffered.
- initialBufferSize = 1024
-)
-
-// WaitForCacheSync waits for caches to populate. It returns true if it was successful, false
-// if the controller should shutdown
-func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool {
- err := wait.PollUntil(syncedPollPeriod,
- func() (bool, error) {
- for _, syncFunc := range cacheSyncs {
- if !syncFunc() {
- return false, nil
- }
- }
- return true, nil
- },
- stopCh)
- if err != nil {
- glog.V(2).Infof("stop requested")
- return false
- }
-
- glog.V(4).Infof("caches populated")
- return true
-}
-
-type sharedIndexInformer struct {
- indexer Indexer
- controller Controller
-
- processor *sharedProcessor
- cacheMutationDetector CacheMutationDetector
-
- // This block is tracked to handle late initialization of the controller
- listerWatcher ListerWatcher
- objectType runtime.Object
-
- // resyncCheckPeriod is how often we want the reflector's resync timer to fire so it can call
- // shouldResync to check if any of our listeners need a resync.
- resyncCheckPeriod time.Duration
- // defaultEventHandlerResyncPeriod is the default resync period for any handlers added via
- // AddEventHandler (i.e. they don't specify one and just want to use the shared informer's default
- // value).
- defaultEventHandlerResyncPeriod time.Duration
- // clock allows for testability
- clock clock.Clock
-
- started, stopped bool
- startedLock sync.Mutex
-
- // blockDeltas gives a way to stop all event distribution so that a late event handler
- // can safely join the shared informer.
- blockDeltas sync.Mutex
-}
-
-// dummyController hides the fact that a SharedInformer is different from a dedicated one
-// where a caller can `Run`. The run method is disconnected in this case, because higher
-// level logic will decide when to start the SharedInformer and related controller.
-// Because returning information back is always asynchronous, the legacy callers shouldn't
-// notice any change in behavior.
-type dummyController struct {
- informer *sharedIndexInformer
-}
-
-func (v *dummyController) Run(stopCh <-chan struct{}) {
-}
-
-func (v *dummyController) HasSynced() bool {
- return v.informer.HasSynced()
-}
-
-func (c *dummyController) LastSyncResourceVersion() string {
- return ""
-}
-
-type updateNotification struct {
- oldObj interface{}
- newObj interface{}
-}
-
-type addNotification struct {
- newObj interface{}
-}
-
-type deleteNotification struct {
- oldObj interface{}
-}
-
-func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) {
- defer utilruntime.HandleCrash()
-
- fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, nil, s.indexer)
-
- cfg := &Config{
- Queue: fifo,
- ListerWatcher: s.listerWatcher,
- ObjectType: s.objectType,
- FullResyncPeriod: s.resyncCheckPeriod,
- RetryOnError: false,
- ShouldResync: s.processor.shouldResync,
-
- Process: s.HandleDeltas,
- }
-
- func() {
- s.startedLock.Lock()
- defer s.startedLock.Unlock()
-
- s.controller = New(cfg)
- s.controller.(*controller).clock = s.clock
- s.started = true
- }()
-
- // Separate stop channel because Processor should be stopped strictly after controller
- processorStopCh := make(chan struct{})
- var wg wait.Group
- defer wg.Wait() // Wait for Processor to stop
- defer close(processorStopCh) // Tell Processor to stop
- wg.StartWithChannel(processorStopCh, s.cacheMutationDetector.Run)
- wg.StartWithChannel(processorStopCh, s.processor.run)
-
- defer func() {
- s.startedLock.Lock()
- defer s.startedLock.Unlock()
- s.stopped = true // Don't want any new listeners
- }()
- s.controller.Run(stopCh)
-}
-
-func (s *sharedIndexInformer) HasSynced() bool {
- s.startedLock.Lock()
- defer s.startedLock.Unlock()
-
- if s.controller == nil {
- return false
- }
- return s.controller.HasSynced()
-}
-
-func (s *sharedIndexInformer) LastSyncResourceVersion() string {
- s.startedLock.Lock()
- defer s.startedLock.Unlock()
-
- if s.controller == nil {
- return ""
- }
- return s.controller.LastSyncResourceVersion()
-}
-
-func (s *sharedIndexInformer) GetStore() Store {
- return s.indexer
-}
-
-func (s *sharedIndexInformer) GetIndexer() Indexer {
- return s.indexer
-}
-
-func (s *sharedIndexInformer) AddIndexers(indexers Indexers) error {
- s.startedLock.Lock()
- defer s.startedLock.Unlock()
-
- if s.started {
- return fmt.Errorf("informer has already started")
- }
-
- return s.indexer.AddIndexers(indexers)
-}
-
-func (s *sharedIndexInformer) GetController() Controller {
- return &dummyController{informer: s}
-}
-
-func (s *sharedIndexInformer) AddEventHandler(handler ResourceEventHandler) {
- s.AddEventHandlerWithResyncPeriod(handler, s.defaultEventHandlerResyncPeriod)
-}
-
-func determineResyncPeriod(desired, check time.Duration) time.Duration {
- if desired == 0 {
- return desired
- }
- if check == 0 {
- glog.Warningf("The specified resyncPeriod %v is invalid because this shared informer doesn't support resyncing", desired)
- return 0
- }
- if desired < check {
- glog.Warningf("The specified resyncPeriod %v is being increased to the minimum resyncCheckPeriod %v", desired, check)
- return check
- }
- return desired
-}
-
-const minimumResyncPeriod = 1 * time.Second
-
-func (s *sharedIndexInformer) AddEventHandlerWithResyncPeriod(handler ResourceEventHandler, resyncPeriod time.Duration) {
- s.startedLock.Lock()
- defer s.startedLock.Unlock()
-
- if s.stopped {
- glog.V(2).Infof("Handler %v was not added to shared informer because it has stopped already", handler)
- return
- }
-
- if resyncPeriod > 0 {
- if resyncPeriod < minimumResyncPeriod {
- glog.Warningf("resyncPeriod %d is too small. Changing it to the minimum allowed value of %d", resyncPeriod, minimumResyncPeriod)
- resyncPeriod = minimumResyncPeriod
- }
-
- if resyncPeriod < s.resyncCheckPeriod {
- if s.started {
- glog.Warningf("resyncPeriod %d is smaller than resyncCheckPeriod %d and the informer has already started. Changing it to %d", resyncPeriod, s.resyncCheckPeriod, s.resyncCheckPeriod)
- resyncPeriod = s.resyncCheckPeriod
- } else {
- // if the event handler's resyncPeriod is smaller than the current resyncCheckPeriod, update
- // resyncCheckPeriod to match resyncPeriod and adjust the resync periods of all the listeners
- // accordingly
- s.resyncCheckPeriod = resyncPeriod
- s.processor.resyncCheckPeriodChanged(resyncPeriod)
- }
- }
- }
-
- listener := newProcessListener(handler, resyncPeriod, determineResyncPeriod(resyncPeriod, s.resyncCheckPeriod), s.clock.Now(), initialBufferSize)
-
- if !s.started {
- s.processor.addListener(listener)
- return
- }
-
- // in order to safely join, we have to
- // 1. stop sending add/update/delete notifications
- // 2. do a list against the store
- // 3. send synthetic "Add" events to the new handler
- // 4. unblock
- s.blockDeltas.Lock()
- defer s.blockDeltas.Unlock()
-
- s.processor.addAndStartListener(listener)
- for _, item := range s.indexer.List() {
- listener.add(addNotification{newObj: item})
- }
-}
-
-func (s *sharedIndexInformer) HandleDeltas(obj interface{}) error {
- s.blockDeltas.Lock()
- defer s.blockDeltas.Unlock()
-
- // from oldest to newest
- for _, d := range obj.(Deltas) {
- switch d.Type {
- case Sync, Added, Updated:
- isSync := d.Type == Sync
- s.cacheMutationDetector.AddObject(d.Object)
- if old, exists, err := s.indexer.Get(d.Object); err == nil && exists {
- if err := s.indexer.Update(d.Object); err != nil {
- return err
- }
- s.processor.distribute(updateNotification{oldObj: old, newObj: d.Object}, isSync)
- } else {
- if err := s.indexer.Add(d.Object); err != nil {
- return err
- }
- s.processor.distribute(addNotification{newObj: d.Object}, isSync)
- }
- case Deleted:
- if err := s.indexer.Delete(d.Object); err != nil {
- return err
- }
- s.processor.distribute(deleteNotification{oldObj: d.Object}, false)
- }
- }
- return nil
-}
-
-type sharedProcessor struct {
- listenersLock sync.RWMutex
- listeners []*processorListener
- syncingListeners []*processorListener
- clock clock.Clock
- wg wait.Group
-}
-
-func (p *sharedProcessor) addAndStartListener(listener *processorListener) {
- p.listenersLock.Lock()
- defer p.listenersLock.Unlock()
-
- p.addListenerLocked(listener)
- p.wg.Start(listener.run)
- p.wg.Start(listener.pop)
-}
-
-func (p *sharedProcessor) addListener(listener *processorListener) {
- p.listenersLock.Lock()
- defer p.listenersLock.Unlock()
-
- p.addListenerLocked(listener)
-}
-
-func (p *sharedProcessor) addListenerLocked(listener *processorListener) {
- p.listeners = append(p.listeners, listener)
- p.syncingListeners = append(p.syncingListeners, listener)
-}
-
-func (p *sharedProcessor) distribute(obj interface{}, sync bool) {
- p.listenersLock.RLock()
- defer p.listenersLock.RUnlock()
-
- if sync {
- for _, listener := range p.syncingListeners {
- listener.add(obj)
- }
- } else {
- for _, listener := range p.listeners {
- listener.add(obj)
- }
- }
-}
-
-func (p *sharedProcessor) run(stopCh <-chan struct{}) {
- func() {
- p.listenersLock.RLock()
- defer p.listenersLock.RUnlock()
- for _, listener := range p.listeners {
- p.wg.Start(listener.run)
- p.wg.Start(listener.pop)
- }
- }()
- <-stopCh
- p.listenersLock.RLock()
- defer p.listenersLock.RUnlock()
- for _, listener := range p.listeners {
- close(listener.addCh) // Tell .pop() to stop. .pop() will tell .run() to stop
- }
- p.wg.Wait() // Wait for all .pop() and .run() to stop
-}
-
-// shouldResync queries every listener to determine if any of them need a resync, based on each
-// listener's resyncPeriod.
-func (p *sharedProcessor) shouldResync() bool {
- p.listenersLock.Lock()
- defer p.listenersLock.Unlock()
-
- p.syncingListeners = []*processorListener{}
-
- resyncNeeded := false
- now := p.clock.Now()
- for _, listener := range p.listeners {
- // need to loop through all the listeners to see if they need to resync so we can prepare any
- // listeners that are going to be resyncing.
- if listener.shouldResync(now) {
- resyncNeeded = true
- p.syncingListeners = append(p.syncingListeners, listener)
- listener.determineNextResync(now)
- }
- }
- return resyncNeeded
-}
-
-func (p *sharedProcessor) resyncCheckPeriodChanged(resyncCheckPeriod time.Duration) {
- p.listenersLock.RLock()
- defer p.listenersLock.RUnlock()
-
- for _, listener := range p.listeners {
- resyncPeriod := determineResyncPeriod(listener.requestedResyncPeriod, resyncCheckPeriod)
- listener.setResyncPeriod(resyncPeriod)
- }
-}
-
-type processorListener struct {
- nextCh chan interface{}
- addCh chan interface{}
-
- handler ResourceEventHandler
-
- // pendingNotifications is an unbounded ring buffer that holds all notifications not yet distributed.
- // There is one per listener, but a failing/stalled listener will have infinite pendingNotifications
- // added until we OOM.
- // TODO: This is no worse than before, since reflectors were backed by unbounded DeltaFIFOs, but
- // we should try to do something better.
- pendingNotifications buffer.RingGrowing
-
- // requestedResyncPeriod is how frequently the listener wants a full resync from the shared informer
- requestedResyncPeriod time.Duration
- // resyncPeriod is how frequently the listener wants a full resync from the shared informer. This
- // value may differ from requestedResyncPeriod if the shared informer adjusts it to align with the
- // informer's overall resync check period.
- resyncPeriod time.Duration
- // nextResync is the earliest time the listener should get a full resync
- nextResync time.Time
- // resyncLock guards access to resyncPeriod and nextResync
- resyncLock sync.Mutex
-}
-
-func newProcessListener(handler ResourceEventHandler, requestedResyncPeriod, resyncPeriod time.Duration, now time.Time, bufferSize int) *processorListener {
- ret := &processorListener{
- nextCh: make(chan interface{}),
- addCh: make(chan interface{}),
- handler: handler,
- pendingNotifications: *buffer.NewRingGrowing(bufferSize),
- requestedResyncPeriod: requestedResyncPeriod,
- resyncPeriod: resyncPeriod,
- }
-
- ret.determineNextResync(now)
-
- return ret
-}
-
-func (p *processorListener) add(notification interface{}) {
- p.addCh <- notification
-}
-
-func (p *processorListener) pop() {
- defer utilruntime.HandleCrash()
- defer close(p.nextCh) // Tell .run() to stop
-
- var nextCh chan<- interface{}
- var notification interface{}
- for {
- select {
- case nextCh <- notification:
- // Notification dispatched
- var ok bool
- notification, ok = p.pendingNotifications.ReadOne()
- if !ok { // Nothing to pop
- nextCh = nil // Disable this select case
- }
- case notificationToAdd, ok := <-p.addCh:
- if !ok {
- return
- }
- if notification == nil { // No notification to pop (and pendingNotifications is empty)
- // Optimize the case - skip adding to pendingNotifications
- notification = notificationToAdd
- nextCh = p.nextCh
- } else { // There is already a notification waiting to be dispatched
- p.pendingNotifications.WriteOne(notificationToAdd)
- }
- }
- }
-}
-
-func (p *processorListener) run() {
- // this call blocks until the channel is closed. When a panic happens during the notification
- // we will catch it, **the offending item will be skipped!**, and after a short delay (one second)
- // the next notification will be attempted. This is usually better than the alternative of never
- // delivering again.
- stopCh := make(chan struct{})
- wait.Until(func() {
- // this gives us a few quick retries before a long pause and then a few more quick retries
- err := wait.ExponentialBackoff(retry.DefaultRetry, func() (bool, error) {
- for next := range p.nextCh {
- switch notification := next.(type) {
- case updateNotification:
- p.handler.OnUpdate(notification.oldObj, notification.newObj)
- case addNotification:
- p.handler.OnAdd(notification.newObj)
- case deleteNotification:
- p.handler.OnDelete(notification.oldObj)
- default:
- utilruntime.HandleError(fmt.Errorf("unrecognized notification: %#v", next))
- }
- }
- // the only way to get here is if the p.nextCh is empty and closed
- return true, nil
- })
-
- // the only way to get here is if the p.nextCh is empty and closed
- if err == nil {
- close(stopCh)
- }
- }, 1*time.Minute, stopCh)
-}
-
-// shouldResync deterimines if the listener needs a resync. If the listener's resyncPeriod is 0,
-// this always returns false.
-func (p *processorListener) shouldResync(now time.Time) bool {
- p.resyncLock.Lock()
- defer p.resyncLock.Unlock()
-
- if p.resyncPeriod == 0 {
- return false
- }
-
- return now.After(p.nextResync) || now.Equal(p.nextResync)
-}
-
-func (p *processorListener) determineNextResync(now time.Time) {
- p.resyncLock.Lock()
- defer p.resyncLock.Unlock()
-
- p.nextResync = now.Add(p.resyncPeriod)
-}
-
-func (p *processorListener) setResyncPeriod(resyncPeriod time.Duration) {
- p.resyncLock.Lock()
- defer p.resyncLock.Unlock()
-
- p.resyncPeriod = resyncPeriod
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/store.go b/vendor/k8s.io/client-go/tools/cache/store.go
deleted file mode 100755
index 4958987f0..000000000
--- a/vendor/k8s.io/client-go/tools/cache/store.go
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
-Copyright 2014 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 cache
-
-import (
- "fmt"
- "strings"
-
- "k8s.io/apimachinery/pkg/api/meta"
-)
-
-// Store is a generic object storage interface. Reflector knows how to watch a server
-// and update a store. A generic store is provided, which allows Reflector to be used
-// as a local caching system, and an LRU store, which allows Reflector to work like a
-// queue of items yet to be processed.
-//
-// Store makes no assumptions about stored object identity; it is the responsibility
-// of a Store implementation to provide a mechanism to correctly key objects and to
-// define the contract for obtaining objects by some arbitrary key type.
-type Store interface {
- Add(obj interface{}) error
- Update(obj interface{}) error
- Delete(obj interface{}) error
- List() []interface{}
- ListKeys() []string
- Get(obj interface{}) (item interface{}, exists bool, err error)
- GetByKey(key string) (item interface{}, exists bool, err error)
-
- // Replace will delete the contents of the store, using instead the
- // given list. Store takes ownership of the list, you should not reference
- // it after calling this function.
- Replace([]interface{}, string) error
- Resync() error
-}
-
-// KeyFunc knows how to make a key from an object. Implementations should be deterministic.
-type KeyFunc func(obj interface{}) (string, error)
-
-// KeyError will be returned any time a KeyFunc gives an error; it includes the object
-// at fault.
-type KeyError struct {
- Obj interface{}
- Err error
-}
-
-// Error gives a human-readable description of the error.
-func (k KeyError) Error() string {
- return fmt.Sprintf("couldn't create key for object %+v: %v", k.Obj, k.Err)
-}
-
-// ExplicitKey can be passed to MetaNamespaceKeyFunc if you have the key for
-// the object but not the object itself.
-type ExplicitKey string
-
-// MetaNamespaceKeyFunc is a convenient default KeyFunc which knows how to make
-// keys for API objects which implement meta.Interface.
-// The key uses the format <namespace>/<name> unless <namespace> is empty, then
-// it's just <name>.
-//
-// TODO: replace key-as-string with a key-as-struct so that this
-// packing/unpacking won't be necessary.
-func MetaNamespaceKeyFunc(obj interface{}) (string, error) {
- if key, ok := obj.(ExplicitKey); ok {
- return string(key), nil
- }
- meta, err := meta.Accessor(obj)
- if err != nil {
- return "", fmt.Errorf("object has no meta: %v", err)
- }
- if len(meta.GetNamespace()) > 0 {
- return meta.GetNamespace() + "/" + meta.GetName(), nil
- }
- return meta.GetName(), nil
-}
-
-// SplitMetaNamespaceKey returns the namespace and name that
-// MetaNamespaceKeyFunc encoded into key.
-//
-// TODO: replace key-as-string with a key-as-struct so that this
-// packing/unpacking won't be necessary.
-func SplitMetaNamespaceKey(key string) (namespace, name string, err error) {
- parts := strings.Split(key, "/")
- switch len(parts) {
- case 1:
- // name only, no namespace
- return "", parts[0], nil
- case 2:
- // namespace and name
- return parts[0], parts[1], nil
- }
-
- return "", "", fmt.Errorf("unexpected key format: %q", key)
-}
-
-// cache responsibilities are limited to:
-// 1. Computing keys for objects via keyFunc
-// 2. Invoking methods of a ThreadSafeStorage interface
-type cache struct {
- // cacheStorage bears the burden of thread safety for the cache
- cacheStorage ThreadSafeStore
- // keyFunc is used to make the key for objects stored in and retrieved from items, and
- // should be deterministic.
- keyFunc KeyFunc
-}
-
-var _ Store = &cache{}
-
-// Add inserts an item into the cache.
-func (c *cache) Add(obj interface{}) error {
- key, err := c.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- c.cacheStorage.Add(key, obj)
- return nil
-}
-
-// Update sets an item in the cache to its updated state.
-func (c *cache) Update(obj interface{}) error {
- key, err := c.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- c.cacheStorage.Update(key, obj)
- return nil
-}
-
-// Delete removes an item from the cache.
-func (c *cache) Delete(obj interface{}) error {
- key, err := c.keyFunc(obj)
- if err != nil {
- return KeyError{obj, err}
- }
- c.cacheStorage.Delete(key)
- return nil
-}
-
-// List returns a list of all the items.
-// List is completely threadsafe as long as you treat all items as immutable.
-func (c *cache) List() []interface{} {
- return c.cacheStorage.List()
-}
-
-// ListKeys returns a list of all the keys of the objects currently
-// in the cache.
-func (c *cache) ListKeys() []string {
- return c.cacheStorage.ListKeys()
-}
-
-// GetIndexers returns the indexers of cache
-func (c *cache) GetIndexers() Indexers {
- return c.cacheStorage.GetIndexers()
-}
-
-// Index returns a list of items that match on the index function
-// Index is thread-safe so long as you treat all items as immutable
-func (c *cache) Index(indexName string, obj interface{}) ([]interface{}, error) {
- return c.cacheStorage.Index(indexName, obj)
-}
-
-func (c *cache) IndexKeys(indexName, indexKey string) ([]string, error) {
- return c.cacheStorage.IndexKeys(indexName, indexKey)
-}
-
-// ListIndexFuncValues returns the list of generated values of an Index func
-func (c *cache) ListIndexFuncValues(indexName string) []string {
- return c.cacheStorage.ListIndexFuncValues(indexName)
-}
-
-func (c *cache) ByIndex(indexName, indexKey string) ([]interface{}, error) {
- return c.cacheStorage.ByIndex(indexName, indexKey)
-}
-
-func (c *cache) AddIndexers(newIndexers Indexers) error {
- return c.cacheStorage.AddIndexers(newIndexers)
-}
-
-// Get returns the requested item, or sets exists=false.
-// Get is completely threadsafe as long as you treat all items as immutable.
-func (c *cache) Get(obj interface{}) (item interface{}, exists bool, err error) {
- key, err := c.keyFunc(obj)
- if err != nil {
- return nil, false, KeyError{obj, err}
- }
- return c.GetByKey(key)
-}
-
-// GetByKey returns the request item, or exists=false.
-// GetByKey is completely threadsafe as long as you treat all items as immutable.
-func (c *cache) GetByKey(key string) (item interface{}, exists bool, err error) {
- item, exists = c.cacheStorage.Get(key)
- return item, exists, nil
-}
-
-// Replace will delete the contents of 'c', using instead the given list.
-// 'c' takes ownership of the list, you should not reference the list again
-// after calling this function.
-func (c *cache) Replace(list []interface{}, resourceVersion string) error {
- items := map[string]interface{}{}
- for _, item := range list {
- key, err := c.keyFunc(item)
- if err != nil {
- return KeyError{item, err}
- }
- items[key] = item
- }
- c.cacheStorage.Replace(items, resourceVersion)
- return nil
-}
-
-// Resync touches all items in the store to force processing
-func (c *cache) Resync() error {
- return c.cacheStorage.Resync()
-}
-
-// NewStore returns a Store implemented simply with a map and a lock.
-func NewStore(keyFunc KeyFunc) Store {
- return &cache{
- cacheStorage: NewThreadSafeStore(Indexers{}, Indices{}),
- keyFunc: keyFunc,
- }
-}
-
-// NewIndexer returns an Indexer implemented simply with a map and a lock.
-func NewIndexer(keyFunc KeyFunc, indexers Indexers) Indexer {
- return &cache{
- cacheStorage: NewThreadSafeStore(indexers, Indices{}),
- keyFunc: keyFunc,
- }
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go b/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go
deleted file mode 100644
index 1c201efb6..000000000
--- a/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
-Copyright 2014 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 cache
-
-import (
- "fmt"
- "sync"
-
- "k8s.io/apimachinery/pkg/util/sets"
-)
-
-// ThreadSafeStore is an interface that allows concurrent access to a storage backend.
-// TL;DR caveats: you must not modify anything returned by Get or List as it will break
-// the indexing feature in addition to not being thread safe.
-//
-// The guarantees of thread safety provided by List/Get are only valid if the caller
-// treats returned items as read-only. For example, a pointer inserted in the store
-// through `Add` will be returned as is by `Get`. Multiple clients might invoke `Get`
-// on the same key and modify the pointer in a non-thread-safe way. Also note that
-// modifying objects stored by the indexers (if any) will *not* automatically lead
-// to a re-index. So it's not a good idea to directly modify the objects returned by
-// Get/List, in general.
-type ThreadSafeStore interface {
- Add(key string, obj interface{})
- Update(key string, obj interface{})
- Delete(key string)
- Get(key string) (item interface{}, exists bool)
- List() []interface{}
- ListKeys() []string
- Replace(map[string]interface{}, string)
- Index(indexName string, obj interface{}) ([]interface{}, error)
- IndexKeys(indexName, indexKey string) ([]string, error)
- ListIndexFuncValues(name string) []string
- ByIndex(indexName, indexKey string) ([]interface{}, error)
- GetIndexers() Indexers
-
- // AddIndexers adds more indexers to this store. If you call this after you already have data
- // in the store, the results are undefined.
- AddIndexers(newIndexers Indexers) error
- Resync() error
-}
-
-// threadSafeMap implements ThreadSafeStore
-type threadSafeMap struct {
- lock sync.RWMutex
- items map[string]interface{}
-
- // indexers maps a name to an IndexFunc
- indexers Indexers
- // indices maps a name to an Index
- indices Indices
-}
-
-func (c *threadSafeMap) Add(key string, obj interface{}) {
- c.lock.Lock()
- defer c.lock.Unlock()
- oldObject := c.items[key]
- c.items[key] = obj
- c.updateIndices(oldObject, obj, key)
-}
-
-func (c *threadSafeMap) Update(key string, obj interface{}) {
- c.lock.Lock()
- defer c.lock.Unlock()
- oldObject := c.items[key]
- c.items[key] = obj
- c.updateIndices(oldObject, obj, key)
-}
-
-func (c *threadSafeMap) Delete(key string) {
- c.lock.Lock()
- defer c.lock.Unlock()
- if obj, exists := c.items[key]; exists {
- c.deleteFromIndices(obj, key)
- delete(c.items, key)
- }
-}
-
-func (c *threadSafeMap) Get(key string) (item interface{}, exists bool) {
- c.lock.RLock()
- defer c.lock.RUnlock()
- item, exists = c.items[key]
- return item, exists
-}
-
-func (c *threadSafeMap) List() []interface{} {
- c.lock.RLock()
- defer c.lock.RUnlock()
- list := make([]interface{}, 0, len(c.items))
- for _, item := range c.items {
- list = append(list, item)
- }
- return list
-}
-
-// ListKeys returns a list of all the keys of the objects currently
-// in the threadSafeMap.
-func (c *threadSafeMap) ListKeys() []string {
- c.lock.RLock()
- defer c.lock.RUnlock()
- list := make([]string, 0, len(c.items))
- for key := range c.items {
- list = append(list, key)
- }
- return list
-}
-
-func (c *threadSafeMap) Replace(items map[string]interface{}, resourceVersion string) {
- c.lock.Lock()
- defer c.lock.Unlock()
- c.items = items
-
- // rebuild any index
- c.indices = Indices{}
- for key, item := range c.items {
- c.updateIndices(nil, item, key)
- }
-}
-
-// Index returns a list of items that match on the index function
-// Index is thread-safe so long as you treat all items as immutable
-func (c *threadSafeMap) Index(indexName string, obj interface{}) ([]interface{}, error) {
- c.lock.RLock()
- defer c.lock.RUnlock()
-
- indexFunc := c.indexers[indexName]
- if indexFunc == nil {
- return nil, fmt.Errorf("Index with name %s does not exist", indexName)
- }
-
- indexKeys, err := indexFunc(obj)
- if err != nil {
- return nil, err
- }
- index := c.indices[indexName]
-
- // need to de-dupe the return list. Since multiple keys are allowed, this can happen.
- returnKeySet := sets.String{}
- for _, indexKey := range indexKeys {
- set := index[indexKey]
- for _, key := range set.UnsortedList() {
- returnKeySet.Insert(key)
- }
- }
-
- list := make([]interface{}, 0, returnKeySet.Len())
- for absoluteKey := range returnKeySet {
- list = append(list, c.items[absoluteKey])
- }
- return list, nil
-}
-
-// ByIndex returns a list of items that match an exact value on the index function
-func (c *threadSafeMap) ByIndex(indexName, indexKey string) ([]interface{}, error) {
- c.lock.RLock()
- defer c.lock.RUnlock()
-
- indexFunc := c.indexers[indexName]
- if indexFunc == nil {
- return nil, fmt.Errorf("Index with name %s does not exist", indexName)
- }
-
- index := c.indices[indexName]
-
- set := index[indexKey]
- list := make([]interface{}, 0, set.Len())
- for _, key := range set.List() {
- list = append(list, c.items[key])
- }
-
- return list, nil
-}
-
-// IndexKeys returns a list of keys that match on the index function.
-// IndexKeys is thread-safe so long as you treat all items as immutable.
-func (c *threadSafeMap) IndexKeys(indexName, indexKey string) ([]string, error) {
- c.lock.RLock()
- defer c.lock.RUnlock()
-
- indexFunc := c.indexers[indexName]
- if indexFunc == nil {
- return nil, fmt.Errorf("Index with name %s does not exist", indexName)
- }
-
- index := c.indices[indexName]
-
- set := index[indexKey]
- return set.List(), nil
-}
-
-func (c *threadSafeMap) ListIndexFuncValues(indexName string) []string {
- c.lock.RLock()
- defer c.lock.RUnlock()
-
- index := c.indices[indexName]
- names := make([]string, 0, len(index))
- for key := range index {
- names = append(names, key)
- }
- return names
-}
-
-func (c *threadSafeMap) GetIndexers() Indexers {
- return c.indexers
-}
-
-func (c *threadSafeMap) AddIndexers(newIndexers Indexers) error {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- if len(c.items) > 0 {
- return fmt.Errorf("cannot add indexers to running index")
- }
-
- oldKeys := sets.StringKeySet(c.indexers)
- newKeys := sets.StringKeySet(newIndexers)
-
- if oldKeys.HasAny(newKeys.List()...) {
- return fmt.Errorf("indexer conflict: %v", oldKeys.Intersection(newKeys))
- }
-
- for k, v := range newIndexers {
- c.indexers[k] = v
- }
- return nil
-}
-
-// updateIndices modifies the objects location in the managed indexes, if this is an update, you must provide an oldObj
-// updateIndices must be called from a function that already has a lock on the cache
-func (c *threadSafeMap) updateIndices(oldObj interface{}, newObj interface{}, key string) {
- // if we got an old object, we need to remove it before we add it again
- if oldObj != nil {
- c.deleteFromIndices(oldObj, key)
- }
- for name, indexFunc := range c.indexers {
- indexValues, err := indexFunc(newObj)
- if err != nil {
- panic(fmt.Errorf("unable to calculate an index entry for key %q on index %q: %v", key, name, err))
- }
- index := c.indices[name]
- if index == nil {
- index = Index{}
- c.indices[name] = index
- }
-
- for _, indexValue := range indexValues {
- set := index[indexValue]
- if set == nil {
- set = sets.String{}
- index[indexValue] = set
- }
- set.Insert(key)
- }
- }
-}
-
-// deleteFromIndices removes the object from each of the managed indexes
-// it is intended to be called from a function that already has a lock on the cache
-func (c *threadSafeMap) deleteFromIndices(obj interface{}, key string) {
- for name, indexFunc := range c.indexers {
- indexValues, err := indexFunc(obj)
- if err != nil {
- panic(fmt.Errorf("unable to calculate an index entry for key %q on index %q: %v", key, name, err))
- }
-
- index := c.indices[name]
- if index == nil {
- continue
- }
- for _, indexValue := range indexValues {
- set := index[indexValue]
- if set != nil {
- set.Delete(key)
- }
- }
- }
-}
-
-func (c *threadSafeMap) Resync() error {
- // Nothing to do
- return nil
-}
-
-func NewThreadSafeStore(indexers Indexers, indices Indices) ThreadSafeStore {
- return &threadSafeMap{
- items: map[string]interface{}{},
- indexers: indexers,
- indices: indices,
- }
-}
diff --git a/vendor/k8s.io/client-go/tools/cache/undelta_store.go b/vendor/k8s.io/client-go/tools/cache/undelta_store.go
deleted file mode 100644
index 117df46c4..000000000
--- a/vendor/k8s.io/client-go/tools/cache/undelta_store.go
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-Copyright 2015 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 cache
-
-// UndeltaStore listens to incremental updates and sends complete state on every change.
-// It implements the Store interface so that it can receive a stream of mirrored objects
-// from Reflector. Whenever it receives any complete (Store.Replace) or incremental change
-// (Store.Add, Store.Update, Store.Delete), it sends the complete state by calling PushFunc.
-// It is thread-safe. It guarantees that every change (Add, Update, Replace, Delete) results
-// in one call to PushFunc, but sometimes PushFunc may be called twice with the same values.
-// PushFunc should be thread safe.
-type UndeltaStore struct {
- Store
- PushFunc func([]interface{})
-}
-
-// Assert that it implements the Store interface.
-var _ Store = &UndeltaStore{}
-
-// Note about thread safety. The Store implementation (cache.cache) uses a lock for all methods.
-// In the functions below, the lock gets released and reacquired betweend the {Add,Delete,etc}
-// and the List. So, the following can happen, resulting in two identical calls to PushFunc.
-// time thread 1 thread 2
-// 0 UndeltaStore.Add(a)
-// 1 UndeltaStore.Add(b)
-// 2 Store.Add(a)
-// 3 Store.Add(b)
-// 4 Store.List() -> [a,b]
-// 5 Store.List() -> [a,b]
-
-func (u *UndeltaStore) Add(obj interface{}) error {
- if err := u.Store.Add(obj); err != nil {
- return err
- }
- u.PushFunc(u.Store.List())
- return nil
-}
-
-func (u *UndeltaStore) Update(obj interface{}) error {
- if err := u.Store.Update(obj); err != nil {
- return err
- }
- u.PushFunc(u.Store.List())
- return nil
-}
-
-func (u *UndeltaStore) Delete(obj interface{}) error {
- if err := u.Store.Delete(obj); err != nil {
- return err
- }
- u.PushFunc(u.Store.List())
- return nil
-}
-
-func (u *UndeltaStore) Replace(list []interface{}, resourceVersion string) error {
- if err := u.Store.Replace(list, resourceVersion); err != nil {
- return err
- }
- u.PushFunc(u.Store.List())
- return nil
-}
-
-// NewUndeltaStore returns an UndeltaStore implemented with a Store.
-func NewUndeltaStore(pushFunc func([]interface{}), keyFunc KeyFunc) *UndeltaStore {
- return &UndeltaStore{
- Store: NewStore(keyFunc),
- PushFunc: pushFunc,
- }
-}
diff --git a/vendor/k8s.io/client-go/tools/pager/pager.go b/vendor/k8s.io/client-go/tools/pager/pager.go
deleted file mode 100644
index 2e0874e0e..000000000
--- a/vendor/k8s.io/client-go/tools/pager/pager.go
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-Copyright 2017 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 pager
-
-import (
- "fmt"
-
- "golang.org/x/net/context"
-
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/api/meta"
- metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
-)
-
-const defaultPageSize = 500
-
-// ListPageFunc returns a list object for the given list options.
-type ListPageFunc func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error)
-
-// SimplePageFunc adapts a context-less list function into one that accepts a context.
-func SimplePageFunc(fn func(opts metav1.ListOptions) (runtime.Object, error)) ListPageFunc {
- return func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) {
- return fn(opts)
- }
-}
-
-// ListPager assists client code in breaking large list queries into multiple
-// smaller chunks of PageSize or smaller. PageFn is expected to accept a
-// metav1.ListOptions that supports paging and return a list. The pager does
-// not alter the field or label selectors on the initial options list.
-type ListPager struct {
- PageSize int64
- PageFn ListPageFunc
-
- FullListIfExpired bool
-}
-
-// New creates a new pager from the provided pager function using the default
-// options. It will fall back to a full list if an expiration error is encountered
-// as a last resort.
-func New(fn ListPageFunc) *ListPager {
- return &ListPager{
- PageSize: defaultPageSize,
- PageFn: fn,
- FullListIfExpired: true,
- }
-}
-
-// TODO: introduce other types of paging functions - such as those that retrieve from a list
-// of namespaces.
-
-// List returns a single list object, but attempts to retrieve smaller chunks from the
-// server to reduce the impact on the server. If the chunk attempt fails, it will load
-// the full list instead. The Limit field on options, if unset, will default to the page size.
-func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
- if options.Limit == 0 {
- options.Limit = p.PageSize
- }
- var list *metainternalversion.List
- for {
- obj, err := p.PageFn(ctx, options)
- if err != nil {
- if !errors.IsResourceExpired(err) || !p.FullListIfExpired {
- return nil, err
- }
- // the list expired while we were processing, fall back to a full list
- options.Limit = 0
- options.Continue = ""
- return p.PageFn(ctx, options)
- }
- m, err := meta.ListAccessor(obj)
- if err != nil {
- return nil, fmt.Errorf("returned object must be a list: %v", err)
- }
-
- // exit early and return the object we got if we haven't processed any pages
- if len(m.GetContinue()) == 0 && list == nil {
- return obj, nil
- }
-
- // initialize the list and fill its contents
- if list == nil {
- list = &metainternalversion.List{Items: make([]runtime.Object, 0, options.Limit+1)}
- list.ResourceVersion = m.GetResourceVersion()
- list.SelfLink = m.GetSelfLink()
- }
- if err := meta.EachListItem(obj, func(obj runtime.Object) error {
- list.Items = append(list.Items, obj)
- return nil
- }); err != nil {
- return nil, err
- }
-
- // if we have no more items, return the list
- if len(m.GetContinue()) == 0 {
- return list, nil
- }
-
- // set the next loop up
- options.Continue = m.GetContinue()
- }
-}
diff --git a/vendor/k8s.io/client-go/tools/record/doc.go b/vendor/k8s.io/client-go/tools/record/doc.go
deleted file mode 100644
index 657ddecbc..000000000
--- a/vendor/k8s.io/client-go/tools/record/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2014 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 record has all client logic for recording and reporting events.
-package record // import "k8s.io/client-go/tools/record"
diff --git a/vendor/k8s.io/client-go/tools/record/event.go b/vendor/k8s.io/client-go/tools/record/event.go
deleted file mode 100644
index b5ec44650..000000000
--- a/vendor/k8s.io/client-go/tools/record/event.go
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
-Copyright 2014 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 record
-
-import (
- "fmt"
- "math/rand"
- "time"
-
- "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/clock"
- utilruntime "k8s.io/apimachinery/pkg/util/runtime"
- "k8s.io/apimachinery/pkg/watch"
- restclient "k8s.io/client-go/rest"
- ref "k8s.io/client-go/tools/reference"
-
- "net/http"
-
- "github.com/golang/glog"
-)
-
-const maxTriesPerEvent = 12
-
-var defaultSleepDuration = 10 * time.Second
-
-const maxQueuedEvents = 1000
-
-// EventSink knows how to store events (client.Client implements it.)
-// EventSink must respect the namespace that will be embedded in 'event'.
-// It is assumed that EventSink will return the same sorts of errors as
-// pkg/client's REST client.
-type EventSink interface {
- Create(event *v1.Event) (*v1.Event, error)
- Update(event *v1.Event) (*v1.Event, error)
- Patch(oldEvent *v1.Event, data []byte) (*v1.Event, error)
-}
-
-// EventRecorder knows how to record events on behalf of an EventSource.
-type EventRecorder interface {
- // Event constructs an event from the given information and puts it in the queue for sending.
- // 'object' is the object this event is about. Event will make a reference-- or you may also
- // pass a reference to the object directly.
- // 'type' of this event, and can be one of Normal, Warning. New types could be added in future
- // 'reason' is the reason this event is generated. 'reason' should be short and unique; it
- // should be in UpperCamelCase format (starting with a capital letter). "reason" will be used
- // to automate handling of events, so imagine people writing switch statements to handle them.
- // You want to make that easy.
- // 'message' is intended to be human readable.
- //
- // The resulting event will be created in the same namespace as the reference object.
- Event(object runtime.Object, eventtype, reason, message string)
-
- // Eventf is just like Event, but with Sprintf for the message field.
- Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{})
-
- // PastEventf is just like Eventf, but with an option to specify the event's 'timestamp' field.
- PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{})
-}
-
-// EventBroadcaster knows how to receive events and send them to any EventSink, watcher, or log.
-type EventBroadcaster interface {
- // StartEventWatcher starts sending events received from this EventBroadcaster to the given
- // event handler function. The return value can be ignored or used to stop recording, if
- // desired.
- StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface
-
- // StartRecordingToSink starts sending events received from this EventBroadcaster to the given
- // sink. The return value can be ignored or used to stop recording, if desired.
- StartRecordingToSink(sink EventSink) watch.Interface
-
- // StartLogging starts sending events received from this EventBroadcaster to the given logging
- // function. The return value can be ignored or used to stop recording, if desired.
- StartLogging(logf func(format string, args ...interface{})) watch.Interface
-
- // NewRecorder returns an EventRecorder that can be used to send events to this EventBroadcaster
- // with the event source set to the given event source.
- NewRecorder(scheme *runtime.Scheme, source v1.EventSource) EventRecorder
-}
-
-// Creates a new event broadcaster.
-func NewBroadcaster() EventBroadcaster {
- return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), defaultSleepDuration}
-}
-
-func NewBroadcasterForTests(sleepDuration time.Duration) EventBroadcaster {
- return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), sleepDuration}
-}
-
-type eventBroadcasterImpl struct {
- *watch.Broadcaster
- sleepDuration time.Duration
-}
-
-// StartRecordingToSink starts sending events received from the specified eventBroadcaster to the given sink.
-// The return value can be ignored or used to stop recording, if desired.
-// TODO: make me an object with parameterizable queue length and retry interval
-func (eventBroadcaster *eventBroadcasterImpl) StartRecordingToSink(sink EventSink) watch.Interface {
- // The default math/rand package functions aren't thread safe, so create a
- // new Rand object for each StartRecording call.
- randGen := rand.New(rand.NewSource(time.Now().UnixNano()))
- eventCorrelator := NewEventCorrelator(clock.RealClock{})
- return eventBroadcaster.StartEventWatcher(
- func(event *v1.Event) {
- recordToSink(sink, event, eventCorrelator, randGen, eventBroadcaster.sleepDuration)
- })
-}
-
-func recordToSink(sink EventSink, event *v1.Event, eventCorrelator *EventCorrelator, randGen *rand.Rand, sleepDuration time.Duration) {
- // Make a copy before modification, because there could be multiple listeners.
- // Events are safe to copy like this.
- eventCopy := *event
- event = &eventCopy
- result, err := eventCorrelator.EventCorrelate(event)
- if err != nil {
- utilruntime.HandleError(err)
- }
- if result.Skip {
- return
- }
- tries := 0
- for {
- if recordEvent(sink, result.Event, result.Patch, result.Event.Count > 1, eventCorrelator) {
- break
- }
- tries++
- if tries >= maxTriesPerEvent {
- glog.Errorf("Unable to write event '%#v' (retry limit exceeded!)", event)
- break
- }
- // Randomize the first sleep so that various clients won't all be
- // synced up if the master goes down.
- if tries == 1 {
- time.Sleep(time.Duration(float64(sleepDuration) * randGen.Float64()))
- } else {
- time.Sleep(sleepDuration)
- }
- }
-}
-
-func isKeyNotFoundError(err error) bool {
- statusErr, _ := err.(*errors.StatusError)
-
- if statusErr != nil && statusErr.Status().Code == http.StatusNotFound {
- return true
- }
-
- return false
-}
-
-// recordEvent attempts to write event to a sink. It returns true if the event
-// was successfully recorded or discarded, false if it should be retried.
-// If updateExistingEvent is false, it creates a new event, otherwise it updates
-// existing event.
-func recordEvent(sink EventSink, event *v1.Event, patch []byte, updateExistingEvent bool, eventCorrelator *EventCorrelator) bool {
- var newEvent *v1.Event
- var err error
- if updateExistingEvent {
- newEvent, err = sink.Patch(event, patch)
- }
- // Update can fail because the event may have been removed and it no longer exists.
- if !updateExistingEvent || (updateExistingEvent && isKeyNotFoundError(err)) {
- // Making sure that ResourceVersion is empty on creation
- event.ResourceVersion = ""
- newEvent, err = sink.Create(event)
- }
- if err == nil {
- // we need to update our event correlator with the server returned state to handle name/resourceversion
- eventCorrelator.UpdateState(newEvent)
- return true
- }
-
- // If we can't contact the server, then hold everything while we keep trying.
- // Otherwise, something about the event is malformed and we should abandon it.
- switch err.(type) {
- case *restclient.RequestConstructionError:
- // We will construct the request the same next time, so don't keep trying.
- glog.Errorf("Unable to construct event '%#v': '%v' (will not retry!)", event, err)
- return true
- case *errors.StatusError:
- if errors.IsAlreadyExists(err) {
- glog.V(5).Infof("Server rejected event '%#v': '%v' (will not retry!)", event, err)
- } else {
- glog.Errorf("Server rejected event '%#v': '%v' (will not retry!)", event, err)
- }
- return true
- case *errors.UnexpectedObjectError:
- // We don't expect this; it implies the server's response didn't match a
- // known pattern. Go ahead and retry.
- default:
- // This case includes actual http transport errors. Go ahead and retry.
- }
- glog.Errorf("Unable to write event: '%v' (may retry after sleeping)", err)
- return false
-}
-
-// StartLogging starts sending events received from this EventBroadcaster to the given logging function.
-// The return value can be ignored or used to stop recording, if desired.
-func (eventBroadcaster *eventBroadcasterImpl) StartLogging(logf func(format string, args ...interface{})) watch.Interface {
- return eventBroadcaster.StartEventWatcher(
- func(e *v1.Event) {
- logf("Event(%#v): type: '%v' reason: '%v' %v", e.InvolvedObject, e.Type, e.Reason, e.Message)
- })
-}
-
-// StartEventWatcher starts sending events received from this EventBroadcaster to the given event handler function.
-// The return value can be ignored or used to stop recording, if desired.
-func (eventBroadcaster *eventBroadcasterImpl) StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface {
- watcher := eventBroadcaster.Watch()
- go func() {
- defer utilruntime.HandleCrash()
- for {
- watchEvent, open := <-watcher.ResultChan()
- if !open {
- return
- }
- event, ok := watchEvent.Object.(*v1.Event)
- if !ok {
- // This is all local, so there's no reason this should
- // ever happen.
- continue
- }
- eventHandler(event)
- }
- }()
- return watcher
-}
-
-// NewRecorder returns an EventRecorder that records events with the given event source.
-func (eventBroadcaster *eventBroadcasterImpl) NewRecorder(scheme *runtime.Scheme, source v1.EventSource) EventRecorder {
- return &recorderImpl{scheme, source, eventBroadcaster.Broadcaster, clock.RealClock{}}
-}
-
-type recorderImpl struct {
- scheme *runtime.Scheme
- source v1.EventSource
- *watch.Broadcaster
- clock clock.Clock
-}
-
-func (recorder *recorderImpl) generateEvent(object runtime.Object, timestamp metav1.Time, eventtype, reason, message string) {
- ref, err := ref.GetReference(recorder.scheme, object)
- if err != nil {
- glog.Errorf("Could not construct reference to: '%#v' due to: '%v'. Will not report event: '%v' '%v' '%v'", object, err, eventtype, reason, message)
- return
- }
-
- if !validateEventType(eventtype) {
- glog.Errorf("Unsupported event type: '%v'", eventtype)
- return
- }
-
- event := recorder.makeEvent(ref, eventtype, reason, message)
- event.Source = recorder.source
-
- go func() {
- // NOTE: events should be a non-blocking operation
- defer utilruntime.HandleCrash()
- recorder.Action(watch.Added, event)
- }()
-}
-
-func validateEventType(eventtype string) bool {
- switch eventtype {
- case v1.EventTypeNormal, v1.EventTypeWarning:
- return true
- }
- return false
-}
-
-func (recorder *recorderImpl) Event(object runtime.Object, eventtype, reason, message string) {
- recorder.generateEvent(object, metav1.Now(), eventtype, reason, message)
-}
-
-func (recorder *recorderImpl) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) {
- recorder.Event(object, eventtype, reason, fmt.Sprintf(messageFmt, args...))
-}
-
-func (recorder *recorderImpl) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) {
- recorder.generateEvent(object, timestamp, eventtype, reason, fmt.Sprintf(messageFmt, args...))
-}
-
-func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, eventtype, reason, message string) *v1.Event {
- t := metav1.Time{Time: recorder.clock.Now()}
- namespace := ref.Namespace
- if namespace == "" {
- namespace = metav1.NamespaceDefault
- }
- return &v1.Event{
- ObjectMeta: metav1.ObjectMeta{
- Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()),
- Namespace: namespace,
- },
- InvolvedObject: *ref,
- Reason: reason,
- Message: message,
- FirstTimestamp: t,
- LastTimestamp: t,
- Count: 1,
- Type: eventtype,
- }
-}
diff --git a/vendor/k8s.io/client-go/tools/record/events_cache.go b/vendor/k8s.io/client-go/tools/record/events_cache.go
deleted file mode 100644
index 6ac767c9f..000000000
--- a/vendor/k8s.io/client-go/tools/record/events_cache.go
+++ /dev/null
@@ -1,467 +0,0 @@
-/*
-Copyright 2015 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 record
-
-import (
- "encoding/json"
- "fmt"
- "strings"
- "sync"
- "time"
-
- "github.com/golang/groupcache/lru"
-
- "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/clock"
- "k8s.io/apimachinery/pkg/util/sets"
- "k8s.io/apimachinery/pkg/util/strategicpatch"
- "k8s.io/client-go/util/flowcontrol"
-)
-
-const (
- maxLruCacheEntries = 4096
-
- // if we see the same event that varies only by message
- // more than 10 times in a 10 minute period, aggregate the event
- defaultAggregateMaxEvents = 10
- defaultAggregateIntervalInSeconds = 600
-
- // by default, allow a source to send 25 events about an object
- // but control the refill rate to 1 new event every 5 minutes
- // this helps control the long-tail of events for things that are always
- // unhealthy
- defaultSpamBurst = 25
- defaultSpamQPS = 1. / 300.
-)
-
-// getEventKey builds unique event key based on source, involvedObject, reason, message
-func getEventKey(event *v1.Event) string {
- return strings.Join([]string{
- event.Source.Component,
- event.Source.Host,
- event.InvolvedObject.Kind,
- event.InvolvedObject.Namespace,
- event.InvolvedObject.Name,
- event.InvolvedObject.FieldPath,
- string(event.InvolvedObject.UID),
- event.InvolvedObject.APIVersion,
- event.Type,
- event.Reason,
- event.Message,
- },
- "")
-}
-
-// getSpamKey builds unique event key based on source, involvedObject
-func getSpamKey(event *v1.Event) string {
- return strings.Join([]string{
- event.Source.Component,
- event.Source.Host,
- event.InvolvedObject.Kind,
- event.InvolvedObject.Namespace,
- event.InvolvedObject.Name,
- string(event.InvolvedObject.UID),
- event.InvolvedObject.APIVersion,
- },
- "")
-}
-
-// EventFilterFunc is a function that returns true if the event should be skipped
-type EventFilterFunc func(event *v1.Event) bool
-
-// DefaultEventFilterFunc returns false for all incoming events
-func DefaultEventFilterFunc(event *v1.Event) bool {
- return false
-}
-
-// EventSourceObjectSpamFilter is responsible for throttling
-// the amount of events a source and object can produce.
-type EventSourceObjectSpamFilter struct {
- sync.RWMutex
-
- // the cache that manages last synced state
- cache *lru.Cache
-
- // burst is the amount of events we allow per source + object
- burst int
-
- // qps is the refill rate of the token bucket in queries per second
- qps float32
-
- // clock is used to allow for testing over a time interval
- clock clock.Clock
-}
-
-// NewEventSourceObjectSpamFilter allows burst events from a source about an object with the specified qps refill.
-func NewEventSourceObjectSpamFilter(lruCacheSize, burst int, qps float32, clock clock.Clock) *EventSourceObjectSpamFilter {
- return &EventSourceObjectSpamFilter{
- cache: lru.New(lruCacheSize),
- burst: burst,
- qps: qps,
- clock: clock,
- }
-}
-
-// spamRecord holds data used to perform spam filtering decisions.
-type spamRecord struct {
- // rateLimiter controls the rate of events about this object
- rateLimiter flowcontrol.RateLimiter
-}
-
-// Filter controls that a given source+object are not exceeding the allowed rate.
-func (f *EventSourceObjectSpamFilter) Filter(event *v1.Event) bool {
- var record spamRecord
-
- // controls our cached information about this event (source+object)
- eventKey := getSpamKey(event)
-
- // do we have a record of similar events in our cache?
- f.Lock()
- defer f.Unlock()
- value, found := f.cache.Get(eventKey)
- if found {
- record = value.(spamRecord)
- }
-
- // verify we have a rate limiter for this record
- if record.rateLimiter == nil {
- record.rateLimiter = flowcontrol.NewTokenBucketRateLimiterWithClock(f.qps, f.burst, f.clock)
- }
-
- // ensure we have available rate
- filter := !record.rateLimiter.TryAccept()
-
- // update the cache
- f.cache.Add(eventKey, record)
-
- return filter
-}
-
-// EventAggregatorKeyFunc is responsible for grouping events for aggregation
-// It returns a tuple of the following:
-// aggregateKey - key the identifies the aggregate group to bucket this event
-// localKey - key that makes this event in the local group
-type EventAggregatorKeyFunc func(event *v1.Event) (aggregateKey string, localKey string)
-
-// EventAggregatorByReasonFunc aggregates events by exact match on event.Source, event.InvolvedObject, event.Type and event.Reason
-func EventAggregatorByReasonFunc(event *v1.Event) (string, string) {
- return strings.Join([]string{
- event.Source.Component,
- event.Source.Host,
- event.InvolvedObject.Kind,
- event.InvolvedObject.Namespace,
- event.InvolvedObject.Name,
- string(event.InvolvedObject.UID),
- event.InvolvedObject.APIVersion,
- event.Type,
- event.Reason,
- },
- ""), event.Message
-}
-
-// EventAggregatorMessageFunc is responsible for producing an aggregation message
-type EventAggregatorMessageFunc func(event *v1.Event) string
-
-// EventAggregratorByReasonMessageFunc returns an aggregate message by prefixing the incoming message
-func EventAggregatorByReasonMessageFunc(event *v1.Event) string {
- return "(combined from similar events): " + event.Message
-}
-
-// EventAggregator identifies similar events and aggregates them into a single event
-type EventAggregator struct {
- sync.RWMutex
-
- // The cache that manages aggregation state
- cache *lru.Cache
-
- // The function that groups events for aggregation
- keyFunc EventAggregatorKeyFunc
-
- // The function that generates a message for an aggregate event
- messageFunc EventAggregatorMessageFunc
-
- // The maximum number of events in the specified interval before aggregation occurs
- maxEvents uint
-
- // The amount of time in seconds that must transpire since the last occurrence of a similar event before it's considered new
- maxIntervalInSeconds uint
-
- // clock is used to allow for testing over a time interval
- clock clock.Clock
-}
-
-// NewEventAggregator returns a new instance of an EventAggregator
-func NewEventAggregator(lruCacheSize int, keyFunc EventAggregatorKeyFunc, messageFunc EventAggregatorMessageFunc,
- maxEvents int, maxIntervalInSeconds int, clock clock.Clock) *EventAggregator {
- return &EventAggregator{
- cache: lru.New(lruCacheSize),
- keyFunc: keyFunc,
- messageFunc: messageFunc,
- maxEvents: uint(maxEvents),
- maxIntervalInSeconds: uint(maxIntervalInSeconds),
- clock: clock,
- }
-}
-
-// aggregateRecord holds data used to perform aggregation decisions
-type aggregateRecord struct {
- // we track the number of unique local keys we have seen in the aggregate set to know when to actually aggregate
- // if the size of this set exceeds the max, we know we need to aggregate
- localKeys sets.String
- // The last time at which the aggregate was recorded
- lastTimestamp metav1.Time
-}
-
-// EventAggregate checks if a similar event has been seen according to the
-// aggregation configuration (max events, max interval, etc) and returns:
-//
-// - The (potentially modified) event that should be created
-// - The cache key for the event, for correlation purposes. This will be set to
-// the full key for normal events, and to the result of
-// EventAggregatorMessageFunc for aggregate events.
-func (e *EventAggregator) EventAggregate(newEvent *v1.Event) (*v1.Event, string) {
- now := metav1.NewTime(e.clock.Now())
- var record aggregateRecord
- // eventKey is the full cache key for this event
- eventKey := getEventKey(newEvent)
- // aggregateKey is for the aggregate event, if one is needed.
- aggregateKey, localKey := e.keyFunc(newEvent)
-
- // Do we have a record of similar events in our cache?
- e.Lock()
- defer e.Unlock()
- value, found := e.cache.Get(aggregateKey)
- if found {
- record = value.(aggregateRecord)
- }
-
- // Is the previous record too old? If so, make a fresh one. Note: if we didn't
- // find a similar record, its lastTimestamp will be the zero value, so we
- // create a new one in that case.
- maxInterval := time.Duration(e.maxIntervalInSeconds) * time.Second
- interval := now.Time.Sub(record.lastTimestamp.Time)
- if interval > maxInterval {
- record = aggregateRecord{localKeys: sets.NewString()}
- }
-
- // Write the new event into the aggregation record and put it on the cache
- record.localKeys.Insert(localKey)
- record.lastTimestamp = now
- e.cache.Add(aggregateKey, record)
-
- // If we are not yet over the threshold for unique events, don't correlate them
- if uint(record.localKeys.Len()) < e.maxEvents {
- return newEvent, eventKey
- }
-
- // do not grow our local key set any larger than max
- record.localKeys.PopAny()
-
- // create a new aggregate event, and return the aggregateKey as the cache key
- // (so that it can be overwritten.)
- eventCopy := &v1.Event{
- ObjectMeta: metav1.ObjectMeta{
- Name: fmt.Sprintf("%v.%x", newEvent.InvolvedObject.Name, now.UnixNano()),
- Namespace: newEvent.Namespace,
- },
- Count: 1,
- FirstTimestamp: now,
- InvolvedObject: newEvent.InvolvedObject,
- LastTimestamp: now,
- Message: e.messageFunc(newEvent),
- Type: newEvent.Type,
- Reason: newEvent.Reason,
- Source: newEvent.Source,
- }
- return eventCopy, aggregateKey
-}
-
-// eventLog records data about when an event was observed
-type eventLog struct {
- // The number of times the event has occurred since first occurrence.
- count uint
-
- // The time at which the event was first recorded.
- firstTimestamp metav1.Time
-
- // The unique name of the first occurrence of this event
- name string
-
- // Resource version returned from previous interaction with server
- resourceVersion string
-}
-
-// eventLogger logs occurrences of an event
-type eventLogger struct {
- sync.RWMutex
- cache *lru.Cache
- clock clock.Clock
-}
-
-// newEventLogger observes events and counts their frequencies
-func newEventLogger(lruCacheEntries int, clock clock.Clock) *eventLogger {
- return &eventLogger{cache: lru.New(lruCacheEntries), clock: clock}
-}
-
-// eventObserve records an event, or updates an existing one if key is a cache hit
-func (e *eventLogger) eventObserve(newEvent *v1.Event, key string) (*v1.Event, []byte, error) {
- var (
- patch []byte
- err error
- )
- eventCopy := *newEvent
- event := &eventCopy
-
- e.Lock()
- defer e.Unlock()
-
- // Check if there is an existing event we should update
- lastObservation := e.lastEventObservationFromCache(key)
-
- // If we found a result, prepare a patch
- if lastObservation.count > 0 {
- // update the event based on the last observation so patch will work as desired
- event.Name = lastObservation.name
- event.ResourceVersion = lastObservation.resourceVersion
- event.FirstTimestamp = lastObservation.firstTimestamp
- event.Count = int32(lastObservation.count) + 1
-
- eventCopy2 := *event
- eventCopy2.Count = 0
- eventCopy2.LastTimestamp = metav1.NewTime(time.Unix(0, 0))
- eventCopy2.Message = ""
-
- newData, _ := json.Marshal(event)
- oldData, _ := json.Marshal(eventCopy2)
- patch, err = strategicpatch.CreateTwoWayMergePatch(oldData, newData, event)
- }
-
- // record our new observation
- e.cache.Add(
- key,
- eventLog{
- count: uint(event.Count),
- firstTimestamp: event.FirstTimestamp,
- name: event.Name,
- resourceVersion: event.ResourceVersion,
- },
- )
- return event, patch, err
-}
-
-// updateState updates its internal tracking information based on latest server state
-func (e *eventLogger) updateState(event *v1.Event) {
- key := getEventKey(event)
- e.Lock()
- defer e.Unlock()
- // record our new observation
- e.cache.Add(
- key,
- eventLog{
- count: uint(event.Count),
- firstTimestamp: event.FirstTimestamp,
- name: event.Name,
- resourceVersion: event.ResourceVersion,
- },
- )
-}
-
-// lastEventObservationFromCache returns the event from the cache, reads must be protected via external lock
-func (e *eventLogger) lastEventObservationFromCache(key string) eventLog {
- value, ok := e.cache.Get(key)
- if ok {
- observationValue, ok := value.(eventLog)
- if ok {
- return observationValue
- }
- }
- return eventLog{}
-}
-
-// EventCorrelator processes all incoming events and performs analysis to avoid overwhelming the system. It can filter all
-// incoming events to see if the event should be filtered from further processing. It can aggregate similar events that occur
-// frequently to protect the system from spamming events that are difficult for users to distinguish. It performs de-duplication
-// to ensure events that are observed multiple times are compacted into a single event with increasing counts.
-type EventCorrelator struct {
- // the function to filter the event
- filterFunc EventFilterFunc
- // the object that performs event aggregation
- aggregator *EventAggregator
- // the object that observes events as they come through
- logger *eventLogger
-}
-
-// EventCorrelateResult is the result of a Correlate
-type EventCorrelateResult struct {
- // the event after correlation
- Event *v1.Event
- // if provided, perform a strategic patch when updating the record on the server
- Patch []byte
- // if true, do no further processing of the event
- Skip bool
-}
-
-// NewEventCorrelator returns an EventCorrelator configured with default values.
-//
-// The EventCorrelator is responsible for event filtering, aggregating, and counting
-// prior to interacting with the API server to record the event.
-//
-// The default behavior is as follows:
-// * Aggregation is performed if a similar event is recorded 10 times in a
-// in a 10 minute rolling interval. A similar event is an event that varies only by
-// the Event.Message field. Rather than recording the precise event, aggregation
-// will create a new event whose message reports that it has combined events with
-// the same reason.
-// * Events are incrementally counted if the exact same event is encountered multiple
-// times.
-// * A source may burst 25 events about an object, but has a refill rate budget
-// per object of 1 event every 5 minutes to control long-tail of spam.
-func NewEventCorrelator(clock clock.Clock) *EventCorrelator {
- cacheSize := maxLruCacheEntries
- spamFilter := NewEventSourceObjectSpamFilter(cacheSize, defaultSpamBurst, defaultSpamQPS, clock)
- return &EventCorrelator{
- filterFunc: spamFilter.Filter,
- aggregator: NewEventAggregator(
- cacheSize,
- EventAggregatorByReasonFunc,
- EventAggregatorByReasonMessageFunc,
- defaultAggregateMaxEvents,
- defaultAggregateIntervalInSeconds,
- clock),
-
- logger: newEventLogger(cacheSize, clock),
- }
-}
-
-// EventCorrelate filters, aggregates, counts, and de-duplicates all incoming events
-func (c *EventCorrelator) EventCorrelate(newEvent *v1.Event) (*EventCorrelateResult, error) {
- if newEvent == nil {
- return nil, fmt.Errorf("event is nil")
- }
- aggregateEvent, ckey := c.aggregator.EventAggregate(newEvent)
- observedEvent, patch, err := c.logger.eventObserve(aggregateEvent, ckey)
- if c.filterFunc(observedEvent) {
- return &EventCorrelateResult{Skip: true}, nil
- }
- return &EventCorrelateResult{Event: observedEvent, Patch: patch}, err
-}
-
-// UpdateState based on the latest observed state from server
-func (c *EventCorrelator) UpdateState(event *v1.Event) {
- c.logger.updateState(event)
-}
diff --git a/vendor/k8s.io/client-go/tools/record/fake.go b/vendor/k8s.io/client-go/tools/record/fake.go
deleted file mode 100644
index c0e8eedbb..000000000
--- a/vendor/k8s.io/client-go/tools/record/fake.go
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-Copyright 2015 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 record
-
-import (
- "fmt"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
-)
-
-// FakeRecorder is used as a fake during tests. It is thread safe. It is usable
-// when created manually and not by NewFakeRecorder, however all events may be
-// thrown away in this case.
-type FakeRecorder struct {
- Events chan string
-}
-
-func (f *FakeRecorder) Event(object runtime.Object, eventtype, reason, message string) {
- if f.Events != nil {
- f.Events <- fmt.Sprintf("%s %s %s", eventtype, reason, message)
- }
-}
-
-func (f *FakeRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) {
- if f.Events != nil {
- f.Events <- fmt.Sprintf(eventtype+" "+reason+" "+messageFmt, args...)
- }
-}
-
-func (f *FakeRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) {
-}
-
-// NewFakeRecorder creates new fake event recorder with event channel with
-// buffer of given size.
-func NewFakeRecorder(bufferSize int) *FakeRecorder {
- return &FakeRecorder{
- Events: make(chan string, bufferSize),
- }
-}
diff --git a/vendor/k8s.io/client-go/tools/reference/ref.go b/vendor/k8s.io/client-go/tools/reference/ref.go
deleted file mode 100644
index 58b60fd5d..000000000
--- a/vendor/k8s.io/client-go/tools/reference/ref.go
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-Copyright 2014 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 reference
-
-import (
- "errors"
- "fmt"
- "net/url"
- "strings"
-
- "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/meta"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
-)
-
-var (
- // Errors that could be returned by GetReference.
- ErrNilObject = errors.New("can't reference a nil object")
- ErrNoSelfLink = errors.New("selfLink was empty, can't make reference")
-)
-
-// GetReference returns an ObjectReference which refers to the given
-// object, or an error if the object doesn't follow the conventions
-// that would allow this.
-// TODO: should take a meta.Interface see http://issue.k8s.io/7127
-func GetReference(scheme *runtime.Scheme, obj runtime.Object) (*v1.ObjectReference, error) {
- if obj == nil {
- return nil, ErrNilObject
- }
- if ref, ok := obj.(*v1.ObjectReference); ok {
- // Don't make a reference to a reference.
- return ref, nil
- }
-
- gvk := obj.GetObjectKind().GroupVersionKind()
-
- // if the object referenced is actually persisted, we can just get kind from meta
- // if we are building an object reference to something not yet persisted, we should fallback to scheme
- kind := gvk.Kind
- if len(kind) == 0 {
- // TODO: this is wrong
- gvks, _, err := scheme.ObjectKinds(obj)
- if err != nil {
- return nil, err
- }
- kind = gvks[0].Kind
- }
-
- // An object that implements only List has enough metadata to build a reference
- var listMeta metav1.Common
- objectMeta, err := meta.Accessor(obj)
- if err != nil {
- listMeta, err = meta.CommonAccessor(obj)
- if err != nil {
- return nil, err
- }
- } else {
- listMeta = objectMeta
- }
-
- // if the object referenced is actually persisted, we can also get version from meta
- version := gvk.GroupVersion().String()
- if len(version) == 0 {
- selfLink := listMeta.GetSelfLink()
- if len(selfLink) == 0 {
- return nil, ErrNoSelfLink
- }
- selfLinkUrl, err := url.Parse(selfLink)
- if err != nil {
- return nil, err
- }
- // example paths: /<prefix>/<version>/*
- parts := strings.Split(selfLinkUrl.Path, "/")
- if len(parts) < 3 {
- return nil, fmt.Errorf("unexpected self link format: '%v'; got version '%v'", selfLink, version)
- }
- version = parts[2]
- }
-
- // only has list metadata
- if objectMeta == nil {
- return &v1.ObjectReference{
- Kind: kind,
- APIVersion: version,
- ResourceVersion: listMeta.GetResourceVersion(),
- }, nil
- }
-
- return &v1.ObjectReference{
- Kind: kind,
- APIVersion: version,
- Name: objectMeta.GetName(),
- Namespace: objectMeta.GetNamespace(),
- UID: objectMeta.GetUID(),
- ResourceVersion: objectMeta.GetResourceVersion(),
- }, nil
-}
-
-// GetPartialReference is exactly like GetReference, but allows you to set the FieldPath.
-func GetPartialReference(scheme *runtime.Scheme, obj runtime.Object, fieldPath string) (*v1.ObjectReference, error) {
- ref, err := GetReference(scheme, obj)
- if err != nil {
- return nil, err
- }
- ref.FieldPath = fieldPath
- return ref, nil
-}
diff --git a/vendor/k8s.io/client-go/util/buffer/ring_growing.go b/vendor/k8s.io/client-go/util/buffer/ring_growing.go
deleted file mode 100644
index 86965a513..000000000
--- a/vendor/k8s.io/client-go/util/buffer/ring_growing.go
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-Copyright 2017 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 buffer
-
-// RingGrowing is a growing ring buffer.
-// Not thread safe.
-type RingGrowing struct {
- data []interface{}
- n int // Size of Data
- beg int // First available element
- readable int // Number of data items available
-}
-
-// NewRingGrowing constructs a new RingGrowing instance with provided parameters.
-func NewRingGrowing(initialSize int) *RingGrowing {
- return &RingGrowing{
- data: make([]interface{}, initialSize),
- n: initialSize,
- }
-}
-
-// ReadOne reads (consumes) first item from the buffer if it is available, otherwise returns false.
-func (r *RingGrowing) ReadOne() (data interface{}, ok bool) {
- if r.readable == 0 {
- return nil, false
- }
- r.readable--
- element := r.data[r.beg]
- r.data[r.beg] = nil // Remove reference to the object to help GC
- if r.beg == r.n-1 {
- // Was the last element
- r.beg = 0
- } else {
- r.beg++
- }
- return element, true
-}
-
-// WriteOne adds an item to the end of the buffer, growing it if it is full.
-func (r *RingGrowing) WriteOne(data interface{}) {
- if r.readable == r.n {
- // Time to grow
- newN := r.n * 2
- newData := make([]interface{}, newN)
- to := r.beg + r.readable
- if to <= r.n {
- copy(newData, r.data[r.beg:to])
- } else {
- copied := copy(newData, r.data[r.beg:])
- copy(newData[copied:], r.data[:(to%r.n)])
- }
- r.beg = 0
- r.data = newData
- r.n = newN
- }
- r.data[(r.readable+r.beg)%r.n] = data
- r.readable++
-}
diff --git a/vendor/k8s.io/client-go/util/retry/util.go b/vendor/k8s.io/client-go/util/retry/util.go
deleted file mode 100644
index 3ac0840ad..000000000
--- a/vendor/k8s.io/client-go/util/retry/util.go
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-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 retry
-
-import (
- "time"
-
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/util/wait"
-)
-
-// DefaultRetry is the recommended retry for a conflict where multiple clients
-// are making changes to the same resource.
-var DefaultRetry = wait.Backoff{
- Steps: 5,
- Duration: 10 * time.Millisecond,
- Factor: 1.0,
- Jitter: 0.1,
-}
-
-// DefaultBackoff is the recommended backoff for a conflict where a client
-// may be attempting to make an unrelated modification to a resource under
-// active management by one or more controllers.
-var DefaultBackoff = wait.Backoff{
- Steps: 4,
- Duration: 10 * time.Millisecond,
- Factor: 5.0,
- Jitter: 0.1,
-}
-
-// RetryConflict executes the provided function repeatedly, retrying if the server returns a conflicting
-// write. Callers should preserve previous executions if they wish to retry changes. It performs an
-// exponential backoff.
-//
-// var pod *api.Pod
-// err := RetryOnConflict(DefaultBackoff, func() (err error) {
-// pod, err = c.Pods("mynamespace").UpdateStatus(podStatus)
-// return
-// })
-// if err != nil {
-// // may be conflict if max retries were hit
-// return err
-// }
-// ...
-//
-// TODO: Make Backoff an interface?
-func RetryOnConflict(backoff wait.Backoff, fn func() error) error {
- var lastConflictErr error
- err := wait.ExponentialBackoff(backoff, func() (bool, error) {
- err := fn()
- switch {
- case err == nil:
- return true, nil
- case errors.IsConflict(err):
- lastConflictErr = err
- return false, nil
- default:
- return false, err
- }
- })
- if err == wait.ErrWaitTimeout {
- err = lastConflictErr
- }
- return err
-}
diff --git a/vendor/k8s.io/kube-openapi/LICENSE b/vendor/k8s.io/kube-openapi/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/vendor/k8s.io/kube-openapi/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/vendor/k8s.io/kube-openapi/README.md b/vendor/k8s.io/kube-openapi/README.md
deleted file mode 100644
index babadde1f..000000000
--- a/vendor/k8s.io/kube-openapi/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Kube OpenAPI
-
-This repo is the home for Kubernetes OpenAPI discovery spec generation. The goal
-is to support a subset of OpenAPI features to satisfy kubernetes use-cases but
-implement that subset with little to no assumption about the structure of the
-code or routes. Thus, there should be no kubernetes specific code in this repo.
-
-
-There are two main parts:
- - A model generator that goes through .go files, find and generate model
-definitions.
- - The spec generator that is responsible for dynamically generate
-the final OpenAPI spec using web service routes or combining other
-OpenAPI/Json specs.
diff --git a/vendor/k8s.io/kube-openapi/pkg/util/proto/doc.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/doc.go
deleted file mode 100644
index 11ed8a6b7..000000000
--- a/vendor/k8s.io/kube-openapi/pkg/util/proto/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2017 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 proto is a collection of libraries for parsing and indexing the type definitions.
-// The openapi spec contains the object model definitions and extensions metadata.
-package proto
diff --git a/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go
deleted file mode 100644
index 61dbf4fc0..000000000
--- a/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
-Copyright 2017 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 proto
-
-import (
- "fmt"
- "sort"
- "strings"
-
- openapi_v2 "github.com/googleapis/gnostic/OpenAPIv2"
- yaml "gopkg.in/yaml.v2"
-)
-
-func newSchemaError(path *Path, format string, a ...interface{}) error {
- err := fmt.Sprintf(format, a...)
- if path.Len() == 0 {
- return fmt.Errorf("SchemaError: %v", err)
- }
- return fmt.Errorf("SchemaError(%v): %v", path, err)
-}
-
-// VendorExtensionToMap converts openapi VendorExtension to a map.
-func VendorExtensionToMap(e []*openapi_v2.NamedAny) map[string]interface{} {
- values := map[string]interface{}{}
-
- for _, na := range e {
- if na.GetName() == "" || na.GetValue() == nil {
- continue
- }
- if na.GetValue().GetYaml() == "" {
- continue
- }
- var value interface{}
- err := yaml.Unmarshal([]byte(na.GetValue().GetYaml()), &value)
- if err != nil {
- continue
- }
-
- values[na.GetName()] = value
- }
-
- return values
-}
-
-// Definitions is an implementation of `Models`. It looks for
-// models in an openapi Schema.
-type Definitions struct {
- models map[string]Schema
-}
-
-var _ Models = &Definitions{}
-
-// NewOpenAPIData creates a new `Models` out of the openapi document.
-func NewOpenAPIData(doc *openapi_v2.Document) (Models, error) {
- definitions := Definitions{
- models: map[string]Schema{},
- }
-
- // Save the list of all models first. This will allow us to
- // validate that we don't have any dangling reference.
- for _, namedSchema := range doc.GetDefinitions().GetAdditionalProperties() {
- definitions.models[namedSchema.GetName()] = nil
- }
-
- // Now, parse each model. We can validate that references exists.
- for _, namedSchema := range doc.GetDefinitions().GetAdditionalProperties() {
- path := NewPath(namedSchema.GetName())
- schema, err := definitions.ParseSchema(namedSchema.GetValue(), &path)
- if err != nil {
- return nil, err
- }
- definitions.models[namedSchema.GetName()] = schema
- }
-
- return &definitions, nil
-}
-
-// We believe the schema is a reference, verify that and returns a new
-// Schema
-func (d *Definitions) parseReference(s *openapi_v2.Schema, path *Path) (Schema, error) {
- if len(s.GetProperties().GetAdditionalProperties()) > 0 {
- return nil, newSchemaError(path, "unallowed embedded type definition")
- }
- if len(s.GetType().GetValue()) > 0 {
- return nil, newSchemaError(path, "definition reference can't have a type")
- }
-
- if !strings.HasPrefix(s.GetXRef(), "#/definitions/") {
- return nil, newSchemaError(path, "unallowed reference to non-definition %q", s.GetXRef())
- }
- reference := strings.TrimPrefix(s.GetXRef(), "#/definitions/")
- if _, ok := d.models[reference]; !ok {
- return nil, newSchemaError(path, "unknown model in reference: %q", reference)
- }
- return &Ref{
- BaseSchema: d.parseBaseSchema(s, path),
- reference: reference,
- definitions: d,
- }, nil
-}
-
-func (d *Definitions) parseBaseSchema(s *openapi_v2.Schema, path *Path) BaseSchema {
- return BaseSchema{
- Description: s.GetDescription(),
- Extensions: VendorExtensionToMap(s.GetVendorExtension()),
- Path: *path,
- }
-}
-
-// We believe the schema is a map, verify and return a new schema
-func (d *Definitions) parseMap(s *openapi_v2.Schema, path *Path) (Schema, error) {
- if len(s.GetType().GetValue()) != 0 && s.GetType().GetValue()[0] != object {
- return nil, newSchemaError(path, "invalid object type")
- }
- if s.GetAdditionalProperties().GetSchema() == nil {
- return nil, newSchemaError(path, "invalid object doesn't have additional properties")
- }
- sub, err := d.ParseSchema(s.GetAdditionalProperties().GetSchema(), path)
- if err != nil {
- return nil, err
- }
- return &Map{
- BaseSchema: d.parseBaseSchema(s, path),
- SubType: sub,
- }, nil
-}
-
-func (d *Definitions) parsePrimitive(s *openapi_v2.Schema, path *Path) (Schema, error) {
- var t string
- if len(s.GetType().GetValue()) > 1 {
- return nil, newSchemaError(path, "primitive can't have more than 1 type")
- }
- if len(s.GetType().GetValue()) == 1 {
- t = s.GetType().GetValue()[0]
- }
- switch t {
- case String:
- case Number:
- case Integer:
- case Boolean:
- case "": // Some models are completely empty, and can be safely ignored.
- // Do nothing
- default:
- return nil, newSchemaError(path, "Unknown primitive type: %q", t)
- }
- return &Primitive{
- BaseSchema: d.parseBaseSchema(s, path),
- Type: t,
- Format: s.GetFormat(),
- }, nil
-}
-
-func (d *Definitions) parseArray(s *openapi_v2.Schema, path *Path) (Schema, error) {
- if len(s.GetType().GetValue()) != 1 {
- return nil, newSchemaError(path, "array should have exactly one type")
- }
- if s.GetType().GetValue()[0] != array {
- return nil, newSchemaError(path, `array should have type "array"`)
- }
- if len(s.GetItems().GetSchema()) != 1 {
- return nil, newSchemaError(path, "array should have exactly one sub-item")
- }
- sub, err := d.ParseSchema(s.GetItems().GetSchema()[0], path)
- if err != nil {
- return nil, err
- }
- return &Array{
- BaseSchema: d.parseBaseSchema(s, path),
- SubType: sub,
- }, nil
-}
-
-func (d *Definitions) parseKind(s *openapi_v2.Schema, path *Path) (Schema, error) {
- if len(s.GetType().GetValue()) != 0 && s.GetType().GetValue()[0] != object {
- return nil, newSchemaError(path, "invalid object type")
- }
- if s.GetProperties() == nil {
- return nil, newSchemaError(path, "object doesn't have properties")
- }
-
- fields := map[string]Schema{}
-
- for _, namedSchema := range s.GetProperties().GetAdditionalProperties() {
- var err error
- path := path.FieldPath(namedSchema.GetName())
- fields[namedSchema.GetName()], err = d.ParseSchema(namedSchema.GetValue(), &path)
- if err != nil {
- return nil, err
- }
- }
-
- return &Kind{
- BaseSchema: d.parseBaseSchema(s, path),
- RequiredFields: s.GetRequired(),
- Fields: fields,
- }, nil
-}
-
-func (d *Definitions) parseArbitrary(s *openapi_v2.Schema, path *Path) (Schema, error) {
- return &Arbitrary{
- BaseSchema: d.parseBaseSchema(s, path),
- }, nil
-}
-
-// ParseSchema creates a walkable Schema from an openapi schema. While
-// this function is public, it doesn't leak through the interface.
-func (d *Definitions) ParseSchema(s *openapi_v2.Schema, path *Path) (Schema, error) {
- objectTypes := s.GetType().GetValue()
- if len(objectTypes) == 1 {
- t := objectTypes[0]
- switch t {
- case object:
- return d.parseMap(s, path)
- case array:
- return d.parseArray(s, path)
- }
-
- }
- if s.GetXRef() != "" {
- return d.parseReference(s, path)
- }
- if s.GetProperties() != nil {
- return d.parseKind(s, path)
- }
- if len(objectTypes) == 0 || (len(objectTypes) == 1 && objectTypes[0] == "") {
- return d.parseArbitrary(s, path)
- }
- return d.parsePrimitive(s, path)
-}
-
-// LookupModel is public through the interface of Models. It
-// returns a visitable schema from the given model name.
-func (d *Definitions) LookupModel(model string) Schema {
- return d.models[model]
-}
-
-func (d *Definitions) ListModels() []string {
- models := []string{}
-
- for model := range d.models {
- models = append(models, model)
- }
-
- sort.Strings(models)
- return models
-}
-
-type Ref struct {
- BaseSchema
-
- reference string
- definitions *Definitions
-}
-
-var _ Reference = &Ref{}
-
-func (r *Ref) Reference() string {
- return r.reference
-}
-
-func (r *Ref) SubSchema() Schema {
- return r.definitions.models[r.reference]
-}
-
-func (r *Ref) Accept(v SchemaVisitor) {
- v.VisitReference(r)
-}
-
-func (r *Ref) GetName() string {
- return fmt.Sprintf("Reference to %q", r.reference)
-}
diff --git a/vendor/k8s.io/kube-openapi/pkg/util/proto/openapi.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/openapi.go
deleted file mode 100644
index b48e62c3b..000000000
--- a/vendor/k8s.io/kube-openapi/pkg/util/proto/openapi.go
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
-Copyright 2017 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 proto
-
-import (
- "fmt"
- "sort"
- "strings"
-)
-
-// Defines openapi types.
-const (
- Integer = "integer"
- Number = "number"
- String = "string"
- Boolean = "boolean"
-
- // These types are private as they should never leak, and are
- // represented by actual structs.
- array = "array"
- object = "object"
-)
-
-// Models interface describe a model provider. They can give you the
-// schema for a specific model.
-type Models interface {
- LookupModel(string) Schema
- ListModels() []string
-}
-
-// SchemaVisitor is an interface that you need to implement if you want
-// to "visit" an openapi schema. A dispatch on the Schema type will call
-// the appropriate function based on its actual type:
-// - Array is a list of one and only one given subtype
-// - Map is a map of string to one and only one given subtype
-// - Primitive can be string, integer, number and boolean.
-// - Kind is an object with specific fields mapping to specific types.
-// - Reference is a link to another definition.
-type SchemaVisitor interface {
- VisitArray(*Array)
- VisitMap(*Map)
- VisitPrimitive(*Primitive)
- VisitKind(*Kind)
- VisitReference(Reference)
-}
-
-// SchemaVisitorArbitrary is an additional visitor interface which handles
-// arbitrary types. For backwards compatability, it's a separate interface
-// which is checked for at runtime.
-type SchemaVisitorArbitrary interface {
- SchemaVisitor
- VisitArbitrary(*Arbitrary)
-}
-
-// Schema is the base definition of an openapi type.
-type Schema interface {
- // Giving a visitor here will let you visit the actual type.
- Accept(SchemaVisitor)
-
- // Pretty print the name of the type.
- GetName() string
- // Describes how to access this field.
- GetPath() *Path
- // Describes the field.
- GetDescription() string
- // Returns type extensions.
- GetExtensions() map[string]interface{}
-}
-
-// Path helps us keep track of type paths
-type Path struct {
- parent *Path
- key string
-}
-
-func NewPath(key string) Path {
- return Path{key: key}
-}
-
-func (p *Path) Get() []string {
- if p == nil {
- return []string{}
- }
- if p.key == "" {
- return p.parent.Get()
- }
- return append(p.parent.Get(), p.key)
-}
-
-func (p *Path) Len() int {
- return len(p.Get())
-}
-
-func (p *Path) String() string {
- return strings.Join(p.Get(), "")
-}
-
-// ArrayPath appends an array index and creates a new path
-func (p *Path) ArrayPath(i int) Path {
- return Path{
- parent: p,
- key: fmt.Sprintf("[%d]", i),
- }
-}
-
-// FieldPath appends a field name and creates a new path
-func (p *Path) FieldPath(field string) Path {
- return Path{
- parent: p,
- key: fmt.Sprintf(".%s", field),
- }
-}
-
-// BaseSchema holds data used by each types of schema.
-type BaseSchema struct {
- Description string
- Extensions map[string]interface{}
-
- Path Path
-}
-
-func (b *BaseSchema) GetDescription() string {
- return b.Description
-}
-
-func (b *BaseSchema) GetExtensions() map[string]interface{} {
- return b.Extensions
-}
-
-func (b *BaseSchema) GetPath() *Path {
- return &b.Path
-}
-
-// Array must have all its element of the same `SubType`.
-type Array struct {
- BaseSchema
-
- SubType Schema
-}
-
-var _ Schema = &Array{}
-
-func (a *Array) Accept(v SchemaVisitor) {
- v.VisitArray(a)
-}
-
-func (a *Array) GetName() string {
- return fmt.Sprintf("Array of %s", a.SubType.GetName())
-}
-
-// Kind is a complex object. It can have multiple different
-// subtypes for each field, as defined in the `Fields` field. Mandatory
-// fields are listed in `RequiredFields`. The key of the object is
-// always of type `string`.
-type Kind struct {
- BaseSchema
-
- // Lists names of required fields.
- RequiredFields []string
- // Maps field names to types.
- Fields map[string]Schema
-}
-
-var _ Schema = &Kind{}
-
-func (k *Kind) Accept(v SchemaVisitor) {
- v.VisitKind(k)
-}
-
-func (k *Kind) GetName() string {
- properties := []string{}
- for key := range k.Fields {
- properties = append(properties, key)
- }
- return fmt.Sprintf("Kind(%v)", properties)
-}
-
-// IsRequired returns true if `field` is a required field for this type.
-func (k *Kind) IsRequired(field string) bool {
- for _, f := range k.RequiredFields {
- if f == field {
- return true
- }
- }
- return false
-}
-
-// Keys returns a alphabetically sorted list of keys.
-func (k *Kind) Keys() []string {
- keys := make([]string, 0)
- for key := range k.Fields {
- keys = append(keys, key)
- }
- sort.Strings(keys)
- return keys
-}
-
-// Map is an object who values must all be of the same `SubType`.
-// The key of the object is always of type `string`.
-type Map struct {
- BaseSchema
-
- SubType Schema
-}
-
-var _ Schema = &Map{}
-
-func (m *Map) Accept(v SchemaVisitor) {
- v.VisitMap(m)
-}
-
-func (m *Map) GetName() string {
- return fmt.Sprintf("Map of %s", m.SubType.GetName())
-}
-
-// Primitive is a literal. There can be multiple types of primitives,
-// and this subtype can be visited through the `subType` field.
-type Primitive struct {
- BaseSchema
-
- // Type of a primitive must be one of: integer, number, string, boolean.
- Type string
- Format string
-}
-
-var _ Schema = &Primitive{}
-
-func (p *Primitive) Accept(v SchemaVisitor) {
- v.VisitPrimitive(p)
-}
-
-func (p *Primitive) GetName() string {
- if p.Format == "" {
- return p.Type
- }
- return fmt.Sprintf("%s (%s)", p.Type, p.Format)
-}
-
-// Arbitrary is a value of any type (primitive, object or array)
-type Arbitrary struct {
- BaseSchema
-}
-
-var _ Schema = &Arbitrary{}
-
-func (a *Arbitrary) Accept(v SchemaVisitor) {
- if visitor, ok := v.(SchemaVisitorArbitrary); ok {
- visitor.VisitArbitrary(a)
- }
-}
-
-func (a *Arbitrary) GetName() string {
- return "Arbitrary value (primitive, object or array)"
-}
-
-// Reference implementation depends on the type of document.
-type Reference interface {
- Schema
-
- Reference() string
- SubSchema() Schema
-}
diff --git a/vendor/k8s.io/utils/LICENSE b/vendor/k8s.io/utils/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/vendor/k8s.io/utils/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/vendor/k8s.io/utils/README.md b/vendor/k8s.io/utils/README.md
deleted file mode 100644
index 3765eed26..000000000
--- a/vendor/k8s.io/utils/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# Utils
-
-[![Build Status]](https://travis-ci.org/kubernetes/utils) [![GoDoc](https://godoc.org/k8s.io/utils?status.svg)](https://godoc.org/k8s.io/utils)
-
-A set of Go libraries that provide low-level,
-kubernetes-independent packages supplementing the [Go
-standard libs].
-
-## Purpose
-
-As Kubernetes grows and spins functionality out of its
-[core] and into cooperating repositories like
-[apiserver], [kubectl], [kubeadm], etc., the need
-arises for leaf repositories to house shared code and
-avoid cycles in repository relationships.
-
-This repository is intended to hold shared utilities
-with no Kubernetes dependence that may be of interest
-to any Go project. See these [instructions for moving]
-an existing package to this repository.
-
-
-## Criteria for adding code here
-
-- Used by multiple Kubernetes repositories.
-
-- Full unit test coverage.
-
-- Go tools compliant (`go get`, `go test`, etc.).
-
-- Complex enough to be worth vendoring, rather than copying.
-
-- Stable, or backward compatible, API.
-
-- _No dependence on any Kubernetes repository_.
-
-## Libraries
-
-- [Exec](/exec) provides an interface for `os/exec`. It makes it easier
- to mock and replace in tests, especially with
- the [FakeExec](exec/testing/fake_exec.go) struct.
-
-- [Temp](/temp) provides an interface to create temporary directories. It also
- provides a [FakeDir](temp/temptest) implementation to replace in tests.
-
-- [Clock](/clock) provides an interface for time-based operations. It allows
- mocking time for testing.
-
-[Build Status]: https://travis-ci.org/kubernetes/utils.svg?branch=master
-[Go standard libs]: https://golang.org/pkg/#stdlib
-[api]: https://github.com/kubernetes/api
-[apiserver]: https://github.com/kubernetes/apiserver
-[core]: https://github.com/kubernetes/kubernetes
-[ingress]: https://github.com/kubernetes/ingress
-[kubeadm]: https://github.com/kubernetes/kubeadm
-[kubectl]: https://github.com/kubernetes/kubectl
-[instructions for moving]: ./HOWTOMOVE.md
diff --git a/vendor/k8s.io/utils/exec/doc.go b/vendor/k8s.io/utils/exec/doc.go
deleted file mode 100644
index cbb44bdb5..000000000
--- a/vendor/k8s.io/utils/exec/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2017 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 exec provides an injectable interface and implementations for running commands.
-package exec // import "k8s.io/utils/exec"
diff --git a/vendor/k8s.io/utils/exec/exec.go b/vendor/k8s.io/utils/exec/exec.go
deleted file mode 100644
index 07735d881..000000000
--- a/vendor/k8s.io/utils/exec/exec.go
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
-Copyright 2017 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 exec
-
-import (
- "context"
- "io"
- osexec "os/exec"
- "syscall"
- "time"
-)
-
-// ErrExecutableNotFound is returned if the executable is not found.
-var ErrExecutableNotFound = osexec.ErrNotFound
-
-// Interface is an interface that presents a subset of the os/exec API. Use this
-// when you want to inject fakeable/mockable exec behavior.
-type Interface interface {
- // Command returns a Cmd instance which can be used to run a single command.
- // This follows the pattern of package os/exec.
- Command(cmd string, args ...string) Cmd
-
- // CommandContext returns a Cmd instance which can be used to run a single command.
- //
- // The provided context is used to kill the process if the context becomes done
- // before the command completes on its own. For example, a timeout can be set in
- // the context.
- CommandContext(ctx context.Context, cmd string, args ...string) Cmd
-
- // LookPath wraps os/exec.LookPath
- LookPath(file string) (string, error)
-}
-
-// Cmd is an interface that presents an API that is very similar to Cmd from os/exec.
-// As more functionality is needed, this can grow. Since Cmd is a struct, we will have
-// to replace fields with get/set method pairs.
-type Cmd interface {
- // Run runs the command to the completion.
- Run() error
- // CombinedOutput runs the command and returns its combined standard output
- // and standard error. This follows the pattern of package os/exec.
- CombinedOutput() ([]byte, error)
- // Output runs the command and returns standard output, but not standard err
- Output() ([]byte, error)
- SetDir(dir string)
- SetStdin(in io.Reader)
- SetStdout(out io.Writer)
- SetStderr(out io.Writer)
- // Stops the command by sending SIGTERM. It is not guaranteed the
- // process will stop before this function returns. If the process is not
- // responding, an internal timer function will send a SIGKILL to force
- // terminate after 10 seconds.
- Stop()
-}
-
-// ExitError is an interface that presents an API similar to os.ProcessState, which is
-// what ExitError from os/exec is. This is designed to make testing a bit easier and
-// probably loses some of the cross-platform properties of the underlying library.
-type ExitError interface {
- String() string
- Error() string
- Exited() bool
- ExitStatus() int
-}
-
-// Implements Interface in terms of really exec()ing.
-type executor struct{}
-
-// New returns a new Interface which will os/exec to run commands.
-func New() Interface {
- return &executor{}
-}
-
-// Command is part of the Interface interface.
-func (executor *executor) Command(cmd string, args ...string) Cmd {
- return (*cmdWrapper)(osexec.Command(cmd, args...))
-}
-
-// CommandContext is part of the Interface interface.
-func (executor *executor) CommandContext(ctx context.Context, cmd string, args ...string) Cmd {
- return (*cmdWrapper)(osexec.CommandContext(ctx, cmd, args...))
-}
-
-// LookPath is part of the Interface interface
-func (executor *executor) LookPath(file string) (string, error) {
- return osexec.LookPath(file)
-}
-
-// Wraps exec.Cmd so we can capture errors.
-type cmdWrapper osexec.Cmd
-
-var _ Cmd = &cmdWrapper{}
-
-func (cmd *cmdWrapper) SetDir(dir string) {
- cmd.Dir = dir
-}
-
-func (cmd *cmdWrapper) SetStdin(in io.Reader) {
- cmd.Stdin = in
-}
-
-func (cmd *cmdWrapper) SetStdout(out io.Writer) {
- cmd.Stdout = out
-}
-
-func (cmd *cmdWrapper) SetStderr(out io.Writer) {
- cmd.Stderr = out
-}
-
-// Run is part of the Cmd interface.
-func (cmd *cmdWrapper) Run() error {
- err := (*osexec.Cmd)(cmd).Run()
- return handleError(err)
-}
-
-// CombinedOutput is part of the Cmd interface.
-func (cmd *cmdWrapper) CombinedOutput() ([]byte, error) {
- out, err := (*osexec.Cmd)(cmd).CombinedOutput()
- return out, handleError(err)
-}
-
-func (cmd *cmdWrapper) Output() ([]byte, error) {
- out, err := (*osexec.Cmd)(cmd).Output()
- return out, handleError(err)
-}
-
-// Stop is part of the Cmd interface.
-func (cmd *cmdWrapper) Stop() {
- c := (*osexec.Cmd)(cmd)
-
- if c.Process == nil {
- return
- }
-
- c.Process.Signal(syscall.SIGTERM)
-
- time.AfterFunc(10*time.Second, func() {
- if !c.ProcessState.Exited() {
- c.Process.Signal(syscall.SIGKILL)
- }
- })
-}
-
-func handleError(err error) error {
- if err == nil {
- return nil
- }
-
- switch e := err.(type) {
- case *osexec.ExitError:
- return &ExitErrorWrapper{e}
- case *osexec.Error:
- if e.Err == osexec.ErrNotFound {
- return ErrExecutableNotFound
- }
- }
-
- return err
-}
-
-// ExitErrorWrapper is an implementation of ExitError in terms of os/exec ExitError.
-// Note: standard exec.ExitError is type *os.ProcessState, which already implements Exited().
-type ExitErrorWrapper struct {
- *osexec.ExitError
-}
-
-var _ ExitError = &ExitErrorWrapper{}
-
-// ExitStatus is part of the ExitError interface.
-func (eew ExitErrorWrapper) ExitStatus() int {
- ws, ok := eew.Sys().(syscall.WaitStatus)
- if !ok {
- panic("can't call ExitStatus() on a non-WaitStatus exitErrorWrapper")
- }
- return ws.ExitStatus()
-}
-
-// CodeExitError is an implementation of ExitError consisting of an error object
-// and an exit code (the upper bits of os.exec.ExitStatus).
-type CodeExitError struct {
- Err error
- Code int
-}
-
-var _ ExitError = CodeExitError{}
-
-func (e CodeExitError) Error() string {
- return e.Err.Error()
-}
-
-func (e CodeExitError) String() string {
- return e.Err.Error()
-}
-
-func (e CodeExitError) Exited() bool {
- return true
-}
-
-func (e CodeExitError) ExitStatus() int {
- return e.Code
-}